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/reftest/gif/test_bug641198.html | |
parent | Initial commit. (diff) | |
download | firefox-esr-upstream.tar.xz firefox-esr-upstream.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/reftest/gif/test_bug641198.html')
-rw-r--r-- | image/test/reftest/gif/test_bug641198.html | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/image/test/reftest/gif/test_bug641198.html b/image/test/reftest/gif/test_bug641198.html new file mode 100644 index 0000000000..46bdb0d47c --- /dev/null +++ b/image/test/reftest/gif/test_bug641198.html @@ -0,0 +1,53 @@ +<!DOCTYPE HTML> +<html class="reftest-wait"> +<head> +<title>Test for bug 641198</title> +<link rel="stylesheet" href="ImageDocument.css"> +<style type="text/css" media=screen> + a.animated1 { + display: block; + width: 40px; + height: 40px; + background: url("animation1a.gif") no-repeat 0 0; + } + + a.animated1 span { + position: absolute; + top: -999em; + } + + a.animated2 { + display: block; + width: 40px; + height: 40px; + background: url("animation2a.gif") no-repeat 0 0; + } + + a.animated2 span { + position: absolute; + top: -999em; + } +</style> +</head> +<body onload="doTimeout()"> + +<a id="animated" href="#" title="Animated"><span>Animated</span></a> + +<script> +// We check whether changing the class will lead to the animation being +// run from the beginning, even if the animation was already shown +// before. +var counter = 0; +function doTimeout() { + if (counter == 4) { + document.documentElement.className = ''; + } else { + document.getElementById("animated").setAttribute("class", "animated" + ((counter % 2)+1)); + setTimeout(doTimeout, counter == 3 ? 500 : 250); // Wait a bit more for the last one, to prevent oranges + } + counter++; +} +</script> +</body> +</html> + |