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

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

Issue 1988313004: Test pixel results for repaint tests testing selection, etc. (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 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <style> 2 <style>
3 canvas { 3 canvas {
4 position: absolute; 4 position: absolute;
5 width: 600px; 5 width: 600px;
6 height: 500px; 6 height: 500px;
7 top: 50px; 7 top: 50px;
8 left: 50px; 8 left: 50px;
9 } 9 }
10 </style> 10 </style>
11 Tests paint invalidation of canvas when it's resized. Passes if there is a whole green circle. 11 Tests paint invalidation of canvas when it's resized. Passes if there is a whole green circle.
12 <canvas id="canvas" width="500" height="500"></canvas> 12 <canvas id="canvas" width="500" height="500"></canvas>
13 13
14 <script src="resources/text-based-repaint.js"></script> 14 <script src="resources/text-based-repaint.js"></script>
15 <script> 15 <script>
16 function repaintTest() { 16 function repaintTest() {
17 document.getElementById('canvas').style.width = '500px'; 17 document.getElementById('canvas').style.width = '500px';
18 } 18 }
19 onload = runRepaintTest; 19 onload = runRepaintAndPixelTest;
20 20
21 var ctx = document.getElementById('canvas').getContext('2d'); 21 var ctx = document.getElementById('canvas').getContext('2d');
22 ctx.beginPath(); 22 ctx.beginPath();
23 ctx.arc(250, 250, 250, 0, 2 * Math.PI); 23 ctx.arc(250, 250, 250, 0, 2 * Math.PI);
24 ctx.fillStyle = 'green'; 24 ctx.fillStyle = 'green';
25 ctx.fill(); 25 ctx.fill();
26 </script> 26 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698