blob: 9fe864b90a2344cf5f525bf48e7c89698a11927d [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "">
<html lang="en">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Test event generation with suspendAnimations()/resumeAnimations() for animations</title>
<style type="text/css" media="screen">
#box {
position: relative;
height: 100px;
width: 100px;
background-color: blue;
-webkit-animation-duration: 0.1s;
-webkit-animation-timing-function: linear;
-webkit-animation-direction: alternate;
-webkit-animation-iteration-count: 2;
-webkit-animation-name: "move";
@-webkit-keyframes "move" {
from { left: 0; }
to { left: 500px; }
#log {
margin-top: 20px;
height: 300px;
width: 500px;
border: 2px solid gray;
<script type="text/javascript" charset="utf-8">
function suspend()
if (window.internals)
function resume()
if (window.internals)
function startTest()
if (window.testRunner) {
setTimeout(suspend, 40);
setTimeout(resume, 100);
if (window.testRunner)
}, 350);
function logEvent(e, phase)
var log = document.getElementById('log');
log.innerHTML = log.innerHTML + phase + ' animation ' + e.animationName + '<br>';
<body onload="startTest()">
Events generated are displayed. There should be one start event one iteration event and one end event. There
should not be a start event generated when the animation is resumed.
<div id="box"
onwebkitanimationstart="logEvent(event, 'start'); return false;"
onwebkitanimationiteration="logEvent(event, 'iteration'); return false;"
onwebkitanimationend="logEvent(event, 'end'); return false;"
<div id="log">