blob: e986d06eb40442773a49a94aa2500bf05509f3a3 [file] [log] [blame]
<video id="vid" src="content/test.wav" onloadedmetadata="loadedMetadata()"></video>
<p>
This tests the intrinsic size of a video element is the default 300&#xd7;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>