Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(270)

Unified Diff: LayoutTests/fast/canvas/svg-taint.html

Issue 22604008: Allow SVG images to not taint the canvas with drawImage/drawPattern (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase after r156375 Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: LayoutTests/fast/canvas/svg-taint.html
diff --git a/LayoutTests/fast/canvas/svg-taint.html b/LayoutTests/fast/canvas/svg-taint.html
deleted file mode 100644
index 46cd2408d4099d4f911296ab161e0ddac788f99b..0000000000000000000000000000000000000000
--- a/LayoutTests/fast/canvas/svg-taint.html
+++ /dev/null
@@ -1,46 +0,0 @@
-<html>
-<head>
-<script>
-if (window.testRunner) {
- testRunner.dumpAsText();
- testRunner.waitUntilDone();
-}
-
-function log(message) {
- var console = document.getElementById('log');
- console.appendChild(document.createTextNode(message));
- console.appendChild(document.createElement('br'));
-}
-
-function loaded() {
- var canvas = document.getElementById('canvas');
- var ctx = canvas.getContext("2d");
- var img = document.getElementById('img');
- log('Starting...');
-
- // This should taint the canvas by rendering an SVG on to it via the pattern
- // route.
- var p = ctx.createPattern(img, 'repeat');
- ctx.fillStyle = p;
- ctx.fillRect(0, 0, 100, 100);
-
- try {
- // This should fail as the canvas should be tainted.
- var data = ctx.getImageData(0, 0, 10, 10);
- log('Oh dear -- missing exception!');
- } catch (e) {
- log('Exception: ' + e.name);
- if (window.testRunner)
- testRunner.notifyDone();
- }
-}
-</script>
-</head>
-<body>
-Let's check that rendering an SVG pattern to a canvas taints it!
-<p>
-See https://bugs.webkit.org/show_bug.cgi?id=36838
-<div id="log"></div>
-<canvas id="canvas" width="100" height="100"></canvas>
-<img id="img" onload="loaded()" src="resources/empty.svg"></img>
-</body>
« no previous file with comments | « LayoutTests/TestExpectations ('k') | LayoutTests/http/tests/security/canvas-remote-read-data-url-svg-image.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698