[Web Animations] Turn Web Animations with CSS integration on for test runners
[WebKit-https.git] / LayoutTests / transitions / cubic-bezier-overflow-color.html
1 <!doctype html><!-- webkit-test-runner [ enableWebAnimationsCSSIntegration=true ] -->
2 <html>
3   <head>
4     <title>cubic-bezier value overflow: Colors</title>
5     <style>
6       .box {
7         position: relative;
8         left: 0;
9         height: 100px;
10         width: 100px;
11         margin: 10px;
12         background-color: #404040;
13         -webkit-transition: background-color 1s linear;
14       }
15       .animating > .box {
16         background-color: #C0C0C0;
17       }
18       .animating > .box.colored {
19         background-color: papayawhip;
20       }
21     </style>
22     <script src="resources/transition-test-helpers.js"></script>
23     <script>
24       const expectedValues = [
25         // [time, element-id, property, expected-value, tolerance]
26         [0.50, "box1", "background-color", [220, 220, 220], 10],
27         [0.95, "box1", "background-color", [207, 207, 207], 10],
28         [0.10, "box2", "background-color", [45, 45, 45], 15],
29         [0.50, "box2", "background-color", [106, 106, 106], 15],
30         [0.95, "box2", "background-color", [204, 204, 204], 15],
31         [0.10, "box3", "background-color", [0, 2, 11], 15],
32         [0.50, "box3", "background-color", [0, 0, 0], 0],
33         [0.15, "box4", "background-color", [255, 255, 255], 0],
34         [0.50, "box4", "background-color", [166, 155, 140], 15],
35         [0.80, "box4", "background-color", [17, 22, 28], 15],
36       ];
37
38       function setupTest() {
39         document.getElementById('container').className = 'animating';
40       }
41
42       runTransitionTest(expectedValues, setupTest, usePauseAPI);
43     </script>
44   </head>
45   <body>
46     <div id="container">
47       <div class="box" id="box1" style="-webkit-transition-timing-function: cubic-bezier(0.3, 1.5, 0.8, 1.5);"></div>
48       <div class="box" id="box2" style="-webkit-transition-timing-function: cubic-bezier(0.4, -0.8, 0.7, 1.7);"></div>
49       <div class="box colored" id="box3" style="-webkit-transition-timing-function: cubic-bezier(0.7, -2, 1, -1.5);"></div>
50       <div class="box colored" id="box4" style="-webkit-transition-timing-function: cubic-bezier(0, 4, 1, -3);"></div>
51     </div>
52     <div id="result"></div>
53   </body>
54 </html>