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

Unified 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/canvas/canvas-ellipse-negative-radius.html
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/canvas-ellipse-negative-radius.html b/third_party/WebKit/LayoutTests/fast/canvas/canvas-ellipse-negative-radius.html
index f07b5314b637a6856537d0aae789f2258f765e68..f93435815f68b340462f3f4b8a38162a9e21d5ac 100644
--- a/third_party/WebKit/LayoutTests/fast/canvas/canvas-ellipse-negative-radius.html
+++ b/third_party/WebKit/LayoutTests/fast/canvas/canvas-ellipse-negative-radius.html
@@ -1,27 +1,20 @@
-<!DOCTYPE html>
-<html>
-<head>
-<script src="../../resources/js-test.js"></script>
-</head>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
<body>
-<p id="description"></p>
-<div id="console"></div>
-
<script>
-description("Tests CanvasPathMethods ellipse with negative radii.");
-
-var canvas = document.createElement("canvas");
-var ctx = canvas.getContext('2d');
-
-shouldNotThrow("ctx.ellipse(10, 10, 10, 5, 0, 0, 1, false)");
-shouldNotThrow("ctx.ellipse(10, 10, 10, 0, 0, 0, 1, false)");
-shouldNotThrow("ctx.ellipse(10, 10, -0, 5, 0, 0, 1, false)");
-
-shouldThrow("ctx.ellipse(10, 10, -2, 5, 0, 0, 1, false)");
-shouldThrow("ctx.ellipse(10, 10, 0, -1.5, 0, 0, 1, false)");
-shouldThrow("ctx.ellipse(10, 10, -2, -5, 0, 0, 1, false)");
-
-// FIXME: When this is exposed on Path as well as CanvasRenderingContext2D, add tests for Path as well.
+test(function(t) {
+ var canvas = document.createElement('canvas');
+ var ctx = canvas.getContext('2d');
+
+ ctx.ellipse(10, 10, 10, 5, 0, 0, 1, false);
+ ctx.ellipse(10, 10, 10, 0, 0, 0, 1, false);
+ ctx.ellipse(10, 10, -0, 5, 0, 0, 1, false);
+
+ assert_throws(null, function() {ctx.ellipse(10, 10, -2, 5, 0, 0, 1, false);});
+ assert_throws(null, function() {ctx.ellipse(10, 10, 0, -1.5, 0, 0, 1, false);});
+ assert_throws(null, function() {ctx.ellipse(10, 10, -2, -5, 0, 0, 1, false);});
+
+ // FIXME: When this is exposed on Path as well as CanvasRenderingContext2D, add tests for Path as well.
+}, 'Tests CanvasPathMethods ellipse with negative radii.');
</script>
</body>
-</html>
« 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