Bug 1915045 Ensure decode tasks are scheduled on BufferingState::Enter() r=media...
[gecko.git] / dom / canvas / test / reftest / 1719886-1-ref.html
blobda35d8667773d12e9fecdc3a351ea754da64bc92
1 <!DOCTYPE html>
2 <html>
3 <body>
4 Pattern Canvas<br>
5 <canvas id="patternCanvas" style="border: 1px solid black" width="10" height="10"></canvas><br>
6 Main Canvas (red square should be in top-left corner)<br>
7 <canvas id="canvas" style="border: 1px solid black" width="100" height="100"></canvas>
8 <script>
10 // Draw a 10x10 red rectangle that will be used for the pattern.
11 const patternCanvas = document.getElementById("patternCanvas");
12 const patternCtx = patternCanvas.getContext("2d");
13 patternCtx.fillStyle = "red";
14 patternCtx.fillRect(0, 0, patternCanvas.width, patternCanvas.height);
16 const canvas = document.getElementById("canvas");
17 const ctx = canvas.getContext("2d");
19 const pattern = ctx.createPattern(patternCanvas, "no-repeat");
21 ctx.fillStyle = pattern;
22 // Fill the entire canvas with the pattern.
23 ctx.fillRect(0, 0, 100, 100);
25 </script>
27 </body>
28 </html>