summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/compositing/transitions/singular-scale-transition.html
blob: 2b76bd7c51c35f06dec0a6a1dd79d017b1d72a58 (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
44
45
46
47
48
49
50
51
52
53
54
55
<!DOCTYPE>

<html>
<head>
  <title>Singular scale</title>
  <style type="text/css" media="screen">
    #box {
      height: 200px;
      width: 200px;
      border: 1px solid black;
    }
    
    #inner {
      height: 200px;
      width: 200px;
      background-color: gray;
      transform: scale(0);
      -webkit-transition: -webkit-transform 1s linear;
    }

    #box.final #inner {
      transform: scale(1);
    }
    
    #box:hover #inner {
      transform: scale(1);
    }
  </style>
  
  <script src="../../animations/resources/animation-test-helpers.js" type="text/javascript" charset="utf-8"></script>
  <script type="text/javascript" charset="utf-8">

    const expectedValues = [
      // [time, element-id, property, expected-value, tolerance]
      [0.5, 'inner', '-webkit-transform.0', 0.5, 0.1],
    ];

    function setupTest()
    {
      var box = document.getElementById('box');
      box.className = 'final';
    }
    runTransitionTest(expectedValues, setupTest, undefined, true /* pixel test */);
  </script>
</head>
<body>
  <p>Check the pixel result to make sure that the gray square is half way through the scale animation.</p>
  <div id="box">
    <div id="inner">
    </div>
  </div>

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