| <!DOCTYPE html> | |
| <!-- DO NOT EDIT! This test has been generated by tools/gentest.py. --> | |
| <title>OffscreenCanvas test: 2d.path.arcTo.shape.end</title> | |
| <script src="/resources/testharness.js"></script> | |
| <script src="/resources/testharnessreport.js"></script> | |
| <script src="/common/canvas-tests.js"></script> | |
| <h1>2d.path.arcTo.shape.end</h1> | |
| <p class="desc">arcTo() does not draw anything from P1 to P2</p> | |
| <script> | |
| var t = async_test("arcTo() does not draw anything from P1 to P2"); | |
| t.step(function() { | |
| var offscreenCanvas = new OffscreenCanvas(100, 50); | |
| var ctx = offscreenCanvas.getContext('2d'); | |
| ctx.fillStyle = '#0f0'; | |
| ctx.fillRect(0, 0, 100, 50); | |
| ctx.strokeStyle = '#f00'; | |
| ctx.lineWidth = 50; | |
| ctx.beginPath(); | |
| ctx.moveTo(-100, -100); | |
| ctx.arcTo(-100, 25, 200, 25, 10); | |
| ctx.stroke(); | |
| _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); | |
| _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); | |
| _assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); | |
| _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); | |
| _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); | |
| t.done(); | |
| }); | |
| </script> |