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

Side by Side Diff: LayoutTests/fast/canvas/drawImageFromRect_withToDataURLAsSource.html

Issue 408813007: Remove non-standard API entry points in CanvasRenderingContext2D (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: remove some unnecessary mac/virtual/gpu baselines Created 6 years, 1 month 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
5 function init()
6 {
7 if (window.testRunner)
8 window.testRunner.dumpAsText();
9
10 var imgCanvas = document.getElementById("c1");
11 var imgCanvas2 = document.getElementById("c2");
12
13 var imgCtx = imgCanvas.getContext("2d");
14 var imgCtx2 = imgCanvas2.getContext("2d");
15 imgCtx.fillStyle = '#0f0';
16 imgCtx.fillRect(0,0,32,32);
17
18 var newImage = new Image();
19 newImage.src = imgCanvas.toDataURL();
20
21 imgCtx2.fillStyle = '#0f0';
22 imgCtx2.fillRect(0,0,32,32);
23 imgCtx2.drawImageFromRect(newImage,
24 0, 1, 1, 1,
25 0, 0, 32, 32, 'source-over');
26
27 var result = document.getElementById("result");
28 var data = imgCtx2.getImageData(0,0,1,1).data;
29 var red = data[0];
30 var green = data[1];
31 var blue = data[2];
32 var alpha = data[3];
33 if (red != 0 || green != 255 || blue != 0 || alpha != 255)
34 result.innerHTML = "FAILED";
35 else
36 result.innerHTML = "PASSED";
37 }
38
39 </script>
40 </head>
41 <body onload="init()">
42 <canvas id="c1" width="32px" height="32px"></canvas>
43 <canvas id="c2" width="32px" height="32px"></canvas>
44 <a>This test exercises a webkit specific canvas routine drawImageFromRect. This test should pass and never crash. <rdar://problem/9125032> </a>
45 <a id="result"></a>
46 </body>
47 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698