summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/compositing/reflections/animation-inside-reflection.html
blob: 894a98f591df9226bea5822e5601298d7bdfbfc8 (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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<!DOCTYPE html>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <style>
  .outer {
    width: 120px;
    height: 240px;
    margin: 20px;
    border: 1px solid black;
    -webkit-box-reflect: right 10px;
    opacity:0.95;
  }
  
  .inner {
    margin: 10px;
    width: 100px;
    height: 100px;
    text-align: center;
    font-size: 50pt;
    border: 2px solid blue;
    -webkit-box-reflect: below 10px;
    opacity:0.95;
  }
  
  #animated {
    margin: 10px;
    width: 80px;
    height: 80px;
    background-color: green;
  }
  
  #animated.animated {
    -webkit-animation: swing 1s linear 1;
  }
  
  /* for manual testing */
  #animated:hover {
    -webkit-animation-play-state: paused;
  }
  
  .composited {
    transform: translateZ(0);
  }
  
  @-webkit-keyframes swing {
    from { transform: rotate(0deg); }
    to   { transform: rotate(90deg); }
  }
  </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, "animated", "webkitTransform.0", 0.76, 0.1],
    ];
    
    var pixelTest = true;
    var disablePauseAPI = false;
    runAnimationTest(expectedValues, null, null, disablePauseAPI, pixelTest);
  </script>
  </head>
<body>
  <p>The top left box, and all reflections should be rotated 45deg.</p>
  <div class="outer">
    <div id="inner" class="inner">
      <div id="animated" class="animated"></div>
    </div>
  </div>
  <div id="result"></div>
</body>
</html>