Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / ManualTests / animation / transitions-and-paused-animations.html
bloba1e2e53b759da337d1682cf949d353427d6772a9
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>Transitions and paused animations</title>
8 <style type="text/css" media="screen">
10 .container {
11 height: 200px;
12 width: 200px;
13 border: 1px solid black;
14 -webkit-transition: -webkit-transform 0.5s;
17 .moved {
18 transform: translateX(100px);
21 .box {
22 position: relative;
23 height: 100px;
24 width: 100px;
25 margin: 50px;
26 background-color: blue;
27 transform: translateZ(0);
28 -webkit-animation: fade 1s infinite linear alternate;
31 .moved .box {
32 -webkit-animation-play-state: paused;
35 @-webkit-keyframes fade {
36 from { transform: rotate(-20deg); }
37 to { transform: rotate(20deg); }
39 </style>
40 <script type="text/javascript" charset="utf-8">
42 function runTest()
44 var box = document.querySelectorAll('.box')[0];
45 var container = document.querySelectorAll('.container')[0];
47 window.setTimeout(function() {
48 container.className = 'container';
49 }, 250);
51 window.setTimeout(function() {
52 container.className = 'container moved';
53 }, 1500);
55 window.setTimeout(function() {
56 container.className = 'container';
57 }, 3000);
60 window.addEventListener('load', runTest, false)
61 </script>
62 </head>
63 <body>
65 <p>Box should animate smoothly left, then right then left again, and not jump at the end.</p>
66 <div class="container moved">
67 <div class="box"></div>
68 </div>
70 </body>
71 </html>