Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / animations / keyframes-out-of-order.html
blob6fcc0cf1557021371f4d32cb8eb00698fb19fb6c
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2 "http://www.w3.org/TR/html4/loose.dtd">
4 <html lang="en">
5 <head>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
7 <title>Keyframes test with keyframes out of order</title>
8 <style type="text/css" media="screen">
9 #box {
10 position: absolute;
11 left: 0;
12 top: 100px;
13 height: 100px;
14 width: 100px;
15 background-color: blue;
16 -webkit-animation-duration: 1s;
17 -webkit-animation-timing-function: linear;
18 -webkit-animation-name: anim;
20 @-webkit-keyframes anim {
21 40% { left: 100px; }
22 from { left: 50px; }
23 20% { left: 100px; }
24 to { left: 300px; }
25 80% { left: 200px; }
26 60% { left: 200px; }
28 </style>
29 <script src="resources/animation-test-helpers.js" type="text/javascript" charset="utf-8"></script>
30 <script type="text/javascript" charset="utf-8">
32 const expectedValues = [
33 // [time, element-id, property, expected-value, tolerance]
34 [0.3, "box", "left", 100, 1],
35 [0.7, "box", "left", 200, 1],
38 runAnimationTest(expectedValues);
40 </script>
41 </head>
42 <body>
43 This test performs an animation of the left property. It should stop for 100ms at 100px and 200px
44 We test for those values 50ms after it has stopped at each position. The keyframes are out of order
45 and should get correctly sorted.
46 <div id="box">
47 </div>
48 <div id="result">
49 </div>
50 </body>
51 </html>