1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5 <title>Test event generation with suspendAnimations()/resumeAnimations() for animations</title>
6 <style type="text/css" media="screen">
11 background-color: blue;
12 -webkit-animation-duration: 0.1s;
13 -webkit-animation-timing-function: linear;
14 -webkit-animation-direction: alternate;
15 -webkit-animation-iteration-count: 2;
16 -webkit-animation-name: "move";
18 @-webkit-keyframes "move" {
26 border: 2px solid gray;
29 <script type="text/javascript" charset="utf-8">
34 internals.suspendAnimations(document);
40 internals.resumeAnimations(document);
45 if (window.testRunner) {
46 testRunner.dumpAsText();
47 testRunner.waitUntilDone();
50 setTimeout(suspend, 40);
51 setTimeout(resume, 100);
54 if (window.testRunner)
55 testRunner.notifyDone();
59 function logEvent(e, phase)
61 var log = document.getElementById('log');
62 log.innerHTML = log.innerHTML + phase + ' animation ' + e.animationName + '<br>';
68 <body onload="startTest()">
70 Events generated are displayed. There should be one start event one iteration event and one end event. There
71 should not be a start event generated when the animation is resumed.
73 onwebkitanimationstart="logEvent(event, 'start'); return false;"
74 onwebkitanimationiteration="logEvent(event, 'iteration'); return false;"
75 onwebkitanimationend="logEvent(event, 'end'); return false;"