| 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>itemid attribute simple test.</p> | |
| 9 <div id="console"></div> | |
| 10 <script> | |
| 11 var element = createElement('div', {itemid: 'http://example.com/foo'}); | |
| 12 | |
| 13 debug("<br>The itemId attribute must be defined."); | |
| 14 shouldBeDefined("element.itemId"); | |
| 15 shouldBe("element.itemId", "'http://example.com/foo'"); | |
| 16 | |
| 17 debug("<br>itemId attribute must be case-senaitive."); | |
| 18 shouldBeTrue("createElement('div', {itemid: 'http://example.com/FOO'}).itemId ==
'http://example.com/FOO';"); | |
| 19 | |
| 20 debug("<br>itemId must strip leading and trailing whitespace."); | |
| 21 shouldBeTrue("createElement('div', {itemid: ' http://example.com/foo '}).itemId
== 'http://example.com/foo';"); | |
| 22 | |
| 23 debug("<br>itemId must strip leading whitespace."); | |
| 24 shouldBeTrue("createElement('div', {itemid: ' http://example.com/foo'}).itemId
== 'http://example.com/foo';"); | |
| 25 | |
| 26 debug("<br>itemId must strip trailing whitespace."); | |
| 27 shouldBeTrue("createElement('div', {itemid: 'http://example.com/foo '}).itemId
== 'http://example.com/foo';"); | |
| 28 | |
| 29 debug("<br>itemId must be read/write."); | |
| 30 shouldBeTrue("element.itemId = 'http://example.com/bar'; element.itemId == 'http
://example.com/bar'"); | |
| 31 | |
| 32 </script> | |
| 33 <script src="../../js/resources/js-test-post.js"></script> | |
| 34 </body> | |
| 35 </html> | |
| OLD | NEW |