blob: eb2be285ec48ec84cad0e3a6156d7fcf13e645b5 [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.py?name=" + mediaFile + "&type=" + type;
window.jsTestIsAsync = true;
</script>
<script src="../../../resources/js-test-post.js"></script>
</body>
</html>