OLD | NEW |
| (Empty) |
1 <!DOCTYPE html> | |
2 <!-- DO NOT EDIT! This test has been generated by tools/gentest.py. --> | |
3 <title>OffscreenCanvas test: 2d.path.arc.nonfinite</title> | |
4 <script src="/resources/testharness.js"></script> | |
5 <script src="/resources/testharnessreport.js"></script> | |
6 <script src="/common/canvas-tests.js"></script> | |
7 | |
8 <h1>2d.path.arc.nonfinite</h1> | |
9 <p class="desc">arc() with Infinity/NaN is ignored</p> | |
10 | |
11 | |
12 <script> | |
13 var t = async_test("arc() with Infinity/NaN is ignored"); | |
14 t.step(function() { | |
15 | |
16 var offscreenCanvas = new OffscreenCanvas(100, 50); | |
17 var ctx = offscreenCanvas.getContext('2d'); | |
18 | |
19 ctx.fillStyle = '#f00'; | |
20 ctx.fillRect(0, 0, 100, 50); | |
21 ctx.moveTo(0, 0); | |
22 ctx.lineTo(100, 0); | |
23 ctx.arc(Infinity, 0, 50, 0, 2*Math.PI, true); | |
24 ctx.arc(-Infinity, 0, 50, 0, 2*Math.PI, true); | |
25 ctx.arc(NaN, 0, 50, 0, 2*Math.PI, true); | |
26 ctx.arc(0, Infinity, 50, 0, 2*Math.PI, true); | |
27 ctx.arc(0, -Infinity, 50, 0, 2*Math.PI, true); | |
28 ctx.arc(0, NaN, 50, 0, 2*Math.PI, true); | |
29 ctx.arc(0, 0, Infinity, 0, 2*Math.PI, true); | |
30 ctx.arc(0, 0, -Infinity, 0, 2*Math.PI, true); | |
31 ctx.arc(0, 0, NaN, 0, 2*Math.PI, true); | |
32 ctx.arc(0, 0, 50, Infinity, 2*Math.PI, true); | |
33 ctx.arc(0, 0, 50, -Infinity, 2*Math.PI, true); | |
34 ctx.arc(0, 0, 50, NaN, 2*Math.PI, true); | |
35 ctx.arc(0, 0, 50, 0, Infinity, true); | |
36 ctx.arc(0, 0, 50, 0, -Infinity, true); | |
37 ctx.arc(0, 0, 50, 0, NaN, true); | |
38 ctx.arc(Infinity, Infinity, 50, 0, 2*Math.PI, true); | |
39 ctx.arc(Infinity, Infinity, Infinity, 0, 2*Math.PI, true); | |
40 ctx.arc(Infinity, Infinity, Infinity, Infinity, 2*Math.PI, true); | |
41 ctx.arc(Infinity, Infinity, Infinity, Infinity, Infinity, true); | |
42 ctx.arc(Infinity, Infinity, Infinity, 0, Infinity, true); | |
43 ctx.arc(Infinity, Infinity, 50, Infinity, 2*Math.PI, true); | |
44 ctx.arc(Infinity, Infinity, 50, Infinity, Infinity, true); | |
45 ctx.arc(Infinity, Infinity, 50, 0, Infinity, true); | |
46 ctx.arc(Infinity, 0, Infinity, 0, 2*Math.PI, true); | |
47 ctx.arc(Infinity, 0, Infinity, Infinity, 2*Math.PI, true); | |
48 ctx.arc(Infinity, 0, Infinity, Infinity, Infinity, true); | |
49 ctx.arc(Infinity, 0, Infinity, 0, Infinity, true); | |
50 ctx.arc(Infinity, 0, 50, Infinity, 2*Math.PI, true); | |
51 ctx.arc(Infinity, 0, 50, Infinity, Infinity, true); | |
52 ctx.arc(Infinity, 0, 50, 0, Infinity, true); | |
53 ctx.arc(0, Infinity, Infinity, 0, 2*Math.PI, true); | |
54 ctx.arc(0, Infinity, Infinity, Infinity, 2*Math.PI, true); | |
55 ctx.arc(0, Infinity, Infinity, Infinity, Infinity, true); | |
56 ctx.arc(0, Infinity, Infinity, 0, Infinity, true); | |
57 ctx.arc(0, Infinity, 50, Infinity, 2*Math.PI, true); | |
58 ctx.arc(0, Infinity, 50, Infinity, Infinity, true); | |
59 ctx.arc(0, Infinity, 50, 0, Infinity, true); | |
60 ctx.arc(0, 0, Infinity, Infinity, 2*Math.PI, true); | |
61 ctx.arc(0, 0, Infinity, Infinity, Infinity, true); | |
62 ctx.arc(0, 0, Infinity, 0, Infinity, true); | |
63 ctx.arc(0, 0, 50, Infinity, Infinity, true); | |
64 ctx.lineTo(100, 50); | |
65 ctx.lineTo(0, 50); | |
66 ctx.fillStyle = '#0f0'; | |
67 ctx.fill(); | |
68 _assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); | |
69 _assertPixel(offscreenCanvas, 90,45, 0,255,0,255, "90,45", "0,255,0,255"); | |
70 | |
71 t.done(); | |
72 | |
73 }); | |
74 </script> | |
OLD | NEW |