OLD | NEW |
| (Empty) |
1 // DO NOT EDIT! This test has been generated by tools/gentest.py. | |
2 // OffscreenCanvas test in a worker:2d.path.isPointInPath.arc | |
3 // Description:isPointInPath() works on arcs | |
4 // Note: | |
5 | |
6 importScripts("/resources/testharness.js"); | |
7 importScripts("/common/canvas-tests.js"); | |
8 | |
9 var t = async_test("isPointInPath() works on arcs"); | |
10 t.step(function() { | |
11 | |
12 var offscreenCanvas = new OffscreenCanvas(100, 50); | |
13 var ctx = offscreenCanvas.getContext('2d'); | |
14 | |
15 ctx.arc(50, 25, 10, 0, Math.PI, false); | |
16 _assertSame(ctx.isPointInPath(50, 10), false, "ctx.isPointInPath(50, 10)", "fals
e"); | |
17 _assertSame(ctx.isPointInPath(50, 20), false, "ctx.isPointInPath(50, 20)", "fals
e"); | |
18 _assertSame(ctx.isPointInPath(50, 30), true, "ctx.isPointInPath(50, 30)", "true"
); | |
19 _assertSame(ctx.isPointInPath(50, 40), false, "ctx.isPointInPath(50, 40)", "fals
e"); | |
20 _assertSame(ctx.isPointInPath(30, 20), false, "ctx.isPointInPath(30, 20)", "fals
e"); | |
21 _assertSame(ctx.isPointInPath(70, 20), false, "ctx.isPointInPath(70, 20)", "fals
e"); | |
22 _assertSame(ctx.isPointInPath(30, 30), false, "ctx.isPointInPath(30, 30)", "fals
e"); | |
23 _assertSame(ctx.isPointInPath(70, 30), false, "ctx.isPointInPath(70, 30)", "fals
e"); | |
24 | |
25 t.done(); | |
26 | |
27 }); | |
28 done(); | |
OLD | NEW |