chromium/third_party/blink/web_tests/transitions/flex-transitions.html

<!DOCTYPE>
<html>
<head>
<style>
.flexbox {
    display: -webkit-flex;
    width: 100px;
    height: 100px;
    margin-bottom: 10px;
}
.flexbox :nth-child(1) {
    background-color: blue;
}
.flexbox :nth-child(2) {
    background-color: green;
}
.flexbox div {
    -webkit-transition-property: -webkit-flex;
    -webkit-transition-duration: 1s;
    -webkit-transition-timing-function: linear;
}

#flex-row div {
    -webkit-flex: 100 0 0px;
}
.final #row1 {
    -webkit-flex: 300 0 0px;
}

#flex-column {
    -webkit-flex-direction: column;
}
#flex-column div {
    -webkit-flex: 100 0 0px;
}
.final #column1 {
    -webkit-flex: 0 0 200px;
}

#flex-negative div {
    -webkit-flex: 100 100 50px;
}
.final #negative1 {
    -webkit-flex: 100 100 100px;
}

#flex-no-flex div {
    -webkit-flex: 100 0 0px;
}
.final #no-flex1 {
    -webkit-flex: 0 0 0px;
}

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

    const expectedValues = [
      // [time, element-id, property, expected-value, tolerance]
      [0.2, 'row1',      '-webkit-flex', [140, 0,     0], 10],
      [0.2, 'column1',   '-webkit-flex', [80,  0,    40], 10],
      [0.2, 'negative1', '-webkit-flex', [100, 100,  60], 10],
      [0.2, 'no-flex1',  '-webkit-flex', [80,  0,     0], 10],
      [0.8, 'row1',      '-webkit-flex', [260, 0,     0], 10],
      [0.8, 'column1',   '-webkit-flex', [20,  0,   160], 10],
      [0.8, 'negative1', '-webkit-flex', [100, 100,  90], 10],
      [0.8, 'no-flex1',  '-webkit-flex', [20,  0,     0], 10],
    ];

    function setupTest()
    {
      document.body.className = 'final';
    }
  
    runTransitionTest(expectedValues, setupTest);
  </script>
</head>
<body>

  <div id="flex-row" class='flexbox'>
    <div id="row1"></div>
    <div id="row2"></div>
  </div>

  <div id="flex-column" class='flexbox'>
    <div id="column1"></div>
    <div id="column2"></div>
  </div>

  <div id="flex-negative" class='flexbox'>
    <div id="negative1"></div>
    <div id="negative2"></div>
  </div>

  <div id="flex-no-flex" class='flexbox'>
    <div id="no-flex1"></div>
    <div id="no-flex2"></div>
  </div>

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