OLD | NEW |
| (Empty) |
1 <!DOCTYPE html> | |
2 <html> | |
3 <head> | |
4 <script src="../../js/resources/js-test-pre.js"></script> | |
5 </head> | |
6 <body> | |
7 <p>This test ensures that document.getItems must not contain the items that have
the itemprop attribute set. | |
8 It must return a NodeList containing the top-level microdata items in the docume
nt.</p> | |
9 | |
10 <div itemscope itemtype="http://example.com/foo" id="one"></div> | |
11 <div itemscope itemtype="http://example.com/bar" id="two"></div> | |
12 | |
13 <div itemscope> | |
14 <p>Name: <span itemprop="name">Amanda</span></p> | |
15 <p>Band: <span itemprop="band" itemscope> <span itemprop="name">Jazz Band</span>
(<span itemprop="size">12</span> players)</span></p> | |
16 </div> | |
17 | |
18 <div itemscope itemtype="http://example.com/foo" id="three"> | |
19 <div itemscope itemtype="http://example.com/f1" id="four"></div> | |
20 </div> | |
21 <div itemscope id="five"></div> | |
22 <div id="console"></div> | |
23 <script> | |
24 shouldBeTrue("document.getItems().length == 6"); | |
25 | |
26 document.getElementById('one').setAttribute('itemprop', 'test'); | |
27 document.getElementById('five').setAttribute('itemprop', 'test'); | |
28 shouldBeTrue("document.getItems().length == 4"); | |
29 | |
30 document.getElementById('five').removeAttribute('itemprop'); | |
31 shouldBeTrue("document.getItems().length == 5"); | |
32 </script> | |
33 | |
34 <script src="../../js/resources/js-test-post.js"></script> | |
35 </body> | |
36 </html> | |
OLD | NEW |