chromium/third_party/blink/web_tests/css3/filters/filter-animation-from-none-hw.html

<!DOCTYPE html>

<html>
<head>
  <style>
    .box {
        height: 100px;
        width: 100px;
        margin: 10px;
        background-color: blue;
        display: inline-block;
        transform:translateZ(0);
    }

    #grayscale-box {
      animation: grayscale-anim 2s linear
    }

    #sepia-box {
      animation: sepia-anim 2s linear
    }

    #saturate-box {
      animation: saturate-anim 2s linear
    }

    #hue-rotate-box {
      animation: hue-rotate-anim 2s linear
    }

    #invert-box {
      animation: invert-anim 2s linear
    }

    #opacity-box {
      animation: opacity-anim 2s linear
    }

    #brightness-box {
      animation: brightness-anim 2s linear
    }

    #contrast-box {
      animation: contrast-anim 2s linear
    }

    #blur-box {
      animation: blur-anim 2s linear
    }

    #dropshadow-box {
      animation: dropshadow-anim 2s linear
    }


    @keyframes grayscale-anim {
        from { }
        to   { filter: grayscale(1); }
    }

    @keyframes sepia-anim {
        from { }
        to   { filter: sepia(1); }
    }

    @keyframes saturate-anim {
        from { }
        to   { filter: saturate(0); }
    }

    @keyframes hue-rotate-anim {
        from { }
        to   { filter: hue-rotate(180deg); }
    }

    @keyframes invert-anim {
        from { }
        to   { filter: invert(1); }
    }

    @keyframes opacity-anim {
        from { }
        to   { filter: opacity(0); }
    }

    @keyframes brightness-anim {
        from { }
        to   { filter: brightness(0); }
    }

    @keyframes contrast-anim {
        from { }
        to   { filter: contrast(0); }
    }

    @keyframes blur-anim {
        from { }
        to   { filter: blur(20px); }
    }

    @keyframes dropshadow-anim {
        from { }
        to   { filter: drop-shadow(20px 32px 12px black)); }
    }

  </style>
  <script src="../../animations/resources/animation-test-helpers.js"></script>
  <script type="text/javascript">
    const expectedValues = [
      // [time, element-id, property, expected-value, tolerance]
      [1, "grayscale-box", "filter", 'grayscale(0.5)', 0.05],
      [1, "sepia-box", "filter", 'sepia(0.5)', 0.05],
      [1, "saturate-box", "filter", 'saturate(0.5)', 0.05],
      [1, "hue-rotate-box", "filter", 'hue-rotate(90deg)', 5],
      [1, "invert-box", "filter", 'invert(0.5)', 0.05],
      [1, "opacity-box", "filter", 'opacity(0.5)', 0.05],
      [1, "brightness-box", "filter", 'brightness(0.5)', 0.05],
      [1, "contrast-box", "filter", 'contrast(0.5)', 0.05],
      [1, "blur-box", "filter", 'blur(10px)', 1],
      // FIXME when we implement computed filter style for drop-shadow.
      // ["dropshadow-anim",  1, "dropshadow-box", "filter", 'drop-shadow(rgba(0, 0, 0, 0.25) 5px 8px 3px )', 2],
    ];
    
    runAnimationTest(expectedValues);
  </script>
</head>
<body>

<div class="box" id="grayscale-box"></div>
<div class="box" id="sepia-box"></div>
<div class="box" id="saturate-box"></div>
<div class="box" id="hue-rotate-box"></div>
<div class="box" id="invert-box"></div>
<div class="box" id="opacity-box"></div>
<div class="box" id="brightness-box"></div>
<div class="box" id="contrast-box"></div>
<div class="box" id="blur-box"></div>
<!-- <div class="box" id="dropshadow-box"></div> -->

<div id="result">
</div>
</body>
</html>