blob: 8e20613baca23e28b9ccea1f011a99ce53e59f1b [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="../../../resources/js-test-pre.js"></script>
<script src="../../media-resources/media-file.js"></script>
<script src="resources/canvas-video-crossorigin.js"></script>
</head>
<body>
<pre id="console"></pre>
<script>
description("Ensure that data cannot be retrieved from a canvas tainted by a remote video resource when CORS is not enabled.");
function test()
{
testDataRetrievalForbidden("remote video");
finishJSTest();
}
var video = document.createElement("video");
video.addEventListener("loadeddata", test);
var mediaFile = findMediaFile("video", "../../media/resources/test");
var type = mimeTypeForExtension(mediaFile.split('.').pop());
video.src = "http://localhost:8080/security/resources/video-cross-origin-allow.php?name=" + mediaFile + "&type=" + type;
window.jsTestIsAsync = true;
</script>
<script src="../../../resources/js-test-post.js"></script>
</body>
</html>