Index: LayoutTests/svg/as-image/svg-canvas-xhtml-tainted.html |
diff --git a/LayoutTests/svg/as-image/svg-canvas-xhtml-tainted.html b/LayoutTests/svg/as-image/svg-canvas-xhtml-tainted.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..c01a48c1b030e5255338f49a83f28ac3a72cbc13 |
--- /dev/null |
+++ b/LayoutTests/svg/as-image/svg-canvas-xhtml-tainted.html |
@@ -0,0 +1,31 @@ |
+<!DOCTYPE html> |
+<html> |
+<head> |
+ <script src="../../fast/js/resources/js-test-pre.js"></script> |
+</head> |
+<body> |
+ <script> |
+ if (window.testRunner) { |
+ testRunner.dumpAsText(); |
+ testRunner.waitUntilDone(); |
+ } |
+ |
+ var svg = new Image(); |
+ svg.src = "resources/link-xhtml.svg"; |
+ |
+ svg.onload = function() { |
+ var canvas = document.createElement("canvas"); |
+ window.ctx = canvas.getContext("2d"); |
+ |
+ ctx.getImageData(0, 0, 1, 1); |
+ |
+ ctx.drawImage(svg, 0, 0); |
+ |
+ shouldThrow("window.ctx.getImageData(0, 0, 1, 1)"); |
+ |
+ if (window.testRunner) |
+ testRunner.notifyDone(); |
+ }; |
+ </script> |
+</body> |
+</html> |