[Web Animations] Expose Web Animations CSS integration as an experimental feature
[WebKit-https.git] / LayoutTests / animations / keyframe-multiple-timing-functions-transform.html
1 <!DOCTYPE html><!-- webkit-test-runner [ enableWebAnimationsCSSIntegration=true ] -->
2 <html>
3 <head>
4     <style>
5         #box {
6             position: relative;
7             height: 100px;
8             width: 100px;
9             margin: 20px;
10             background-color: red;
11             -webkit-animation:
12                 horizontal 2s linear 1 alternate,
13                 fade 2s steps(2) 1 alternate;
14         }
15
16         @-webkit-keyframes horizontal {
17             from { -webkit-transform: translateX(0px); }
18             to   { -webkit-transform: translateX(200px); }
19         }
20
21         @-webkit-keyframes fade {
22             from { opacity: 1.0; }
23             to { opacity: 0.0; }
24         }
25     </style>
26     <script src="resources/animation-test-helpers.js" type="text/javascript" charset="utf-8"></script>
27     <script type="text/javascript" charset="utf-8">
28         const expectedValues = [
29           // [animation-name, time, element-id, property, expected-value, tolerance]
30           ["horizontal", 0.5, "box", "webkitTransform", [1,0,0,1, 50,0], 20],
31           ["horizontal", 1.0, "box", "webkitTransform", [1,0,0,1,100,0], 20],
32           ["horizontal", 1.5, "box", "webkitTransform", [1,0,0,1,150,0], 20],
33           ["fade", 0.5, "box", "opacity", 1.0, 0.15],
34           ["fade", 0.9, "box", "opacity", 1.0, 0.15],
35           ["fade", 1.5, "box", "opacity", 0.5, 0.15],
36         ];
37
38         runAnimationTest(expectedValues);
39     </script>
40 </head>
41 <body>
42     <div id="box"></div>
43     <div id="result"></div>
44 </body>
45 </html>