| 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 <p>This test ensures thet properties.item and length must ignore properties of n
ested items.</p> | |
| 9 <div id="console"></div> | |
| 10 <script> | |
| 11 var element = createElement('div', {itemscope: 'itemscope'}, '<div itemscope ite
mprop="foo"><div itemprop="bar"></div></div><div><div itemprop="baz"></div></div
>'); | |
| 12 var propertiesCollection = element.properties; | |
| 13 var childNodes = element.childNodes; | |
| 14 | |
| 15 shouldBeTrue("propertiesCollection.length == '2'"); | |
| 16 shouldBeTrue("propertiesCollection[0] == childNodes[0]"); | |
| 17 shouldBeTrue("propertiesCollection.item(0) == childNodes[0]"); | |
| 18 shouldBeTrue("propertiesCollection[1] == childNodes[1].firstChild"); | |
| 19 shouldBeTrue("propertiesCollection.item(1) == childNodes[1].firstChild"); | |
| 20 | |
| 21 </script> | |
| 22 <script src="../../js/resources/js-test-post.js"></script> | |
| 23 </body> | |
| 24 </html> | |
| OLD | NEW |