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 ensure that PropertyNodeList.getValues() array returns an array who
se valuse are obtained from the itemValue DOM property of each of the elements r
epresented by the object, in tree order.</p> | |
9 <div id="console"></div> | |
10 <div> | |
11 <div id="id1"> | |
12 <div itemprop="foo"> | |
13 <span itemprop="foo" itemscope></span> | |
14 </div> | |
15 <div itemscope itemref="id1" id="item"> | |
16 <meta itemprop="foo" content="test" /> | |
17 <audio itemprop="foo" src="audio.mp3"></audio> | |
18 <embed itemprop="foo" src="test.swf" /> | |
19 <iframe itemprop="foo" src="test.html"></iframe> | |
20 <img itemprop="foo" src="test.jpg" /> | |
21 <audio controls="controls"> | |
22 <source itemprop="foo" src="song.mp3" type="audio/mp3" /> | |
23 </audio> | |
24 <video itemprop="foo" src="video.mp4"></video> | |
25 <video src="video.mp4"> | |
26 <track itemprop="foo" src="subtitles_en.vtt"> | |
27 </video> | |
28 <a itemprop="foo" src="link.html"></a> | |
29 <map> | |
30 <area itemprop="foo" href="test.html" /> | |
31 </map> | |
32 <link itemprop="foo" href="test.css" /> | |
33 <p itemprop="foo"> | |
34 <span itemprop="foo" itemscope> | |
35 <a itemprop="foo" src="test_anchor.html"></a> | |
36 </span> | |
37 </p> | |
38 </div> | |
39 </div> | |
40 <script> | |
41 var item = document.getElementById("item"); | |
42 var propertyNodeList = item.properties.namedItem('foo'); | |
43 var valuesArray = propertyNodeList.getValues(); | |
44 for (var i = 0; i < propertyNodeList.length; i++) { | |
45 debug('property index ' + i + ', tag ' + propertyNodeList[i].tagName); | |
46 shouldBe("valuesArray[i]", "propertyNodeList[i].itemValue"); | |
47 } | |
48 shouldBe("valuesArray.length", '15'); | |
49 </script> | |
50 <script src="../../js/resources/js-test-post.js"></script> | |
51 </body> | |
52 </html> | |
OLD | NEW |