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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/repaint/canvas-resize-no-full-invalidation.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 /* object-fit and object-position make the content of the canvas not affected 9 /* object-fit and object-position make the content of the canvas not affected
10 by the resize in repaintTest(). */ 10 by the resize in repaintTest(). */
11 object-fit: contain; 11 object-fit: contain;
12 object-position: 0 0; 12 object-position: 0 0;
13 background-color: #030; 13 background-color: #030;
14 } 14 }
15 </style> 15 </style>
16 Tests paint invalidation of canvas when it's resized which doesn't affect its co ntents. Passes if there is only incremental invalidation for the resized backgro und. 16 Tests paint invalidation of canvas when it's resized which doesn't affect its co ntents. Passes if there is only incremental invalidation for the resized backgro und.
17 <canvas id="canvas" width="500" height="500"></canvas> 17 <canvas id="canvas" width="500" height="500"></canvas>
18 18
19 <script src="resources/text-based-repaint.js"></script> 19 <script src="resources/text-based-repaint.js"></script>
20 <script> 20 <script>
21 function repaintTest() { 21 function repaintTest() {
22 document.getElementById('canvas').style.width = '500px'; 22 document.getElementById('canvas').style.width = '500px';
23 } 23 }
24 onload = runRepaintTest; 24 onload = runRepaintAndPixelTest;
25 25
26 var ctx = document.getElementById('canvas').getContext('2d'); 26 var ctx = document.getElementById('canvas').getContext('2d');
27 ctx.beginPath(); 27 ctx.beginPath();
28 ctx.arc(250, 250, 250, 0, 2 * Math.PI); 28 ctx.arc(250, 250, 250, 0, 2 * Math.PI);
29 ctx.fillStyle = 'green'; 29 ctx.fillStyle = 'green';
30 ctx.fill(); 30 ctx.fill();
31 </script> 31 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698