| <p> |
| This tests that in a standalone media document with audio content, the media element has non-zero |
| size. |
| </p> |
| <pre id="console"></pre> |
| <script> |
| if (window.testRunner) { |
| testRunner.dumpAsText(); |
| testRunner.waitUntilDone(); |
| } |
| |
| function log(message) |
| { |
| document.getElementById("console").appendChild(document.createTextNode(message + "\n")); |
| } |
| |
| function frameLoaded() |
| { |
| var videoElement = document.getElementById("fr").contentDocument.querySelector("video"); |
| var elementWidth = videoElement.offsetWidth; |
| var elementHeight = videoElement.offsetHeight; |
| if (elementWidth > 0 && elementHeight > 0) |
| log("PASS"); |
| else |
| log("FAIL: the video element dimensions are " + elementWidth + " by " + elementHeight); |
| if (window.testRunner) |
| testRunner.notifyDone(); |
| } |
| </script> |
| <iframe src="content/test.wav" id="fr" width=380 height=330 onload="frameLoaded()"></iframe> |