5 <title>Bootstrap Plugin Test Suite
</title>
6 <meta name=
"viewport" content=
"width=device-width, initial-scale=1">
9 <script src=
"../../docs/assets/js/vendor/jquery-slim.min.js"></script>
10 <script src=
"../../docs/assets/js/vendor/tether.min.js"></script>
12 // Disable jQuery event aliases to ensure we don't accidentally use any of them
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')
56 <link rel=
"stylesheet" href=
"vendor/qunit.css" media=
"screen">
57 <script src=
"vendor/qunit.js"></script>
59 // See https://github.com/axemclion/grunt-saucelabs#test-result-details-with-qunit
61 // Require assert.expect in each test
62 QUnit.config.requireExpects = true
63 QUnit.done(function (testResults) {
65 for (var i =
0, len = log.length; i < len; i++) {
69 result: details.result,
70 expected: details.expected,
71 actual: details.actual,
72 source: details.source
75 testResults.tests = tests
77 window.global_test_results = testResults
80 QUnit.testStart(function (testDetails) {
81 $(window).scrollTop(
0)
82 QUnit.log(function (details) {
83 if (!details.result) {
84 details.name = testDetails.name
91 QUnit.testDone(function () {
92 $('#qunit-fixture').empty()
93 $('#modal-test, .modal-backdrop').remove()
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 })
102 QUnit.done(function () {
103 $('#qunit-fixture').css({ top: '', left: '' })
107 // Disable deprecated global QUnit method aliases in preparation for QUnit v2
129 for (var i =
0; i < methodNames.length; i++) {
130 var methodName = methodNames[i];
131 window[methodName] = undefined;
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>
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>
163 <div id=
"qunit-container">
164 <div id=
"qunit"></div>
165 <div id=
"qunit-fixture"></div>