Bug 1794662 [wpt PR 36401] - Batch-remove unused arguments in _assertPixel and _asser...
[gecko.git] / testing / web-platform / tests / html / canvas / offscreen / compositing / 2d.composite.solid.destination-over.worker.js
blob99d64be57830f3b78d9fb6aa56c923459175d917
1 // DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py.
2 // OffscreenCanvas test in a worker:2d.composite.solid.destination-over
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');
20 ctx.fillStyle = 'rgba(0, 255, 255, 1.0)';
21 ctx.fillRect(0, 0, 100, 50);
22 ctx.globalCompositeOperation = 'destination-over';
23 ctx.fillStyle = 'rgba(255, 255, 0, 1.0)';
24 ctx.fillRect(0, 0, 100, 50);
25 _assertPixelApprox(canvas, 50,25, 0,255,255,255, 5);
26 t.done();
28 });
29 done();