diff options
Diffstat (limited to 'dom/canvas/test/reftest/1851943-ref.html')
-rw-r--r-- | dom/canvas/test/reftest/1851943-ref.html | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/dom/canvas/test/reftest/1851943-ref.html b/dom/canvas/test/reftest/1851943-ref.html new file mode 100644 index 0000000000..5cd7b829e5 --- /dev/null +++ b/dom/canvas/test/reftest/1851943-ref.html @@ -0,0 +1,19 @@ +<!DOCTYPE html> +<head><meta charset="utf-8"></head> +<body> +<canvas id="canvas" width="100" height="100" style="background-color: #555555;"></canvas> +<script> +let canvas = document.getElementById("canvas"); +let ctx = canvas.getContext("2d"); + +const canvasTemp = document.createElement('canvas'); +canvasTemp.width = 50; +canvasTemp.height = 50; +let ctxTemp = canvasTemp.getContext("2d"); +ctxTemp.fillStyle = "#ff0000"; +ctxTemp.fillRect(0, 0, 50, 50); +ctxTemp.fillStyle = "#00ff00"; +ctxTemp.fillRect(2, 2, 46, 46); +ctx.drawImage(canvasTemp, 0, 0, 100, 100, 0, 0, 100, 100); +</script> +</body> |