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