Skip to content

Commit

Permalink
Bug 1741767 - Reftest drawing a large image to canvas. r=bobowen
Browse files Browse the repository at this point in the history
  • Loading branch information
vyv03354 committed Jan 15, 2022
1 parent 5ed1807 commit 020ebd1
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 0 deletions.
4 changes: 4 additions & 0 deletions dom/canvas/test/reftest/draw-large-image-ref.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<!DOCTYPE html><meta charset=utf-8>
<body>
<img style="width: 200px;" src="red_ref.png">
</body>
15 changes: 15 additions & 0 deletions dom/canvas/test/reftest/draw-large-image.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!DOCTYPE html><meta charset=utf-8>
<body class="reftest-wait">
<canvas style="width: 200px;" id="canvas"></canvas>
<script>
const ctx1 = document.getElementById("canvas").getContext("2d");
const img1 = new Image();
img1.onload = () => {
ctx1.canvas.width = img1.width;
ctx1.canvas.height = 200;
ctx1.drawImage(img1, 0, 0);
document.body.classList.remove("reftest-wait");
};
img1.src = "red_tall.png";
</script>
</body>
Binary file added dom/canvas/test/reftest/red_ref.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dom/canvas/test/reftest/red_tall.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions dom/canvas/test/reftest/reftest.list
Original file line number Diff line number Diff line change
Expand Up @@ -178,3 +178,5 @@ skip-if(Android) == visible-occluded.html visible-occluded-ref.html

== 1678909-1.html 1678909-1-ref.html
== 1719886-1.html 1719886-1-ref.html

skip-if(isDebugBuild) == draw-large-image.html draw-large-image-ref.html

0 comments on commit 020ebd1

Please sign in to comment.