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

Side by Side Diff: LayoutTests/fast/canvas/canvas-composite-fill-repaint.html

Issue 24438004: Rename testRunner.dumpAsText(true) to testRunner.dumpAsTextWithPixelResults() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: more tests Created 7 years, 3 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
1 <!doctype html> 1 <!doctype html>
2 <script src="resources/repaint.js"></script> 2 <script src="resources/repaint.js"></script>
3 <body onload="runRepaintTest();"> 3 <body onload="runRepaintTest();">
4 <canvas id="canvas-source-in" width="100" height="100"></canvas> 4 <canvas id="canvas-source-in" width="100" height="100"></canvas>
5 <canvas id="canvas-copy" width="100" height="100"></canvas> 5 <canvas id="canvas-copy" width="100" height="100"></canvas>
6 <script> 6 <script>
7 var compositeTypes = ['source-in','copy']; 7 var compositeTypes = ['source-in','copy'];
8 8
9 if (window.testRunner) 9 if (window.testRunner)
10 testRunner.dumpAsText(true); 10 testRunner.dumpAsTextWithPixelResults();
11 11
12 for (i = 0; i < compositeTypes.length; i++) { 12 for (i = 0; i < compositeTypes.length; i++) {
13 var canvas = document.getElementById('canvas-' + compositeTypes[i]); 13 var canvas = document.getElementById('canvas-' + compositeTypes[i]);
14 var ctx = canvas.getContext('2d'); 14 var ctx = canvas.getContext('2d');
15 ctx.fillStyle = '#0f0'; 15 ctx.fillStyle = '#0f0';
16 ctx.fillRect(0, 0, 100, 100); 16 ctx.fillRect(0, 0, 100, 100);
17 } 17 }
18 18
19 function repaintTest() 19 function repaintTest()
20 { 20 {
21 for (i = 0; i < compositeTypes.length; i++) { 21 for (i = 0; i < compositeTypes.length; i++) {
22 var canvas = document.getElementById('canvas-' + compositeTypes[i]); 22 var canvas = document.getElementById('canvas-' + compositeTypes[i]);
23 var ctx = canvas.getContext('2d'); 23 var ctx = canvas.getContext('2d');
24 ctx.globalCompositeOperation = compositeTypes[i]; 24 ctx.globalCompositeOperation = compositeTypes[i];
25 ctx.fillStyle = '#00f'; 25 ctx.fillStyle = '#00f';
26 ctx.fillRect(40, 40, 20, 20); 26 ctx.fillRect(40, 40, 20, 20);
27 } 27 }
28 } 28 }
29 29
30 </script> 30 </script>
31 </body> 31 </body>
OLDNEW
« no previous file with comments | « LayoutTests/fast/canvas/canvas-composite.html ('k') | LayoutTests/fast/canvas/canvas-composite-transformclip.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698