OLD | NEW |
(Empty) | |
| 1 // DO NOT EDIT! This test has been generated by tools/gentest.py. |
| 2 // OffscreenCanvas test in a worker:2d.strokeRect.transform |
| 3 // Description:fillRect is affected by transforms |
| 4 // Note: |
| 5 |
| 6 importScripts("/resources/testharness.js"); |
| 7 importScripts("/common/canvas-tests.js"); |
| 8 |
| 9 var t = async_test("fillRect is affected by transforms"); |
| 10 t.step(function() { |
| 11 |
| 12 var offscreenCanvas = new OffscreenCanvas(100, 50); |
| 13 var ctx = offscreenCanvas.getContext('2d'); |
| 14 |
| 15 ctx.scale(10, 10); |
| 16 ctx.translate(0, 5); |
| 17 ctx.strokeStyle = '#0f0'; |
| 18 ctx.lineWidth = 5; |
| 19 ctx.strokeRect(2.5, -2.6, 5, 0.2); |
| 20 _assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); |
| 21 |
| 22 t.done(); |
| 23 |
| 24 }); |
| 25 done(); |
OLD | NEW |