[Web Animations] Expose Web Animations CSS integration as an experimental feature
[WebKit-https.git] / LayoutTests / animations / keyframe-timing-functions.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!-- webkit-test-runner [ enableWebAnimationsCSSIntegration=true ] -->
2
3 <html lang="en">
4 <head>
5   <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6   <title>Keyframe Timing Functions</title>
7   <style type="text/css" media="screen">
8   
9     #container {
10       position: relative;
11       border: 1px solid black;
12       height: 100px;
13       width: 700px;
14     }
15     
16     #box {
17       position: absolute;
18       height: 100px;
19       width: 100px;
20       background-color: blue;
21       -webkit-animation-name: move;
22       -webkit-animation-duration: 1.5s;
23     }
24
25     @-webkit-keyframes move {
26       0%   {
27         left: 0;
28         -webkit-animation-timing-function: linear;
29       }
30       100% {
31         left: 600px;
32       }
33     }
34     
35   </style>
36   <script src="resources/animation-test-helpers.js" type="text/javascript" charset="utf-8"></script>
37   <script type="text/javascript" charset="utf-8">
38
39     const expectedValues = [
40       // [animation-name, time, element-id, property, expected-value, tolerance]
41       ["move", 0.75, "box", "left", 300, 20],
42     ];
43     
44     runAnimationTest(expectedValues);
45   </script>
46 </head>
47 <body>
48
49 <div id="container">
50     This test should do a linear animation. The timing-function comes from the keyframe, so this is testing
51     whether or not the timing function in keyframes is used.
52   <div id="box"></div>
53 </div>
54 <div id="result">
55 </div>
56 </body>
57 </html>