Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / animations / transition-and-animation-3.html
blob32e4fcce3bd101649ce6be06321e784edb319f08
1 <!DOCTYPE html>
3 <html>
4 <head>
5 <style type="text/css" media="screen">
6 .box {
7 position: absolute;
8 height: 100px;
9 width: 100px;
10 left: 0px;
11 background-color: blue;
14 .box.animating {
15 -webkit-animation: move 0.1s linear;
16 left: 100px;
17 -webkit-transition: left 10s linear;
20 .box.animating.moved {
21 left: 200px;
24 @-webkit-keyframes move {
25 from {
26 left: 500px;
28 to {
29 left: 501px;
33 #result {
34 margin-top: 130px;
36 </style>
37 <script src="resources/animation-test-helpers.js" type="text/javascript" charset="utf-8"></script>
38 <script type="text/javascript" charset="utf-8">
40 if (window.testRunner)
41 testRunner.waitUntilDone();
43 const expectedValues = [
44 // [time, element-id, property, expected-value, tolerance]
45 [0.2, "test", "left", 200, 10],
48 function animationStarted()
50 document.getElementById('test').className = 'animating moved box';
53 function setupTest()
55 document.getElementById('test').className = 'animating box';
56 runAnimationTest(expectedValues, animationStarted, undefined, 'do-not-use-pause-api');
59 window.addEventListener('load', function() {
60 window.setTimeout(setupTest, 0);
61 }, false);
63 </script>
64 </head>
65 <body>
66 <p>Once animation has finished, box shouldn't transitioning.</p>
67 <div id="test" class="box"></div>
68 <div id="result"></div>
69 </body>
70 </html>