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

Unified Diff: third_party/WebKit/LayoutTests/fast/canvas/winding-enumeration.html

Issue 2311223002: Convert fast/canvas Layouttests to testharness (Closed)
Patch Set: Created 4 years, 3 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/winding-enumeration.html
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/winding-enumeration.html b/third_party/WebKit/LayoutTests/fast/canvas/winding-enumeration.html
index 21200e6cb8774d7b8810dab39eab47cabd898b53..d9c4e1208128415908cd443a099dda1a9b4e40e5 100644
--- a/third_party/WebKit/LayoutTests/fast/canvas/winding-enumeration.html
+++ b/third_party/WebKit/LayoutTests/fast/canvas/winding-enumeration.html
@@ -1,26 +1,24 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-<script src="../../resources/js-test.js"></script>
-</head>
-<body>
+<!DOCTYPE html>
+<title>Test CanvasWindingRule enumeration</title>
+
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
<script>
+test(function() {
var canvas = document.createElement("canvas");
sivag 2016/09/06 12:58:44 move this to html <canvas></canvas> and access usi
Abhishek Kanike 2016/09/08 09:05:07 Done.
var context = canvas.getContext("2d");
-shouldNotThrow("context.fill()");
-shouldNotThrow("context.fill('nonzero')");
-shouldThrow("context.fill('randomstring')");
-
-shouldNotThrow("context.clip()");
-shouldNotThrow("context.clip('nonzero')");
-shouldThrow("context.clip('randomstring')");
-
-shouldNotThrow("context.isPointInPath(0, 0)");
-shouldNotThrow("context.isPointInPath(0, 0, 'nonzero')");
-shouldThrow("context.isPointInPath(0, 0, 'randomstring')");
-</script>
+context.fill();
+context.fill('nonzero');
+assert_throws(new TypeError(), function() { context.fill('randomstring'); });
-</body>
+context.clip();
+context.clip('nonzero');
+assert_throws(new TypeError(), function() { context.clip('randomstring'); });
+context.isPointInPath(0, 0);
+context.isPointInPath(0, 0, 'nonzero');
+assert_throws(new TypeError(), function() { context.isPointInPath(0, 0, 'randomstring'); });
+});
+</script>

Powered by Google App Engine
This is Rietveld 408576698