blob: 634d90a42b3c1d8d42bf8b129f4d419801e53a1e [file] [log] [blame]
<html>
<head>
<style>
.box {
height: 100px;
width: 100px;
margin: 10px;
background-color: blue;
-webkit-transition-property: -webkit-transform;
-webkit-transition-duration: 0.2s;
}
</style>
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
var numDone = 0;
function transitionEnded()
{
++numDone;
if (numDone == 2) {
if (window.GCController)
GCController.collect();
document.getElementById('results').innerHTML = 'Did not crash, so PASSED';
if (window.testRunner)
testRunner.notifyDone();
}
}
function startTest()
{
var box1 = document.getElementById('box1');
box1.addEventListener('webkitTransitionEnd', function() {
box1.parentNode.removeChild(box1);
transitionEnded();
}, false);
box1.style.webkitTransform = 'translate(100px, 0)';
var box2 = document.getElementById('box2');
box2.addEventListener('webkitTransitionEnd', function() {
box2.style.display = 'none';
transitionEnded();
}, false);
box2.style.webkitTransform = 'translate(100px, 0)';
}
window.addEventListener('load', startTest, false);
</script>
</head>
<body>
<p>Tests element removal and hiding in webkitTransitionEnd event handler. Should not crash.</p>
<div id="container">
<div id="box1" class="box"></div>
<div id="box2" class="box"></div>
</div>
<div id="results"></div>
</body>
</html>