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..d654923edf10f84d3efce8ec4a8b30da15ddbf0f 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"); |
Srirama
2016/09/14 10:22:47
Looks like tabs were used, please use spaces inste
Abhishek Kanike
2016/09/14 10:32:25
Done.
|
+ 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> |