index.html 14 KB

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