4 <style type="text/css">
11 -webkit-animation: test 1ms;
15 -webkit-animation-duration: 2ms;
16 animation-duration: 2ms;
18 -webkit-animation-iteration-count: 2;
19 animation-iteration-count: 2;
21 -webkit-animation-delay: 1ms;
23 /* Default is normal */
24 -webkit-animation-direction: reverse;
25 animation-direction: reverse;
27 -webkit-animation-fill-mode: forwards;
28 animation-fill-mode: forwards;
30 -webkit-animation-timing-function: linear;
31 animation-timing-function: linear;
33 @-webkit-keyframes test {
34 from { -webkit-transform: translateX(100px); }
35 to { -webkit-transform: translateX(300px); }
38 from { -webkit-transform: translateX(100px); }
39 to { -webkit-transform: translateX(300px); }
42 <script type="text/javascript">
43 if (window.testRunner) {
44 testRunner.dumpAsText();
45 testRunner.waitUntilDone();
49 var target = document.getElementById('target');
50 target.addEventListener('webkitAnimationEnd', updateTiming);
51 target.classList.add('animated');
55 function updateTiming(message) {
56 document.getElementById('result').innerHTML = 'First animation completed<br>';
57 var target = document.getElementById('target');
58 target.removeEventListener('webkitAnimationEnd', updateTiming);
59 target.addEventListener('webkitAnimationEnd', failTest);
60 setTimeout(function() {
61 target.classList.add('updated-timing');
63 timeoutId = setTimeout(passTest, 100);
67 clearTimeout(timeoutId);
68 document.getElementById('result').innerHTML += 'FAIL: Animation restarted';
69 if (window.testRunner) {
70 testRunner.notifyDone();
75 document.getElementById('result').innerHTML += 'PASS: Animation did not restart';
76 if (window.testRunner) {
77 testRunner.notifyDone();
84 Tests that setting the iteration count, delay, duration, direction, fill
85 mode or timing function does not trigger an animation.
87 <div id="target"></div>
88 <div id="result"></div>