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

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

Issue 2311223002: Convert fast/canvas Layouttests to testharness (Closed)
Patch Set: Refactor2 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/canvas/winding-enumeration-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/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..2bb41f04476f8bef69cecd808448774ef2ca4f53 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>
-var canvas = document.createElement("canvas");
-var context = canvas.getContext("2d");
-
-shouldNotThrow("context.fill()");
-shouldNotThrow("context.fill('nonzero')");
-shouldThrow("context.fill('randomstring')");
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
-shouldNotThrow("context.clip()");
-shouldNotThrow("context.clip('nonzero')");
-shouldThrow("context.clip('randomstring')");
+<script>
+test(function() {
+ var canvas = document.createElement("canvas");
+ var context = canvas.getContext("2d");
-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>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/canvas/winding-enumeration-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698