blob: 274ac89971b19a85e57f6f56ab0f1ed83d8d1625 [file] [log] [blame]
<!DOCTYPE html>
<style>
#child {
width: 50px;
height: 50px;
background: red;
animation: flash 0.2s infinite;
}
.hideMe {
display: none;
}
@keyframes flash {
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}
</style>
<div id='container'>
<div id='child' class='hideMe'></div>
</div>
<script>
if (window.testRunner) {
testRunner.waitUntilDone();
testRunner.dumpAsText();
}
var firstCall = true;
child.addEventListener('animationstart', function(e) {
if (firstCall) {
container.classList.add('hideMe');
container.offsetTop;
container.classList.remove('hideMe');
firstCall = false;
return;
}
document.documentElement.textContent = 'PASS';
if (window.testRunner) {
testRunner.notifyDone();
}
});
child.classList.remove('hideMe');
</script>