wpt / css / css-backgrounds / animations / background-color-animation-custom-timing-function.html

Status: PASS | Duration: 5ms | Subtests: 1/1 | Open test on wpt.live | Open ref on wpt.live | wpt.fyi

/css/css-backgrounds/animations/background-color-animation-custom-timing-function.html

<!DOCTYPE html>
<html class="reftest-wait">
<link rel="help" href="https://www.w3.org/TR/css-color-4/#interpolation">
<link rel="help" href="ttps://www.w3.org/TR/css-easing-1/#...">
<link rel="match" href="background-color-animation-custom-timing-function-ref.html">
<style>
  @keyframes bgcolor {
    0% {
      background-color: rgb(90, 90, 90);
    }

    25% {
      background-color: rgb(80, 80, 80);
    }

    50% {
      background-color: rgb(90, 90, 90);
    }

    75% {
      background-color: rgb(80, 80, 80);
    }

    100% {
      background-color: rgb(90, 90, 90);
    }
  }

  .background {
    width: 200px;
    height: 200px;
    animation: bgcolor 10000000s -1286796s
      /* roughly where the derivative of the cubic-bezier is zero */
    ;
    animation-timing-function: cubic-bezier(0, 9, 1, 9);
  }
</style>
<script src="/common/reftest-wait.js"></script>
<script src="/web-animations/testcommon.js"></script>

<body>
  <div class="background"></div>

  <script>
    document.getAnimations()[0].ready.then(() => {
      waitForAnimationFrames(3).then(takeScreenshot);
    });
  </script>
</body>

</html>

/css/css-backgrounds/animations/background-color-animation-custom-timing-function-ref.html

<!DOCTYPE html>

<style>
  .background {
    width: 200px;
    height: 200px;
    background-color: rgb(21, 21, 21);
  }
</style>

<body>
  <div class="background"></div>
</body>

</html>