chromium/third_party/blink/web_tests/transitions/multiple-shadow-transitions.html

<!DOCTYPE>

<html>
<head>
  <style>
    .box {
      height: 100px;
      width: 100px;
      margin: 50px;
      border: 1px solid black;
      text-align: center;
      padding: 20px;
      background-repeat: no-repeat;
      -webkit-transition-duration: 1s;
      -webkit-transition-timing-function: linear;
      -webkit-transition-property: box-shadow, text-shadow;
    }
    
    #box {
      box-shadow: 0 -20px 10px red, 0 20px 10px blue;
      text-shadow: 0 -20px 10px red, 0 20px 10px blue;
    }
    
    #box.final {
      box-shadow: 0 20px 10px red, 0 -20px 10px blue;
      text-shadow: 0 20px 10px red, 0 -20px 10px blue;
    }

    /* Mismatched layers */
    #box2 {
      box-shadow: 0 -20px 10px red, 0 20px 10px blue;
      text-shadow: 0 -20px 10px red, 0 20px 10px blue;
    }
    
    #box2.final {
      box-shadow: 0 -20px 10px red;
      text-shadow: 0 -20px 10px red;
    }

    #box3 {
      box-shadow: 0 20px 10px blue;
      text-shadow: 0 20px 10px blue;
    }
    
    #box3.final {
      box-shadow: 0 -20px 10px red, 0 20px 10px blue;
      text-shadow: 0 -20px 10px red, 0 20px 10px blue;
    }

  </style>
  <script src="../animations/resources/animation-test-helpers.js"></script>
  <script type="text/javascript">

    const expectedValues = [
      // [time, element-id, property, expected-value, tolerance]
      [0.5, 'box', 'box-shadow', 'rgb(255, 0, 0) 0px 0px 10px 0px, rgb(0, 0, 255) 0px 0px 10px 0px', 4],
      [0.5, 'box2', 'box-shadow', 'rgb(255, 0, 0) 0px -20px 10px 0px, rgba(0, 0, 255, 0.5) 0px 10px 5px 0px', 4],
      [0.5, 'box3', 'box-shadow', 'rgb(128, 0, 128) 0px 0px 10px 0px, rgba(0, 0, 255, 0.5) 0px 10px 5px 0px', 4],
    ];
  
    function setupTest()
    {
      document.getElementById('box').className = 'box final';
      document.getElementById('box2').className = 'box final';
      document.getElementById('box3').className = 'box final';
    }
  
    runTransitionTest(expectedValues, setupTest);
  </script>
</head>
<body>

  <div id="box" class="box">BOX</div>
  <div id="box2" class="box">BOX</div>
  <div id="box3" class="box">BOX</div>

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

</body>
</html>