| 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>This test ensures that itemValue must reflect the src attribute if the elemen
t is an audio, embed, iframe, source, track, or video element.</p> | |
| 9 <div id="console"></div> | |
| 10 <script> | |
| 11 var testElement; | |
| 12 function runTest(tagName) | |
| 13 { | |
| 14 debug("Testing '" + tagName + "' element's behavior."); | |
| 15 testElement = createElement(tagName, {itemprop: 'foo', src: 'http://example.
org/'}); | |
| 16 shouldBe("testElement.itemValue", "'http://example.org/'"); | |
| 17 testElement.src = 'http://example.net/'; | |
| 18 shouldBe("testElement.itemValue", "'http://example.net/'"); | |
| 19 testElement.itemValue = 'http://example.com/'; | |
| 20 shouldBe("testElement.src", "'http://example.com/'"); | |
| 21 debug(''); | |
| 22 } | |
| 23 | |
| 24 runTest('audio'); | |
| 25 runTest('embed'); | |
| 26 runTest('iframe'); | |
| 27 runTest('source'); | |
| 28 runTest('track'); | |
| 29 runTest('video'); | |
| 30 | |
| 31 </script> | |
| 32 <script src="../../js/resources/js-test-post.js"></script> | |
| 33 </body> | |
| 34 </html | |
| OLD | NEW |