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

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

Issue 2678493002: Use testharness.js instead of js-test.js in LayoutTests/fast/canvas tests. (Closed)
Patch Set: Addressing comments Created 3 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 | « no previous file | third_party/WebKit/LayoutTests/fast/canvas/canvas-ellipse-negative-radius-expected.txt » ('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 <script src="../../resources/testharness.js"></script>
2 <html> 2 <script src="../../resources/testharnessreport.js"></script>
3 <head>
4 <script src="../../resources/js-test.js"></script>
5 </head>
6 <body> 3 <body>
7 <p id="description"></p>
8 <div id="console"></div>
9
10 <script> 4 <script>
11 description("Tests CanvasPathMethods ellipse with negative radii."); 5 test(function(t) {
12 6 var canvas = document.createElement('canvas');
13 var canvas = document.createElement("canvas"); 7 var ctx = canvas.getContext('2d');
14 var ctx = canvas.getContext('2d'); 8
15 9 ctx.ellipse(10, 10, 10, 5, 0, 0, 1, false);
16 shouldNotThrow("ctx.ellipse(10, 10, 10, 5, 0, 0, 1, false)"); 10 ctx.ellipse(10, 10, 10, 0, 0, 0, 1, false);
17 shouldNotThrow("ctx.ellipse(10, 10, 10, 0, 0, 0, 1, false)"); 11 ctx.ellipse(10, 10, -0, 5, 0, 0, 1, false);
18 shouldNotThrow("ctx.ellipse(10, 10, -0, 5, 0, 0, 1, false)"); 12
19 13 assert_throws(null, function() {ctx.ellipse(10, 10, -2, 5, 0, 0, 1, false);} );
20 shouldThrow("ctx.ellipse(10, 10, -2, 5, 0, 0, 1, false)"); 14 assert_throws(null, function() {ctx.ellipse(10, 10, 0, -1.5, 0, 0, 1, false) ;});
21 shouldThrow("ctx.ellipse(10, 10, 0, -1.5, 0, 0, 1, false)"); 15 assert_throws(null, function() {ctx.ellipse(10, 10, -2, -5, 0, 0, 1, false); });
22 shouldThrow("ctx.ellipse(10, 10, -2, -5, 0, 0, 1, false)"); 16
23 17 // FIXME: When this is exposed on Path as well as CanvasRenderingContext2D, add tests for Path as well.
24 // FIXME: When this is exposed on Path as well as CanvasRenderingContext2D, add tests for Path as well. 18 }, 'Tests CanvasPathMethods ellipse with negative radii.');
25 </script> 19 </script>
26 </body> 20 </body>
27 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/canvas/canvas-ellipse-negative-radius-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698