headless-squirrel 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +55 -0
- data/Rakefile +27 -0
- data/bin/jstest +10 -0
- data/lib/headless_squirrel.rb +2 -0
- data/lib/headless_squirrel/console.rb +24 -0
- data/lib/headless_squirrel/runner.rb +70 -0
- data/lib/headless_squirrel/test.rb +17 -0
- data/lib/headless_squirrel/test_case.rb +158 -0
- data/test/fixtures/a_unit_test.html +27 -0
- data/test/fixtures/a_unit_test.js +22 -0
- data/test/fixtures/syntax_error.html +27 -0
- data/test/fixtures/syntax_error.js +5 -0
- data/test/fixtures/type_error.html +27 -0
- data/test/fixtures/type_error.js +1 -0
- data/test/regression/prototype/unit/ajax_test.html +29 -0
- data/test/regression/prototype/unit/array_test.html +28 -0
- data/test/regression/prototype/unit/assets/prototype.js +4900 -0
- data/test/regression/prototype/unit/assets/unittest.css +50 -0
- data/test/regression/prototype/unit/assets/unittest.js +615 -0
- data/test/regression/prototype/unit/assets/unittest_transport.js +1 -0
- data/test/regression/prototype/unit/base_test.html +27 -0
- data/test/regression/prototype/unit/class_test.html +27 -0
- data/test/regression/prototype/unit/date_test.html +27 -0
- data/test/regression/prototype/unit/dom_test.html +304 -0
- data/test/regression/prototype/unit/element_mixins_test.html +30 -0
- data/test/regression/prototype/unit/enumerable_test.html +35 -0
- data/test/regression/prototype/unit/event_test.html +31 -0
- data/test/regression/prototype/unit/fixtures/ajax.html +2 -0
- data/test/regression/prototype/unit/fixtures/ajax.js +42 -0
- data/test/regression/prototype/unit/fixtures/array.html +1 -0
- data/test/regression/prototype/unit/fixtures/class.js +83 -0
- data/test/regression/prototype/unit/fixtures/content.html +1 -0
- data/test/regression/prototype/unit/fixtures/data.json +1 -0
- data/test/regression/prototype/unit/fixtures/dom.css +84 -0
- data/test/regression/prototype/unit/fixtures/dom.html +278 -0
- data/test/regression/prototype/unit/fixtures/dom.js +17 -0
- data/test/regression/prototype/unit/fixtures/element_mixins.html +4 -0
- data/test/regression/prototype/unit/fixtures/element_mixins.js +2 -0
- data/test/regression/prototype/unit/fixtures/empty.html +0 -0
- data/test/regression/prototype/unit/fixtures/empty.js +1 -0
- data/test/regression/prototype/unit/fixtures/enumerable.html +8 -0
- data/test/regression/prototype/unit/fixtures/enumerable.js +23 -0
- data/test/regression/prototype/unit/fixtures/event.html +4 -0
- data/test/regression/prototype/unit/fixtures/form.html +108 -0
- data/test/regression/prototype/unit/fixtures/function.js +13 -0
- data/test/regression/prototype/unit/fixtures/hash.js +25 -0
- data/test/regression/prototype/unit/fixtures/hello.js +1 -0
- data/test/regression/prototype/unit/fixtures/logo.gif +0 -0
- data/test/regression/prototype/unit/fixtures/object.html +6 -0
- data/test/regression/prototype/unit/fixtures/object.js +7 -0
- data/test/regression/prototype/unit/fixtures/position.html +9 -0
- data/test/regression/prototype/unit/fixtures/selector.html +71 -0
- data/test/regression/prototype/unit/fixtures/string.js +8 -0
- data/test/regression/prototype/unit/fixtures/unittest.html +18 -0
- data/test/regression/prototype/unit/form_test.html +135 -0
- data/test/regression/prototype/unit/function_test.html +27 -0
- data/test/regression/prototype/unit/hash_test.html +27 -0
- data/test/regression/prototype/unit/number_test.html +27 -0
- data/test/regression/prototype/unit/object_test.html +32 -0
- data/test/regression/prototype/unit/periodical_executer_test.html +27 -0
- data/test/regression/prototype/unit/position_test.html +36 -0
- data/test/regression/prototype/unit/prototype_test.html +27 -0
- data/test/regression/prototype/unit/range_test.html +27 -0
- data/test/regression/prototype/unit/regexp_test.html +27 -0
- data/test/regression/prototype/unit/selector_test.html +98 -0
- data/test/regression/prototype/unit/string_test.html +27 -0
- data/test/regression/prototype/unit/tests/ajax_test.js +379 -0
- data/test/regression/prototype/unit/tests/array_test.js +186 -0
- data/test/regression/prototype/unit/tests/base_test.js +43 -0
- data/test/regression/prototype/unit/tests/class_test.js +136 -0
- data/test/regression/prototype/unit/tests/date_test.js +5 -0
- data/test/regression/prototype/unit/tests/dom_test.js +1493 -0
- data/test/regression/prototype/unit/tests/element_mixins_test.js +32 -0
- data/test/regression/prototype/unit/tests/enumerable_test.js +271 -0
- data/test/regression/prototype/unit/tests/event_test.js +235 -0
- data/test/regression/prototype/unit/tests/form_test.js +382 -0
- data/test/regression/prototype/unit/tests/function_test.js +133 -0
- data/test/regression/prototype/unit/tests/hash_test.js +178 -0
- data/test/regression/prototype/unit/tests/number_test.js +44 -0
- data/test/regression/prototype/unit/tests/object_test.js +180 -0
- data/test/regression/prototype/unit/tests/periodical_executer_test.js +15 -0
- data/test/regression/prototype/unit/tests/position_test.js +44 -0
- data/test/regression/prototype/unit/tests/prototype_test.js +43 -0
- data/test/regression/prototype/unit/tests/range_test.js +58 -0
- data/test/regression/prototype/unit/tests/regexp_test.js +42 -0
- data/test/regression/prototype/unit/tests/selector_test.js +408 -0
- data/test/regression/prototype/unit/tests/string_test.js +548 -0
- data/test/regression/prototype/unit/tests/unittest_test.js +148 -0
- data/test/regression/prototype/unit/unittest_test.html +45 -0
- data/test/regression/prototype/upstream +1 -0
- data/test/regression/scriptaculous/unit/_ajax_inplaceeditor_ipce_alt_text.html +1 -0
- data/test/regression/scriptaculous/unit/_ajax_inplaceeditor_ipce_collection.js +1 -0
- data/test/regression/scriptaculous/unit/_ajax_inplaceeditor_result.html +1 -0
- data/test/regression/scriptaculous/unit/_ajax_inplaceeditor_result2.html +1 -0
- data/test/regression/scriptaculous/unit/_ajax_inplaceeditor_tagged.html +1 -0
- data/test/regression/scriptaculous/unit/_ajax_inplaceeditor_text.html +1 -0
- data/test/regression/scriptaculous/unit/_ajax_updater_result.html +20 -0
- data/test/regression/scriptaculous/unit/_autocomplete_result.html +11 -0
- data/test/regression/scriptaculous/unit/_autocomplete_result_nobr.html +1 -0
- data/test/regression/scriptaculous/unit/ajax_autocompleter_test.html +243 -0
- data/test/regression/scriptaculous/unit/ajax_inplaceeditor_test.html +895 -0
- data/test/regression/scriptaculous/unit/assets/builder.js +134 -0
- data/test/regression/scriptaculous/unit/assets/controls.js +963 -0
- data/test/regression/scriptaculous/unit/assets/dragdrop.js +973 -0
- data/test/regression/scriptaculous/unit/assets/effects.js +1122 -0
- data/test/regression/scriptaculous/unit/assets/javascripttest.rb +203 -0
- data/test/regression/scriptaculous/unit/assets/prototype.js +4320 -0
- data/test/regression/scriptaculous/unit/assets/scriptaculous.js +66 -0
- data/test/regression/scriptaculous/unit/assets/slider.js +273 -0
- data/test/regression/scriptaculous/unit/assets/sound.js +57 -0
- data/test/regression/scriptaculous/unit/assets/unittest.js +566 -0
- data/test/regression/scriptaculous/unit/bdd_test.html +150 -0
- data/test/regression/scriptaculous/unit/builder_test.html +262 -0
- data/test/regression/scriptaculous/unit/dragdrop_test.html +131 -0
- data/test/regression/scriptaculous/unit/effects_test.html +547 -0
- data/test/regression/scriptaculous/unit/element_test.html +116 -0
- data/test/regression/scriptaculous/unit/icon.png +0 -0
- data/test/regression/scriptaculous/unit/index.html +70 -0
- data/test/regression/scriptaculous/unit/loading_test.html +41 -0
- data/test/regression/scriptaculous/unit/position_clone_test.html +312 -0
- data/test/regression/scriptaculous/unit/slider_test.html +437 -0
- data/test/regression/scriptaculous/unit/sortable_test.html +205 -0
- data/test/regression/scriptaculous/unit/string_test.html +71 -0
- data/test/regression/scriptaculous/unit/unittest_test.html +154 -0
- data/test/regression/scriptaculous/upstream +1 -0
- data/test/test_helper.rb +20 -0
- data/test/unit/runner_test.rb +165 -0
- data/test/unit/test_case_test.rb +207 -0
- data/test/unit/test_test.rb +24 -0
- metadata +209 -0
@@ -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
|
+
});
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
|
@@ -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,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>");
|
Binary file
|
@@ -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>
|
@@ -0,0 +1,71 @@
|
|
1
|
+
<div id="fixtures" style="display: none">
|
2
|
+
<h1 class="title">Some title <span>here</span></h1>
|
3
|
+
<p id="p" class="first summary">
|
4
|
+
<strong id="strong">This</strong> is a short blurb
|
5
|
+
<a id="link_1" class="first internal" rel="external nofollow" href="#">with a <em id="em2">link</em></a> or
|
6
|
+
<a id="link_2" class="internal highlight" href="#"><em id="em">two</em></a>.
|
7
|
+
Or <cite id="with_title" title="hello world!">a citation</cite>.
|
8
|
+
</p>
|
9
|
+
<ul id="list">
|
10
|
+
<li id="item_1" class="first"><a id="link_3" href="#" class="external"><span id="span">Another link</span></a></li>
|
11
|
+
<li id="item_2">Some text</li>
|
12
|
+
<li id="item_3" xml:lang="es-us" class="">Otra cosa</li>
|
13
|
+
</ul>
|
14
|
+
|
15
|
+
<!-- this form has a field with the name 'id',
|
16
|
+
therefore its ID property won't be 'troubleForm': -->
|
17
|
+
<form id="troubleForm">
|
18
|
+
<input type="hidden" name="id" id="hidden" />
|
19
|
+
<input type="text" name="disabled_text_field" id="disabled_text_field" disabled="disabled" />
|
20
|
+
<input type="text" name="enabled_text_field" id="enabled_text_field" />
|
21
|
+
<input type="checkbox" name="checkboxes" id="checked_box" checked="checked" value="Checked" />
|
22
|
+
<input type="checkbox" name="checkboxes" id="unchecked_box" value="Unchecked"/>
|
23
|
+
<input type="radio" name="radiobuttons" id="checked_radio" checked="checked" value="Checked" />
|
24
|
+
<input type="radio" name="radiobuttons" id="unchecked_radio" value="Unchecked" />
|
25
|
+
</form>
|
26
|
+
|
27
|
+
<form id="troubleForm2">
|
28
|
+
<input type="checkbox" name="brackets[5][]" id="chk_1" checked="checked" value="1" />
|
29
|
+
<input type="checkbox" name="brackets[5][]" id="chk_2" value="2" />
|
30
|
+
</form>
|
31
|
+
|
32
|
+
<div id="level1">
|
33
|
+
<span id="level2_1">
|
34
|
+
<span id="level3_1"></span>
|
35
|
+
<!-- This comment should be ignored by the adjacent selector -->
|
36
|
+
<span id="level3_2"></span>
|
37
|
+
</span>
|
38
|
+
<span id="level2_2">
|
39
|
+
<em id="level_only_child">
|
40
|
+
</em>
|
41
|
+
</span>
|
42
|
+
<div id="level2_3"></div>
|
43
|
+
</div> <!-- #level1 -->
|
44
|
+
|
45
|
+
<div id="dupContainer">
|
46
|
+
<span id="dupL1" class="span_foo span_bar">
|
47
|
+
<span id="dupL2">
|
48
|
+
<span id="dupL3">
|
49
|
+
<span id="dupL4">
|
50
|
+
<span id="dupL5"></span>
|
51
|
+
</span>
|
52
|
+
</span>
|
53
|
+
</span>
|
54
|
+
</span>
|
55
|
+
</div> <!-- #dupContainer -->
|
56
|
+
|
57
|
+
<div id="grandfather"> grandfather
|
58
|
+
<div id="father" class="brothers men"> father
|
59
|
+
<div id="son"> son </div>
|
60
|
+
</div>
|
61
|
+
<div id="uncle" class="brothers men"> uncle </div>
|
62
|
+
</div>
|
63
|
+
|
64
|
+
<form id="commaParent" title="commas,are,good">
|
65
|
+
<input type="hidden" id="commaChild" name="foo" value="#commaOne,#commaTwo" />
|
66
|
+
<input type="hidden" id="commaTwo" name="foo2" value="oops" />
|
67
|
+
</form>
|
68
|
+
<div id="counted_container"><div class="is_counted"></div></div>
|
69
|
+
|
70
|
+
<div foo-bar="baz" id="attr_with_dash">blah</div>
|
71
|
+
</div>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<div id="testlog_2"> </div>
|
2
|
+
|
3
|
+
<!-- Test elements follow -->
|
4
|
+
<div id="test_1" class="a bbbbbbbbbbbb cccccccccc dddd"> </div>
|
5
|
+
|
6
|
+
<div id="test_2"> <span> </span>
|
7
|
+
|
8
|
+
|
9
|
+
|
10
|
+
<div><div></div> </div><span> </span>
|
11
|
+
</div>
|
12
|
+
|
13
|
+
<ul id="tlist"><li id="tlist_1">x1</li><li id="tlist_2">x2</li></ul>
|
14
|
+
<ul id="tlist2"><li class="a" id="tlist2_1">x1</li><li id="tlist2_2">x2</li></ul>
|
15
|
+
|
16
|
+
<div id="testmoveby" style="background-color:#333;width:100px;">XXXX</div>
|
17
|
+
|
18
|
+
<div id="testcss1">testcss1<span id="testcss1_span" style="display:none;">blah</span></div><div id="testcss2">testcss1</div>
|
@@ -0,0 +1,135 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
+
<head>
|
5
|
+
<title>Unit test file | Form | default template | 2009-04-11 15:28</title>
|
6
|
+
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
7
|
+
<script type="text/javascript" charset="utf-8">
|
8
|
+
var eventResults = {};
|
9
|
+
var originalElement = window.Element;
|
10
|
+
</script>
|
11
|
+
<script src="assets/prototype.js" type="text/javascript" charset="utf-8"></script>
|
12
|
+
<script src="assets/unittest.js" type="text/javascript" charset="utf-8"></script>
|
13
|
+
<link rel="stylesheet" href="assets/unittest.css" type="text/css" />
|
14
|
+
|
15
|
+
|
16
|
+
<script src="tests/form_test.js" type="text/javascript" charset="utf-8"></script>
|
17
|
+
</head>
|
18
|
+
<body>
|
19
|
+
|
20
|
+
<div id="testlog"></div>
|
21
|
+
|
22
|
+
<form id="form" method="get" action="fixtures/empty.js">
|
23
|
+
<input type="text" name="val1" id="input_enabled" value="4" />
|
24
|
+
<div>This is not a form element</div>
|
25
|
+
<input type="text" name="val2" id="input_disabled" disabled="disabled" value="5" />
|
26
|
+
<input type="submit" name="first_submit" value="Commit it!" />
|
27
|
+
<input type="submit" name="second_submit" value="Delete it!" />
|
28
|
+
<input type="text" name="action" value="blah" />
|
29
|
+
</form>
|
30
|
+
|
31
|
+
<form id="bigform" method="get" action="fixtures/empty.js">
|
32
|
+
<div id="inputs">
|
33
|
+
<input type="text" name="dummy" id="dummy_disabled" disabled="disabled"/>
|
34
|
+
<input type="submit" name="commit" id="submit" />
|
35
|
+
<input type="button" name="clicky" value="click me" />
|
36
|
+
<input type="reset" name="revert" />
|
37
|
+
<input type="text" name="greeting" id="focus_text" value="Hello" />
|
38
|
+
</div>
|
39
|
+
|
40
|
+
<!-- some edge cases in serialization -->
|
41
|
+
<div id="value_checks">
|
42
|
+
<input name="twin" type="text" value="" />
|
43
|
+
<input name="twin" type="text" value="siamese" />
|
44
|
+
<!-- Rails checkbox hack with hidden input: -->
|
45
|
+
<input name="checky" type="checkbox" id="checkbox_hack" value="1" />
|
46
|
+
<input name="checky" type="hidden" value="0" />
|
47
|
+
</div>
|
48
|
+
|
49
|
+
<!-- all variations of SELECT controls -->
|
50
|
+
<div id="selects_wrapper">
|
51
|
+
<select name="vu">
|
52
|
+
<option value="1" selected="selected">One</option>
|
53
|
+
<option value="2">Two</option>
|
54
|
+
<option value="3">Three</option>
|
55
|
+
</select>
|
56
|
+
<select id="multiSel1" name="vm[]" multiple="multiple">
|
57
|
+
<option id="multiSel1_opt1" value="1" selected="selected">One</option>
|
58
|
+
<option id="multiSel1_opt2" value="2">Two</option>
|
59
|
+
<option id="multiSel1_opt3" value="3" selected="selected">Three</option>
|
60
|
+
</select>
|
61
|
+
<select name="nvu">
|
62
|
+
<option selected="selected">One</option>
|
63
|
+
<option value="2">Two</option>
|
64
|
+
<option value="3">Three</option>
|
65
|
+
</select>
|
66
|
+
|
67
|
+
<fieldset id="selects_fieldset">
|
68
|
+
<select name="nvm[]" multiple="multiple">
|
69
|
+
<option selected="selected">One</option>
|
70
|
+
<option>Two</option>
|
71
|
+
<option selected="selected">Three</option>
|
72
|
+
</select>
|
73
|
+
<select name="evu">
|
74
|
+
<option value="" selected="selected">One</option>
|
75
|
+
<option value="2">Two</option>
|
76
|
+
<option value="3">Three</option>
|
77
|
+
</select>
|
78
|
+
<select name="evm[]" multiple="multiple">
|
79
|
+
<option value="" selected="selected">One</option>
|
80
|
+
<option>Two</option>
|
81
|
+
<option selected="selected">Three</option>
|
82
|
+
</select>
|
83
|
+
</fieldset>
|
84
|
+
</div>
|
85
|
+
|
86
|
+
<div id="various">
|
87
|
+
<select name="tf_selectOne"><option selected="selected"></option><option>1</option></select>
|
88
|
+
<textarea name="tf_textarea"></textarea>
|
89
|
+
<input type="checkbox" name="tf_checkbox" value="on" />
|
90
|
+
<select name="tf_selectMany" multiple="multiple"></select>
|
91
|
+
<input type="text" name="tf_text" />
|
92
|
+
<div>This is not a form element</div>
|
93
|
+
<input type="radio" name="tf_radio" value="on" />
|
94
|
+
<input type="hidden" name="tf_hidden" />
|
95
|
+
<input type="password" name="tf_password" />
|
96
|
+
</div>
|
97
|
+
</form>
|
98
|
+
|
99
|
+
<form id="form_focus_hidden" style="display: none">
|
100
|
+
<input type="text" />
|
101
|
+
</form>
|
102
|
+
|
103
|
+
<form id="form_with_file_input">
|
104
|
+
<input type="file" name="file_name" value="foo" />
|
105
|
+
</form>
|
106
|
+
|
107
|
+
<!-- tabindexed forms -->
|
108
|
+
<div id="tabindex">
|
109
|
+
<form id="ffe">
|
110
|
+
<p><input type="text" disabled="disabled" id="ffe_disabled" /></p>
|
111
|
+
<input type="hidden" id="ffe_hidden" />
|
112
|
+
<input type="checkbox" id="ffe_checkbox" />
|
113
|
+
</form>
|
114
|
+
|
115
|
+
<form id="ffe_ti">
|
116
|
+
<p><input type="text" disabled="disabled" id="ffe_ti_disabled" /></p>
|
117
|
+
<input type="hidden" id="ffe_ti_hidden" />
|
118
|
+
<input type="checkbox" id="ffe_ti_checkbox" />
|
119
|
+
<input type="submit" id="ffe_ti_submit" tabindex="1" />
|
120
|
+
</form>
|
121
|
+
|
122
|
+
<form id="ffe_ti2">
|
123
|
+
<p><input type="text" disabled="disabled" id="ffe_ti2_disabled" /></p>
|
124
|
+
<input type="hidden" id="ffe_ti2_hidden" />
|
125
|
+
<input type="checkbox" id="ffe_ti2_checkbox" tabindex="0" />
|
126
|
+
<input type="submit" id="ffe_ti2_submit" tabindex="1" />
|
127
|
+
</form>
|
128
|
+
|
129
|
+
</div>
|
130
|
+
|
131
|
+
</body>
|
132
|
+
</html>
|
133
|
+
<script type="text/javascript" charset="utf-8">
|
134
|
+
eventResults.endOfDocument = true;
|
135
|
+
</script>
|