blob: 14e43d0e6c9ac0cafa3e8b3ebef3e68744f3f1f2 [file] [log] [blame]
HTMLCollection.item() shouldn't fallback to namedItem().
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS document.forms.item(0) is document.getElementById('a')
PASS document.forms.item('0') is document.getElementById('a')
PASS document.forms.item('z') is document.getElementById('a')
PASS document.forms.item(undefined) is document.getElementById('a')
PASS document.forms.item(null) is document.getElementById('a')
PASS document.forms.item({a: 'blah'}) is document.getElementById('a')
PASS document.forms.item(false) is document.getElementById('a')
PASS document.forms.item(true) is document.forms.item(1)
PASS document.forms.item(4294967297) is document.forms.item(1)
PASS document.forms.item(10000) is null
PASS document.forms.item(-1) is null
PASS document.forms[0].elements.item(0) is document.getElementById('x')
PASS document.forms[0].elements.item('0') is document.getElementById('x')
PASS document.forms[0].elements.item('z') is document.getElementById('x')
PASS document.forms[0].elements.item(undefined) is document.getElementById('x')
PASS document.forms[0].elements.item(null) is document.getElementById('x')
PASS document.forms[0].elements.item({a: 'blah'}) is document.getElementById('x')
PASS document.forms[0].elements.item(false) is document.getElementById('x')
PASS document.forms[0].elements.item(true) is document.forms[0].elements.item(1)
PASS document.forms[0].elements.item(4294967297) is document.forms[0].elements.item(1)
PASS document.forms[0].elements.item(10000) is null
PASS document.forms[0].elements.item(-1) is null
PASS document.forms[1].elements[2].options.item(0) is document.getElementById('o')
PASS document.forms[1].elements[2].options.item('0') is document.getElementById('o')
PASS document.forms[1].elements[2].options.item('z') is document.getElementById('o')
PASS document.forms[1].elements[2].options.item(undefined) is document.getElementById('o')
PASS document.forms[1].elements[2].options.item(null) is document.getElementById('o')
PASS document.forms[1].elements[2].options.item({a: 'blah'}) is document.getElementById('o')
PASS document.forms[1].elements[2].options.item(false) is document.getElementById('o')
PASS document.forms[1].elements[2].options.item(true) is document.forms[1].elements[2].options.item(1)
PASS document.forms[1].elements[2].options.item(4294967297) is document.forms[1].elements[2].options.item(1)
PASS document.forms[1].elements[2].options.item(10000) is null
PASS document.forms[1].elements[2].options.item(-1) is null
PASS document.anchors.item(0) is document.getElementById('c')
PASS document.anchors.item('0') is document.getElementById('c')
PASS document.anchors.item('z') is document.getElementById('c')
PASS document.anchors.item(undefined) is document.getElementById('c')
PASS document.anchors.item(null) is document.getElementById('c')
PASS document.anchors.item({a: 'blah'}) is document.getElementById('c')
PASS document.anchors.item(false) is document.getElementById('c')
PASS document.anchors.item(true) is document.anchors.item(1)
PASS document.anchors.item(4294967297) is document.anchors.item(1)
PASS document.anchors.item(10000) is null
PASS document.anchors.item(-1) is null
PASS document.all.item('z')[0] is document.forms[0].elements.namedItem('z')
PASS document.all.item('z')[1] is document.forms.namedItem('z')
PASS document.all.item('z')[2] is document.forms.namedItem('z').elements.namedItem('z')
PASS successfullyParsed is true
TEST COMPLETE