Bug 1794662 [wpt PR 36401] - Batch-remove unused arguments in _assertPixel and _asser...
[gecko.git] / testing / web-platform / tests / html / canvas / offscreen / drawing-rectangles-to-the-canvas / 2d.strokeRect.zero.3.html
blob0145b2e412c298ff157bb828af290d47baf93458
1 <!DOCTYPE html>
2 <!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
3 <title>OffscreenCanvas test: 2d.strokeRect.zero.3</title>
4 <script src="/resources/testharness.js"></script>
5 <script src="/resources/testharnessreport.js"></script>
6 <script src="/html/canvas/resources/canvas-tests.js"></script>
8 <h1>2d.strokeRect.zero.3</h1>
9 <p class="desc">strokeRect of Nx0 pixels draws a straight line</p>
12 <script>
13 var t = async_test("strokeRect of Nx0 pixels draws a straight line");
14 var t_pass = t.done.bind(t);
15 var t_fail = t.step_func(function(reason) {
16 throw reason;
17 });
18 t.step(function() {
20 var canvas = new OffscreenCanvas(100, 50);
21 var ctx = canvas.getContext('2d');
23 ctx.strokeStyle = '#0f0';
24 ctx.lineWidth = 50;
25 ctx.strokeRect(0, 25, 100, 0);
26 _assertPixel(canvas, 50,25, 0,255,0,255);
27 t.done();
29 });
30 </script>