summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/transitions/zero-duration-in-list.html
blob: 04ecd8bd4b6cd76932fe11a7888e282f203cb6c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<!DOCTYPE html>

<html>
<head>
  <style>
    #box {
      position: absolute;
      height: 100px;
      width: 100px;
      background-color: blue;
      -webkit-transition-duration: 0, 0.5s;
      -webkit-transition-timing-function: linear;
      -webkit-transition-property: top, left;
    }
  </style>
  <script src="../animations/resources/animation-test-helpers.js"></script>
  <script type="text/javascript">
    
    const expectedValues = [
      // [time, element-id, property, expected-value, tolerance, post-completion callback, should-be-transitioning]
      [0.25, "box", "left", 50, 10, null, shouldBeTransitioning],
      [0.25, "box", "top", 100, 10, null, shouldNotBeTransitioning],
    ];
    
    function setupTest()
    {
      var box = document.getElementById('box');
      box.style.top = '100px';
      box.style.left = '100px';
    }
    
    runTransitionTest(expectedValues, setupTest);
  </script>
</head>
<body>

<p>Tests that with a zero duration transition on top, it does not animate</p>
<div id="box">
</div>
<div id="result">
</div>
</body>
</html>