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

Side by Side Diff: third_party/WebKit/LayoutTests/compositing/canvas-with-object-fit-contain-in-composited-layer.html

Issue 2179913002: Make compositing/canvas-with-object-fit-contain-in-composited-layer.html less flaky (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/compositing/canvas-with-object-fit-contain-in-composited-layer-expected.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <style> 2 <style>
3 canvas { 3 canvas {
4 background-color: gray; 4 background-color: gray;
5 width: 200px; 5 width: 100px;
6 height: 200px; 6 height: 100px;
7 object-fit: contain; 7 object-fit: contain;
8 } 8 }
9 </style> 9 </style>
10 <p>Test passes if a green square inside an orange rectanlge is shown up without a distortion. 10 <p>Test passes if a green square inside a gray square is shown without distortio n.</p>
11 <div> 11 <div>
12 <canvas width="200" height="400"></canvas> 12 <canvas width="50" height="100"></canvas>
13 </div> 13 </div>
14 <script> 14 <script>
15 function paintCanvas(canvas) 15 function paintCanvas(canvas)
16 { 16 {
17 var ctx = canvas.getContext('2d'); 17 var ctx = canvas.getContext('2d');
18 ctx.fillStyle = 'orange';
19 ctx.fillRect(0, 0, canvas.width, canvas.height);
20
21 ctx.fillStyle = 'green'; 18 ctx.fillStyle = 'green';
22 var squarWidth = canvas.width / 2; 19 ctx.fillRect(10, 35, 30, 30);
23 ctx.fillRect(50, 150, squarWidth, squarWidth);
24 } 20 }
25 21
26 paintCanvas(document.querySelector('canvas')); 22 paintCanvas(document.querySelector('canvas'));
27 </script> 23 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/compositing/canvas-with-object-fit-contain-in-composited-layer-expected.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698