blob: 14e43d0e6c9ac0cafa3e8b3ebef3e68744f3f1f2 [file] [log] [blame]
commit-queue@webkit.org03a9c0f2012-01-25 13:04:24 +00001HTMLCollection.item() shouldn't fallback to namedItem().
2
3On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
4
5
6PASS document.forms.item(0) is document.getElementById('a')
7PASS document.forms.item('0') is document.getElementById('a')
8PASS document.forms.item('z') is document.getElementById('a')
9PASS document.forms.item(undefined) is document.getElementById('a')
10PASS document.forms.item(null) is document.getElementById('a')
11PASS document.forms.item({a: 'blah'}) is document.getElementById('a')
12PASS document.forms.item(false) is document.getElementById('a')
13PASS document.forms.item(true) is document.forms.item(1)
14PASS document.forms.item(4294967297) is document.forms.item(1)
15PASS document.forms.item(10000) is null
16PASS document.forms.item(-1) is null
17PASS document.forms[0].elements.item(0) is document.getElementById('x')
18PASS document.forms[0].elements.item('0') is document.getElementById('x')
19PASS document.forms[0].elements.item('z') is document.getElementById('x')
20PASS document.forms[0].elements.item(undefined) is document.getElementById('x')
21PASS document.forms[0].elements.item(null) is document.getElementById('x')
22PASS document.forms[0].elements.item({a: 'blah'}) is document.getElementById('x')
23PASS document.forms[0].elements.item(false) is document.getElementById('x')
24PASS document.forms[0].elements.item(true) is document.forms[0].elements.item(1)
25PASS document.forms[0].elements.item(4294967297) is document.forms[0].elements.item(1)
26PASS document.forms[0].elements.item(10000) is null
27PASS document.forms[0].elements.item(-1) is null
28PASS document.forms[1].elements[2].options.item(0) is document.getElementById('o')
29PASS document.forms[1].elements[2].options.item('0') is document.getElementById('o')
30PASS document.forms[1].elements[2].options.item('z') is document.getElementById('o')
31PASS document.forms[1].elements[2].options.item(undefined) is document.getElementById('o')
32PASS document.forms[1].elements[2].options.item(null) is document.getElementById('o')
33PASS document.forms[1].elements[2].options.item({a: 'blah'}) is document.getElementById('o')
34PASS document.forms[1].elements[2].options.item(false) is document.getElementById('o')
35PASS document.forms[1].elements[2].options.item(true) is document.forms[1].elements[2].options.item(1)
36PASS document.forms[1].elements[2].options.item(4294967297) is document.forms[1].elements[2].options.item(1)
37PASS document.forms[1].elements[2].options.item(10000) is null
38PASS document.forms[1].elements[2].options.item(-1) is null
39PASS document.anchors.item(0) is document.getElementById('c')
40PASS document.anchors.item('0') is document.getElementById('c')
41PASS document.anchors.item('z') is document.getElementById('c')
42PASS document.anchors.item(undefined) is document.getElementById('c')
43PASS document.anchors.item(null) is document.getElementById('c')
44PASS document.anchors.item({a: 'blah'}) is document.getElementById('c')
45PASS document.anchors.item(false) is document.getElementById('c')
46PASS document.anchors.item(true) is document.anchors.item(1)
47PASS document.anchors.item(4294967297) is document.anchors.item(1)
48PASS document.anchors.item(10000) is null
49PASS document.anchors.item(-1) is null
50PASS document.all.item('z')[0] is document.forms[0].elements.namedItem('z')
51PASS document.all.item('z')[1] is document.forms.namedItem('z')
52PASS document.all.item('z')[2] is document.forms.namedItem('z').elements.namedItem('z')
53PASS successfullyParsed is true
54
55TEST COMPLETE
56