aboutsummaryrefslogtreecommitdiffstats
path: root/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.basic.1.worker.js
diff options
context:
space:
mode:
authorWPT Sync Bot <josh+wptsync@joshmatthews.net>2020-04-30 08:20:24 +0000
committerJosh Matthews <josh@joshmatthews.net>2020-04-30 18:22:37 -0400
commitdb4f300c7c87d0132aecaa69b28697ae7dc3e5b8 (patch)
tree213b453daabf1704c6605219f4aec87d3cf07a7e /tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.basic.1.worker.js
parented392ab3bea3948acb03b3319bb77b09920162ad (diff)
downloadservo-db4f300c7c87d0132aecaa69b28697ae7dc3e5b8.tar.gz
servo-db4f300c7c87d0132aecaa69b28697ae7dc3e5b8.zip
Update web-platform-tests to revision e51f414776c4e7efa7cfa5fe63a3a8b3969e06ac
Diffstat (limited to 'tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.basic.1.worker.js')
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.basic.1.worker.js25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.basic.1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.basic.1.worker.js
new file mode 100644
index 00000000000..19fbf213560
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.basic.1.worker.js
@@ -0,0 +1,25 @@
+// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.path.isPointInPath.basic.1
+// Description:isPointInPath() detects whether the point is inside the path
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/html/canvas/resources/canvas-tests.js");
+
+var t = async_test("isPointInPath() detects whether the point is inside the path");
+var t_pass = t.done.bind(t);
+var t_fail = t.step_func(function(reason) {
+ throw reason;
+});
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.rect(0, 0, 20, 20);
+_assertSame(ctx.isPointInPath(10, 10), true, "ctx.isPointInPath(10, 10)", "true");
+_assertSame(ctx.isPointInPath(30, 10), false, "ctx.isPointInPath(30, 10)", "false");
+t.done();
+
+});
+done();