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

Side by Side Diff: LayoutTests/http/tests/security/canvas-remote-read-svg-image.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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <html>
2 <head>
3 <script>
4 if (window.testRunner)
5 testRunner.dumpAsText();
6
7 function log(msg)
8 {
9 document.getElementById('console').appendChild(document.createTextNode(msg + "\n"));
10 }
11
12 function draw()
13 {
14 var canvas = document.getElementById("canvas");
15 var ctx = canvas.getContext("2d");
16 ctx.drawImage(document.getElementById("img"), 0, 0);
17
18 try {
19 var data = ctx.getImageData(20, 20, 290, 75);
20 log("FAIL: getImageData succeeded. Canvas not tainted.");
21 } catch (e) {
22 log("PASS: getImageData failed. Canvas tainted.");
23 }
24 }
25 </script>
26 </head>
27 <body>
28 <p>This tests that drawing a SVG image to a canvas taints the canvas</p>
29 <pre id="console"></pre>
30 <canvas id="canvas" width="330" height="115"></canvas>
31 <img id="img" onload="draw()" src="resources/image-wrapper.svg">
32 </body>
33 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698