blob: 67de4bc04936007771bbc8775cdf9db859df2e2e [file] [log] [blame]
<!DOCTYPE html>
<title>Test video dimension aspect ratio.</title>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<script src="media-file.js"></script>
<video></video>
<script>
async_test(function(t) {
var video = document.querySelector("video");
assert_equals(video.videoWidth, 0);
assert_equals(video.videoHeight, 0);
video.onloadedmetadata = t.step_func_done(function() {
assert_equals(video.videoWidth, 320);
assert_equals(video.videoHeight, 449);
});
assert_equals(video.canPlayType("video/webm"), "maybe")
// Note: Do not use an ogv file. Ogv files do not seem to support pixel
// aspect ratios, where as webms do.
video.src = "content/test-par-5-7.webm";
});
</script>