| OLD | NEW |
| (Empty) |
| 1 <html> | |
| 2 <head> | |
| 3 <script src="../../js/resources/js-test-pre.js"></script> | |
| 4 <script src="resources/microdata-common.js"></script> | |
| 5 </head> | |
| 6 <body> | |
| 7 <script> | |
| 8 description("Test to verify HTMLPropertiesCollection's behavior of Microdata ite
m with itemprop attribute and itemref pointing to itself."); | |
| 9 | |
| 10 var item = createElement('div', {itemscope: 'itemscope', id: 'id1', itemref:'id1
', itemprop:'foo'}); | |
| 11 | |
| 12 function executeTest() | |
| 13 { | |
| 14 shouldBe("item.properties.length", "0"); | |
| 15 shouldBeNull("item.properties.item(0)"); | |
| 16 shouldBeUndefined("item.properties[0]"); | |
| 17 shouldBe("item.properties.namedItem('foo').length", "0"); | |
| 18 shouldBeNull("item.properties.namedItem('foo').item(0)"); | |
| 19 shouldBeUndefined("item.properties.namedItem('foo')[0]"); | |
| 20 shouldBe("item.properties.names.length", "0"); | |
| 21 shouldBeFalse("item.properties.names.contains('foo')"); | |
| 22 shouldBeNull("item.properties.names.item(0)"); | |
| 23 shouldBeUndefined("item.properties.names.length[0]"); | |
| 24 } | |
| 25 | |
| 26 debug(""); | |
| 27 debug("Item not attached to dom tree"); | |
| 28 executeTest(); | |
| 29 | |
| 30 debug(""); | |
| 31 debug("Attached item to dom tree"); | |
| 32 document.body.appendChild(item); | |
| 33 executeTest(); | |
| 34 </script> | |
| 35 <script src="../../js/resources/js-test-post.js"></script> | |
| 36 </body> | |
| 37 </html> | |
| OLD | NEW |