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