<video id="vid" src="content/test.wav" onloadedmetadata="loadedMetadata()"></video>
<p>
This tests the intrinsic size of a video element is the default 300×150 before metadata is
loaded, and also after metadata is loaded for an audio-only file.
</p>
<pre id="console"></pre>
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
function log(message)
{
document.getElementById("console").appendChild(document.createTextNode(message + "\n"));
}
var videoElement = document.getElementById("vid");
log("Initial dimensions: " + videoElement.offsetWidth + "\u00d7" + videoElement.offsetHeight);
function loadedMetadata()
{
log("Dimensions after metadata loaded: " + videoElement.offsetWidth + "\u00d7" + videoElement.offsetHeight);
testRunner.notifyDone();
}
</script>