180c2e90254e21a745545675c0ee790e65beff4b
[WebKit-https.git] / LayoutTests / animations / transition-and-animation-1.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!-- webkit-test-runner [ enableCSSAnimationsAndCSSTransitionsBackedByWebAnimations=true ] -->
2
3 <html lang="en">
4 <head>
5   <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6   <title>Transition/Animation Test #1</title>
7   <style type="text/css" media="screen">
8     #box {
9         position: absolute;
10         left: 0;
11         top: 100px;
12         height: 100px;
13         width: 100px;
14         background-color: blue;
15         -webkit-animation-duration: 0.5s;
16         -webkit-animation-timing-function: linear;
17         -webkit-animation-name: "anim";
18         -webkit-transition-property: -webkit-transform;
19         -webkit-transition-duration: 10s;
20     }
21     @-webkit-keyframes "anim" {
22         from { -webkit-transform: translateX(200px); }
23         to   { -webkit-transform: translateX(300px); }
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     
29     const expectedValues = [
30       // [animation-name, time, element-id, property, expected-value, tolerance]
31       [null, 0.55, "box", "webkitTransform", "none", null],
32     ];
33     
34     runAnimationTest(expectedValues);
35     
36   </script>
37 </head>
38 <body>
39 This test has a transition and animation on the same property (-webkit-transform). But the transition is never triggered,
40 so nothing should be moving when the animation finishes.
41 <div id="box">
42 </div>
43 <div id="result">
44 </div>
45 </body>
46 </html>