]>
Commit | Line | Data |
---|---|---|
91e44d91 S |
1 | <!DOCTYPE html> |
2 | <html> | |
3 | <head> | |
4 | <meta charset="utf-8"> | |
5 | <title>Bootstrap Plugin Test Suite</title> | |
6 | <meta name="viewport" content="width=device-width, initial-scale=1"> | |
7 | ||
8 | <!-- jQuery --> | |
9 | <script src="../../docs/assets/js/vendor/jquery-slim.min.js"></script> | |
10 | <script src="../../docs/assets/js/vendor/tether.min.js"></script> | |
11 | <script> | |
12 | // Disable jQuery event aliases to ensure we don't accidentally use any of them | |
13 | (function () { | |
14 | var eventAliases = [ | |
15 | 'blur', | |
16 | 'focus', | |
17 | 'focusin', | |
18 | 'focusout', | |
19 | 'load', | |
20 | 'resize', | |
21 | 'scroll', | |
22 | 'unload', | |
23 | 'click', | |
24 | 'dblclick', | |
25 | 'mousedown', | |
26 | 'mouseup', | |
27 | 'mousemove', | |
28 | 'mouseover', | |
29 | 'mouseout', | |
30 | 'mouseenter', | |
31 | 'mouseleave', | |
32 | 'change', | |
33 | 'select', | |
34 | 'submit', | |
35 | 'keydown', | |
36 | 'keypress', | |
37 | 'keyup', | |
38 | 'error', | |
39 | 'contextmenu', | |
40 | 'hover', | |
41 | 'bind', | |
42 | 'unbind', | |
43 | 'delegate', | |
44 | 'undelegate' | |
45 | ] | |
46 | for (var i = 0; i < eventAliases.length; i++) { | |
47 | var eventAlias = eventAliases[i] | |
48 | $.fn[eventAlias] = function () { | |
49 | throw new Error('Using the ".' + eventAlias + '()" method is not allowed, so that Bootstrap can be compatible with custom jQuery builds which exclude the "event aliases" module that defines said method. See https://github.com/twbs/bootstrap/blob/master/CONTRIBUTING.md#js') | |
50 | } | |
51 | } | |
52 | })() | |
53 | </script> | |
54 | ||
55 | <!-- QUnit --> | |
56 | <link rel="stylesheet" href="vendor/qunit.css" media="screen"> | |
57 | <script src="vendor/qunit.js"></script> | |
58 | <script> | |
59 | // See https://github.com/axemclion/grunt-saucelabs#test-result-details-with-qunit | |
60 | var log = [] | |
61 | // Require assert.expect in each test | |
62 | QUnit.config.requireExpects = true | |
63 | QUnit.done(function (testResults) { | |
64 | var tests = [] | |
65 | for (var i = 0, len = log.length; i < len; i++) { | |
66 | var details = log[i] | |
67 | tests.push({ | |
68 | name: details.name, | |
69 | result: details.result, | |
70 | expected: details.expected, | |
71 | actual: details.actual, | |
72 | source: details.source | |
73 | }) | |
74 | } | |
75 | testResults.tests = tests | |
76 | ||
77 | window.global_test_results = testResults | |
78 | }) | |
79 | ||
80 | QUnit.testStart(function (testDetails) { | |
81 | $(window).scrollTop(0) | |
82 | QUnit.log(function (details) { | |
83 | if (!details.result) { | |
84 | details.name = testDetails.name | |
85 | log.push(details) | |
86 | } | |
87 | }) | |
88 | }) | |
89 | ||
90 | // Cleanup | |
91 | QUnit.testDone(function () { | |
92 | $('#qunit-fixture').empty() | |
93 | $('#modal-test, .modal-backdrop').remove() | |
94 | }) | |
95 | ||
96 | // Display fixture on-screen on iOS to avoid false positives | |
97 | if (/iPhone|iPad|iPod/.test(navigator.userAgent)) { | |
98 | QUnit.begin(function() { | |
99 | $('#qunit-fixture').css({ top: 0, left: 0 }) | |
100 | }) | |
101 | ||
102 | QUnit.done(function () { | |
103 | $('#qunit-fixture').css({ top: '', left: '' }) | |
104 | }) | |
105 | } | |
106 | ||
107 | // Disable deprecated global QUnit method aliases in preparation for QUnit v2 | |
108 | (function () { | |
109 | var methodNames = [ | |
110 | 'async', | |
111 | 'asyncTest', | |
112 | 'deepEqual', | |
113 | 'equal', | |
114 | 'expect', | |
115 | 'module', | |
116 | 'notDeepEqual', | |
117 | 'notEqual', | |
118 | 'notPropEqual', | |
119 | 'notStrictEqual', | |
120 | 'ok', | |
121 | 'propEqual', | |
122 | 'push', | |
123 | 'start', | |
124 | 'stop', | |
125 | 'strictEqual', | |
126 | 'test', | |
127 | 'throws' | |
128 | ]; | |
129 | for (var i = 0; i < methodNames.length; i++) { | |
130 | var methodName = methodNames[i]; | |
131 | window[methodName] = undefined; | |
132 | } | |
133 | })(); | |
134 | </script> | |
135 | ||
136 | <!-- es6 Plugin sources --> | |
137 | <script src="../../js/dist/util.js"></script> | |
138 | <script src="../../js/dist/alert.js"></script> | |
139 | <script src="../../js/dist/button.js"></script> | |
140 | <script src="../../js/dist/carousel.js"></script> | |
141 | <script src="../../js/dist/collapse.js"></script> | |
142 | <script src="../../js/dist/dropdown.js"></script> | |
143 | <script src="../../js/dist/modal.js"></script> | |
144 | <script src="../../js/dist/scrollspy.js"></script> | |
145 | <script src="../../js/dist/tab.js"></script> | |
146 | <script src="../../js/dist/tooltip.js"></script> | |
147 | <script src="../../js/dist/popover.js"></script> | |
148 | ||
149 | <!-- Unit tests --> | |
150 | <script src="unit/alert.js"></script> | |
151 | <script src="unit/button.js"></script> | |
152 | <script src="unit/carousel.js"></script> | |
153 | <script src="unit/collapse.js"></script> | |
154 | <script src="unit/dropdown.js"></script> | |
155 | <script src="unit/modal.js"></script> | |
156 | <script src="unit/scrollspy.js"></script> | |
157 | <script src="unit/tab.js"></script> | |
158 | <script src="unit/tooltip.js"></script> | |
159 | <script src="unit/popover.js"></script> | |
160 | ||
161 | </head> | |
162 | <body> | |
163 | <div id="qunit-container"> | |
164 | <div id="qunit"></div> | |
165 | <div id="qunit-fixture"></div> | |
166 | </div> | |
167 | </body> | |
168 | </html> |