tor-browser

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

two-clip-path-animation-diff-length3.html (1306B)


      1 <!DOCTYPE html>
      2 <html class="reftest-wait">
      3 <link rel="help" href="https://drafts.csswg.org/css-shapes-1/#basic-shape-interpolation">
      4 <link rel="match" href="two-clip-path-animation-diff-length3-ref.html">
      5 <style>
      6  .container {
      7    width: 100px;
      8    height: 100px;
      9    background-color: green;
     10    animation: clippath2 10000s step-end, clippath1 20s 0.001s;
     11  }
     12 
     13  /* Use un-interpolatable keyframes to force discrete transition */
     14  @keyframes clippath1 {
     15    0% {
     16      clip-path: circle(50% at 50% 50%);
     17    }
     18 
     19    100% {
     20      clip-path: inset(11px 11px);
     21    }
     22  }
     23 
     24  @keyframes clippath2 {
     25    0% {
     26      clip-path: circle(10% at 50% 50%);
     27    }
     28 
     29    100% {
     30      clip-path: circle(25% at 50% 50%);
     31    }
     32  }
     33 </style>
     34 <script src="/common/reftest-wait.js"></script>
     35 <script src="../../../../web-animations/testcommon.js"></script>
     36 
     37 <body>
     38  <div class="container"></div>
     39 
     40  <script>
     41    // This test ensures that when there are two animations where one of them has
     42    // animation delays, we show the right clip when the delayed animation is
     43    // started.
     44    const animations = document.getAnimations();
     45    Promise.all([animations[0].ready, animations[1].ready]).then(() => {
     46      waitForAnimationFrames(3).then(() => {
     47        takeScreenshot();
     48      });
     49    });
     50  </script>
     51 </body>
     52 
     53 </html>