OLD | NEW |
1 This tests verifies that namedItem and named getter returns the first matched it
em for all but all, options, and form controls collections. | 1 This tests verifies that namedItem and named getter returns the first matched it
em for all but all, options, and form controls collections. |
2 | 2 |
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". | 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". |
4 | 4 |
5 | 5 |
6 document.all | 6 document.all |
7 PASS document.all instanceof HTMLAllCollection is true | 7 PASS document.all instanceof HTMLAllCollection is true |
8 FAIL document.all instanceof HTMLCollection should be true. Was false. | 8 FAIL document.all instanceof HTMLCollection should be true. Was false. |
9 PASS initialLength = document.all.length; elements = [insertElementWithId('b', '
foo'), insertElementWithId('q', 'foo')]; | 9 PASS initialLength = document.all.length; elements = [insertElementWithId('b', '
foo'), insertElementWithId('q', 'foo')]; |
10 document.all.length is initialLength + 2; | 10 document.all.length is initialLength + 2; |
11 PASS document.all['foo'].length is 2 | 11 PASS document.all['foo'].length is 2 |
12 PASS document.all['foo'][0] is elements[0] | 12 PASS document.all['foo'][0] is elements[0] |
13 PASS document.all['foo'][1] is elements[1] | 13 PASS document.all['foo'][1] is elements[1] |
14 PASS elements[0].parentNode.removeChild(elements[0]); document.all['foo'] is ele
ments[1] | 14 PASS elements[0].parentNode.removeChild(elements[0]); document.all['foo'] is ele
ments[1] |
| 15 PASS document.all['no-such-element'] is undefined. |
15 | 16 |
16 form.elements | 17 form.elements |
17 PASS form.elements instanceof HTMLFormControlsCollection is true | 18 PASS form.elements instanceof HTMLFormControlsCollection is true |
18 PASS form.elements instanceof HTMLCollection is true | 19 PASS form.elements instanceof HTMLCollection is true |
19 PASS form.elements.length is 0 | 20 PASS form.elements.length is 0 |
20 PASS elements = [createElementWithId('input', 'foo'), createElementWithId('input
', 'foo')]; | 21 PASS elements = [createElementWithId('input', 'foo'), createElementWithId('input
', 'foo')]; |
21 form.appendChild(elements[0]); form.elements.length is 1 | 22 form.appendChild(elements[0]); form.elements.length is 1 |
22 PASS form.elements['foo'] is elements[0] | 23 PASS form.elements['foo'] is elements[0] |
23 PASS form.appendChild(elements[1]); form.elements.length is 2 | 24 PASS form.appendChild(elements[1]); form.elements.length is 2 |
24 PASS form.elements['foo'].toString() is '[object RadioNodeList]' | 25 PASS form.elements['foo'].toString() is '[object RadioNodeList]' |
25 PASS form.elements['foo'].length is 2 | 26 PASS form.elements['foo'].length is 2 |
26 PASS form.elements['foo'][0] is elements[0] | 27 PASS form.elements['foo'][0] is elements[0] |
27 PASS form.elements['foo'][1] is elements[1] | 28 PASS form.elements['foo'][1] is elements[1] |
28 PASS form.removeChild(elements[0]); form.elements['foo'] is elements[1] | 29 PASS form.removeChild(elements[0]); form.elements['foo'] is elements[1] |
29 PASS removeTestElements(); form.elements.length is 0 | 30 PASS removeTestElements(); form.elements.length is 0 |
| 31 PASS form.elements['no-such-element'] is undefined. |
30 | 32 |
31 select.options | 33 select.options |
32 PASS form.appendChild(createElementWithId('select', 'bar')); form.elements.lengt
h is 1 | 34 PASS form.appendChild(createElementWithId('select', 'bar')); form.elements.lengt
h is 1 |
33 PASS select = form.elements[0]; select.options instanceof HTMLOptionsCollection
is true | 35 PASS select = form.elements[0]; select.options instanceof HTMLOptionsCollection
is true |
34 PASS select.options instanceof HTMLCollection is true | 36 PASS select.options instanceof HTMLCollection is true |
35 PASS select.options.length is 0 | 37 PASS select.options.length is 0 |
36 PASS elements = [createElementWithId('option', 'foo'), createElementWithId('opti
on', 'foo')]; | 38 PASS elements = [createElementWithId('option', 'foo'), createElementWithId('opti
on', 'foo')]; |
37 select.appendChild(elements[0]); select.options.length is 1 | 39 select.appendChild(elements[0]); select.options.length is 1 |
38 PASS select.options['foo'] is elements[0] | 40 PASS select.options['foo'] is elements[0] |
39 PASS select.appendChild(elements[1]); select.options.length is 2 | 41 PASS select.appendChild(elements[1]); select.options.length is 2 |
40 PASS select.options['foo'].toString() is '[object NodeList]' | 42 PASS select.options['foo'].toString() is '[object NodeList]' |
41 PASS select.options['foo'].length is 2 | 43 PASS select.options['foo'].length is 2 |
42 PASS select.options['foo'][0] is elements[0] | 44 PASS select.options['foo'][0] is elements[0] |
43 PASS select.options['foo'][1] is elements[1] | 45 PASS select.options['foo'][1] is elements[1] |
44 PASS select.removeChild(elements[0]); select.options['foo'] is elements[1] | 46 PASS select.removeChild(elements[0]); select.options['foo'] is elements[1] |
45 PASS select.innerHTML = ''; select.options.length is 0 | 47 PASS select.innerHTML = ''; select.options.length is 0 |
46 PASS removeTestElements(); form.elements.length is 0 | 48 PASS removeTestElements(); form.elements.length is 0 |
| 49 PASS select.options['no-such-element'] is undefined. |
47 | 50 |
48 document.images | 51 document.images |
49 PASS document.images.length is 0 | 52 PASS document.images.length is 0 |
50 PASS elements[0] = insertElementWithId('img', 'foo'); document.images.length is
1 | 53 PASS elements[0] = insertElementWithId('img', 'foo'); document.images.length is
1 |
51 PASS elements[1] = insertElementWithId('img', 'foo'); document.images.length is
2 | 54 PASS elements[1] = insertElementWithId('img', 'foo'); document.images.length is
2 |
52 PASS document.images['foo'] is elements[0] | 55 PASS document.images['foo'] is elements[0] |
53 PASS removeTestElements(); document.images.length is 0 | 56 PASS removeTestElements(); document.images.length is 0 |
54 | 57 |
55 document.applets | 58 document.applets |
56 PASS document.applets.length is 0 | 59 PASS document.applets.length is 0 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 PASS document.scripts.length is 2 | 95 PASS document.scripts.length is 2 |
93 PASS elements[0] = insertElementWithId('script', 'foo'); document.scripts.length
is 3 | 96 PASS elements[0] = insertElementWithId('script', 'foo'); document.scripts.length
is 3 |
94 PASS elements[1] = insertElementWithId('script', 'foo'); document.scripts.length
is 4 | 97 PASS elements[1] = insertElementWithId('script', 'foo'); document.scripts.length
is 4 |
95 PASS document.scripts['foo'] is elements[0] | 98 PASS document.scripts['foo'] is elements[0] |
96 PASS removeTestElements(); document.scripts.length is 2 | 99 PASS removeTestElements(); document.scripts.length is 2 |
97 | 100 |
98 PASS successfullyParsed is true | 101 PASS successfullyParsed is true |
99 | 102 |
100 TEST COMPLETE | 103 TEST COMPLETE |
101 | 104 |
OLD | NEW |