blob: 67555e1a7afd95272dd5b77546bcd2afc1d2ac5e [file] [log] [blame]
Test to ensure that HTMLPropertiesCollection contains all item properties when item is not attached to the DOM tree.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Created element of type: div
Item not attached to the dom tree
PASS item.properties.length is 4
PASS item.properties.item(0) is parent.firstChild
PASS item.properties[0] is parent.firstChild
PASS item.properties.item(1) is item.firstChild
PASS item.properties[1] is item.firstChild
PASS item.properties.item(2) is parent.childNodes[2]
PASS item.properties[2] is parent.childNodes[2]
PASS item.properties.item(3) is parent.childNodes[2].firstChild
PASS item.properties[3] is parent.childNodes[2].firstChild
PASS item.properties.names.length is 3
PASS item.properties.names.item(0) is 'foo'
PASS item.properties.names[0] is 'foo'
PASS item.properties.names.item(1) is 'bar'
PASS item.properties.names[1] is 'bar'
PASS item.properties.names.item(2) is 'baz'
PASS item.properties.names[2] is 'baz'
PASS item.properties.namedItem('foo').length is 2
PASS item.properties.namedItem('foo').item(0) is parent.firstChild
PASS item.properties.namedItem('foo')[0] is parent.firstChild
PASS item.properties.namedItem('foo').item(1) is parent.childNodes[2]
PASS item.properties.namedItem('foo')[1] is parent.childNodes[2]
PASS item.properties.namedItem('bar').length is 1
PASS item.properties.namedItem('bar').item(0) is item.firstChild
PASS item.properties.namedItem('bar')[0] is item.firstChild
PASS item.properties.namedItem('baz').length is 1
PASS item.properties.namedItem('baz').item(0) is parent.childNodes[2].firstChild
PASS item.properties.namedItem('baz')[0] is parent.childNodes[2].firstChild
Item added to the dom tree
PASS item.properties.length is 4
PASS item.properties.item(0) is parent.firstChild
PASS item.properties[0] is parent.firstChild
PASS item.properties.item(1) is item.firstChild
PASS item.properties[1] is item.firstChild
PASS item.properties.item(2) is parent.childNodes[2]
PASS item.properties[2] is parent.childNodes[2]
PASS item.properties.item(3) is parent.childNodes[2].firstChild
PASS item.properties[3] is parent.childNodes[2].firstChild
PASS item.properties.names.length is 3
PASS item.properties.names.item(0) is 'foo'
PASS item.properties.names[0] is 'foo'
PASS item.properties.names.item(1) is 'bar'
PASS item.properties.names[1] is 'bar'
PASS item.properties.names.item(2) is 'baz'
PASS item.properties.names[2] is 'baz'
PASS item.properties.namedItem('foo').length is 2
PASS item.properties.namedItem('foo').item(0) is parent.firstChild
PASS item.properties.namedItem('foo')[0] is parent.firstChild
PASS item.properties.namedItem('foo').item(1) is parent.childNodes[2]
PASS item.properties.namedItem('foo')[1] is parent.childNodes[2]
PASS item.properties.namedItem('bar').length is 1
PASS item.properties.namedItem('bar').item(0) is item.firstChild
PASS item.properties.namedItem('bar')[0] is item.firstChild
PASS item.properties.namedItem('baz').length is 1
PASS item.properties.namedItem('baz').item(0) is parent.childNodes[2].firstChild
PASS item.properties.namedItem('baz')[0] is parent.childNodes[2].firstChild
Item detached from the dom tree
PASS item.properties.length is 4
PASS item.properties.item(0) is parent.firstChild
PASS item.properties[0] is parent.firstChild
PASS item.properties.item(1) is item.firstChild
PASS item.properties[1] is item.firstChild
PASS item.properties.item(2) is parent.childNodes[2]
PASS item.properties[2] is parent.childNodes[2]
PASS item.properties.item(3) is parent.childNodes[2].firstChild
PASS item.properties[3] is parent.childNodes[2].firstChild
PASS item.properties.names.length is 3
PASS item.properties.names.item(0) is 'foo'
PASS item.properties.names[0] is 'foo'
PASS item.properties.names.item(1) is 'bar'
PASS item.properties.names[1] is 'bar'
PASS item.properties.names.item(2) is 'baz'
PASS item.properties.names[2] is 'baz'
PASS item.properties.namedItem('foo').length is 2
PASS item.properties.namedItem('foo').item(0) is parent.firstChild
PASS item.properties.namedItem('foo')[0] is parent.firstChild
PASS item.properties.namedItem('foo').item(1) is parent.childNodes[2]
PASS item.properties.namedItem('foo')[1] is parent.childNodes[2]
PASS item.properties.namedItem('bar').length is 1
PASS item.properties.namedItem('bar').item(0) is item.firstChild
PASS item.properties.namedItem('bar')[0] is item.firstChild
PASS item.properties.namedItem('baz').length is 1
PASS item.properties.namedItem('baz').item(0) is parent.childNodes[2].firstChild
PASS item.properties.namedItem('baz')[0] is parent.childNodes[2].firstChild
PASS successfullyParsed is true
TEST COMPLETE