Bug 1860959 [wpt PR 42048] - [webaudio] Convert test to testharness, a=testonly
[gecko.git] / gfx / tests / reftest / 1972885-ref.html
blob1466912b4995eed811037488ade6d14dd0b5dadd
1 <!DOCTYPE html>
2 <html>
3 <meta charset="utf-8">
4 <title>Reference for Bug 1972885</title>
5 <style>
6 body {
7 margin: 0;
9 canvas {
10 /* Rounded up. */
11 margin-top: 2px;
12 width: 100px;
13 /* Subpixel snapped down. */
14 height: 100px;
16 </style>
17 <canvas id="canvas"></canvas>
18 <script>
19 function draw(canvas, width, height) {
20 const ctx = canvas.getContext('2d');
21 canvas.width = width;
22 canvas.height = height;
23 const imgData = ctx.createImageData(width, height);
24 const u32View = new Uint32Array(imgData.data.buffer);
25 u32View.fill(0xFFFFFFFF);
26 for (let y = 0; y < height; y += 2) {
27 for (let x = 0; x < width; x++) {
28 u32View[y * width + x] = 0xFF000000;
31 ctx.putImageData(imgData, 0, 0);
34 draw(canvas, 100, 100);
35 </script>