| <!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 anonymous."); |
| |
| function test() |
| { |
| testDataRetrievalAllowed(); |
| finishJSTest(); |
| } |
| |
| var video = document.createElement("video"); |
| video.addEventListener("loadeddata", test); |
| |
| video.crossOrigin = "anonymous"; |
| var mediaFile = findMediaFile("video", "../../media/resources/test"); |
| var type = mimeTypeForExtension(mediaFile.split('.').pop()); |
| video.src = "http://localhost:8080/security/resources/video-cross-origin-allow.py?name=" + mediaFile + "&type=" + type; |
| |
| window.jsTestIsAsync = true; |
| </script> |
| <script src="../../../resources/js-test-post.js"></script> |
| </body> |
| </html> |