diff options
| author | Mark Otto <[email protected]> | 2014-11-09 22:02:53 -0800 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2014-11-09 22:02:53 -0800 |
| commit | 86af1f39abbff7ef06b94d23951408ca27f81cdc (patch) | |
| tree | fdd71d469877a0fdfcaa8ab3d6994463240c40c4 /js/tests | |
| parent | 9796f56fa175c41582793a87a1c7eab0f8db1209 (diff) | |
| parent | d1278efcc5a6b45467caca15206bb1a83ae99fc5 (diff) | |
| download | bootstrap-86af1f39abbff7ef06b94d23951408ca27f81cdc.tar.xz bootstrap-86af1f39abbff7ef06b94d23951408ca27f81cdc.zip | |
Merge branch 'master' into derp
Conflicts:
Gruntfile.js
_config.yml
dist/css/bootstrap-theme.css
dist/css/bootstrap-theme.css.map
dist/css/bootstrap-theme.min.css
dist/css/bootstrap.css
dist/css/bootstrap.css.map
dist/css/bootstrap.min.css
docs/_includes/components/button-groups.html
docs/_includes/components/jumbotron.html
docs/_includes/components/media.html
docs/_includes/components/navs.html
docs/_includes/customizer-variables.html
docs/_includes/footer.html
docs/_includes/getting-started/browser-device-support.html
docs/_includes/js/carousel.html
docs/_includes/js/dropdowns.html
docs/_includes/js/modal.html
docs/_includes/js/popovers.html
docs/_includes/js/tooltips.html
docs/_includes/nav/getting-started.html
docs/_includes/nav/javascript.html
docs/_layouts/default.html
docs/assets/css/docs.min.css
docs/assets/css/src/docs.css
docs/assets/js/customize.min.js
docs/assets/js/docs.min.js
docs/assets/js/raw-files.min.js
docs/browser-bugs.html
docs/dist/css/bootstrap-theme.css
docs/dist/css/bootstrap-theme.css.map
docs/dist/css/bootstrap-theme.min.css
docs/dist/css/bootstrap.css
docs/dist/css/bootstrap.css.map
docs/dist/css/bootstrap.min.css
docs/examples/justified-nav/index.html
less/_forms.less
less/_tooltip.less
less/navs.less
less/theme.less
Diffstat (limited to 'js/tests')
| -rw-r--r-- | js/tests/index.html | 9 | ||||
| -rw-r--r-- | js/tests/unit/button.js | 10 | ||||
| -rw-r--r-- | js/tests/unit/carousel.js | 42 | ||||
| -rw-r--r-- | js/tests/unit/collapse.js | 72 | ||||
| -rw-r--r-- | js/tests/unit/tooltip.js | 62 | ||||
| -rw-r--r-- | js/tests/visual/affix.html | 12 | ||||
| -rw-r--r-- | js/tests/visual/alert.html | 12 | ||||
| -rw-r--r-- | js/tests/visual/button.html | 12 | ||||
| -rw-r--r-- | js/tests/visual/carousel.html | 12 | ||||
| -rw-r--r-- | js/tests/visual/collapse.html | 12 | ||||
| -rw-r--r-- | js/tests/visual/dropdown.html | 12 | ||||
| -rw-r--r-- | js/tests/visual/modal.html | 12 | ||||
| -rw-r--r-- | js/tests/visual/popover.html | 12 | ||||
| -rw-r--r-- | js/tests/visual/scrollspy.html | 15 | ||||
| -rw-r--r-- | js/tests/visual/tab.html | 16 | ||||
| -rw-r--r-- | js/tests/visual/tooltip.html | 12 |
16 files changed, 262 insertions, 72 deletions
diff --git a/js/tests/index.html b/js/tests/index.html index 194f531aa..b32f0adc2 100644 --- a/js/tests/index.html +++ b/js/tests/index.html @@ -3,6 +3,7 @@ <head> <meta charset="utf-8"> <title>Bootstrap Plugin Test Suite</title> + <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- jQuery --> <script src="vendor/jquery.min.js"></script> @@ -12,7 +13,12 @@ <script src="vendor/qunit.js"></script> <style> #qunit-tests > li.pass { - display: none;/* Make it easier to see failing tests is Sauce screencasts */ + display: none;/* Make it easier to see failing tests in Sauce screencasts */ + } + + #qunit-fixture { + top: 0; + left: 0; } </style> <script> @@ -36,6 +42,7 @@ }) QUnit.testStart(function (testDetails) { + $(window).scrollTop(0) QUnit.log = function (details) { if (!details.result) { details.name = testDetails.name diff --git a/js/tests/unit/button.js b/js/tests/unit/button.js index 73747cdd4..320996483 100644 --- a/js/tests/unit/button.js +++ b/js/tests/unit/button.js @@ -33,9 +33,9 @@ $(function () { var $btn = $('<button class="btn" data-loading-text="fat">mdo</button>') equal($btn.html(), 'mdo', 'btn text equals mdo') $btn.bootstrapButton('loading') - equal($btn.html(), 'fat', 'btn text equals fat') stop() setTimeout(function () { + equal($btn.html(), 'fat', 'btn text equals fat') ok($btn[0].hasAttribute('disabled'), 'btn is disabled') ok($btn.hasClass('disabled'), 'btn has disabled class') start() @@ -46,16 +46,16 @@ $(function () { var $btn = $('<button class="btn" data-loading-text="fat">mdo</button>') equal($btn.html(), 'mdo', 'btn text equals mdo') $btn.bootstrapButton('loading') - equal($btn.html(), 'fat', 'btn text equals fat') stop() setTimeout(function () { + equal($btn.html(), 'fat', 'btn text equals fat') ok($btn[0].hasAttribute('disabled'), 'btn is disabled') ok($btn.hasClass('disabled'), 'btn has disabled class') start() stop() $btn.bootstrapButton('reset') - equal($btn.html(), 'mdo', 'btn text equals mdo') setTimeout(function () { + equal($btn.html(), 'mdo', 'btn text equals mdo') ok(!$btn[0].hasAttribute('disabled'), 'btn is not disabled') ok(!$btn.hasClass('disabled'), 'btn does not have disabled class') start() @@ -67,16 +67,16 @@ $(function () { var $btn = $('<button class="btn" data-loading-text="fat"/>') equal($btn.html(), '', 'btn text equals ""') $btn.bootstrapButton('loading') - equal($btn.html(), 'fat', 'btn text equals fat') stop() setTimeout(function () { + equal($btn.html(), 'fat', 'btn text equals fat') ok($btn[0].hasAttribute('disabled'), 'btn is disabled') ok($btn.hasClass('disabled'), 'btn has disabled class') start() stop() $btn.bootstrapButton('reset') - equal($btn.html(), '', 'btn text equals ""') setTimeout(function () { + equal($btn.html(), '', 'btn text equals ""') ok(!$btn[0].hasAttribute('disabled'), 'btn is not disabled') ok(!$btn.hasClass('disabled'), 'btn does not have disabled class') start() diff --git a/js/tests/unit/carousel.js b/js/tests/unit/carousel.js index 6f0b9642f..5998abe6a 100644 --- a/js/tests/unit/carousel.js +++ b/js/tests/unit/carousel.js @@ -478,6 +478,48 @@ $(function () { strictEqual($template.find('.item')[0], $template.find('.active')[0], 'first item still active after left arrow press') }) + test('should ignore keyboard events within <input>s and <textarea>s', function () { + var templateHTML = '<div id="myCarousel" class="carousel" data-interval="false">' + + '<div class="carousel-inner">' + + '<div id="first" class="item active">' + + '<img alt="">' + + '<input type="text" id="in-put">' + + '<textarea id="text-area"></textarea>' + + '</div>' + + '<div id="second" class="item">' + + '<img alt="">' + + '</div>' + + '<div id="third" class="item">' + + '<img alt="">' + + '</div>' + + '</div>' + + '</div>' + var $template = $(templateHTML) + var $input = $template.find('#in-put') + var $textarea = $template.find('#text-area') + + strictEqual($input.length, 1, 'found <input>') + strictEqual($textarea.length, 1, 'found <textarea>') + + $template.bootstrapCarousel() + + strictEqual($template.find('.item')[0], $template.find('.active')[0], 'first item active') + + + $input.trigger($.Event('keydown', { which: 39 })) + strictEqual($template.find('.item')[0], $template.find('.active')[0], 'first item still active after right arrow press in <input>') + + $input.trigger($.Event('keydown', { which: 37 })) + strictEqual($template.find('.item')[0], $template.find('.active')[0], 'first item still active after left arrow press in <input>') + + + $textarea.trigger($.Event('keydown', { which: 39 })) + strictEqual($template.find('.item')[0], $template.find('.active')[0], 'first item still active after right arrow press in <textarea>') + + $textarea.trigger($.Event('keydown', { which: 37 })) + strictEqual($template.find('.item')[0], $template.find('.active')[0], 'first item still active after left arrow press in <textarea>') + }) + test('should only add mouseenter and mouseleave listeners when not on mobile', function () { var isMobile = 'ontouchstart' in document.documentElement var templateHTML = '<div id="myCarousel" class="carousel" data-interval="false" data-pause="hover">' diff --git a/js/tests/unit/collapse.js b/js/tests/unit/collapse.js index c1d78575c..30d00e413 100644 --- a/js/tests/unit/collapse.js +++ b/js/tests/unit/collapse.js @@ -79,7 +79,7 @@ $(function () { $('<div id="test1"/>') .appendTo('#qunit-fixture') - .on('show.bs.collapse', function () { + .on('shown.bs.collapse', function () { ok(!$target.hasClass('collapsed')) start() }) @@ -94,7 +94,7 @@ $(function () { $('<div id="test1" class="in"/>') .appendTo('#qunit-fixture') - .on('hide.bs.collapse', function () { + .on('hidden.bs.collapse', function () { ok($target.hasClass('collapsed')) start() }) @@ -137,12 +137,12 @@ $(function () { test('should remove "collapsed" class from active accordion target', function () { stop() - var accordionHTML = '<div id="accordion">' - + '<div class="accordion-group"/>' - + '<div class="accordion-group"/>' - + '<div class="accordion-group"/>' + var accordionHTML = '<div class="panel-group" id="accordion">' + + '<div class="panel"/>' + + '<div class="panel"/>' + + '<div class="panel"/>' + '</div>' - var $groups = $(accordionHTML).appendTo('#qunit-fixture').find('.accordion-group') + var $groups = $(accordionHTML).appendTo('#qunit-fixture').find('.panel') var $target1 = $('<a data-toggle="collapse" href="#body1" data-parent="#accordion"/>').appendTo($groups.eq(0)) @@ -156,7 +156,7 @@ $(function () { $('<div id="body3"/>') .appendTo($groups.eq(2)) - .on('show.bs.collapse', function () { + .on('shown.bs.collapse', function () { ok($target1.hasClass('collapsed'), 'inactive target 1 does have class "collapsed"') ok($target2.hasClass('collapsed'), 'inactive target 2 does have class "collapsed"') ok(!$target3.hasClass('collapsed'), 'active target 3 does not have class "collapsed"') @@ -170,12 +170,12 @@ $(function () { test('should allow dots in data-parent', function () { stop() - var accordionHTML = '<div class="accordion">' - + '<div class="accordion-group"/>' - + '<div class="accordion-group"/>' - + '<div class="accordion-group"/>' + var accordionHTML = '<div class="panel-group accordion">' + + '<div class="panel"/>' + + '<div class="panel"/>' + + '<div class="panel"/>' + '</div>' - var $groups = $(accordionHTML).appendTo('#qunit-fixture').find('.accordion-group') + var $groups = $(accordionHTML).appendTo('#qunit-fixture').find('.panel') var $target1 = $('<a data-toggle="collapse" href="#body1" data-parent=".accordion"/>').appendTo($groups.eq(0)) @@ -189,7 +189,7 @@ $(function () { $('<div id="body3"/>') .appendTo($groups.eq(2)) - .on('show.bs.collapse', function () { + .on('shown.bs.collapse', function () { ok($target1.hasClass('collapsed'), 'inactive target 1 does have class "collapsed"') ok($target2.hasClass('collapsed'), 'inactive target 2 does have class "collapsed"') ok(!$target3.hasClass('collapsed'), 'active target 3 does not have class "collapsed"') @@ -207,7 +207,7 @@ $(function () { $('<div id="test1"/>') .appendTo('#qunit-fixture') - .on('show.bs.collapse', function () { + .on('shown.bs.collapse', function () { equal($target.attr('aria-expanded'), 'true', 'aria-expanded on target is "true"') start() }) @@ -222,7 +222,7 @@ $(function () { $('<div id="test1" class="in"/>') .appendTo('#qunit-fixture') - .on('hide.bs.collapse', function () { + .on('hidden.bs.collapse', function () { equal($target.attr('aria-expanded'), 'false', 'aria-expanded on target is "false"') start() }) @@ -233,12 +233,12 @@ $(function () { test('should change aria-expanded from active accordion target to "false" and set the newly active one to "true"', function () { stop() - var accordionHTML = '<div id="accordion">' - + '<div class="accordion-group"/>' - + '<div class="accordion-group"/>' - + '<div class="accordion-group"/>' + var accordionHTML = '<div class="panel-group" id="accordion">' + + '<div class="panel"/>' + + '<div class="panel"/>' + + '<div class="panel"/>' + '</div>' - var $groups = $(accordionHTML).appendTo('#qunit-fixture').find('.accordion-group') + var $groups = $(accordionHTML).appendTo('#qunit-fixture').find('.panel') var $target1 = $('<a data-toggle="collapse" href="#body1" data-parent="#accordion"/>').appendTo($groups.eq(0)) @@ -252,7 +252,7 @@ $(function () { $('<div id="body3" aria-expanded="false"/>') .appendTo($groups.eq(2)) - .on('show.bs.collapse', function () { + .on('shown.bs.collapse', function () { equal($target1.attr('aria-expanded'), 'false', 'inactive target 1 has aria-expanded="false"') equal($target2.attr('aria-expanded'), 'false', 'inactive target 2 has aria-expanded="false"') equal($target3.attr('aria-expanded'), 'true', 'active target 3 has aria-expanded="false"') @@ -298,4 +298,32 @@ $(function () { }, 1) }) + test('should add "collapsed" class to target when collapse is hidden via manual invocation', function () { + stop() + + var $target = $('<a data-toggle="collapse" href="#test1"/>').appendTo('#qunit-fixture') + + $('<div id="test1" class="in"/>') + .appendTo('#qunit-fixture') + .on('hidden.bs.collapse', function () { + ok($target.hasClass('collapsed')) + start() + }) + .bootstrapCollapse('hide') + }) + + test('should remove "collapsed" class from target when collapse is shown via manual invocation', function () { + stop() + + var $target = $('<a data-toggle="collapse" class="collapsed" href="#test1"/>').appendTo('#qunit-fixture') + + $('<div id="test1"/>') + .appendTo('#qunit-fixture') + .on('shown.bs.collapse', function () { + ok(!$target.hasClass('collapsed')) + start() + }) + .bootstrapCollapse('show') + }) + }) diff --git a/js/tests/unit/tooltip.js b/js/tests/unit/tooltip.js index 351dd61cb..4fbd91dc3 100644 --- a/js/tests/unit/tooltip.js +++ b/js/tests/unit/tooltip.js @@ -803,16 +803,16 @@ $(function () { var $tooltip = $('<a href="#" rel="tooltip" title="Another tooltip"/>') .appendTo('#qunit-fixture') - .bootstrapTooltip({ delay: 15 }) + .bootstrapTooltip({ delay: 150 }) setTimeout(function () { - ok(!$('.tooltip').is('.fade.in'), '10ms: tooltip is not faded in') - }, 10) + ok(!$('.tooltip').is('.fade.in'), '100ms: tooltip is not faded in') + }, 100) setTimeout(function () { - ok($('.tooltip').is('.fade.in'), '20ms: tooltip is faded in') + ok($('.tooltip').is('.fade.in'), '200ms: tooltip is faded in') start() - }, 20) + }, 200) $tooltip.trigger('mouseenter') }) @@ -822,17 +822,17 @@ $(function () { var $tooltip = $('<a href="#" rel="tooltip" title="Another tooltip"/>') .appendTo('#qunit-fixture') - .bootstrapTooltip({ delay: 15 }) + .bootstrapTooltip({ delay: 150 }) setTimeout(function () { - ok(!$('.tooltip').is('.fade.in'), '10ms: tooltip not faded in') + ok(!$('.tooltip').is('.fade.in'), '100ms: tooltip not faded in') $tooltip.trigger('mouseout') - }, 10) + }, 100) setTimeout(function () { - ok(!$('.tooltip').is('.fade.in'), '20ms: tooltip not faded in') + ok(!$('.tooltip').is('.fade.in'), '200ms: tooltip not faded in') start() - }, 20) + }, 200) $tooltip.trigger('mouseenter') }) @@ -842,21 +842,21 @@ $(function () { var $tooltip = $('<a href="#" rel="tooltip" title="Another tooltip"/>') .appendTo('#qunit-fixture') - .bootstrapTooltip({ delay: { show: 0, hide: 15 }}) + .bootstrapTooltip({ delay: { show: 0, hide: 150 }}) setTimeout(function () { ok($('.tooltip').is('.fade.in'), '1ms: tooltip faded in') $tooltip.trigger('mouseout') setTimeout(function () { - ok($('.tooltip').is('.fade.in'), '10ms: tooltip still faded in') + ok($('.tooltip').is('.fade.in'), '100ms: tooltip still faded in') $tooltip.trigger('mouseenter') - }, 10) + }, 100) setTimeout(function () { - ok($('.tooltip').is('.fade.in'), '20ms: tooltip still faded in') + ok($('.tooltip').is('.fade.in'), '200ms: tooltip still faded in') start() - }, 20) + }, 200) }, 0) $tooltip.trigger('mouseenter') @@ -867,17 +867,17 @@ $(function () { var $tooltip = $('<a href="#" rel="tooltip" title="Another tooltip"/>') .appendTo('#qunit-fixture') - .bootstrapTooltip({ delay: 15 }) + .bootstrapTooltip({ delay: 150 }) setTimeout(function () { - ok(!$('.tooltip').is('.fade.in'), '10ms: tooltip not faded in') + ok(!$('.tooltip').is('.fade.in'), '100ms: tooltip not faded in') $tooltip.trigger('mouseout') - }, 10) + }, 100) setTimeout(function () { - ok(!$('.tooltip').is('.fade.in'), '20ms: tooltip not faded in') + ok(!$('.tooltip').is('.fade.in'), '200ms: tooltip not faded in') start() - }, 20) + }, 200) $tooltip.trigger('mouseenter') }) @@ -887,27 +887,27 @@ $(function () { var $tooltip = $('<a href="#" rel="tooltip" title="Another tooltip"/>') .appendTo('#qunit-fixture') - .bootstrapTooltip({ delay: { show: 15, hide: 0 }}) + .bootstrapTooltip({ delay: { show: 150, hide: 0 }}) setTimeout(function () { - ok(!$('.tooltip').is('.fade.in'), '10ms: tooltip not faded in') + ok(!$('.tooltip').is('.fade.in'), '100ms: tooltip not faded in') $tooltip.trigger('mouseout') - }, 10) + }, 100) setTimeout(function () { - ok(!$('.tooltip').is('.fade.in'), '25ms: tooltip not faded in') + ok(!$('.tooltip').is('.fade.in'), '250ms: tooltip not faded in') start() - }, 25) + }, 250) $tooltip.trigger('mouseenter') }) - test('should wait 20ms before hiding the tooltip', function () { + test('should wait 200ms before hiding the tooltip', function () { stop() var $tooltip = $('<a href="#" rel="tooltip" title="Another tooltip"/>') .appendTo('#qunit-fixture') - .bootstrapTooltip({ delay: { show: 0, hide: 15 }}) + .bootstrapTooltip({ delay: { show: 0, hide: 150 }}) setTimeout(function () { ok($tooltip.data('bs.tooltip').$tip.is('.fade.in'), '1ms: tooltip faded in') @@ -915,13 +915,13 @@ $(function () { $tooltip.trigger('mouseout') setTimeout(function () { - ok($tooltip.data('bs.tooltip').$tip.is('.fade.in'), '10ms: tooltip still faded in') - }, 10) + ok($tooltip.data('bs.tooltip').$tip.is('.fade.in'), '100ms: tooltip still faded in') + }, 100) setTimeout(function () { - ok(!$tooltip.data('bs.tooltip').$tip.is('.in'), '20ms: tooltip removed') + ok(!$tooltip.data('bs.tooltip').$tip.is('.in'), '200ms: tooltip removed') start() - }, 20) + }, 200) }, 0) diff --git a/js/tests/visual/affix.html b/js/tests/visual/affix.html index 40a55ab51..4d772dc73 100644 --- a/js/tests/visual/affix.html +++ b/js/tests/visual/affix.html @@ -1,8 +1,11 @@ <!DOCTYPE html> <html> <head> + <meta charset="utf-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Affix</title> - <link rel="stylesheet" type="text/css" href="../../../dist/css/bootstrap.min.css"> + <link rel="stylesheet" href="../../../dist/css/bootstrap.min.css"> <style> /* Test Styles */ @@ -37,6 +40,13 @@ background-color: #85144B; } </style> + + <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --> + <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> + <!--[if lt IE 9]> + <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> + <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> + <![endif]--> </head> <body> diff --git a/js/tests/visual/alert.html b/js/tests/visual/alert.html index 688e6362c..0070315a2 100644 --- a/js/tests/visual/alert.html +++ b/js/tests/visual/alert.html @@ -1,8 +1,18 @@ <!DOCTYPE html> <html> <head> + <meta charset="utf-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Alert</title> - <link rel="stylesheet" type="text/css" href="../../../dist/css/bootstrap.min.css"> + <link rel="stylesheet" href="../../../dist/css/bootstrap.min.css"> + + <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --> + <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> + <!--[if lt IE 9]> + <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> + <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> + <![endif]--> </head> <body> diff --git a/js/tests/visual/button.html b/js/tests/visual/button.html index 01c7dd4b3..d92a08329 100644 --- a/js/tests/visual/button.html +++ b/js/tests/visual/button.html @@ -1,8 +1,18 @@ <!DOCTYPE html> <html> <head> + <meta charset="utf-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Button</title> - <link rel="stylesheet" type="text/css" href="../../../dist/css/bootstrap.min.css"> + <link rel="stylesheet" href="../../../dist/css/bootstrap.min.css"> + + <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --> + <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> + <!--[if lt IE 9]> + <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> + <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> + <![endif]--> </head> <body> diff --git a/js/tests/visual/carousel.html b/js/tests/visual/carousel.html index aaf48b059..8dede0921 100644 --- a/js/tests/visual/carousel.html +++ b/js/tests/visual/carousel.html @@ -1,8 +1,18 @@ <!DOCTYPE html> <html> <head> + <meta charset="utf-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Carousel</title> - <link rel="stylesheet" type="text/css" href="../../../dist/css/bootstrap.min.css"> + <link rel="stylesheet" href="../../../dist/css/bootstrap.min.css"> + + <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --> + <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> + <!--[if lt IE 9]> + <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> + <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> + <![endif]--> </head> <body> diff --git a/js/tests/visual/collapse.html b/js/tests/visual/collapse.html index 792ba796d..b7a151516 100644 --- a/js/tests/visual/collapse.html +++ b/js/tests/visual/collapse.html @@ -1,8 +1,18 @@ <!DOCTYPE html> <html> <head> + <meta charset="utf-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Collapse</title> - <link rel="stylesheet" type="text/css" href="../../../dist/css/bootstrap.min.css"> + <link rel="stylesheet" href="../../../dist/css/bootstrap.min.css"> + + <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --> + <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> + <!--[if lt IE 9]> + <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> + <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> + <![endif]--> </head> <body> diff --git a/js/tests/visual/dropdown.html b/js/tests/visual/dropdown.html index 6c7f52b2f..02090b6cc 100644 --- a/js/tests/visual/dropdown.html +++ b/js/tests/visual/dropdown.html @@ -1,8 +1,18 @@ <!DOCTYPE html> <html> <head> + <meta charset="utf-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Dropdown</title> - <link rel="stylesheet" type="text/css" href="../../../dist/css/bootstrap.min.css"> + <link rel="stylesheet" href="../../../dist/css/bootstrap.min.css"> + + <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --> + <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> + <!--[if lt IE 9]> + <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> + <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> + <![endif]--> </head> <body> diff --git a/js/tests/visual/modal.html b/js/tests/visual/modal.html index f4f61f47f..0af79cc55 100644 --- a/js/tests/visual/modal.html +++ b/js/tests/visual/modal.html @@ -1,8 +1,18 @@ <!DOCTYPE html> <html> <head> + <meta charset="utf-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Modal</title> - <link rel="stylesheet" type="text/css" href="../../../dist/css/bootstrap.min.css"> + <link rel="stylesheet" href="../../../dist/css/bootstrap.min.css"> + + <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --> + <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> + <!--[if lt IE 9]> + <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> + <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> + <![endif]--> </head> <body> diff --git a/js/tests/visual/popover.html b/js/tests/visual/popover.html index c09739ff9..0e84f5cee 100644 --- a/js/tests/visual/popover.html +++ b/js/tests/visual/popover.html @@ -1,8 +1,18 @@ <!DOCTYPE html> <html> <head> + <meta charset="utf-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Popover</title> - <link rel="stylesheet" type="text/css" href="../../../dist/css/bootstrap.min.css"> + <link rel="stylesheet" href="../../../dist/css/bootstrap.min.css"> + + <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --> + <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> + <!--[if lt IE 9]> + <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> + <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> + <![endif]--> </head> <body> diff --git a/js/tests/visual/scrollspy.html b/js/tests/visual/scrollspy.html index 2611337f5..5952b7e59 100644 --- a/js/tests/visual/scrollspy.html +++ b/js/tests/visual/scrollspy.html @@ -1,11 +1,22 @@ <!DOCTYPE html> <html> <head> + <meta charset="utf-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Scrollspy</title> - <link rel="stylesheet" type="text/css" href="../../../dist/css/bootstrap.min.css"> - <style type="text/css"> + <link rel="stylesheet" href="../../../dist/css/bootstrap.min.css"> + + <style> body { padding-top: 70px; } </style> + + <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --> + <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> + <!--[if lt IE 9]> + <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> + <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> + <![endif]--> </head> <body data-spy="scroll" data-target=".navbar" data-offset="70"> diff --git a/js/tests/visual/tab.html b/js/tests/visual/tab.html index 28757df6e..a3fed1e9f 100644 --- a/js/tests/visual/tab.html +++ b/js/tests/visual/tab.html @@ -1,16 +1,28 @@ <!DOCTYPE html> <html> <head> + <meta charset="utf-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Tab</title> - <link rel="stylesheet" type="text/css" href="../../../dist/css/bootstrap.min.css"> - <style type="text/css"> + <link rel="stylesheet" href="../../../dist/css/bootstrap.min.css"> + + <style> h4 { margin: 40px 0 10px; } + .nav-tabs { margin-bottom: 15px; } </style> + + <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --> + <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> + <!--[if lt IE 9]> + <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> + <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> + <![endif]--> </head> <body> diff --git a/js/tests/visual/tooltip.html b/js/tests/visual/tooltip.html index aaf4b767d..8d10871c9 100644 --- a/js/tests/visual/tooltip.html +++ b/js/tests/visual/tooltip.html @@ -1,8 +1,18 @@ <!DOCTYPE html> <html> <head> + <meta charset="utf-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Tooltip</title> - <link rel="stylesheet" type="text/css" href="../../../dist/css/bootstrap.min.css"> + <link rel="stylesheet" href="../../../dist/css/bootstrap.min.css"> + + <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --> + <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> + <!--[if lt IE 9]> + <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> + <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> + <![endif]--> </head> <body> |
