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

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

Issue 2311223002: Convert fast/canvas Layouttests to testharness (Closed)
Patch Set: Convert fast/canvas Layouttests to testharness 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..39e342f675d5860f76649266e49595de3ca6197a 100644
--- a/third_party/WebKit/LayoutTests/fast/canvas/winding-enumeration.html
+++ b/third_party/WebKit/LayoutTests/fast/canvas/winding-enumeration.html
@@ -1,26 +1,25 @@
-<!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>
+
+<canvas></canvas>
fs 2016/09/08 10:13:10 Probably good the way it was (w/ createElement.)
Abhishek Kanike 2016/09/14 04:33:57 Done.
<script>
-var canvas = document.createElement("canvas");
+test(function() {
+var canvas = document.querySelector('canvas');
fs 2016/09/08 10:13:10 Indent 2 or 4 spaces within the test-function body
Abhishek Kanike 2016/09/14 04:33:57 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