| 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>itemType attribute simple test.</p> | |
| 9 <div id="console"></div> | |
| 10 <script> | |
| 11 var element = createElement('div', {itemtype: 'http://example.com/foo'}); | |
| 12 | |
| 13 debug("<br>The itemType attribute must be defined."); | |
| 14 shouldBeDefined("element.itemType"); | |
| 15 shouldBe("element.itemType.toString()", "'http://example.com/foo'"); | |
| 16 | |
| 17 debug("<br>itemType and itemType.length must be read-only."); | |
| 18 shouldBeTrue("element.itemType = 'http://example.com/test'; element.itemType.toS
tring() == 'http://example.com/foo'"); | |
| 19 shouldBeFalse("element.itemType.contains('http://example.com/test')"); | |
| 20 shouldBeTrue("element.itemType.length = 0; element.itemType.length == 1"); | |
| 21 | |
| 22 debug("<br>removeAttribute('itemType') must reflect correctly."); | |
| 23 element.removeAttribute('itemType'); | |
| 24 shouldBe("element.itemType.toString()", "''"); | |
| 25 | |
| 26 </script> | |
| 27 <script src="../../js/resources/js-test-post.js"></script> | |
| 28 </body> | |
| 29 </html> | |
| OLD | NEW |