Make sure that non-px values aren't manipulated before input to height/width.
[jquery.git] / test / index.html
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         <title>jQuery Test Suite</title>
6         <link rel="Stylesheet" media="screen" href="qunit/qunit/qunit.css" />
7         <link rel="Stylesheet" media="screen" href="data/testsuite.css" />
8         <!-- Includes -->
9         <script src="data/testinit.js"></script>
10
11         <script src="../src/core.js"></script>
12         <script src="../src/support.js"></script>
13         <script src="../src/data.js"></script>
14         <script src="../src/queue.js"></script>
15         <script src="../src/attributes.js"></script>
16         <script src="../src/event.js"></script>
17         <script src="../src/sizzle/sizzle.js"></script>
18         <script src="../src/sizzle-jquery.js"></script>
19         <script src="../src/traversing.js"></script>
20         <script src="../src/manipulation.js"></script>
21         <script src="../src/css.js"></script>
22         <script src="../src/ajax.js"></script>
23         <script src="../src/effects.js"></script>
24         <script src="../src/offset.js"></script>
25         <script src="../src/dimensions.js"></script>
26
27         <script src="qunit/qunit/qunit.js"></script>
28         <script src="data/testrunner.js"></script>
29
30         <script src="unit/core.js"></script>
31         <script src="unit/data.js"></script>
32         <script src="unit/queue.js"></script>
33         <script src="unit/attributes.js"></script>
34         <script src="unit/event.js"></script>
35         <script src="unit/selector.js"></script>
36         <script src="unit/traversing.js"></script>
37         <script src="unit/manipulation.js"></script>
38         <script src="unit/css.js"></script>
39         <script src="unit/ajax.js"></script>
40         <script src="unit/effects.js"></script>
41         <script src="unit/offset.js"></script>
42         <script src="unit/dimensions.js"></script>
43 </head>
44
45 <body id="body">
46         <h1 id="qunit-header">jQuery Test Suite</h1>
47         <h2 id="qunit-banner"></h2>
48         <div id="qunit-testrunner-toolbar"></div>
49         <h2 id="qunit-userAgent"></h2>
50         <ol id="qunit-tests"></ol>
51         
52         <!-- Test HTML -->
53         <div id="nothiddendiv" style="height:1px;background:white;" class="nothiddendiv">
54                 <div id="nothiddendivchild"></div>
55         </div>
56         <!-- this iframe is outside the #main so it won't reload constantly wasting time, but it means the tests must be "safe" and clean up after themselves -->
57         <iframe id="loadediframe" name="loadediframe" style="display:none;" src="data/iframe.html"></iframe>
58         <dl id="dl" style="display:none;">
59         <div id="main" style="display: none;">
60                 <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>
61                 <p id="ap">
62                         Here are some links in a normal paragraph: <a id="google" href="http://www.google.com/" title="Google!">Google</a>, 
63                         <a id="groups" href="http://groups.google.com/" class="GROUPS">Google Groups (Link)</a>. 
64                         This link has <code><a href="http://smin" id="anchor1">class="blog"</a></code>: 
65                         <a href="http://diveintomark.org/" class="blog" hreflang="en" id="mark">diveintomark</a>
66
67                 </p>
68                 <div id="foo">
69                         <p id="sndp">Everything inside the red border is inside a div with <code>id="foo"</code>.</p>
70                         <p lang="en" id="en">This is a normal link: <a id="yahoo" href="http://www.yahoo.com/" class="blogTest">Yahoo</a></p>
71                         <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>
72
73                 </div>
74                 <span id="name+value"></span>
75                 <p id="first">Try them out:</p>
76                 <ul id="firstUL"></ul>
77                 <ol id="empty"></ol>
78                 <form id="form" action="formaction">
79                         <label for="action" id="label-for">Action:</label>
80                         <input type="text" name="action" value="Test" id="text1" maxlength="30"/>
81                         <input type="text" name="text2" value="Test" id="text2" disabled="disabled"/>
82                         <input type="radio" name="radio1" id="radio1" value="on"/>
83
84                         <input type="radio" name="radio2" id="radio2" checked="checked"/>
85                         <input type="checkbox" name="check" id="check1" checked="checked"/>
86                         <input type="checkbox" id="check2" value="on"/>
87
88                         <input type="hidden" name="hidden" id="hidden1"/>
89                         <input type="text" style="display:none;" name="foo[bar]" id="hidden2"/>
90                         
91                         <input type="text" id="name" name="name" value="name" />
92                         <input type="search" id="search" name="search" value="search" />
93                         
94                         <button id="button" name="button" type="button">Button</button>
95                         
96                         <textarea id="area1" maxlength="30">foobar</textarea>
97                         
98                         <select name="select1" id="select1">
99                                 <option id="option1a" class="emptyopt" value="">Nothing</option>
100                                 <option id="option1b" value="1">1</option>
101                                 <option id="option1c" value="2">2</option>
102                                 <option id="option1d" value="3">3</option>
103                         </select>
104                         <select name="select2" id="select2">
105                                 <option id="option2a" class="emptyopt" value="">Nothing</option>
106                                 <option id="option2b" value="1">1</option>
107                                 <option id="option2c" value="2">2</option>
108                                 <option id="option2d" selected="selected" value="3">3</option>
109                         </select>
110                         <select name="select3" id="select3" multiple="multiple">
111                                 <option id="option3a" class="emptyopt" value="">Nothing</option>
112                                 <option id="option3b" selected="selected" value="1">1</option>
113                                 <option id="option3c" selected="selected" value="2">2</option>
114                                 <option id="option3d" value="3">3</option>
115                                 <option id="option3e">no value</option>
116                         </select>
117                         
118                         <object id="object1" codebase="stupid">
119                                 <param name="p1" value="x1" />
120                                 <param name="p2" value="x2" />
121                         </object>
122                         
123                         <span id="台北Táiběi"></span>
124                         <span id="台北" lang="中文"></span>
125                         <span id="utf8class1" class="台北Táiběi 台北"></span>
126                         <span id="utf8class2" class="台北"></span>
127                         <span id="foo:bar" class="foo:bar"></span>
128                         <span id="test.foo[5]bar" class="test.foo[5]bar"></span>
129                         
130                         <foo_bar id="foobar">test element</foo_bar>
131                 </form>
132                 <b id="floatTest">Float test.</b>
133                 <iframe id="iframe" name="iframe"></iframe>
134                 <form id="lengthtest">
135                         <input type="text" id="length" name="test"/>
136                         <input type="text" id="idTest" name="id"/>
137                 </form>
138                 <table id="table"></table>
139
140                 <form id="name-tests">
141                         <!-- Inputs with a grouped name attribute. -->
142                         <input name="types[]" id="types_all" type="checkbox" value="all" />
143                         <input name="types[]" id="types_anime" type="checkbox" value="anime" />
144                         <input name="types[]" id="types_movie" type="checkbox" value="movie" />
145                 </form>
146                 
147                 <form id="testForm" action="#" method="get">
148                         <textarea name="T3" rows="2" cols="15">?
149 Z</textarea>
150                         <input type="hidden" name="H1" value="x" />
151                         <input type="hidden" name="H2" />
152                         <input name="PWD" type="password" value="" />
153                         <input name="T1" type="text" />
154                         <input name="T2" type="text" value="YES" readonly="readonly" />
155                         <input type="checkbox" name="C1" value="1" />
156                         <input type="checkbox" name="C2" />
157                         <input type="radio" name="R1" value="1" />
158                         <input type="radio" name="R1" value="2" />
159                         <input type="text" name="My Name" value="me" />
160                         <input type="reset" name="reset" value="NO" />
161                         <select name="S1">
162                                 <option value="abc">ABC</option>
163                                 <option value="abc">ABC</option>
164                                 <option value="abc">ABC</option>
165                         </select>
166                         <select name="S2" multiple="multiple" size="3">
167                                 <option value="abc">ABC</option>
168                                 <option value="abc">ABC</option>
169                                 <option value="abc">ABC</option>
170                         </select>
171                         <select name="S3">
172                                 <option selected="selected">YES</option>
173                         </select>
174                         <select name="S4">
175                                 <option value="" selected="selected">NO</option>
176                         </select>
177                         <input type="submit" name="sub1" value="NO" />
178                         <input type="submit" name="sub2" value="NO" />
179                         <input type="image" name="sub3" value="NO" />
180                         <button name="sub4" type="submit" value="NO">NO</button>
181                         <input name="D1" type="text" value="NO" disabled="disabled" />
182                         <input type="checkbox" checked="checked" disabled="disabled" name="D2" value="NO" />
183                         <input type="radio" name="D3" value="NO" checked="checked" disabled="disabled" />
184                         <select name="D4" disabled="disabled">
185                                 <option selected="selected" value="NO">NO</option>
186                         </select>
187                 </form>
188                 <div id="moretests">
189                         <form>
190                                 <div id="checkedtest" style="display:none;">
191                                         <input type="radio" name="checkedtestradios" checked="checked"/>
192                                         <input type="radio" name="checkedtestradios" value="on"/>
193                                         <input type="checkbox" name="checkedtestcheckboxes" checked="checked"/>
194                                         <input type="checkbox" name="checkedtestcheckboxes" />
195                                 </div>
196                         </form>
197                         <div id="nonnodes"><span>hi</span> there <!-- mon ami --></div>
198                         <div id="t2037">
199                                 <div><div class="hidden">hidden</div></div>
200                         </div>
201                 </div>
202                 
203                 <div id="tabindex-tests">
204                         <ol id="listWithTabIndex" tabindex="5">
205                                 <li id="foodWithNegativeTabIndex" tabindex="-1">Rice</li>
206                                 <li id="foodNoTabIndex">Beans</li>
207                                 <li>Blinis</li>
208                                 <li>Tofu</li>
209                         </ol>
210                 
211                         <div id="divWithNoTabIndex">I'm hungry. I should...</div>
212                         <span>...</span><a href="#" id="linkWithNoTabIndex">Eat lots of food</a><span>...</span> |
213                         <span>...</span><a href="#" id="linkWithTabIndex" tabindex="2">Eat a little food</a><span>...</span> |
214                         <span>...</span><a href="#" id="linkWithNegativeTabIndex" tabindex="-1">Eat no food</a><span>...</span>
215                         <span>...</span><a id="linkWithNoHrefWithNoTabIndex">Eat a burger</a><span>...</span>
216                         <span>...</span><a id="linkWithNoHrefWithTabIndex" tabindex="1">Eat some funyuns</a><span>...</span>
217                         <span>...</span><a id="linkWithNoHrefWithNegativeTabIndex" tabindex="-1">Eat some funyuns</a><span>...</span>
218                 </div>
219                 
220                 <div id="liveHandlerOrder">
221                         <span id="liveSpan1"><a href="#" id="liveLink1"></a></span>
222                         <span id="liveSpan2"><a href="#" id="liveLink2"></a></span>
223                 </div>
224
225                 <div id="siblingTest">
226                         <em id="siblingfirst">1</em>
227                         <em id="siblingnext">2</em>
228                 </div>
229         </div>
230         </dl>
231         <div id="fx-test-group" style="position:absolute;width:1px;height:1px;overflow:hidden;">
232                 <div id="fx-queue" name="test">
233                         <div id="fadein" class='chain test' name='div'>fadeIn<div>fadeIn</div></div>
234                         <div id="fadeout" class='chain test out'>fadeOut<div>fadeOut</div></div>
235                         
236                         <div id="show" class='chain test'>show<div>show</div></div>
237                         <div id="hide" class='chain test out'>hide<div>hide</div></div>
238                         
239                         <div id="togglein" class='chain test'>togglein<div>togglein</div></div>
240                         <div id="toggleout" class='chain test out'>toggleout<div>toggleout</div></div>
241                 
242                         
243                         <div id="slideup" class='chain test'>slideUp<div>slideUp</div></div>
244                         <div id="slidedown" class='chain test out'>slideDown<div>slideDown</div></div>
245                         
246                         <div id="slidetogglein" class='chain test'>slideToggleIn<div>slideToggleIn</div></div>
247                         <div id="slidetoggleout" class='chain test out'>slideToggleOut<div>slideToggleOut</div></div>
248                 </div>
249                 
250                 <div id="fx-tests"></div>
251         </div>
252 </body>
253 </html>