blob: 44d227f48b9888322fb511e3a1e77777bfe7ef14 [file] [log] [blame]
<html>
<head>
<title>Pause and resume animation should not crash</title>
<style type="text/css" media="screen">
.box {
height: 100px;
width: 100px;
margin: 10px;
background-color: blue;
animation-duration: 2s;
animation-direction: alternate;
animation-iteration-count: infinite;
}
@keyframes anim {
from { transform: matrix3d(1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,1); }
to { transform: matrix3d(1,0,0,0, 0,1,0,0, 0,0,1,0, 400,0,0,1); }
}
</style>
<script type="text/javascript" charset="utf-8">
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
function animationStarted()
{
setTimeout(function() {
document.getElementById('box1').style.animationPlayState = "paused";
setTimeout(function() {
document.getElementById('box1').style.animationPlayState = "running";
setTimeout(function() {
document.getElementById('results').innerHTML = 'Did not crash, so PASSED';
if (window.testRunner)
testRunner.notifyDone();
}, 50);
}, 50);
}, 50);
}
function startTest()
{
document.getElementById('box1').addEventListener('animationstart', animationStarted);
document.getElementById('box1').style.animationName = "anim";
}
window.addEventListener('load', startTest, false);
</script>
</head>
<body>
<p>Tests pause and resume animation. Should not crash. (https://bugs.webkit.org/show_bug.cgi?id=67510)</p>
<div id="container">
<div id="box1" class="box"></div>
</div>
<div id="results"></div>
</body>
</html>