[Web Animations] Turn Web Animations with CSS integration on for test runners
[WebKit-https.git] / LayoutTests / animations / keyframes-comma-separated.html
1 <!DOCTYPE html>
2 <html lang="en">
3 <head>
4   <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5   <title>Keyframes test with comma separated keys</title>
6   <style type="text/css" media="screen">
7     #box {
8         position: absolute;
9         left: 0;
10         top: 100px;
11         height: 100px;
12         width: 100px;
13         background-color: blue;
14         -webkit-animation-duration: 1s;
15         -webkit-animation-timing-function: linear;
16         -webkit-animation-name: "anim";
17     }
18     @-webkit-keyframes "anim" {
19         from { left: 50px; }
20         20%, 40%  { left: 100px; }
21         60%,80%{ left: 200px; }
22         to   { left: 300px; }
23     }
24     </style>
25     <script src="resources/animation-test-helpers.js" type="text/javascript" charset="utf-8"></script>
26     <script type="text/javascript" charset="utf-8">
27     
28     const expectedValues = [
29       // [animation-name, time, element-id, property, expected-value, tolerance]
30       ["anim", 0.3, "box", "left", 100, 1],
31       ["anim", 0.7, "box", "left", 200, 1],
32     ];
33     
34     runAnimationTest(expectedValues);
35     
36   </script>
37 </head>
38 <body>
39 This test performs an animation of the left property. It should stop for 100ms at 100px and 200px
40 We test for those values 50ms after it has stopped at each position. Keys in two of the keyframes
41 are comma separated, so these should be correctly broken out into separate keyframes.
42 <div id="box">
43 </div>
44 <div id="result">
45 </div>
46 </body>
47 </html>