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

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: 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
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..3200ee89885de4079caf4f894aa55d57877fc62b 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>

Powered by Google App Engine
This is Rietveld 408576698