blob: 9b48303f137124bbb221bca006245e9271b78820 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<title>Test animations with repeated iterations and short loops</title>
<style>
#box {
position: relative;
left: 100px;
top: 10px;
height: 100px;
width: 100px;
animation-duration: 0.001s;
animation-name: anim;
background-color: #999;
animation-iteration-count: 2;
}
@keyframes anim {
from { left: 200px; }
to { left: 300px; }
}
</style>
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
onload = function()
{
document.addEventListener('animationend', function() {
document.getElementById('result').innerHTML = 'PASS: got animationend event';
if (window.testRunner)
testRunner.notifyDone();
}, false);
// Animation begins once we append the DOM node to the document.
var boxNode = document.createElement('div');
boxNode.id = 'box';
document.body.appendChild(boxNode);
}
</script>
</head>
<body>
Checks that we still end an animation properly (i.e. fire a animationend
event) when using more than one iteration with very short durations.
<pre id="result">FAIL: no animationend event received</pre>
</body>
</html>