| OLD | NEW |
| (Empty) |
| 1 <!DOCTYPE html> | |
| 2 <html> | |
| 3 <head> | |
| 4 <script src="../../js/resources/js-test-pre.js"></script> | |
| 5 <script src="resources/microdata-common.js"></script> | |
| 6 </head> | |
| 7 <body> | |
| 8 <script> | |
| 9 description("Test HTMLPropertiesCollection when itemref pointing to the root nod
e."); | |
| 10 | |
| 11 var root = createElement('div', {id: 'id1'}, '<div itemprop="foo"></div><div ite
mscope itemref="id1"></div>'); | |
| 12 var item = root.lastChild; | |
| 13 shouldBe("item.properties.length", "1"); | |
| 14 shouldBe("item.properties.item(0)", "root.firstChild"); | |
| 15 shouldBe("item.properties[0]", "root.firstChild"); | |
| 16 shouldBe("item.properties.namedItem('foo').length", "1"); | |
| 17 shouldBe("item.properties.namedItem('foo').item(0)", "root.firstChild"); | |
| 18 shouldBe("item.properties.namedItem('foo')[0]", "root.firstChild"); | |
| 19 shouldBe("item.properties.names.length", "1"); | |
| 20 shouldBe("item.properties.names.item(0)", "'foo'"); | |
| 21 shouldBe("item.properties.names[0]", "'foo'"); | |
| 22 </script> | |
| 23 <script src="../../js/resources/js-test-post.js"></script> | |
| 24 </body> | |
| 25 </html> | |
| OLD | NEW |