OLD | NEW |
| (Empty) |
1 <!DOCTYPE html> | |
2 <!-- DO NOT EDIT! This test has been generated by tools/gentest.py. --> | |
3 <title>OffscreenCanvas test: 2d.fillRect.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.fillRect.nonfinite</h1> | |
9 <p class="desc">fillRect() with Infinity/NaN is ignored</p> | |
10 | |
11 | |
12 <script> | |
13 var t = async_test("fillRect() 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 = '#0f0'; | |
20 ctx.fillRect(0, 0, 100, 50); | |
21 ctx.fillStyle = '#f00'; | |
22 ctx.fillRect(Infinity, 0, 100, 50); | |
23 ctx.fillRect(-Infinity, 0, 100, 50); | |
24 ctx.fillRect(NaN, 0, 100, 50); | |
25 ctx.fillRect(0, Infinity, 100, 50); | |
26 ctx.fillRect(0, -Infinity, 100, 50); | |
27 ctx.fillRect(0, NaN, 100, 50); | |
28 ctx.fillRect(0, 0, Infinity, 50); | |
29 ctx.fillRect(0, 0, -Infinity, 50); | |
30 ctx.fillRect(0, 0, NaN, 50); | |
31 ctx.fillRect(0, 0, 100, Infinity); | |
32 ctx.fillRect(0, 0, 100, -Infinity); | |
33 ctx.fillRect(0, 0, 100, NaN); | |
34 ctx.fillRect(Infinity, Infinity, 100, 50); | |
35 ctx.fillRect(Infinity, Infinity, Infinity, 50); | |
36 ctx.fillRect(Infinity, Infinity, Infinity, Infinity); | |
37 ctx.fillRect(Infinity, Infinity, 100, Infinity); | |
38 ctx.fillRect(Infinity, 0, Infinity, 50); | |
39 ctx.fillRect(Infinity, 0, Infinity, Infinity); | |
40 ctx.fillRect(Infinity, 0, 100, Infinity); | |
41 ctx.fillRect(0, Infinity, Infinity, 50); | |
42 ctx.fillRect(0, Infinity, Infinity, Infinity); | |
43 ctx.fillRect(0, Infinity, 100, Infinity); | |
44 ctx.fillRect(0, 0, Infinity, Infinity); | |
45 _assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); | |
46 | |
47 t.done(); | |
48 | |
49 }); | |
50 </script> | |
OLD | NEW |