tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

animate-display-to-none-001.html (1160B)


      1 <!doctype html>
      2 <meta charset="utf-8">
      3 <title>Test that underlying style gets restored when seeking away from the
      4  'to' portion of a SVG/SMIL animation to 'display:none'</title>
      5 <link rel="help" href="https://www.w3.org/TR/smil-animation/#ToAttribute">
      6 <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
      7 <link rel="match" href="../struct/reftests/reference/green-100x100.html">
      8 <script>
      9  function go() {
     10    svgElem.pauseAnimations();
     11 
     12    /* Seek to 75% of the way through duration, when the animation should be
     13     * imposing the "to" value. (This is necessary to trigger the bug
     14     * that we're regression-testing for here.) */
     15    svgElem.setCurrentTime(3);
     16 
     17    /* Now, seek back to 25% of the way through duration, when the underlying
     18     * value should be restored. This should make the green rect show up
     19     * in our reftest screenshot. */
     20    svgElem.setCurrentTime(1);
     21  }
     22 </script>
     23 <body onload="go()">
     24 <svg id="svgElem">
     25  <rect width="100" height="100" fill="red"/>
     26  <rect width="100" height="100" fill="green">
     27    <animate attributeName="display" to="none"
     28             begin="0s" dur="4s"/>
     29  </rect>
     30 </svg>