diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
commit | 36d22d82aa202bb199967e9512281e9a53db42c9 (patch) | |
tree | 105e8c98ddea1c1e4784a60a5a6410fa416be2de /image/test/mochitest/test_canvas_frame_animation.html | |
parent | Initial commit. (diff) | |
download | firefox-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 'image/test/mochitest/test_canvas_frame_animation.html')
-rw-r--r-- | image/test/mochitest/test_canvas_frame_animation.html | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/image/test/mochitest/test_canvas_frame_animation.html b/image/test/mochitest/test_canvas_frame_animation.html new file mode 100644 index 0000000000..c2820b3a66 --- /dev/null +++ b/image/test/mochitest/test_canvas_frame_animation.html @@ -0,0 +1,24 @@ +<!doctype html> +<title>Test for bug 1619245 - animated image as canvas background</title> +<script src="/tests/SimpleTest/SimpleTest.js"></script> +<script src="/tests/SimpleTest/WindowSnapshot.js"></script> +<script src="imgutils.js"></script> +<script src="animationPolling.js"></script> +<!-- Intentionally not including SimpleTest.css as that sets the background of the root --> +<body id="body" style="background-image: url(animated-gif.gif); display: none; overflow: hidden;"> + <div id="reference" style="background-image: url(animated-gif-finalframe.gif); display: none; width: 100vw; height: 100vh;"></div> + <div id="clean" style="display: none; width: 100vw; height: 100vh;"></div> + <div id="debug" style="display: none"></div> +</body> +<script> +const FAILURE_TIMEOUT = 120000; // Fail early after 120 seconds (2 minutes) + +window.onload = function() { + // first move the reference outside of the <body>, so that the test can properly show it. + document.documentElement.appendChild(document.getElementById("reference")); + document.documentElement.appendChild(document.getElementById("debug")); + document.documentElement.appendChild(document.getElementById("clean")); + var animTest = new AnimationTest(20, FAILURE_TIMEOUT, 'reference', 'body', 'debug', 'clean', 'animated-gif.gif'); + animTest.beginTest(); +} +</script> |