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">
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" />
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=
"data/testinit.js"></script>
16 <script src=
"../bower_components/qunit/qunit/qunit.js"></script>
19 var src
= "../dist/jquery.min.js";
21 // Config parameter to use minified jQuery
22 QUnit
.config
.urlConfig
.push({
24 label
: "Load unminified",
25 tooltip
: "Load the development (unminified) jQuery file"
27 if ( QUnit
.urlParams
.dev
) {
28 src
= "../dist/jquery.js";
31 // Config parameter to force basic code paths
32 QUnit
.config
.urlConfig
.push({
34 label
: "Bypass optimizations",
35 tooltip
: "Force use of the most basic code by disabling native querySelectorAll; contains; compareDocumentPosition"
37 if ( QUnit
.urlParams
.basic
) {
38 document
.querySelectorAll
= null;
39 document
.documentElement
.contains
= null;
40 document
.documentElement
.compareDocumentPosition
= null;
44 document
.write( "<script id='jquery-js' src='" + src
+ "'><\x2Fscript>" );
47 <script src=
"data/testrunner.js"></script>
49 <script src=
"unit/core.js"></script>
50 <script src=
"unit/callbacks.js"></script>
51 <script src=
"unit/deferred.js"></script>
52 <script src=
"unit/support.js"></script>
53 <script src=
"unit/data.js"></script>
54 <script src=
"unit/queue.js"></script>
55 <script src=
"unit/attributes.js"></script>
56 <script src=
"unit/event.js"></script>
57 <script src=
"unit/selector.js"></script>
58 <script src=
"unit/traversing.js"></script>
59 <script src=
"unit/manipulation.js"></script>
60 <script src=
"unit/wrap.js"></script>
61 <script src=
"unit/css.js"></script>
62 <script src=
"unit/serialize.js"></script>
63 <script src=
"unit/ajax.js"></script>
64 <script src=
"unit/effects.js"></script>
65 <script src=
"unit/offset.js"></script>
66 <script src=
"unit/dimensions.js"></script>
67 <script src=
"unit/deprecated.js"></script>
68 <script src=
"unit/exports.js"></script>
70 <!-- Subproject tests must be last because they replace our test fixture -->
72 testSubproject( "Sizzle", "../bower_components/sizzle/test/", /^unit\/.*\.js$/ );
76 // html5shiv, enabling HTML5 elements to be used with jQuery
77 ( "abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup " +
78 "mark meter nav output progress section summary time video"
79 ).replace(/\w+/g, function(n
) {
80 document
.createElement(n
);
86 <div id=
"qunit"></div>
89 <!-- 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 -->
90 <iframe id=
"loadediframe" name=
"loadediframe" style=
"display:none;" src=
"data/iframe.html"></iframe>
91 <dl id=
"dl" style=
"position:absolute;top:-32767px;left:-32767px;width:1px;">
92 <div id=
"qunit-fixture">
93 <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>
95 Here are some links in a normal paragraph:
<a id=
"google" href=
"http://www.google.com/" title=
"Google!">Google
</a>,
96 <a id=
"groups" href=
"http://groups.google.com/" class=
"GROUPS">Google Groups (Link)
</a>.
97 This link has
<code><a href=
"http://smin" id=
"anchor1">class=
"blog"</a></code>:
98 <a href=
"http://diveintomark.org/" class=
"blog" hreflang=
"en" id=
"mark">diveintomark
</a>
102 <p id=
"sndp">Everything inside the red border is inside a div with
<code>id=
"foo"</code>.
</p>
103 <p lang=
"en" id=
"en">This is a normal link:
<a id=
"yahoo" href=
"http://www.yahoo.com/" class=
"blogTest">Yahoo
</a></p>
104 <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>
107 <div id=
"nothiddendiv" style=
"height:1px;background:white;" class=
"nothiddendiv">
108 <div id=
"nothiddendivchild"></div>
110 <span id=
"name+value"></span>
111 <p id=
"first">Try them out:
</p>
112 <ul id=
"firstUL"></ul>
114 <form id=
"form" action=
"formaction">
115 <label for=
"action" id=
"label-for">Action:
</label>
116 <input type=
"text" name=
"action" value=
"Test" id=
"text1" maxlength=
"30"/>
117 <input type=
"text" name=
"text2" value=
"Test" id=
"text2" disabled=
"disabled"/>
118 <input type=
"radio" name=
"radio1" id=
"radio1" value=
"on"/>
120 <input type=
"radio" name=
"radio2" id=
"radio2" checked=
"checked"/>
121 <input type=
"checkbox" name=
"check" id=
"check1" checked=
"checked"/>
122 <input type=
"checkbox" id=
"check2" value=
"on"/>
124 <input type=
"hidden" name=
"hidden" id=
"hidden1"/>
125 <input type=
"text" style=
"display:none;" name=
"foo[bar]" id=
"hidden2"/>
127 <input type=
"text" id=
"name" name=
"name" value=
"name" />
128 <input type=
"search" id=
"search" name=
"search" value=
"search" />
130 <button id=
"button" name=
"button" type=
"button">Button
</button>
132 <textarea id=
"area1" maxlength=
"30">foobar
</textarea>
134 <select name=
"select1" id=
"select1">
135 <option id=
"option1a" class=
"emptyopt" value=
"">Nothing
</option>
136 <option id=
"option1b" value=
"1">1</option>
137 <option id=
"option1c" value=
"2">2</option>
138 <option id=
"option1d" value=
"3">3</option>
140 <select name=
"select2" id=
"select2">
141 <option id=
"option2a" class=
"emptyopt" value=
"">Nothing
</option>
142 <option id=
"option2b" value=
"1">1</option>
143 <option id=
"option2c" value=
"2">2</option>
144 <option id=
"option2d" selected=
"selected" value=
"3">3</option>
146 <select name=
"select3" id=
"select3" multiple=
"multiple">
147 <option id=
"option3a" class=
"emptyopt" value=
"">Nothing
</option>
148 <option id=
"option3b" selected=
"selected" value=
"1">1</option>
149 <option id=
"option3c" selected=
"selected" value=
"2">2</option>
150 <option id=
"option3d" value=
"3">3</option>
151 <option id=
"option3e">no value
</option>
153 <select name=
"select4" id=
"select4" multiple=
"multiple">
154 <optgroup disabled=
"disabled">
155 <option id=
"option4a" class=
"emptyopt" value=
"">Nothing
</option>
156 <option id=
"option4b" disabled=
"disabled" selected=
"selected" value=
"1">1</option>
157 <option id=
"option4c" selected=
"selected" value=
"2">2</option>
159 <option selected=
"selected" disabled=
"disabled" id=
"option4d" value=
"3">3</option>
160 <option id=
"option4e">no value
</option>
162 <select name=
"select5" id=
"select5">
163 <option id=
"option5a" value=
"3">1</option>
164 <option id=
"option5b" value=
"2">2</option>
165 <option id=
"option5c" value=
"1" data-attr=
"">3</option>
168 <object id=
"object1" codebase=
"stupid">
169 <param name=
"p1" value=
"x1" />
170 <param name=
"p2" value=
"x2" />
173 <span id=
"台北Táiběi"></span>
174 <span id=
"台北" lang=
"中文"></span>
175 <span id=
"utf8class1" class=
"台北Táiběi 台北"></span>
176 <span id=
"utf8class2" class=
"台北"></span>
177 <span id=
"foo:bar" class=
"foo:bar"></span>
178 <span id=
"test.foo[5]bar" class=
"test.foo[5]bar"></span>
180 <foo_bar id=
"foobar">test element
</foo_bar>
182 <b id=
"floatTest">Float test.
</b>
183 <iframe id=
"iframe" name=
"iframe"></iframe>
184 <form id=
"lengthtest">
185 <input type=
"text" id=
"length" name=
"test"/>
186 <input type=
"text" id=
"idTest" name=
"id"/>
188 <table id=
"table"></table>
190 <form id=
"name-tests">
191 <!-- Inputs with a grouped name attribute. -->
192 <input name=
"types[]" id=
"types_all" type=
"checkbox" value=
"all" />
193 <input name=
"types[]" id=
"types_anime" type=
"checkbox" value=
"anime" />
194 <input name=
"types[]" id=
"types_movie" type=
"checkbox" value=
"movie" />
197 <form id=
"testForm" action=
"#" method=
"get">
198 <textarea name=
"T3" rows=
"2" cols=
"15">?
200 <input type=
"hidden" name=
"H1" value=
"x" />
201 <input type=
"hidden" name=
"H2" />
202 <input name=
"PWD" type=
"password" value=
"" />
203 <input name=
"T1" type=
"text" />
204 <input name=
"T2" type=
"text" value=
"YES" readonly=
"readonly" />
205 <input type=
"checkbox" name=
"C1" value=
"1" />
206 <input type=
"checkbox" name=
"C2" />
207 <input type=
"radio" name=
"R1" value=
"1" />
208 <input type=
"radio" name=
"R1" value=
"2" />
209 <input type=
"text" name=
"My Name" value=
"me" />
210 <input type=
"reset" name=
"reset" value=
"NO" />
212 <option value=
"abc">ABC
</option>
213 <option value=
"abc">ABC
</option>
214 <option value=
"abc">ABC
</option>
216 <select name=
"S2" multiple=
"multiple" size=
"3">
217 <option value=
"abc">ABC
</option>
218 <option value=
"abc">ABC
</option>
219 <option value=
"abc">ABC
</option>
222 <option selected=
"selected">YES
</option>
225 <option value=
"" selected=
"selected">NO
</option>
227 <input type=
"submit" name=
"sub1" value=
"NO" />
228 <input type=
"submit" name=
"sub2" value=
"NO" />
229 <input type=
"image" name=
"sub3" value=
"NO" />
230 <button name=
"sub4" type=
"submit" value=
"NO">NO
</button>
231 <input name=
"D1" type=
"text" value=
"NO" disabled=
"disabled" />
232 <input type=
"checkbox" checked=
"checked" disabled=
"disabled" name=
"D2" value=
"NO" />
233 <input type=
"radio" name=
"D3" value=
"NO" checked=
"checked" disabled=
"disabled" />
234 <select name=
"D4" disabled=
"disabled">
235 <option selected=
"selected" value=
"NO">NO
</option>
237 <input id=
"list-test" type=
"text" />
238 <datalist id=
"datalist">
239 <option value=
"option"></option>
244 <div id=
"checkedtest" style=
"display:none;">
245 <input type=
"radio" name=
"checkedtestradios" checked=
"checked"/>
246 <input type=
"radio" name=
"checkedtestradios" value=
"on"/>
247 <input type=
"checkbox" name=
"checkedtestcheckboxes" checked=
"checked"/>
248 <input type=
"checkbox" name=
"checkedtestcheckboxes" />
251 <div id=
"nonnodes"><span id=
"nonnodesElement">hi
</span> there
<!-- mon ami --></div>
253 <div><div class=
"hidden">hidden
</div></div>
258 <div id=
"no-clone-exception"><object><embed></embed></object></div>
261 <div id=
"tabindex-tests">
262 <ol id=
"listWithTabIndex" tabindex=
"5">
263 <li id=
"foodWithNegativeTabIndex" tabindex=
"-1">Rice
</li>
264 <li id=
"foodNoTabIndex">Beans
</li>
269 <div id=
"divWithNoTabIndex">I'm hungry. I should...
</div>
270 <span>...
</span><a href=
"#" id=
"linkWithNoTabIndex">Eat lots of food
</a><span>...
</span> |
271 <span>...
</span><a href=
"#" id=
"linkWithTabIndex" tabindex=
"2">Eat a little food
</a><span>...
</span> |
272 <span>...
</span><a href=
"#" id=
"linkWithNegativeTabIndex" tabindex=
"-1">Eat no food
</a><span>...
</span>
273 <span>...
</span><a id=
"linkWithNoHrefWithNoTabIndex">Eat a burger
</a><span>...
</span>
274 <span>...
</span><a id=
"linkWithNoHrefWithTabIndex" tabindex=
"1">Eat some funyuns
</a><span>...
</span>
275 <span>...
</span><a id=
"linkWithNoHrefWithNegativeTabIndex" tabindex=
"-1">Eat some funyuns
</a><span>...
</span>
276 <input id=
"inputWithoutTabIndex"/>
277 <button id=
"buttonWithoutTabIndex"></button>
278 <textarea id=
"textareaWithoutTabIndex"></textarea>
280 <menuitem id=
"menuitemWithoutTabIndex" command=
"submitbutton" default
/>
284 <div id=
"liveHandlerOrder">
285 <span id=
"liveSpan1"><a href=
"#" id=
"liveLink1"></a></span>
286 <span id=
"liveSpan2"><a href=
"#" id=
"liveLink2"></a></span>
289 <div id=
"siblingTest">
290 <em id=
"siblingfirst">1</em>
291 <em id=
"siblingnext">2</em>
292 <em id=
"siblingthird">
293 <em id=
"siblingchild">
294 <em id=
"siblinggrandchild">
295 <em id=
"siblinggreatgrandchild"></em>
299 <span id=
"siblingspan"></span>
301 <div id=
"fx-test-group" style=
"position: absolute; width: 1px; height: 1px; overflow: hidden;">
302 <div id=
"fx-queue" name=
"test">
303 <div id=
"fadein" class='chain-test' name='div'
>fadeIn
<div>fadeIn
</div></div>
304 <div id=
"fadeout" class='chain-test chain-test-out'
>fadeOut
<div>fadeOut
</div></div>
306 <div id=
"show" class='chain-test'
>show
<div>show
</div></div>
307 <div id=
"hide" class='chain-test chain-test-out'
>hide
<div>hide
</div></div>
308 <div id=
"easehide" class='chain-test chain-test-out'
>hide
<div>hide
</div></div>
310 <div id=
"togglein" class='chain-test'
>togglein
<div>togglein
</div></div>
311 <div id=
"toggleout" class='chain-test chain-test-out'
>toggleout
<div>toggleout
</div></div>
312 <div id=
"easetoggleout" class='chain-test chain-test-out'
>toggleout
<div>toggleout
</div></div>
314 <div id=
"slideup" class='chain-test'
>slideUp
<div>slideUp
</div></div>
315 <div id=
"slidedown" class='chain-test chain-test-out'
>slideDown
<div>slideDown
</div></div>
316 <div id=
"easeslideup" class='chain-test'
>slideUp
<div>slideUp
</div></div>
318 <div id=
"slidetogglein" class='chain-test'
>slideToggleIn
<div>slideToggleIn
</div></div>
319 <div id=
"slidetoggleout" class='chain-test chain-test-out'
>slideToggleOut
<div>slideToggleOut
</div></div>
321 <div id=
"fadetogglein" class='chain-test'
>fadeToggleIn
<div>fadeToggleIn
</div></div>
322 <div id=
"fadetoggleout" class='chain-test chain-test-out'
>fadeToggleOut
<div>fadeToggleOut
</div></div>
324 <div id=
"fadeto" class='chain-test'
>fadeTo
<div>fadeTo
</div></div>
327 <div id=
"fx-tests"></div>
328 <span id=
"display"></span>
332 <map name=
"imgmap" id=
"imgmap">
333 <area shape=
"rect" coords=
"0,0,200,50">