4 <style type="text/css" media="screen">
11 background-color: red;
12 -webkit-animation-duration: 0.2s;
13 -webkit-animation-timing-function: linear;
17 -webkit-animation-name: move;
20 @-webkit-keyframes move {
21 from { -webkit-transform: translateX(100px) scale(1); }
22 to { -webkit-transform: translateX(400px) scale(1); }
32 background-color: green;
35 <script type="text/javascript" charset="utf-8">
36 if (window.testRunner)
37 testRunner.waitUntilDone();
39 function suspendAndWaitForCompletion()
42 internals.suspendAnimations(document);
44 window.setTimeout(function() {
45 if (window.testRunner) {
46 internals.resumeAnimations(document);
47 testRunner.notifyDone();
54 document.getElementById('box').addEventListener('webkitAnimationStart', function() {
55 suspendAndWaitForCompletion();
58 document.getElementById('box').className = 'move';
61 window.addEventListener('load', doTest, false);
66 <!-- When suspended, the red box should be hidden by the green box. You should see no red. -->
68 <div id="safezone"></div>
70 <div id="result"></div>