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 properties.item and length must see the properties added with
itemref.</p> | |
9 | |
10 <div itemprop="foo" id="id1"></div> | |
11 <div itemscope itemref="id2 id1"> | |
12 <div itemprop="bar"></div> | |
13 </div> | |
14 <div itemprop="baz" id="id2"> | |
15 <div itemprop="qux"></div> | |
16 </div> | |
17 | |
18 <div id="console"></div> | |
19 <script> | |
20 var item = document.getItems()[0]; | |
21 var propertiesCollection = item.properties; | |
22 var divs = document.getElementsByTagName('div'); | |
23 | |
24 shouldBeTrue("propertiesCollection.length == '4'"); | |
25 shouldBeTrue("propertiesCollection.item(0) == divs[0]"); | |
26 shouldBeTrue("propertiesCollection.item(1) == divs[2]"); | |
27 shouldBeTrue("propertiesCollection.item(2) == divs[3]"); | |
28 shouldBeTrue("propertiesCollection.item(3) == divs[4]"); | |
29 | |
30 | |
31 </script> | |
32 <script src="../../js/resources/js-test-post.js"></script> | |
33 </body> | |
34 </html> | |
OLD | NEW |