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

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

Issue 207383002: Remove repaint.js from layout tests (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: More expectations Created 6 years, 9 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/run-after-display.js"></script>
3 <body onload="runRepaintTest();"> 3 <body onload="runAfterDisplay(repaintTest);">
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.dumpAsTextWithPixelResults(); 10 testRunner.dumpAsTextWithPixelResults();
11 testRunner.waitUntilDone();
12 }
11 13
12 for (i = 0; i < compositeTypes.length; i++) { 14 for (i = 0; i < compositeTypes.length; i++) {
13 var canvas = document.getElementById('canvas-' + compositeTypes[i]); 15 var canvas = document.getElementById('canvas-' + compositeTypes[i]);
14 var ctx = canvas.getContext('2d'); 16 var ctx = canvas.getContext('2d');
15 ctx.fillStyle = '#0f0'; 17 ctx.fillStyle = '#0f0';
16 ctx.fillRect(0, 0, 100, 100); 18 ctx.fillRect(0, 0, 100, 100);
17 } 19 }
18 20
19 function repaintTest() 21 function repaintTest()
20 { 22 {
21 for (i = 0; i < compositeTypes.length; i++) { 23 for (i = 0; i < compositeTypes.length; i++) {
22 var canvas = document.getElementById('canvas-' + compositeTypes[i]); 24 var canvas = document.getElementById('canvas-' + compositeTypes[i]);
23 var ctx = canvas.getContext('2d'); 25 var ctx = canvas.getContext('2d');
24 ctx.globalCompositeOperation = compositeTypes[i]; 26 ctx.globalCompositeOperation = compositeTypes[i];
25 ctx.fillStyle = '#00f'; 27 ctx.fillStyle = '#00f';
26 ctx.fillRect(40, 40, 20, 20); 28 ctx.fillRect(40, 40, 20, 20);
27 } 29 }
30 if (window.testRunner)
31 testRunner.notifyDone();
28 } 32 }
29
30 </script> 33 </script>
31 </body> 34 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698