Fix #12723 and simplification and optmization of defaultDisplay helper
[jquery.git] / test / index.html
blob1b5e33a3b3ba87be73cda789b509ea30a225c560
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr" id="html">
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5 <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
6 <title>jQuery Test Suite</title>
7 <link rel="Stylesheet" media="screen" href="../bower_components/qunit/qunit/qunit.css" />
8 <link rel="Stylesheet" media="screen" href="data/testsuite.css" />
9 <!-- Includes -->
11 <!-- Allows us to fetch submodule tests when using a no-ajax build -->
12 <script src="data/jquery-1.9.1.ajax_xhr.min.js"></script>
14 <script src="../bower_components/qunit/qunit/qunit.js"></script>
15 <script src="../bower_components/requirejs/require.js"></script>
16 <!-- See testinit for the list of tests -->
17 <script src="data/testinit.js"></script>
19 <!-- A script that includes jQuery min, dev, or AMD -->
20 <!-- Adds "basic" URL option, even to iframes -->
21 <!-- iframes will not load AMD as loading needs to be synchronous for some tests -->
22 <!-- Also executes the function above to load tests -->
23 <script src="jquery.js"></script>
25 <script>
26 // html5shiv, enabling HTML5 elements to be used with jQuery
27 ( "abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup " +
28 "mark meter nav output progress section summary time video"
29 ).replace(/\w+/g, function(n) {
30 document.createElement(n);
31 });
33 // Load tests if they have not been loaded
34 // This is in a different script tag to ensure that
35 // jQuery is on the page when the testrunner executes
36 if ( !QUnit.urlParams.amd ) {
37 loadTests();
39 </script>
40 </head>
42 <body id="body">
43 <div id="qunit"></div>
45 <!-- Test HTML -->
46 <!-- this iframe is outside the #qunit-fixture so it won't reload constantly wasting time, but it means the tests must be "safe" and clean up after themselves -->
47 <iframe id="loadediframe" name="loadediframe" style="display:none;" src="data/iframe.html"></iframe>
48 <dl id="dl" style="position:absolute;top:-32767px;left:-32767px;width:1px;">
49 <div id="qunit-fixture">
50 <p id="firstp">See <a id="simon1" href="http://simon.incutio.com/archive/2003/03/25/#getElementsBySelector" rel="bookmark">this blog entry</a> for more information.</p>
51 <p id="ap">
52 Here are some links in a normal paragraph: <a id="google" href="http://www.google.com/" title="Google!">Google</a>,
53 <a id="groups" href="http://groups.google.com/" class="GROUPS">Google Groups (Link)</a>.
54 This link has <code><a href="http://smin" id="anchor1">class="blog"</a></code>:
55 <a href="http://diveintomark.org/" class="blog" hreflang="en" id="mark">diveintomark</a>
57 </p>
58 <div id="foo">
59 <p id="sndp">Everything inside the red border is inside a div with <code>id="foo"</code>.</p>
60 <p lang="en" id="en">This is a normal link: <a id="yahoo" href="http://www.yahoo.com/" class="blogTest">Yahoo</a></p>
61 <p id="sap">This link has <code><a href="#2" id="anchor2">class="blog"</a></code>: <a href="http://simon.incutio.com/" class="blog link" id="simon">Simon Willison's Weblog</a></p>
63 </div>
64 <div id="nothiddendiv" style="height:1px;background:white;" class="nothiddendiv">
65 <div id="nothiddendivchild"></div>
66 </div>
67 <span id="name+value"></span>
68 <p id="first">Try them out:</p>
69 <ul id="firstUL"></ul>
70 <ol id="empty"></ol>
71 <form id="form" action="formaction">
72 <label for="action" id="label-for">Action:</label>
73 <input type="text" name="action" value="Test" id="text1" maxlength="30"/>
74 <input type="text" name="text2" value="Test" id="text2" disabled="disabled"/>
75 <input type="radio" name="radio1" id="radio1" value="on"/>
77 <input type="radio" name="radio2" id="radio2" checked="checked"/>
78 <input type="checkbox" name="check" id="check1" checked="checked"/>
79 <input type="checkbox" id="check2" value="on"/>
81 <input type="hidden" name="hidden" id="hidden1"/>
82 <input type="text" style="display:none;" name="foo[bar]" id="hidden2"/>
84 <input type="text" id="name" name="name" value="name" />
85 <input type="search" id="search" name="search" value="search" />
87 <button id="button" name="button" type="button">Button</button>
89 <textarea id="area1" maxlength="30">foobar</textarea>
91 <select name="select1" id="select1">
92 <option id="option1a" class="emptyopt" value="">Nothing</option>
93 <option id="option1b" value="1">1</option>
94 <option id="option1c" value="2">2</option>
95 <option id="option1d" value="3">3</option>
96 </select>
97 <select name="select2" id="select2">
98 <option id="option2a" class="emptyopt" value="">Nothing</option>
99 <option id="option2b" value="1">1</option>
100 <option id="option2c" value="2">2</option>
101 <option id="option2d" selected="selected" value="3">3</option>
102 </select>
103 <select name="select3" id="select3" multiple="multiple">
104 <option id="option3a" class="emptyopt" value="">Nothing</option>
105 <option id="option3b" selected="selected" value="1">1</option>
106 <option id="option3c" selected="selected" value="2">2</option>
107 <option id="option3d" value="3">3</option>
108 <option id="option3e">no value</option>
109 </select>
110 <select name="select4" id="select4" multiple="multiple">
111 <optgroup disabled="disabled">
112 <option id="option4a" class="emptyopt" value="">Nothing</option>
113 <option id="option4b" disabled="disabled" selected="selected" value="1">1</option>
114 <option id="option4c" selected="selected" value="2">2</option>
115 </optgroup>
116 <option selected="selected" disabled="disabled" id="option4d" value="3">3</option>
117 <option id="option4e">no value</option>
118 </select>
119 <select name="select5" id="select5">
120 <option id="option5a" value="3">1</option>
121 <option id="option5b" value="2">2</option>
122 <option id="option5c" value="1" data-attr="">3</option>
123 </select>
125 <object id="object1" codebase="stupid">
126 <param name="p1" value="x1" />
127 <param name="p2" value="x2" />
128 </object>
130 <span id="台北Táiběi"></span>
131 <span id="台北" lang="中文"></span>
132 <span id="utf8class1" class="台北Táiběi 台北"></span>
133 <span id="utf8class2" class="台北"></span>
134 <span id="foo:bar" class="foo:bar"></span>
135 <span id="test.foo[5]bar" class="test.foo[5]bar"></span>
137 <foo_bar id="foobar">test element</foo_bar>
138 </form>
139 <b id="floatTest">Float test.</b>
140 <iframe id="iframe" name="iframe"></iframe>
141 <form id="lengthtest">
142 <input type="text" id="length" name="test"/>
143 <input type="text" id="idTest" name="id"/>
144 </form>
145 <table id="table"></table>
147 <form id="name-tests">
148 <!-- Inputs with a grouped name attribute. -->
149 <input name="types[]" id="types_all" type="checkbox" value="all" />
150 <input name="types[]" id="types_anime" type="checkbox" value="anime" />
151 <input name="types[]" id="types_movie" type="checkbox" value="movie" />
152 </form>
154 <form id="testForm" action="#" method="get">
155 <textarea name="T3" rows="2" cols="15">?
156 Z</textarea>
157 <input type="hidden" name="H1" value="x" />
158 <input type="hidden" name="H2" />
159 <input name="PWD" type="password" value="" />
160 <input name="T1" type="text" />
161 <input name="T2" type="text" value="YES" readonly="readonly" />
162 <input type="checkbox" name="C1" value="1" />
163 <input type="checkbox" name="C2" />
164 <input type="radio" name="R1" value="1" />
165 <input type="radio" name="R1" value="2" />
166 <input type="text" name="My Name" value="me" />
167 <input type="reset" name="reset" value="NO" />
168 <select name="S1">
169 <option value="abc">ABC</option>
170 <option value="abc">ABC</option>
171 <option value="abc">ABC</option>
172 </select>
173 <select name="S2" multiple="multiple" size="3">
174 <option value="abc">ABC</option>
175 <option value="abc">ABC</option>
176 <option value="abc">ABC</option>
177 </select>
178 <select name="S3">
179 <option selected="selected">YES</option>
180 </select>
181 <select name="S4">
182 <option value="" selected="selected">NO</option>
183 </select>
184 <input type="submit" name="sub1" value="NO" />
185 <input type="submit" name="sub2" value="NO" />
186 <input type="image" name="sub3" value="NO" />
187 <button name="sub4" type="submit" value="NO">NO</button>
188 <input name="D1" type="text" value="NO" disabled="disabled" />
189 <input type="checkbox" checked="checked" disabled="disabled" name="D2" value="NO" />
190 <input type="radio" name="D3" value="NO" checked="checked" disabled="disabled" />
191 <select name="D4" disabled="disabled">
192 <option selected="selected" value="NO">NO</option>
193 </select>
194 <input id="list-test" type="text" />
195 <datalist id="datalist">
196 <option value="option"></option>
197 </datalist>
198 </form>
199 <div id="moretests">
200 <form>
201 <div id="checkedtest" style="display:none;">
202 <input type="radio" name="checkedtestradios" checked="checked"/>
203 <input type="radio" name="checkedtestradios" value="on"/>
204 <input type="checkbox" name="checkedtestcheckboxes" checked="checked"/>
205 <input type="checkbox" name="checkedtestcheckboxes" />
206 </div>
207 </form>
208 <div id="nonnodes"><span id="nonnodesElement">hi</span> there <!-- mon ami --></div>
209 <div id="t2037">
210 <div><div class="hidden">hidden</div></div>
211 </div>
212 <div id="t6652">
213 <div></div>
214 </div>
215 <div id="no-clone-exception"><object><embed></embed></object></div>
216 </div>
218 <div id="tabindex-tests">
219 <ol id="listWithTabIndex" tabindex="5">
220 <li id="foodWithNegativeTabIndex" tabindex="-1">Rice</li>
221 <li id="foodNoTabIndex">Beans</li>
222 <li>Blinis</li>
223 <li>Tofu</li>
224 </ol>
226 <div id="divWithNoTabIndex">I'm hungry. I should...</div>
227 <span>...</span><a href="#" id="linkWithNoTabIndex">Eat lots of food</a><span>...</span> |
228 <span>...</span><a href="#" id="linkWithTabIndex" tabindex="2">Eat a little food</a><span>...</span> |
229 <span>...</span><a href="#" id="linkWithNegativeTabIndex" tabindex="-1">Eat no food</a><span>...</span>
230 <span>...</span><a id="linkWithNoHrefWithNoTabIndex">Eat a burger</a><span>...</span>
231 <span>...</span><a id="linkWithNoHrefWithTabIndex" tabindex="1">Eat some funyuns</a><span>...</span>
232 <span>...</span><a id="linkWithNoHrefWithNegativeTabIndex" tabindex="-1">Eat some funyuns</a><span>...</span>
233 <input id="inputWithoutTabIndex"/>
234 <button id="buttonWithoutTabIndex"></button>
235 <textarea id="textareaWithoutTabIndex"></textarea>
236 <menu type="popup">
237 <menuitem id="menuitemWithoutTabIndex" command="submitbutton" default/>
238 </menu>
239 </div>
241 <div id="liveHandlerOrder">
242 <span id="liveSpan1"><a href="#" id="liveLink1"></a></span>
243 <span id="liveSpan2"><a href="#" id="liveLink2"></a></span>
244 </div>
246 <div id="siblingTest">
247 <em id="siblingfirst">1</em>
248 <em id="siblingnext">2</em>
249 <em id="siblingthird">
250 <em id="siblingchild">
251 <em id="siblinggrandchild">
252 <em id="siblinggreatgrandchild"></em>
253 </em>
254 </em>
255 </em>
256 <span id="siblingspan"></span>
257 </div>
258 <div id="fx-test-group" style="position: absolute; width: 1px; height: 1px; overflow: hidden;">
259 <div id="fx-queue" name="test">
260 <div id="fadein" class='chain-test' name='div'>fadeIn<div>fadeIn</div></div>
261 <div id="fadeout" class='chain-test chain-test-out'>fadeOut<div>fadeOut</div></div>
263 <div id="show" class='chain-test'>show<div>show</div></div>
264 <div id="hide" class='chain-test chain-test-out'>hide<div>hide</div></div>
265 <div id="easehide" class='chain-test chain-test-out'>hide<div>hide</div></div>
267 <div id="togglein" class='chain-test'>togglein<div>togglein</div></div>
268 <div id="toggleout" class='chain-test chain-test-out'>toggleout<div>toggleout</div></div>
269 <div id="easetoggleout" class='chain-test chain-test-out'>toggleout<div>toggleout</div></div>
271 <div id="slideup" class='chain-test'>slideUp<div>slideUp</div></div>
272 <div id="slidedown" class='chain-test chain-test-out'>slideDown<div>slideDown</div></div>
273 <div id="easeslideup" class='chain-test'>slideUp<div>slideUp</div></div>
275 <div id="slidetogglein" class='chain-test'>slideToggleIn<div>slideToggleIn</div></div>
276 <div id="slidetoggleout" class='chain-test chain-test-out'>slideToggleOut<div>slideToggleOut</div></div>
278 <div id="fadetogglein" class='chain-test'>fadeToggleIn<div>fadeToggleIn</div></div>
279 <div id="fadetoggleout" class='chain-test chain-test-out'>fadeToggleOut<div>fadeToggleOut</div></div>
281 <div id="fadeto" class='chain-test'>fadeTo<div>fadeTo</div></div>
282 </div>
284 <div id="fx-tests"></div>
285 <span id="display"></span>
286 </div>
287 </div>
288 </dl>
289 <map name="imgmap" id="imgmap">
290 <area shape="rect" coords="0,0,200,50">
291 </map>
293 </body>
294 </html>