image/test/reftest/gif/test_bug641198.html

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 <!DOCTYPE HTML>
     2 <html class="reftest-wait">
     3 <head>
     4 <title>Test for bug 641198</title>
     5 <link rel="stylesheet" href="ImageDocument.css">
     6 <style type="text/css" media=screen>
     7    a.animated1 {
     8       display: block;
     9       width: 40px;
    10       height: 40px;
    11       background: url("animation1a.gif") no-repeat 0 0;
    12    }
    14    a.animated1 span {
    15       position: absolute;
    16       top: -999em;
    17    }
    19    a.animated2 {
    20       display: block;
    21       width: 40px;
    22       height: 40px;
    23       background: url("animation2a.gif") no-repeat 0 0;
    24    }
    26    a.animated2 span {
    27       position: absolute;
    28       top: -999em;
    29    }
    30 </style>
    31 </head>
    32 <body onload="doTimeout()">
    34 <a id="animated" href="#" title="Animated"><span>Animated</span></a>
    36 <script>
    37 // We check whether changing the class will lead to the animation being
    38 // run from the beginning, even if the animation was already shown
    39 // before.
    40 var counter = 0;
    41 function doTimeout() {
    42   if (counter == 4) {
    43     document.documentElement.className = '';
    44   } else {
    45     document.getElementById("animated").setAttribute("class", "animated" + ((counter % 2)+1));
    46     setTimeout(doTimeout, counter == 3 ? 500 : 250); // Wait a bit more for the last one, to prevent oranges
    47   }
    48   counter++;
    49 }
    50 </script>
    51 </body>
    52 </html>

mercurial