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

Side by Side Diff: sky/tests/clipping/canvas-rounded-corners.sky

Issue 936563002: Make tests/clipping/canvas-rounded-corners.sky actually run. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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 | « sky/engine/core/script/dart_controller.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <sky> 1 <sky>
2 <import src="../resources/dump-as-render-tree.sky" /> 2 <import src="../resources/dump-as-render-tree.sky" />
3 <style> 3 <style>
4 canvas { 4 canvas {
5 background-color: gray; 5 background-color: gray;
6 border: 10px solid red; 6 border: 10px solid red;
7 border-radius: 200px 100px 0px 0px; 7 border-radius: 200px 100px 0px 0px;
8 } 8 }
9 </style> 9 </style>
10 <!-- TODO(ojan): Make this a reftest. --> 10 <!-- TODO(ojan): Make this a reftest. -->
11 <h3>It passes if:</h3> 11 <h3>It passes if:</h3>
12 <ul> 12 <ul>
13 <li>the canvas content has rounded corners (top-left and top-right)</li> 13 <li>the canvas content has rounded corners (top-left and top-right)</li>
14 <li>the 10px red border is visible around the canvas content</li> 14 <li>the 10px red border is visible around the canvas content</li>
15 <li>gray border is not visible</li> 15 <li>gray border is not visible</li>
16 </ul> 16 </ul>
17 <canvas id="theCanvas" width="257" height="257"></canvas> 17 <canvas id="theCanvas" width="257" height="257"></canvas>
18 <script> 18 <script>
19 import 'dart:sky';
20
19 void main() { 21 void main() {
20 var theCanvas = document.getElementById('theCanvas'); 22 var theCanvas = document.getElementById('theCanvas');
21 var context = theCanvas.getContext('2d'); 23 var context = theCanvas.getContext('2d');
22 context.fillColor = 'green'; 24 context.fillColor = 'green';
23 context.fillRect(0, 0, theCanvas.width, theCanvas.width); 25 context.fillRect(0.0, 0.0, 1.0 * theCanvas.width, 1.0 * theCanvas.width);
24 } 26 }
25 </script> 27 </script>
26 </sky> 28 </sky>
OLDNEW
« no previous file with comments | « sky/engine/core/script/dart_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698