| 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 tests that names.item() and names[index] must return correct property na
me in tree order and it should not contain duplicate tokens.</p> | |
| 9 <div id="console"></div> | |
| 10 <script> | |
| 11 var element = createElement('div', {itemscope: 'itemscope'},'<div itemprop="foo"
></div><div itemprop="bar"><div itemprop="foo"></div><div itemprop="foo"></div><
/div><div itemprop="baz qux"></div>'); | |
| 12 shouldBeTrue("element.properties.names[0] == 'foo'"); | |
| 13 shouldBeTrue("element.properties.names[1] == 'bar'"); | |
| 14 shouldBeTrue("element.properties.names[2] == 'baz'"); | |
| 15 shouldBeTrue("element.properties.names[3] == 'qux'"); | |
| 16 | |
| 17 debug(''); | |
| 18 shouldBeTrue("element.properties.names.item(0) == 'foo'"); | |
| 19 shouldBeTrue("element.properties.names.item(1) == 'bar'"); | |
| 20 shouldBeTrue("element.properties.names.item(2) == 'baz'"); | |
| 21 shouldBeTrue("element.properties.names.item(3) == 'qux'"); | |
| 22 | |
| 23 </script> | |
| 24 <script src="../../js/resources/js-test-post.js"></script> | |
| 25 </body> | |
| 26 </html> | |
| OLD | NEW |