blob: 7a692cf71468d27172d2b1f16ac961c3dc1f7518 [file] [log] [blame]
<!DOCTYPE html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../../media-resources/media-file.js"></script>
<canvas></canvas>
<script>
async_test(function(t) {
var video = document.createElement("video");
video.crossOrigin = "anonymous";
video.onerror = t.unreached_func();
video.onplaying = t.step_func_done(function() {
var ctx = document.querySelector("canvas").getContext("2d");
ctx.drawImage(video, 0, 0, video.videoWidth, video.videoHeight);
ctx.getImageData(0, 0, video.videoWidth, video.videoHeight);
});
document.body.appendChild(video);
var mediaFile = "../../media/resources/test.ogv";
var type = mimeTypeForExtension(mediaFile.split('.').pop());
video.src = "http://localhost:8080/security/resources/video-cross-origin-allow.php?no-preflight&name=" + mediaFile + "&type=" + type;
video.play();
});
</script>