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 <div id="testDiv" itemscope><div itemprop="bar"> </div></div> | |
9 <script> | |
10 description("Test to ensure that HTMLPropertiesCollection[name] should return un
defined if item doesn't have a property named 'name'."); | |
11 var testDiv = document.getElementById("testDiv"); | |
12 | |
13 shouldBe("testDiv.properties['foo']", "undefined"); | |
14 shouldBeTrue("!testDiv.properties['foo']"); | |
15 testDiv.firstChild.itemProp.add('foo'); | |
16 shouldBeTrue("testDiv.properties['foo'] == '[object PropertyNodeList]'"); | |
17 testDiv.firstChild.itemProp.remove('bar'); | |
18 shouldBe("testDiv.properties['bar']", "undefined"); | |
19 shouldBeTrue("!testDiv.properties['bar']"); | |
20 </script> | |
21 <script src="../../js/resources/js-test-post.js"></script> | |
22 </body> | |
23 </html> | |
OLD | NEW |