blob: 9df53bfd69cc1c920ab59b85322d8af76252cf3d [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 can be retrieved from a canvas even when tainted by a remote video resource if CORS is enabled with use-credentials.");
function test()
{
testDataRetrievalAllowed();
finishJSTest();
}
var video = document.createElement("video");
video.addEventListener("loadeddata", test);
video.crossOrigin = "use-credentials";
var mediaFile = findMediaFile("video", "../../media/resources/test");
var type = mimeTypeForExtension(mediaFile.split('.').pop());
video.src = "http://localhost:8080/security/resources/video-cross-origin-allow-credentials.php?name=" + mediaFile + "&type=" + type;
window.jsTestIsAsync = true;
</script>
<script src="../../../resources/js-test-post.js"></script>
</body>
</html>