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=
"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.8.2.ajax_xhr.min.js"></script>
14 <script src=
"data/testinit.js"></script>
16 <script src=
"qunit/qunit/qunit.js"></script>
19 var src
= "../dist/jquery.js";
21 // Config parameter to use minified jQuery
22 QUnit
.config
.urlConfig
.push({
24 label
: "Load minified",
25 tooltip
: "Load the minified version of the jQuery build"
27 if ( QUnit
.urlParams
.min
) {
28 src
= "../dist/jquery.min.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 src='" + src
+ "'><\/script>" );
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/css.js"></script>
61 <script src=
"unit/serialize.js"></script>
62 <script src=
"unit/ajax.js"></script>
63 <script src=
"unit/effects.js"></script>
64 <script src=
"unit/offset.js"></script>
65 <script src=
"unit/dimensions.js"></script>
66 <script src=
"unit/deprecated.js"></script>
67 <script src=
"unit/exports.js"></script>
69 <!-- Subproject tests must be last because they replace our test fixture -->
71 testSubproject( "Sizzle", "../src/sizzle/test/", /^unit\/.*\.js$/ );
75 // html5shiv, enabling HTML5 elements to be used with jQuery
76 ( "abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup " +
77 "mark meter nav output progress section summary time video"
78 ).replace(/\w+/g, function(n
) {
79 document
.createElement(n
);
85 <div id=
"qunit"></div>
88 <!-- 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 -->
89 <iframe id=
"loadediframe" name=
"loadediframe" style=
"display:none;" src=
"data/iframe.html"></iframe>
90 <dl id=
"dl" style=
"position:absolute;top:-32767px;left:-32767px;width:1px">
91 <div id=
"qunit-fixture">
92 <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>
94 Here are some links in a normal paragraph:
<a id=
"google" href=
"http://www.google.com/" title=
"Google!">Google
</a>,
95 <a id=
"groups" href=
"http://groups.google.com/" class=
"GROUPS">Google Groups (Link)
</a>.
96 This link has
<code><a href=
"http://smin" id=
"anchor1">class=
"blog"</a></code>:
97 <a href=
"http://diveintomark.org/" class=
"blog" hreflang=
"en" id=
"mark">diveintomark
</a>
101 <p id=
"sndp">Everything inside the red border is inside a div with
<code>id=
"foo"</code>.
</p>
102 <p lang=
"en" id=
"en">This is a normal link:
<a id=
"yahoo" href=
"http://www.yahoo.com/" class=
"blogTest">Yahoo
</a></p>
103 <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>
106 <div id=
"nothiddendiv" style=
"height:1px;background:white;" class=
"nothiddendiv">
107 <div id=
"nothiddendivchild"></div>
109 <span id=
"name+value"></span>
110 <p id=
"first">Try them out:
</p>
111 <ul id=
"firstUL"></ul>
113 <form id=
"form" action=
"formaction">
114 <label for=
"action" id=
"label-for">Action:
</label>
115 <input type=
"text" name=
"action" value=
"Test" id=
"text1" maxlength=
"30"/>
116 <input type=
"text" name=
"text2" value=
"Test" id=
"text2" disabled=
"disabled"/>
117 <input type=
"radio" name=
"radio1" id=
"radio1" value=
"on"/>
119 <input type=
"radio" name=
"radio2" id=
"radio2" checked=
"checked"/>
120 <input type=
"checkbox" name=
"check" id=
"check1" checked=
"checked"/>
121 <input type=
"checkbox" id=
"check2" value=
"on"/>
123 <input type=
"hidden" name=
"hidden" id=
"hidden1"/>
124 <input type=
"text" style=
"display:none;" name=
"foo[bar]" id=
"hidden2"/>
126 <input type=
"text" id=
"name" name=
"name" value=
"name" />
127 <input type=
"search" id=
"search" name=
"search" value=
"search" />
129 <button id=
"button" name=
"button" type=
"button">Button
</button>
131 <textarea id=
"area1" maxlength=
"30">foobar
</textarea>
133 <select name=
"select1" id=
"select1">
134 <option id=
"option1a" class=
"emptyopt" value=
"">Nothing
</option>
135 <option id=
"option1b" value=
"1">1</option>
136 <option id=
"option1c" value=
"2">2</option>
137 <option id=
"option1d" value=
"3">3</option>
139 <select name=
"select2" id=
"select2">
140 <option id=
"option2a" class=
"emptyopt" value=
"">Nothing
</option>
141 <option id=
"option2b" value=
"1">1</option>
142 <option id=
"option2c" value=
"2">2</option>
143 <option id=
"option2d" selected=
"selected" value=
"3">3</option>
145 <select name=
"select3" id=
"select3" multiple=
"multiple">
146 <option id=
"option3a" class=
"emptyopt" value=
"">Nothing
</option>
147 <option id=
"option3b" selected=
"selected" value=
"1">1</option>
148 <option id=
"option3c" selected=
"selected" value=
"2">2</option>
149 <option id=
"option3d" value=
"3">3</option>
150 <option id=
"option3e">no value
</option>
152 <select name=
"select4" id=
"select4" multiple=
"multiple">
153 <optgroup disabled=
"disabled">
154 <option id=
"option4a" class=
"emptyopt" value=
"">Nothing
</option>
155 <option id=
"option4b" disabled=
"disabled" selected=
"selected" value=
"1">1</option>
156 <option id=
"option4c" selected=
"selected" value=
"2">2</option>
158 <option selected=
"selected" disabled=
"disabled" id=
"option4d" value=
"3">3</option>
159 <option id=
"option4e">no value
</option>
161 <select name=
"select5" id=
"select5">
162 <option id=
"option5a" value=
"3">1</option>
163 <option id=
"option5b" value=
"2">2</option>
164 <option id=
"option5c" value=
"1" data-attr=
"">3</option>
167 <object id=
"object1" codebase=
"stupid">
168 <param name=
"p1" value=
"x1" />
169 <param name=
"p2" value=
"x2" />
172 <span id=
"台北Táiběi"></span>
173 <span id=
"台北" lang=
"中文"></span>
174 <span id=
"utf8class1" class=
"台北Táiběi 台北"></span>
175 <span id=
"utf8class2" class=
"台北"></span>
176 <span id=
"foo:bar" class=
"foo:bar"></span>
177 <span id=
"test.foo[5]bar" class=
"test.foo[5]bar"></span>
179 <foo_bar id=
"foobar">test element
</foo_bar>
181 <b id=
"floatTest">Float test.
</b>
182 <iframe id=
"iframe" name=
"iframe"></iframe>
183 <form id=
"lengthtest">
184 <input type=
"text" id=
"length" name=
"test"/>
185 <input type=
"text" id=
"idTest" name=
"id"/>
187 <table id=
"table"></table>
189 <form id=
"name-tests">
190 <!-- Inputs with a grouped name attribute. -->
191 <input name=
"types[]" id=
"types_all" type=
"checkbox" value=
"all" />
192 <input name=
"types[]" id=
"types_anime" type=
"checkbox" value=
"anime" />
193 <input name=
"types[]" id=
"types_movie" type=
"checkbox" value=
"movie" />
196 <form id=
"testForm" action=
"#" method=
"get">
197 <textarea name=
"T3" rows=
"2" cols=
"15">?
199 <input type=
"hidden" name=
"H1" value=
"x" />
200 <input type=
"hidden" name=
"H2" />
201 <input name=
"PWD" type=
"password" value=
"" />
202 <input name=
"T1" type=
"text" />
203 <input name=
"T2" type=
"text" value=
"YES" readonly=
"readonly" />
204 <input type=
"checkbox" name=
"C1" value=
"1" />
205 <input type=
"checkbox" name=
"C2" />
206 <input type=
"radio" name=
"R1" value=
"1" />
207 <input type=
"radio" name=
"R1" value=
"2" />
208 <input type=
"text" name=
"My Name" value=
"me" />
209 <input type=
"reset" name=
"reset" value=
"NO" />
211 <option value=
"abc">ABC
</option>
212 <option value=
"abc">ABC
</option>
213 <option value=
"abc">ABC
</option>
215 <select name=
"S2" multiple=
"multiple" size=
"3">
216 <option value=
"abc">ABC
</option>
217 <option value=
"abc">ABC
</option>
218 <option value=
"abc">ABC
</option>
221 <option selected=
"selected">YES
</option>
224 <option value=
"" selected=
"selected">NO
</option>
226 <input type=
"submit" name=
"sub1" value=
"NO" />
227 <input type=
"submit" name=
"sub2" value=
"NO" />
228 <input type=
"image" name=
"sub3" value=
"NO" />
229 <button name=
"sub4" type=
"submit" value=
"NO">NO
</button>
230 <input name=
"D1" type=
"text" value=
"NO" disabled=
"disabled" />
231 <input type=
"checkbox" checked=
"checked" disabled=
"disabled" name=
"D2" value=
"NO" />
232 <input type=
"radio" name=
"D3" value=
"NO" checked=
"checked" disabled=
"disabled" />
233 <select name=
"D4" disabled=
"disabled">
234 <option selected=
"selected" value=
"NO">NO
</option>
236 <input id=
"list-test" type=
"text" />
237 <datalist id=
"datalist">
238 <option value=
"option"></option>
243 <div id=
"checkedtest" style=
"display:none;">
244 <input type=
"radio" name=
"checkedtestradios" checked=
"checked"/>
245 <input type=
"radio" name=
"checkedtestradios" value=
"on"/>
246 <input type=
"checkbox" name=
"checkedtestcheckboxes" checked=
"checked"/>
247 <input type=
"checkbox" name=
"checkedtestcheckboxes" />
250 <div id=
"nonnodes"><span>hi
</span> there
<!-- mon ami --></div>
252 <div><div class=
"hidden">hidden
</div></div>
257 <div id=
"no-clone-exception"><object><embed></embed></object></div>
260 <div id=
"tabindex-tests">
261 <ol id=
"listWithTabIndex" tabindex=
"5">
262 <li id=
"foodWithNegativeTabIndex" tabindex=
"-1">Rice
</li>
263 <li id=
"foodNoTabIndex">Beans
</li>
268 <div id=
"divWithNoTabIndex">I'm hungry. I should...
</div>
269 <span>...
</span><a href=
"#" id=
"linkWithNoTabIndex">Eat lots of food
</a><span>...
</span> |
270 <span>...
</span><a href=
"#" id=
"linkWithTabIndex" tabindex=
"2">Eat a little food
</a><span>...
</span> |
271 <span>...
</span><a href=
"#" id=
"linkWithNegativeTabIndex" tabindex=
"-1">Eat no food
</a><span>...
</span>
272 <span>...
</span><a id=
"linkWithNoHrefWithNoTabIndex">Eat a burger
</a><span>...
</span>
273 <span>...
</span><a id=
"linkWithNoHrefWithTabIndex" tabindex=
"1">Eat some funyuns
</a><span>...
</span>
274 <span>...
</span><a id=
"linkWithNoHrefWithNegativeTabIndex" tabindex=
"-1">Eat some funyuns
</a><span>...
</span>
277 <div id=
"liveHandlerOrder">
278 <span id=
"liveSpan1"><a href=
"#" id=
"liveLink1"></a></span>
279 <span id=
"liveSpan2"><a href=
"#" id=
"liveLink2"></a></span>
282 <div id=
"siblingTest">
283 <em id=
"siblingfirst">1</em>
284 <em id=
"siblingnext">2</em>
285 <em id=
"siblingthird">
286 <em id=
"siblingchild">
287 <em id=
"siblinggrandchild">
288 <em id=
"siblinggreatgrandchild"></em>
292 <span id=
"siblingspan"></span>
294 <div id=
"fx-test-group" style=
"position: absolute; width: 1px; height: 1px; overflow: hidden;">
295 <div id=
"fx-queue" name=
"test">
296 <div id=
"fadein" class='chain-test' name='div'
>fadeIn
<div>fadeIn
</div></div>
297 <div id=
"fadeout" class='chain-test chain-test-out'
>fadeOut
<div>fadeOut
</div></div>
299 <div id=
"show" class='chain-test'
>show
<div>show
</div></div>
300 <div id=
"hide" class='chain-test chain-test-out'
>hide
<div>hide
</div></div>
301 <div id=
"easehide" class='chain-test chain-test-out'
>hide
<div>hide
</div></div>
303 <div id=
"togglein" class='chain-test'
>togglein
<div>togglein
</div></div>
304 <div id=
"toggleout" class='chain-test chain-test-out'
>toggleout
<div>toggleout
</div></div>
305 <div id=
"easetoggleout" class='chain-test chain-test-out'
>toggleout
<div>toggleout
</div></div>
307 <div id=
"slideup" class='chain-test'
>slideUp
<div>slideUp
</div></div>
308 <div id=
"slidedown" class='chain-test chain-test-out'
>slideDown
<div>slideDown
</div></div>
309 <div id=
"easeslideup" class='chain-test'
>slideUp
<div>slideUp
</div></div>
311 <div id=
"slidetogglein" class='chain-test'
>slideToggleIn
<div>slideToggleIn
</div></div>
312 <div id=
"slidetoggleout" class='chain-test chain-test-out'
>slideToggleOut
<div>slideToggleOut
</div></div>
314 <div id=
"fadetogglein" class='chain-test'
>fadeToggleIn
<div>fadeToggleIn
</div></div>
315 <div id=
"fadetoggleout" class='chain-test chain-test-out'
>fadeToggleOut
<div>fadeToggleOut
</div></div>
317 <div id=
"fadeto" class='chain-test'
>fadeTo
<div>fadeTo
</div></div>
320 <div id=
"fx-tests"></div>
324 <map name=
"imgmap" id=
"imgmap">
325 <area shape=
"rect" coords=
"0,0,200,50">