summaryrefslogtreecommitdiffstats
path: root/layout/reftests/bugs/1743851-1-ref.html
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
commit36d22d82aa202bb199967e9512281e9a53db42c9 (patch)
tree105e8c98ddea1c1e4784a60a5a6410fa416be2de /layout/reftests/bugs/1743851-1-ref.html
parentInitial commit. (diff)
downloadfirefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.tar.xz
firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.zip
Adding upstream version 115.7.0esr.upstream/115.7.0esrupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'layout/reftests/bugs/1743851-1-ref.html')
-rw-r--r--layout/reftests/bugs/1743851-1-ref.html44
1 files changed, 44 insertions, 0 deletions
diff --git a/layout/reftests/bugs/1743851-1-ref.html b/layout/reftests/bugs/1743851-1-ref.html
new file mode 100644
index 0000000000..07a9d22d25
--- /dev/null
+++ b/layout/reftests/bugs/1743851-1-ref.html
@@ -0,0 +1,44 @@
+<!DOCTYPE HTML>
+<html>
+ <head>
+ <meta charset="utf-8"/>
+ <script>
+
+ const spriteSheet = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALBAMAAACEzBAKAAAAFVBMVEUAAADMr3z///8PDw9AQEC/v7/w8PCtfkxVAAAAA3RSTlMAAAD6dsTeAAAAQ0lEQVQIWy3IQRGAIAAEwJ1zCEAFLEAUK5iPClaggj9rMH7Y57prrR0pOJB1kU58OIldsSt2BQVHaIN3Rnt4p2SwJj863A7yxMyt/AAAAABJRU5ErkJggg=='
+
+ const loadImage = (src) => {
+ return new Promise((resolve, reject) => {
+ var img = new Image()
+ img.onload = () => resolve(img)
+ img.onerror = () => reject(false)
+ img.src = src
+ })
+ }
+
+ let cursorImage
+
+ function drawTestImage(canvasID, alphaValue) {
+ const ctx = document.getElementById(canvasID).getContext("2d", { alpha: alphaValue })
+
+ ctx.fillStyle = "#808080" // For contrast
+ ctx.fillRect(0, 0, 30, 30)
+
+ createImageBitmap(cursorImage, 0, 0, 8, 11, { premultiplyAlpha: "none" }).then(image => {
+ ctx.drawImage(image, 10, 10)
+ })
+ }
+
+ window.addEventListener("DOMContentLoaded", () => {
+ loadImage(spriteSheet).then(img => {
+ cursorImage = img
+ drawTestImage("c1", true)
+ })
+ })
+
+ </script>
+ </head>
+ <body>
+ <canvas id="c1" width="30" height="30"></canvas>
+ </body>
+</html>
+