Bug 1794662 [wpt PR 36401] - Batch-remove unused arguments in _assertPixel and _asser...
[gecko.git] / testing / web-platform / tests / html / canvas / offscreen / line-styles / 2d.line.cross.worker.js
blob82b289bdeaca6fb5c85d608623f8fde79832c9ad
1 // DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py.
2 // OffscreenCanvas test in a worker:2d.line.cross
3 // Description:
4 // Note:
6 importScripts("/resources/testharness.js");
7 importScripts("/html/canvas/resources/canvas-tests.js");
9 var t = async_test("");
10 var t_pass = t.done.bind(t);
11 var t_fail = t.step_func(function(reason) {
12     throw reason;
13 });
14 t.step(function() {
16 var canvas = new OffscreenCanvas(100, 50);
17 var ctx = canvas.getContext('2d');
19 ctx.fillStyle = '#0f0';
20 ctx.fillRect(0, 0, 100, 50);
21 ctx.lineWidth = 200;
22 ctx.lineJoin = 'bevel';
23 ctx.strokeStyle = '#f00';
24 ctx.beginPath();
25 ctx.moveTo(110, 50);
26 ctx.lineTo(110, 60);
27 ctx.lineTo(100, 60);
28 ctx.stroke();
29 _assertPixel(canvas, 1,1, 0,255,0,255);
30 _assertPixel(canvas, 48,1, 0,255,0,255);
31 _assertPixel(canvas, 48,48, 0,255,0,255);
32 _assertPixel(canvas, 1,48, 0,255,0,255);
33 t.done();
35 });
36 done();