4 <script src="../../js/resources/js-test-pre.js"></script>
5 <script src="resources/microdata-common.js"></script>
8 <p>itemType attribute simple test.</p>
9 <div id="console"></div>
11 var element = createElement('div', {itemtype: 'http://example.com/foo'});
13 debug("<br>The itemType attribute must be defined.");
14 shouldBeDefined("element.itemType");
15 shouldBe("element.itemType.toString()", "'http://example.com/foo'");
17 debug("<br>itemType and itemType.length must be read-only.");
18 shouldBeTrue("element.itemType = 'http://example.com/test'; element.itemType.toString() == 'http://example.com/foo'");
19 shouldBeFalse("element.itemType.contains('http://example.com/test')");
20 shouldBeTrue("element.itemType.length = 0; element.itemType.length == 1");
22 debug("<br>removeAttribute('itemType') must reflect correctly.");
23 element.removeAttribute('itemType');
24 shouldBe("element.itemType.toString()", "''");
27 <script src="../../js/resources/js-test-post.js"></script>