summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/transitions/zero-duration-without-units.html
blob: 10cce47544fa6596591d8868c2c50a70f3f5a259 (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
<!DOCTYPE html>

<html>
<head>
  <style>
    #box {
      height: 50px;
      width: 100px;
      background-color: blue;
      -webkit-transition-property: top;
      -webkit-transition-duration: 1s;
      -webkit-transition-duration: 0;
    }
  </style>
  <script>
    if (window.testRunner)
      testRunner.dumpAsText();

    function test()
    {
        var box = document.getElementById('box');
        var dur = parseInt(window.getComputedStyle(box).webkitTransitionDuration);
        document.getElementById('result').innerHTML = "Duration was " + dur + " (should be 0): " + (dur == 0 ? "PASS" : "FAIL");
    }
    window.addEventListener('load', test, false)
  </script>
</head>
<body>

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