alloy-js-test-san 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (91) hide show
  1. data/README.rdoc +83 -0
  2. data/Rakefile +27 -0
  3. data/VERSION.yml +4 -0
  4. data/bin/jstest +10 -0
  5. data/lib/js_test_san/runner.rb +70 -0
  6. data/lib/js_test_san/test.rb +17 -0
  7. data/lib/js_test_san/test_case.rb +103 -0
  8. data/lib/js_test_san.rb +2 -0
  9. data/test/fixtures/a_unit_test.html +27 -0
  10. data/test/fixtures/a_unit_test.js +22 -0
  11. data/test/regression/prototype/unit/ajax_test.html +29 -0
  12. data/test/regression/prototype/unit/array_test.html +28 -0
  13. data/test/regression/prototype/unit/assets/prototype.js +4900 -0
  14. data/test/regression/prototype/unit/assets/unittest.css +50 -0
  15. data/test/regression/prototype/unit/assets/unittest.js +615 -0
  16. data/test/regression/prototype/unit/assets/unittest_transport.js +1 -0
  17. data/test/regression/prototype/unit/base_test.html +27 -0
  18. data/test/regression/prototype/unit/class_test.html +27 -0
  19. data/test/regression/prototype/unit/date_test.html +27 -0
  20. data/test/regression/prototype/unit/dom_test.html +304 -0
  21. data/test/regression/prototype/unit/element_mixins_test.html +30 -0
  22. data/test/regression/prototype/unit/enumerable_test.html +35 -0
  23. data/test/regression/prototype/unit/event_test.html +31 -0
  24. data/test/regression/prototype/unit/fixtures/ajax.html +2 -0
  25. data/test/regression/prototype/unit/fixtures/ajax.js +42 -0
  26. data/test/regression/prototype/unit/fixtures/array.html +1 -0
  27. data/test/regression/prototype/unit/fixtures/class.js +83 -0
  28. data/test/regression/prototype/unit/fixtures/content.html +1 -0
  29. data/test/regression/prototype/unit/fixtures/data.json +1 -0
  30. data/test/regression/prototype/unit/fixtures/dom.css +84 -0
  31. data/test/regression/prototype/unit/fixtures/dom.html +278 -0
  32. data/test/regression/prototype/unit/fixtures/dom.js +17 -0
  33. data/test/regression/prototype/unit/fixtures/element_mixins.html +4 -0
  34. data/test/regression/prototype/unit/fixtures/element_mixins.js +2 -0
  35. data/test/regression/prototype/unit/fixtures/empty.html +0 -0
  36. data/test/regression/prototype/unit/fixtures/empty.js +1 -0
  37. data/test/regression/prototype/unit/fixtures/enumerable.html +8 -0
  38. data/test/regression/prototype/unit/fixtures/enumerable.js +23 -0
  39. data/test/regression/prototype/unit/fixtures/event.html +4 -0
  40. data/test/regression/prototype/unit/fixtures/form.html +108 -0
  41. data/test/regression/prototype/unit/fixtures/function.js +13 -0
  42. data/test/regression/prototype/unit/fixtures/hash.js +25 -0
  43. data/test/regression/prototype/unit/fixtures/hello.js +1 -0
  44. data/test/regression/prototype/unit/fixtures/logo.gif +0 -0
  45. data/test/regression/prototype/unit/fixtures/object.html +6 -0
  46. data/test/regression/prototype/unit/fixtures/object.js +7 -0
  47. data/test/regression/prototype/unit/fixtures/position.html +9 -0
  48. data/test/regression/prototype/unit/fixtures/selector.html +71 -0
  49. data/test/regression/prototype/unit/fixtures/string.js +8 -0
  50. data/test/regression/prototype/unit/fixtures/unittest.html +18 -0
  51. data/test/regression/prototype/unit/form_test.html +135 -0
  52. data/test/regression/prototype/unit/function_test.html +27 -0
  53. data/test/regression/prototype/unit/hash_test.html +27 -0
  54. data/test/regression/prototype/unit/number_test.html +27 -0
  55. data/test/regression/prototype/unit/object_test.html +32 -0
  56. data/test/regression/prototype/unit/periodical_executer_test.html +27 -0
  57. data/test/regression/prototype/unit/position_test.html +36 -0
  58. data/test/regression/prototype/unit/prototype_test.html +27 -0
  59. data/test/regression/prototype/unit/range_test.html +27 -0
  60. data/test/regression/prototype/unit/regexp_test.html +27 -0
  61. data/test/regression/prototype/unit/selector_test.html +98 -0
  62. data/test/regression/prototype/unit/string_test.html +27 -0
  63. data/test/regression/prototype/unit/tests/ajax_test.js +379 -0
  64. data/test/regression/prototype/unit/tests/array_test.js +186 -0
  65. data/test/regression/prototype/unit/tests/base_test.js +43 -0
  66. data/test/regression/prototype/unit/tests/class_test.js +136 -0
  67. data/test/regression/prototype/unit/tests/date_test.js +5 -0
  68. data/test/regression/prototype/unit/tests/dom_test.js +1493 -0
  69. data/test/regression/prototype/unit/tests/element_mixins_test.js +32 -0
  70. data/test/regression/prototype/unit/tests/enumerable_test.js +271 -0
  71. data/test/regression/prototype/unit/tests/event_test.js +235 -0
  72. data/test/regression/prototype/unit/tests/form_test.js +382 -0
  73. data/test/regression/prototype/unit/tests/function_test.js +133 -0
  74. data/test/regression/prototype/unit/tests/hash_test.js +178 -0
  75. data/test/regression/prototype/unit/tests/number_test.js +44 -0
  76. data/test/regression/prototype/unit/tests/object_test.js +180 -0
  77. data/test/regression/prototype/unit/tests/periodical_executer_test.js +15 -0
  78. data/test/regression/prototype/unit/tests/position_test.js +44 -0
  79. data/test/regression/prototype/unit/tests/prototype_test.js +43 -0
  80. data/test/regression/prototype/unit/tests/range_test.js +58 -0
  81. data/test/regression/prototype/unit/tests/regexp_test.js +42 -0
  82. data/test/regression/prototype/unit/tests/selector_test.js +408 -0
  83. data/test/regression/prototype/unit/tests/string_test.js +548 -0
  84. data/test/regression/prototype/unit/tests/unittest_test.js +148 -0
  85. data/test/regression/prototype/unit/unittest_test.html +45 -0
  86. data/test/regression/prototype/upstream +1 -0
  87. data/test/test_helper.rb +20 -0
  88. data/test/unit/runner_test.rb +165 -0
  89. data/test/unit/test_case_test.rb +167 -0
  90. data/test/unit/test_test.rb +24 -0
  91. metadata +145 -0
@@ -0,0 +1,84 @@
1
+ #style_test_1 { cursor: pointer; font-size:12px;}
2
+ div.style-test { margin-left: 1px }
3
+
4
+ #style_test_dimensions_container {
5
+ position: absolute;
6
+ top: 0;
7
+ left: 500px;
8
+ width: 20px;
9
+ height: 30px;
10
+ margin: 10px;
11
+ padding: 10px;
12
+ border: 3px solid red;
13
+ }
14
+
15
+ #not_floating_style { float: none }
16
+ #floating_style { float: left }
17
+ #op2 { opacity:0.5;filter:alpha(opacity=50)progid:DXImageTransform.Microsoft.Blur(strength=10);}
18
+
19
+ #scroll_test_1 {
20
+ margin: 10px;
21
+ padding: 10px;
22
+ position: relative;
23
+ }
24
+
25
+ #scroll_test_2 {
26
+ position: absolute;
27
+ left: 10px;
28
+ top: 10px;
29
+ }
30
+
31
+ #dimensions-visible,
32
+ #dimensions-display-none,
33
+ #dimensions-visible-pos-rel,
34
+ #dimensions-display-none-pos-rel,
35
+ #dimensions-visible-pos-abs,
36
+ #dimensions-display-none-pos-abs {
37
+ font-size: 10px;
38
+ height: 10em;
39
+ width: 20em;
40
+ }
41
+
42
+ #dimensions-visible-pos-abs,
43
+ #dimensions-display-none-pos-abs {
44
+ position: absolute;
45
+ top: 15px;
46
+ left: 15px;
47
+ }
48
+
49
+ #dimensions-visible-pos-rel,
50
+ #dimensions-display-none-pos-rel {
51
+ position: relative;
52
+ top: 15px;
53
+ left: 15px;
54
+ }
55
+
56
+ #dimensions-display-none, #imensions-display-none-pos-rel, #dimensions-display-none-pos-abs {
57
+ display: none;
58
+ }
59
+
60
+ #dimensions-table, #dimensions-tbody, #dimensions-tr, #dimensions-td {
61
+ font-size: 10px;
62
+ margin: 0;
63
+ padding: 0;
64
+ border: 0;
65
+ border-spacing: 0;
66
+ height: 10em;
67
+ width: 20em;
68
+ }
69
+
70
+ #notInlineAbsoluted { position: absolute; }
71
+
72
+ #elementToViewportDimensions {
73
+ position: absolute;
74
+ top: 0;
75
+ left: 0;
76
+ height: 10px;
77
+ width: 10px;
78
+ background: #000;
79
+ }
80
+
81
+ /* for scroll test on really big screens */
82
+ body {
83
+ height: 40000px;
84
+ }
@@ -0,0 +1,278 @@
1
+ <div id="scroll_test_1">
2
+ <p id="scroll_test_2">Scroll test</p>
3
+ </div>
4
+
5
+ <div id="test-visible">visible</div>
6
+ <div id="test-hidden" style="display:none;">hidden</div>
7
+ <div id="test-toggle-visible">visible</div>
8
+ <div id="test-toggle-hidden" style="display:none;">hidden</div>
9
+ <div id="test-hide-visible">visible</div>
10
+ <div id="test-hide-hidden" style="display:none;">hidden</div>
11
+ <div id="test-show-visible">visible</div>
12
+ <div id="test-show-hidden" style="display:none;">hidden</div>
13
+ <div id="removable-container"><div id="removable"></div></div>
14
+
15
+ <div>
16
+ <table>
17
+ <tbody id="table">
18
+ <tr>
19
+ <td>Data</td>
20
+ </tr>
21
+ <tr>
22
+ <td id="a_cell">First Row</td>
23
+ </tr>
24
+ <tr id="second_row">
25
+ <td>Second Row</td>
26
+ </tr>
27
+ </tbody>
28
+ </table>
29
+ </div>
30
+
31
+ <div id="table-container-to-replace">
32
+ <table>
33
+ <tbody id="table-to-replace">
34
+ <tr>
35
+ <td>Data</td>
36
+ </tr>
37
+ <tr>
38
+ <td id="a_cell-to-replace">First Row</td>
39
+ </tr>
40
+ <tr id="second_row-to-replace">
41
+ <td>Second Row</td>
42
+ </tr>
43
+ </tbody>
44
+ </table>
45
+ </div>
46
+
47
+ <p class="test">Test paragraph outside of container</p>
48
+
49
+ <div id="container">
50
+ <p class="test" id="intended">Test paragraph 1 inside of container</p>
51
+ <p class="test">Test paragraph 2 inside of container</p>
52
+ <p class="test">Test paragraph 3 inside of container</p>
53
+ <p class="test">Test paragraph 4 inside of container</p>
54
+ </div>
55
+
56
+ <div id="testdiv">to be updated</div>
57
+ <div id="testdiv-replace-container-1"><div id="testdiv-replace-1"></div></div>
58
+ <div id="testdiv-replace-container-2"><div id="testdiv-replace-2"></div></div>
59
+ <div id="testdiv-replace-container-3"><div id="testdiv-replace-3"></div></div>
60
+ <div id="testdiv-replace-container-4"><div id="testdiv-replace-4"></div></div>
61
+ <div id="testdiv-replace-container-5"><div id="testdiv-replace-5"></div></div>
62
+ <div id="testdiv-replace-container-element"><div id="testdiv-replace-element"></div></div>
63
+ <div id="testdiv-replace-container-toelement"><div id="testdiv-replace-toelement"></div></div>
64
+ <div id="testdiv-replace-container-tohtml"><div id="testdiv-replace-tohtml"></div></div>
65
+ <div id="testtable-replace-container"><table id="testtable-replace"></table></div>
66
+ <table id="testrow-replace-container"><tr id="testrow-replace"></tr></table>
67
+ <select id="testoption-replace-container"><option id="testoption-replace"></option><option>stays</option></select>
68
+ <div id="testform-replace-container"><p>some text</p><form id="testform-replace"><input id="testinput-replace" type="text" /></form><p>some text</p></div>
69
+
70
+ <div id="element_with_visible_overflow" style="overflow:visible">V</div>
71
+ <div id="element_with_hidden_overflow" style="overflow:hidden">H</div>
72
+ <div id="element_with_scroll_overflow" style="overflow:scroll">S</div>
73
+
74
+ <div id="element_extend_test"> </div>
75
+
76
+ <div id="element_reextend_test"><div id="discard_1"></div></div>
77
+
78
+ <div id="test_whitespace"> <span> </span>
79
+
80
+
81
+ <div><div></div> </div><span> </span>
82
+ </div>
83
+
84
+
85
+ <div id="nav_tests_isolator">
86
+ <div id="nav_test_first_sibling"></div>
87
+ <div></div>
88
+ <p id="nav_test_p" class="test"></p>
89
+ <span id="nav_test_prev_sibling"></span>
90
+
91
+ <ul id="navigation_test" style="display: none">
92
+ <!-- comment node to screw things up -->
93
+ <li class="first"><em>A</em></li>
94
+ <li><em class="dim">B</em></li>
95
+ <li id="navigation_test_c">
96
+ <em>C</em>
97
+ <ul>
98
+ <li><em class="dim">E</em></li>
99
+ <li id="navigation_test_f"><em>F</em></li>
100
+ </ul>
101
+ </li>
102
+ <li class="last"><em>D</em></li>
103
+ </ul>
104
+
105
+ <div id="navigation_test_next_sibling">
106
+ <!-- -->
107
+ </div>
108
+
109
+ <p></p>
110
+ </div>
111
+
112
+ <div id="class_names">
113
+ <p class="A"></p>
114
+ <ul class="A B" id="class_names_ul">
115
+ <li class="C"></li>
116
+ <li class="A C"></li>
117
+ <li class="1"></li>
118
+ </ul>
119
+ <div class="B C D"></div>
120
+ <div id="unextended"></div>
121
+ </div>
122
+
123
+ <div id="style_test_1" style="display:none;"></div>
124
+ <div id="style_test_2" class="style-test" style="font-size:11px;"></div>
125
+
126
+ <div id="style_test_3">blah</div>
127
+ <span id="style_test_4">blah</span>
128
+ <span id="style_test_5">blah</span>
129
+
130
+ <div id="style_test_dimensions_container">
131
+ <div id="style_test_dimensions" style="background:#ddd;padding:1px;margin:1px;border:1px solid #00f"><div style="height:5px;background:#eee;width:5px;padding:2px;margin:2px;border:2px solid #0f0"> </div>
132
+ </div>
133
+ </div>
134
+
135
+ <div id="test_csstext_1">test_csstext_1</div>
136
+ <div id="test_csstext_2">test_csstext_2</div>
137
+ <div id="test_csstext_3" style="border: 1px solid red">test_csstext_3</div>
138
+ <div id="test_csstext_4" style="font-size: 20px">test_csstext_4</div>
139
+ <div id="test_csstext_5">test_csstext_5</div>
140
+
141
+ <div id="custom_attributes">
142
+ <div foo="1" bar="2"></div>
143
+ <div foo="2"></div>
144
+ </div>
145
+
146
+ <div id="cloned_element_attributes_issue" foo="original"></div>
147
+ <a id="attributes_with_issues_1" href="test.html" accesskey="L" tabindex="50" title="a link" onclick="alert('hello world');"></a>
148
+ <a id="attributes_with_issues_2" href="" accesskey="" tabindex="" title=""></a>
149
+ <a id="attributes_with_issues_3"></a>
150
+ <form id="attributes_with_issues_form" method="post" action="blah">
151
+ <input type="checkbox" id="attributes_with_issues_checked" name="a" checked="checked"/>
152
+ <input type="checkbox" id="attributes_with_issues_disabled" name="b" checked="checked" disabled="disabled"/>
153
+ <input type="text" id="attributes_with_issues_readonly" name="c" readonly="readonly" value="blech"/>
154
+ <input type="date" id="attributes_with_issues_type" value="blech" />
155
+ <select id="attributes_with_issues_multiple" name="e" multiple="multiple">
156
+ <option>blech</option>
157
+ <option>blah</option>
158
+ </select>
159
+ </form>
160
+
161
+ <!-- writeAttributes -->
162
+ <p id="write_attribute_para"></p>
163
+ <a id="write_attribute_link" href="test.html"></a>
164
+ <form action="/dev/null" id="write_attribute_form" method="get" accept-charset="utf-8">
165
+ <label id="write_attribute_label"></label>
166
+ <input type="checkbox" name="write_attribute_checkbox" value="" id="write_attribute_checkbox">
167
+ <input type="checkbox" checked="checked" name="write_attribute_checked_checkbox" value="" id="write_attribute_checked_checkbox">
168
+ <input type="text" name="write_attribute_input" value="" id="write_attribute_input">
169
+ <select id="write_attribute_select">
170
+ <option>Cat</option>
171
+ <option>Dog</option>
172
+ </select>
173
+ </form>
174
+
175
+ <table id="write_attribute_table" cellpadding="6" cellspacing="4">
176
+ <tr><td id="write_attribute_td">A</td><td>B</td></tr>
177
+ <tr><td>C</td></tr>
178
+ <tr><td>D</td><td>E</td><td>F</td></tr>
179
+ </table>
180
+
181
+ <div id="dom_attribute_precedence">
182
+ <form action="blech" method="post">
183
+ <input type="submit" id="update" />
184
+ </form>
185
+ </div>
186
+
187
+ <div id="not_floating_none">NFN</div>
188
+ <div id="not_floating_inline" style="float:none">NFI</div>
189
+ <div id="not_floating_style">NFS</div>
190
+
191
+ <div id="floating_inline" style="float:left">FI</div>
192
+ <div id="floating_style">FS</div>
193
+ <!-- Test Element opacity functions -->
194
+ <img id="op1" alt="op2" src="fixtures/logo.gif" style="opacity:0.5;filter:alpha(opacity=50)" />
195
+ <img id="op2" alt="op2" src="fixtures/logo.gif"/>
196
+ <img id="op3" alt="op3" src="fixtures/logo.gif"/>
197
+ <img id="op4-ie" alt="op3" src="fixtures/logo.gif" style="filter:alpha(opacity=30)" />
198
+ <div id="dimensions-visible"></div>
199
+ <div id="dimensions-display-none"></div>
200
+ <div id="dimensions-visible-pos-rel"></div>
201
+ <div id="dimensions-display-none-pos-rel"></div>
202
+ <div id="dimensions-visible-pos-abs"></div>
203
+ <div id="dimensions-display-none-pos-abs"></div>
204
+ <table border="0" cellspacing="0" cellpadding="0" id="dimensions-table">
205
+ <tbody id="dimensions-tbody">
206
+ <tr id="dimensions-tr">
207
+ <td id="dimensions-td">Data</td>
208
+ </tr>
209
+ </tbody>
210
+ </table>
211
+
212
+ <div id="dimensions-nester" style="width: 500px;">
213
+ <div id="dimensions-nestee" style="display: none">This is a nested DIV. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</div>
214
+ </div>
215
+
216
+
217
+ <p id="test-empty"></p>
218
+ <p id="test-empty-but-contains-whitespace">
219
+
220
+
221
+ </p>
222
+ <p id="test-full">content</p>
223
+ <div id="ancestor">
224
+ <div id="child">
225
+ <div id="grand-child">
226
+ <div id="great-grand-child"></div>
227
+ </div></div><!-- intentional formatting; don't change this line -->
228
+ <div id="sibling"><div id="grand-sibling"></div></div>
229
+ </div>
230
+ <div id="not-in-the-family"></div>
231
+
232
+ <div id="insertions-container"><div id="insertions-main"><p>some content.</p></div></div>
233
+ <div id="insertions-node-container"><div id="insertions-node-main"><p>some content.</p></div></div>
234
+ <div id="element-insertions-container"><div id="element-insertions-main"><p>some content.</p></div></div>
235
+ <div id="element-insertions-multiple-container"><div id="element-insertions-multiple-main"><p>some content.</p></div></div>
236
+ <table id="table_for_insertions"></table>
237
+ <table id="table_for_row_insertions"><tr id="row_1"></tr></table>
238
+ <form method="post" action="blah">
239
+ <select id="select_for_update" name="select_for_update">
240
+ <option>option 1</option>
241
+ <option>option 2</option>
242
+ </select>
243
+ <select id="select_for_insert_bottom" name="select_for_insert_bottom">
244
+ <option>option 1</option>
245
+ <option>option 2</option>
246
+ </select>
247
+ <select id="select_for_insert_top" name="select_for_insert_top">
248
+ <option>option 1</option>
249
+ <option>option 2</option>
250
+ </select>
251
+ </form>
252
+ <div id="wrap-container"><p id="wrap"></p></div>
253
+
254
+ <!-- Positioning methods bench -->
255
+ <div id="body_absolute" style="position: absolute; top: 10px; left: 10px">
256
+ <div id="absolute_absolute" style="position: absolute; top: 10px; left:10px"> </div>
257
+ <div id="absolute_relative" style="position: relative; top: 10px; left:10px">
258
+ <div style="height:10px;font-size:2px">test<span id="inline">test</span></div>
259
+ <div id="absolute_relative_undefined">XYZ</div>
260
+ </div>
261
+ <div id="absolute_fixed" style="position: fixed; top: 10px; left: 10px">
262
+ <span id="absolute_fixed_absolute" style="position: absolute; top: 10px; left: 10px">foo</span>
263
+ <span id="absolute_fixed_undefined" style="display:block">bar</span>
264
+ </div></div>
265
+ <div id="notInlineAbsoluted"></div>
266
+ <div id="inlineAbsoluted" style="position: absolute"></div>
267
+
268
+ <div id="unextended"></div>
269
+ <div id="identification">
270
+ <div id="predefined_id"></div>
271
+ <div></div>
272
+ <div></div>
273
+ <div></div>
274
+ <div id="anonymous_element_3"></div>
275
+ </div>
276
+
277
+ <div id='elementToViewportDimensions' style='display: none'></div>
278
+ <div id="auto_dimensions" style="height:auto"></div>
@@ -0,0 +1,17 @@
1
+ var testVar = 'to be updated', testVar2 = '', documentViewportProperties;
2
+
3
+ Element.addMethods({
4
+ hashBrowns: function(element) { return 'hash browns'; }
5
+ });
6
+
7
+ Element.addMethods("LI", {
8
+ pancakes: function(element) { return "pancakes"; }
9
+ });
10
+
11
+ Element.addMethods("DIV", {
12
+ waffles: function(element) { return "waffles"; }
13
+ });
14
+
15
+ Element.addMethods($w("li div"), {
16
+ orangeJuice: function(element) { return "orange juice"; }
17
+ });
@@ -0,0 +1,4 @@
1
+ <form id="form">
2
+ <input type="text" id="input" value="4" />
3
+ <input type="submit" />
4
+ </form>
@@ -0,0 +1,2 @@
1
+ Form.Element.Methods.coffee = Prototype.K;
2
+ Element.addMethods();
@@ -0,0 +1,8 @@
1
+ <table id="grepTable">
2
+ <tbody id="grepTBody">
3
+ <tr id="grepRow">
4
+ <th id="grepHeader" class="cell"></th>
5
+ <td id="grepCell" class="cell"></td>
6
+ </tr>
7
+ </tbody>
8
+ </table>
@@ -0,0 +1,23 @@
1
+ var Fixtures = {
2
+ People: [
3
+ {name: 'Sam Stephenson', nickname: 'sam-'},
4
+ {name: 'Marcel Molina Jr.', nickname: 'noradio'},
5
+ {name: 'Scott Barron', nickname: 'htonl'},
6
+ {name: 'Nicholas Seckar', nickname: 'Ulysses'}
7
+ ],
8
+
9
+ Nicknames: $w('sam- noradio htonl Ulysses'),
10
+
11
+ Basic: [1, 2, 3],
12
+
13
+ Primes: [
14
+ 1, 2, 3, 5, 7, 11, 13, 17, 19, 23,
15
+ 29, 31, 37, 41, 43, 47, 53, 59, 61, 67,
16
+ 71, 73, 79, 83, 89, 97
17
+ ],
18
+
19
+ Z: []
20
+ };
21
+
22
+ for (var i = 1; i <= 100; i++)
23
+ Fixtures.Z.push(i);
@@ -0,0 +1,4 @@
1
+ <div id="outer" style="display: none">
2
+ <p id="inner">One two three <span id="span">four</span></p>
3
+ </div>
4
+ <div id="container"><div></div></div>
@@ -0,0 +1,108 @@
1
+ <form id="form" method="get" action="fixtures/empty.js">
2
+ <input type="text" name="val1" id="input_enabled" value="4" />
3
+ <div>This is not a form element</div>
4
+ <input type="text" name="val2" id="input_disabled" disabled="disabled" value="5" />
5
+ <input type="submit" name="first_submit" value="Commit it!" />
6
+ <input type="submit" name="second_submit" value="Delete it!" />
7
+ <input type="text" name="action" value="blah" />
8
+ </form>
9
+
10
+ <form id="bigform" method="get" action="fixtures/empty.js">
11
+ <div id="inputs">
12
+ <input type="text" name="dummy" id="dummy_disabled" disabled="disabled"/>
13
+ <input type="submit" name="commit" id="submit" />
14
+ <input type="button" name="clicky" value="click me" />
15
+ <input type="reset" name="revert" />
16
+ <input type="text" name="greeting" id="focus_text" value="Hello" />
17
+ </div>
18
+
19
+ <!-- some edge cases in serialization -->
20
+ <div id="value_checks">
21
+ <input name="twin" type="text" value="" />
22
+ <input name="twin" type="text" value="siamese" />
23
+ <!-- Rails checkbox hack with hidden input: -->
24
+ <input name="checky" type="checkbox" id="checkbox_hack" value="1" />
25
+ <input name="checky" type="hidden" value="0" />
26
+ </div>
27
+
28
+ <!-- all variations of SELECT controls -->
29
+ <div id="selects_wrapper">
30
+ <select name="vu">
31
+ <option value="1" selected="selected">One</option>
32
+ <option value="2">Two</option>
33
+ <option value="3">Three</option>
34
+ </select>
35
+ <select id="multiSel1" name="vm[]" multiple="multiple">
36
+ <option id="multiSel1_opt1" value="1" selected="selected">One</option>
37
+ <option id="multiSel1_opt2" value="2">Two</option>
38
+ <option id="multiSel1_opt3" value="3" selected="selected">Three</option>
39
+ </select>
40
+ <select name="nvu">
41
+ <option selected="selected">One</option>
42
+ <option value="2">Two</option>
43
+ <option value="3">Three</option>
44
+ </select>
45
+
46
+ <fieldset id="selects_fieldset">
47
+ <select name="nvm[]" multiple="multiple">
48
+ <option selected="selected">One</option>
49
+ <option>Two</option>
50
+ <option selected="selected">Three</option>
51
+ </select>
52
+ <select name="evu">
53
+ <option value="" selected="selected">One</option>
54
+ <option value="2">Two</option>
55
+ <option value="3">Three</option>
56
+ </select>
57
+ <select name="evm[]" multiple="multiple">
58
+ <option value="" selected="selected">One</option>
59
+ <option>Two</option>
60
+ <option selected="selected">Three</option>
61
+ </select>
62
+ </fieldset>
63
+ </div>
64
+
65
+ <div id="various">
66
+ <select name="tf_selectOne"><option selected="selected"></option><option>1</option></select>
67
+ <textarea name="tf_textarea"></textarea>
68
+ <input type="checkbox" name="tf_checkbox" value="on" />
69
+ <select name="tf_selectMany" multiple="multiple"></select>
70
+ <input type="text" name="tf_text" />
71
+ <div>This is not a form element</div>
72
+ <input type="radio" name="tf_radio" value="on" />
73
+ <input type="hidden" name="tf_hidden" />
74
+ <input type="password" name="tf_password" />
75
+ </div>
76
+ </form>
77
+
78
+ <form id="form_focus_hidden" style="display: none">
79
+ <input type="text" />
80
+ </form>
81
+
82
+ <form id="form_with_file_input">
83
+ <input type="file" name="file_name" value="foo" />
84
+ </form>
85
+
86
+ <!-- tabindexed forms -->
87
+ <div id="tabindex">
88
+ <form id="ffe">
89
+ <p><input type="text" disabled="disabled" id="ffe_disabled" /></p>
90
+ <input type="hidden" id="ffe_hidden" />
91
+ <input type="checkbox" id="ffe_checkbox" />
92
+ </form>
93
+
94
+ <form id="ffe_ti">
95
+ <p><input type="text" disabled="disabled" id="ffe_ti_disabled" /></p>
96
+ <input type="hidden" id="ffe_ti_hidden" />
97
+ <input type="checkbox" id="ffe_ti_checkbox" />
98
+ <input type="submit" id="ffe_ti_submit" tabindex="1" />
99
+ </form>
100
+
101
+ <form id="ffe_ti2">
102
+ <p><input type="text" disabled="disabled" id="ffe_ti2_disabled" /></p>
103
+ <input type="hidden" id="ffe_ti2_hidden" />
104
+ <input type="checkbox" id="ffe_ti2_checkbox" tabindex="0" />
105
+ <input type="submit" id="ffe_ti2_submit" tabindex="1" />
106
+ </form>
107
+
108
+ </div>
@@ -0,0 +1,13 @@
1
+ var arg1 = 1;
2
+ var arg2 = 2;
3
+ var arg3 = 3;
4
+ function TestObj() { };
5
+ TestObj.prototype.assertingEventHandler =
6
+ function(event, assertEvent, assert1, assert2, assert3, a1, a2, a3) {
7
+ assertEvent(event);
8
+ assert1(a1);
9
+ assert2(a2);
10
+ assert3(a3);
11
+ };
12
+
13
+ var globalBindTest = null;
@@ -0,0 +1,25 @@
1
+ var Fixtures = {
2
+ one: { a: 'A#' },
3
+
4
+ many: {
5
+ a: 'A',
6
+ b: 'B',
7
+ c: 'C',
8
+ d: 'D#'
9
+ },
10
+
11
+ functions: {
12
+ quad: function(n) { return n*n },
13
+ plus: function(n) { return n+n }
14
+ },
15
+
16
+ multiple: { color: $w('r g b') },
17
+ multiple_nil: { color: ['r', null, 'g', undefined, 0] },
18
+ multiple_all_nil: { color: [null, undefined] },
19
+ multiple_empty: { color: [] },
20
+ multiple_special: { 'stuff[]': $w('$ a ;') },
21
+
22
+ value_undefined: { a:"b", c:undefined },
23
+ value_null: { a:"b", c:null },
24
+ value_zero: { a:"b", c:0 }
25
+ };
@@ -0,0 +1 @@
1
+ $("content").update("<H2>Hello world!</H2>");
@@ -0,0 +1,6 @@
1
+ <div id="test"></div>
2
+ <ul id="list">
3
+ <li></li>
4
+ <li></li>
5
+ <li></li>
6
+ </ul>
@@ -0,0 +1,7 @@
1
+ var Person = function(name){
2
+ this.name = name;
3
+ };
4
+
5
+ Person.prototype.toJSON = function() {
6
+ return '-' + this.name;
7
+ };
@@ -0,0 +1,9 @@
1
+ <div id="ensure_scrollbars" style="width:10000px; height:10000px; position:absolute" > </div>
2
+
3
+ <div id="body_absolute" style="position: absolute; top: 10px; left: 10px">
4
+ <div id="absolute_absolute" style="position: absolute; top: 10px; left:10px"> </div>
5
+ <div id="absolute_relative" style="position: relative; top: 10px; left:10px">
6
+ <div style="height:10px;font-size:2px">test<span id="inline">test</span></div>
7
+ <div id="absolute_relative_undefined"> </div>
8
+ </div>
9
+ </div>