diff options
Diffstat (limited to 'tests/unit')
-rw-r--r-- | tests/unit/accordion/accordion.html | 6 | ||||
-rw-r--r-- | tests/unit/accordion/accordion_deprecated.html | 6 | ||||
-rw-r--r-- | tests/unit/autocomplete/autocomplete.html | 2 | ||||
-rw-r--r-- | tests/unit/button/button_tickets.js | 10 | ||||
-rw-r--r-- | tests/unit/core/core.html | 40 | ||||
-rw-r--r-- | tests/unit/core/selector.js | 30 | ||||
-rw-r--r-- | tests/unit/dialog/dialog_core.js | 4 | ||||
-rw-r--r-- | tests/unit/dialog/dialog_options.js | 4 | ||||
-rw-r--r-- | tests/unit/index.html | 129 | ||||
-rw-r--r-- | tests/unit/menu/menu_events.js | 2 |
10 files changed, 130 insertions, 103 deletions
diff --git a/tests/unit/accordion/accordion.html b/tests/unit/accordion/accordion.html index 5bc31a926..b3c3b59ac 100644 --- a/tests/unit/accordion/accordion.html +++ b/tests/unit/accordion/accordion.html @@ -50,9 +50,9 @@ <div class="foo"> <p> You've seen it coming! - <br/> + <br> Buy now and get nothing for free! - <br/> + <br> Well, at least no free beer. Perhaps a bear, if you can afford it. </p> </div> @@ -60,7 +60,7 @@ <div class="foo"> <p> your bear, you have to admit it! - <br/> + <br> No, we aren't selling bears. </p> <p> diff --git a/tests/unit/accordion/accordion_deprecated.html b/tests/unit/accordion/accordion_deprecated.html index a2b0493b6..3a7ad86f2 100644 --- a/tests/unit/accordion/accordion_deprecated.html +++ b/tests/unit/accordion/accordion_deprecated.html @@ -48,9 +48,9 @@ <div class="foo"> <p> You've seen it coming! - <br/> + <br> Buy now and get nothing for free! - <br/> + <br> Well, at least no free beer. Perhaps a bear, if you can afford it. </p> </div> @@ -58,7 +58,7 @@ <div class="foo"> <p> your bear, you have to admit it! - <br/> + <br> No, we aren't selling bears. </p> <p> diff --git a/tests/unit/autocomplete/autocomplete.html b/tests/unit/autocomplete/autocomplete.html index 39e88fdd5..8dc86c621 100644 --- a/tests/unit/autocomplete/autocomplete.html +++ b/tests/unit/autocomplete/autocomplete.html @@ -37,7 +37,7 @@ <div id="qunit-fixture"> <div id="ac-wrap1" class="ac-wrap"></div> -<div id="ac-wrap2" class="ac-wrap"><input id="autocomplete" class="foo" /></div> +<div id="ac-wrap2" class="ac-wrap"><input id="autocomplete" class="foo"></div> <div id="autocomplete-contenteditable" contenteditable="" tabindex=0></div> </div> diff --git a/tests/unit/button/button_tickets.js b/tests/unit/button/button_tickets.js index 9a7ccae43..2912b06a3 100644 --- a/tests/unit/button/button_tickets.js +++ b/tests/unit/button/button_tickets.js @@ -29,23 +29,23 @@ test( "#6711 Checkbox/Radiobutton do not Show Focused State when using Keyboard }); test( "#7092 - button creation that requires a matching label does not find label in all cases", function() { - var group = $( "<span><label for='t7092a'/><input type='checkbox' id='t7092a'/></span>" ); + var group = $( "<span><label for='t7092a'></label><input type='checkbox' id='t7092a'></span>" ); group.find( "input:checkbox" ).button(); ok( group.find( "label" ).is( ".ui-button" ) ); - group = $( "<input type='checkbox' id='t7092b'/><label for='t7092b'/>" ); + group = $( "<input type='checkbox' id='t7092b'><label for='t7092b'></label>" ); group.filter( "input:checkbox" ).button(); ok( group.filter( "label" ).is( ".ui-button" ) ); - group = $( "<span><input type='checkbox' id='t7092c'/></span><label for='t7092c'/>" ); + group = $( "<span><input type='checkbox' id='t7092c'></span><label for='t7092c'></label>" ); group.find( "input:checkbox" ).button(); ok( group.filter( "label" ).is( ".ui-button" ) ); - group = $( "<span><input type='checkbox' id='t7092d'/></span><span><label for='t7092d'/></span>" ); + group = $( "<span><input type='checkbox' id='t7092d'></span><span><label for='t7092d'></label></span>" ); group.find( "input:checkbox" ).button(); ok( group.find( "label" ).is( ".ui-button" ) ); - group = $( "<input type='checkbox' id='t7092e'/><span><label for='t7092e'/></span>" ); + group = $( "<input type='checkbox' id='t7092e'><span><label for='t7092e'></label></span>" ); group.filter( "input:checkbox" ).button(); ok( group.find( "label" ).is( ".ui-button" ) ); }); diff --git a/tests/unit/core/core.html b/tests/unit/core/core.html index affd094d8..fdde81766 100644 --- a/tests/unit/core/core.html +++ b/tests/unit/core/core.html @@ -47,12 +47,12 @@ </map> <div> - <input id="visibleAncestor-inputTypeNone" /> - <input type="text" id="visibleAncestor-inputTypeText" /> - <input type="checkbox" id="visibleAncestor-inputTypeCheckbox" /> - <input type="radio" id="visibleAncestor-inputTypeRadio" /> - <input type="button" id="visibleAncestor-inputTypeButton" /> - <input type="hidden" id="visibleAncestor-inputTypeHidden" /> + <input id="visibleAncestor-inputTypeNone"> + <input type="text" id="visibleAncestor-inputTypeText"> + <input type="checkbox" id="visibleAncestor-inputTypeCheckbox"> + <input type="radio" id="visibleAncestor-inputTypeRadio"> + <input type="button" id="visibleAncestor-inputTypeButton"> + <input type="hidden" id="visibleAncestor-inputTypeHidden"> <button id="visibleAncestor-button">x</button> <select id="visibleAncestor-select"> <option>option</option> @@ -68,12 +68,12 @@ </div> <div> - <input id="disabledElement-inputTypeNone" disabled="disabled" /> - <input type="text" id="disabledElement-inputTypeText" disabled="disabled" /> - <input type="checkbox" id="disabledElement-inputTypeCheckbox" disabled="disabled" /> - <input type="radio" id="disabledElement-inputTypeRadio" disabled="disabled" /> - <input type="button" id="disabledElement-inputTypeButton" disabled="disabled" /> - <input type="hidden" id="disabledElement-inputTypeHidden" disabled="disabled" /> + <input id="disabledElement-inputTypeNone" disabled="disabled"> + <input type="text" id="disabledElement-inputTypeText" disabled="disabled"> + <input type="checkbox" id="disabledElement-inputTypeCheckbox" disabled="disabled"> + <input type="radio" id="disabledElement-inputTypeRadio" disabled="disabled"> + <input type="button" id="disabledElement-inputTypeButton" disabled="disabled"> + <input type="hidden" id="disabledElement-inputTypeHidden" disabled="disabled"> <button id="disabledElement-button" disabled="disabled"></button> <select id="disabledElement-select" disabled="disabled"></select> <textarea id="disabledElement-textarea" disabled="disabled"></textarea> @@ -81,27 +81,27 @@ <div> <div id="displayNoneAncestor" style="display: none;"> - <input id="displayNoneAncestor-input" /> + <input id="displayNoneAncestor-input"> <span tabindex="1" id="displayNoneAncestor-span">.</span> </div> <div id="visibilityHiddenAncestor" style="visibility: hidden;"> - <input id="visibilityHiddenAncestor-input" /> + <input id="visibilityHiddenAncestor-input"> <span tabindex="1" id="visibilityHiddenAncestor-span">.</span> </div> <span tabindex="1" id="displayNone-span" style="display: none;">.</span> <span tabindex="1" id="visibilityHidden-span" style="visibility: hidden;">.</span> - <input id="displayNone-input" style="display: none;" /> - <input id="visibilityHidden-input" style="visibility: hidden;" /> + <input id="displayNone-input" style="display: none;"> + <input id="visibilityHidden-input" style="visibility: hidden;"> </div> <div> - <input id="inputTabindex0" tabindex="0" /> - <input id="inputTabindex10" tabindex="10" /> - <input id="inputTabindex-1" tabindex="-1" /> - <input id="inputTabindex-50" tabindex="-50" /> + <input id="inputTabindex0" tabindex="0"> + <input id="inputTabindex10" tabindex="10"> + <input id="inputTabindex-1" tabindex="-1"> + <input id="inputTabindex-50" tabindex="-50"> <span id="spanTabindex0" tabindex="0">.</span> <span id="spanTabindex10" tabindex="10">.</span> diff --git a/tests/unit/core/selector.js b/tests/unit/core/selector.js index 44888ad88..de5be3da1 100644 --- a/tests/unit/core/selector.js +++ b/tests/unit/core/selector.js @@ -32,49 +32,49 @@ test("data", function() { ok(!el.is(':data(test)'), msg); } - el = $('<div/>'); + el = $('<div>'); shouldNotHaveData('data never set'); - el = $('<div/>').data('test', null); + el = $('<div>').data('test', null); shouldNotHaveData('data is null'); - el = $('<div/>').data('test', true); + el = $('<div>').data('test', true); shouldHaveData('data set to true'); - el = $('<div/>').data('test', false); + el = $('<div>').data('test', false); shouldNotHaveData('data set to false'); - el = $('<div/>').data('test', 0); + el = $('<div>').data('test', 0); shouldNotHaveData('data set to 0'); - el = $('<div/>').data('test', 1); + el = $('<div>').data('test', 1); shouldHaveData('data set to 1'); - el = $('<div/>').data('test', ''); + el = $('<div>').data('test', ''); shouldNotHaveData('data set to empty string'); - el = $('<div/>').data('test', 'foo'); + el = $('<div>').data('test', 'foo'); shouldHaveData('data set to string'); - el = $('<div/>').data('test', []); + el = $('<div>').data('test', []); shouldHaveData('data set to empty array'); - el = $('<div/>').data('test', [1]); + el = $('<div>').data('test', [1]); shouldHaveData('data set to array'); - el = $('<div/>').data('test', {}); + el = $('<div>').data('test', {}); shouldHaveData('data set to empty object'); - el = $('<div/>').data('test', {foo: 'bar'}); + el = $('<div>').data('test', {foo: 'bar'}); shouldHaveData('data set to object'); - el = $('<div/>').data('test', new Date()); + el = $('<div>').data('test', new Date()); shouldHaveData('data set to date'); - el = $('<div/>').data('test', /test/); + el = $('<div>').data('test', /test/); shouldHaveData('data set to regexp'); - el = $('<div/>').data('test', function() {}); + el = $('<div>').data('test', function() {}); shouldHaveData('data set to function'); }); diff --git a/tests/unit/dialog/dialog_core.js b/tests/unit/dialog/dialog_core.js index aec3e22be..2003689e9 100644 --- a/tests/unit/dialog/dialog_core.js +++ b/tests/unit/dialog/dialog_core.js @@ -106,7 +106,7 @@ test("title id", function() { equals(titleId, 'ui-dialog-title-2', 'auto-numbered title id'); el.remove(); - el = $('<div id="foo"/>').dialog(); + el = $('<div id="foo">').dialog(); titleId = dlg().find('.ui-dialog-title').attr('id'); equals(titleId, 'ui-dialog-title-foo', 'carried over title id'); el.remove(); @@ -131,7 +131,7 @@ test("ARIA", function() { }); test("widget method", function() { - var dialog = $("<div/>").appendTo("#main").dialog(); + var dialog = $("<div>").appendTo("#main").dialog(); same(dialog.parent()[0], dialog.dialog("widget")[0]); }); diff --git a/tests/unit/dialog/dialog_options.js b/tests/unit/dialog/dialog_options.js index 5705da079..eab577c69 100644 --- a/tests/unit/dialog/dialog_options.js +++ b/tests/unit/dialog/dialog_options.js @@ -407,7 +407,7 @@ test("title", function() { equals(el.dialog("option", "title"), "", "option not changed"); el.remove(); - el = $('<div title="foo"/>').dialog(); + el = $('<div title="foo">').dialog(); equals(titleText(), "foo", "title in element attribute"); equals(el.dialog("option", "title"), "foo", "option updated from attribute"); el.remove(); @@ -417,7 +417,7 @@ test("title", function() { equals(el.dialog("option", "title"), "foo", "opiton set from options hash"); el.remove(); - el = $('<div title="foo"/>').dialog({ title: 'bar' }); + el = $('<div title="foo">').dialog({ title: 'bar' }); equals(titleText(), "bar", "title in init options should override title in element attribute"); equals(el.dialog("option", "title"), "bar", "opiton set from options hash"); el.remove(); diff --git a/tests/unit/index.html b/tests/unit/index.html index 5282d3f27..b73ede29c 100644 --- a/tests/unit/index.html +++ b/tests/unit/index.html @@ -1,69 +1,96 @@ -<!DOCTYPE html> +<!doctype html> <html lang="en"> <head> - <meta charset="UTF-8" /> + <meta charset="utf-8"> <title>jQuery UI Unit Tests</title> - <link type="text/css" href="../../themes/base/jquery.ui.base.css" rel="stylesheet" /> - <link rel="stylesheet" href="../../external/qunit.css" type="text/css"/> - <style type="text/css"> - ul { font-family: 'trebuchet ms', verdana, arial; } - h2, ul {font-size: 10pt; } - h2 { - background-color:#EEEEEE; - color:black; - font-size:small; - font-weight:normal; - margin:0; - padding:10px; + <link rel="stylesheet" href="../../themes/base/jquery.ui.core.css"> + <link rel="stylesheet" href="../../themes/base/jquery.ui.theme.css"> + <style> + body { + font-size: 62.5%; + } + .ui-widget-header { + padding: 0.2em 0.5em; + margin: 0; + } + .ui-widget-content { + padding: 1em; + margin-bottom: 1em; + } + ul { + margin: 0; + list-style: none; + } + li { + line-height: 2em; } </style> + <script src="../jquery.js"></script> + <script> + $(function() { + $( "#main" ) + .addClass( "ui-widget" ) + .find( "h1, h2" ) + .addClass( "ui-widget-header ui-corner-top" ) + .next() + .addClass( "ui-widget-content ui-corner-bottom" ); + + }); + </script> </head> <body> -<h1 id="qunit-header">jQuery UI Unit Tests</h1> +<div id="main"> + <h1>jQuery UI Unit Tests</h1> + <div> + <h2>Full Test Suite</h2> + <ul> + <li><a href="all.html">All</a></li> + </ul> -<h2>Core</h2> -<ul> - <li><a href="core/core.html">Core</a></li> - <li><a href="widget/widget.html">Widget</a></li> -</ul> + <h2>Core</h2> + <ul> + <li><a href="core/core.html">Core</a></li> + <li><a href="widget/widget.html">Widget</a></li> + </ul> -<h2>Interactions</h2> -<ul> - <li><a href="draggable/draggable.html">Draggable</a></li> - <li><a href="droppable/droppable.html">Droppable</a></li> - <li><a href="resizable/resizable.html">Resizable</a></li> - <li><a href="selectable/selectable.html">Selectable</a></li> - <li><a href="sortable/sortable.html">Sortable</a></li> -</ul> + <h2>Interactions</h2> + <ul> + <li><a href="draggable/draggable.html">Draggable</a></li> + <li><a href="droppable/droppable.html">Droppable</a></li> + <li><a href="resizable/resizable.html">Resizable</a></li> + <li><a href="selectable/selectable.html">Selectable</a></li> + <li><a href="sortable/sortable.html">Sortable</a></li> + </ul> -<h2>Widgets</h2> -<ul> - <li><a href="accordion/accordion.html">Accordion</a></li> - <li><a href="autocomplete/autocomplete.html">Autocomplete</a></li> - <li><a href="button/button.html">Button</a></li> - <li><a href="datepicker/datepicker.html">Datepicker</a></li> - <li><a href="dialog/dialog.html">Dialog</a></li> - <li><a href="menu/menu.html">Menu</a></li> - <li><a href="progressbar/progressbar.html">Progressbar</a></li> - <li><a href="slider/slider.html">Slider</a></li> - <li><a href="spinner/spinner.html">Spinner</a></li> - <li><a href="tabs/tabs.html">Tabs</a></li> - <li><a href="tooltip/tooltip.html">Tooltip</a></li> -</ul> + <h2>Widgets</h2> + <ul> + <li><a href="accordion/accordion.html">Accordion</a></li> + <li><a href="autocomplete/autocomplete.html">Autocomplete</a></li> + <li><a href="button/button.html">Button</a></li> + <li><a href="datepicker/datepicker.html">Datepicker</a></li> + <li><a href="dialog/dialog.html">Dialog</a></li> + <li><a href="menu/menu.html">Menu</a></li> + <li><a href="progressbar/progressbar.html">Progressbar</a></li> + <li><a href="slider/slider.html">Slider</a></li> + <li><a href="spinner/spinner.html">Spinner</a></li> + <li><a href="tabs/tabs.html">Tabs</a></li> + <li><a href="tooltip/tooltip.html">Tooltip</a></li> + </ul> -<h2>Utilities</h2> -<ul> - <li><a href="position/position.html">Position</a></li> -</ul> + <h2>Utilities</h2> + <ul> + <li><a href="position/position.html">Position</a></li> + </ul> -<h2>Effects</h2> -<ul> - <li><a href="effects/effects.html">Effects</a></li> -</ul> + <h2>Effects</h2> + <ul> + <li><a href="effects/effects.html">Effects</a></li> + </ul> + </div> +</div> </body> - </html> diff --git a/tests/unit/menu/menu_events.js b/tests/unit/menu/menu_events.js index 312da0d4c..9ea54faf0 100644 --- a/tests/unit/menu/menu_events.js +++ b/tests/unit/menu/menu_events.js @@ -36,7 +36,7 @@ test( "handle blur: click", function() { }); $menu.find( "li a:first" ).trigger( "click" ); - $( "<a/>", { id: "remove"} ).appendTo("body").trigger( "click" ); + $( "<a>", { id: "remove"} ).appendTo("body").trigger( "click" ); $("#remove").remove(); }); |