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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/repaint/canvas-putImageData.html

Issue 1972273002: Let repaint tests test pixels by default (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
OLDNEW
1 <!-- Test for https://bugs.webkit.org/show_bug.cgi?id=46319 --> 1 <!-- Test for https://bugs.webkit.org/show_bug.cgi?id=46319 -->
2 <head> 2 <head>
3 <script src="resources/text-based-repaint.js"></script> 3 <script src="resources/repaint.js"></script>
4 </head> 4 </head>
5 <body> 5 <body>
6 <canvas id="canvas" width="100" height="100"></canvas> 6 <canvas id="canvas" width="100" height="100"></canvas>
7 <script> 7 <script>
8 var canvas = document.getElementById('canvas'); 8 var canvas = document.getElementById('canvas');
9 var ctx = canvas.getContext('2d'); 9 var ctx = canvas.getContext('2d');
10 10
11 // prepare imagedata 11 // prepare imagedata
12 ctx.fillStyle = "rgb(255, 0, 0)"; ctx.fillRect(0, 0, 100, 100); // red b ackground 12 ctx.fillStyle = "rgb(255, 0, 0)"; ctx.fillRect(0, 0, 100, 100); // red b ackground
13 ctx.fillStyle = "rgb(0, 255, 0)"; ctx.fillRect(10, 10, 10, 10); // inset green square 13 ctx.fillStyle = "rgb(0, 255, 0)"; ctx.fillRect(10, 10, 10, 10); // inset green square
(...skipping 18 matching lines...) Expand all
32 ctx.putImageData(imageDataGreen, 40, 40); 32 ctx.putImageData(imageDataGreen, 40, 40);
33 ctx.putImageData(imageDataRedWithInsetGreen, 70, 70, 10, 10, 10, 10) ; 33 ctx.putImageData(imageDataRedWithInsetGreen, 70, 70, 10, 10, 10, 10) ;
34 // Because canvas invalidations are processed at the end of the curr ent task, 34 // Because canvas invalidations are processed at the end of the curr ent task,
35 // the repaint test has to end in a subsequent task in order to capt ure the repaint. 35 // the repaint test has to end in a subsequent task in order to capt ure the repaint.
36 setTimeout(finishRepaintTest, 0); 36 setTimeout(finishRepaintTest, 0);
37 } 37 }
38 38
39 window.onload = runRepaintTest; 39 window.onload = runRepaintTest;
40 </script> 40 </script>
41 </body> 41 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698