image/test/reftest/gif/test_bug641198.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/image/test/reftest/gif/test_bug641198.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,53 @@
     1.4 +<!DOCTYPE HTML>
     1.5 +<html class="reftest-wait">
     1.6 +<head>
     1.7 +<title>Test for bug 641198</title>
     1.8 +<link rel="stylesheet" href="ImageDocument.css">
     1.9 +<style type="text/css" media=screen>
    1.10 +   a.animated1 {
    1.11 +      display: block;
    1.12 +      width: 40px;
    1.13 +      height: 40px;
    1.14 +      background: url("animation1a.gif") no-repeat 0 0;
    1.15 +   }
    1.16 +
    1.17 +   a.animated1 span {
    1.18 +      position: absolute;
    1.19 +      top: -999em;
    1.20 +   }
    1.21 +
    1.22 +   a.animated2 {
    1.23 +      display: block;
    1.24 +      width: 40px;
    1.25 +      height: 40px;
    1.26 +      background: url("animation2a.gif") no-repeat 0 0;
    1.27 +   }
    1.28 +
    1.29 +   a.animated2 span {
    1.30 +      position: absolute;
    1.31 +      top: -999em;
    1.32 +   }
    1.33 +</style>
    1.34 +</head>
    1.35 +<body onload="doTimeout()">
    1.36 +
    1.37 +<a id="animated" href="#" title="Animated"><span>Animated</span></a>
    1.38 +
    1.39 +<script>
    1.40 +// We check whether changing the class will lead to the animation being
    1.41 +// run from the beginning, even if the animation was already shown
    1.42 +// before.
    1.43 +var counter = 0;
    1.44 +function doTimeout() {
    1.45 +  if (counter == 4) {
    1.46 +    document.documentElement.className = '';
    1.47 +  } else {
    1.48 +    document.getElementById("animated").setAttribute("class", "animated" + ((counter % 2)+1));
    1.49 +    setTimeout(doTimeout, counter == 3 ? 500 : 250); // Wait a bit more for the last one, to prevent oranges
    1.50 +  }
    1.51 +  counter++;
    1.52 +}
    1.53 +</script>
    1.54 +</body>
    1.55 +</html>
    1.56 +

mercurial