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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/canvas/canvas-arc-negative-radius.html

Issue 2826773002: Rename CanvasPathMethods to CanvasPath (Closed)
Patch Set: x Created 3 years, 8 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/fast/canvas/canvas-ellipse-negative-radius.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 <script src="../../resources/testharness.js"></script> 1 <script src="../../resources/testharness.js"></script>
2 <script src="../../resources/testharnessreport.js"></script> 2 <script src="../../resources/testharnessreport.js"></script>
3 <p id="description"></p> 3 <p id="description"></p>
4 <div id="console"></div> 4 <div id="console"></div>
5 5
6 <script> 6 <script>
7 test(function(t) { 7 test(function(t) {
8 var canvas = document.createElement("canvas"); 8 var canvas = document.createElement("canvas");
9 var ctx = canvas.getContext('2d'); 9 var ctx = canvas.getContext('2d');
10 10
11 ctx.arc(10, 10, 5, 0, 1, false); 11 ctx.arc(10, 10, 5, 0, 1, false);
12 ctx.arc(10, 10, 0, 0, 1, false); 12 ctx.arc(10, 10, 0, 0, 1, false);
13 assert_throws(null, function() {ctx.arc(10, 10, -5, 0, 1, false);}); 13 assert_throws(null, function() {ctx.arc(10, 10, -5, 0, 1, false);});
14 14
15 ctx.arcTo(10, 10, 20, 20, 5); 15 ctx.arcTo(10, 10, 20, 20, 5);
16 ctx.arcTo(10, 10, 20, 20, 0); 16 ctx.arcTo(10, 10, 20, 20, 0);
17 assert_throws(null, function() {ctx.arcTo(10, 10, 20, 20, -5);}); 17 assert_throws(null, function() {ctx.arcTo(10, 10, 20, 20, -5);});
18 18
19 var path = new Path2D(); 19 var path = new Path2D();
20 20
21 path.arc(10, 10, 5, 0, 1, false); 21 path.arc(10, 10, 5, 0, 1, false);
22 path.arc(10, 10, 0, 0, 1, false); 22 path.arc(10, 10, 0, 0, 1, false);
23 assert_throws(null, function() {path.arc(10, 10, -5, 0, 1, false);}); 23 assert_throws(null, function() {path.arc(10, 10, -5, 0, 1, false);});
24 24
25 path.arcTo(10, 10, 20, 20, 5); 25 path.arcTo(10, 10, 20, 20, 5);
26 path.arcTo(10, 10, 20, 20, 0); 26 path.arcTo(10, 10, 20, 20, 0);
27 assert_throws(null, function() {path.arcTo(10, 10, 20, 20, -5);}); 27 assert_throws(null, function() {path.arcTo(10, 10, 20, 20, -5);});
28 }, 'Tests CanvasPathMethods arc and arcTo with negative radii.'); 28 }, 'Tests CanvasPath arc and arcTo with negative radii.');
29 </script> 29 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/canvas/canvas-ellipse-negative-radius.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698