3 <title>Destroy and Hide Element in Transition End Event
</title>
4 <style type=
"text/css" media=
"screen">
9 background-color: blue;
10 -webkit-transition-property: -webkit-transform;
11 -webkit-transition-duration:
0.2s;
14 <script type=
"text/javascript" charset=
"utf-8">
15 if (window.layoutTestController) {
16 layoutTestController.dumpAsText();
17 layoutTestController.waitUntilDone();
21 function transitionEnded()
25 if (window.GCController)
26 GCController.collect();
28 document.getElementById('results').innerHTML = 'Did not crash, so PASSED';
30 if (window.layoutTestController)
31 layoutTestController.notifyDone();
37 var box1 = document.getElementById('box1');
38 box1.addEventListener('webkitTransitionEnd', function() {
39 box1.parentNode.removeChild(box1);
42 box1.style.webkitTransform = 'translate(
100px,
0)';
44 var box2 = document.getElementById('box2');
45 box2.addEventListener('webkitTransitionEnd', function() {
46 box2.style.display = 'none';
49 box2.style.webkitTransform = 'translate(
100px,
0)';
52 window.addEventListener('load', startTest, false);
57 <p>Tests element removal and hiding in webkitTransitionEnd event handler. Should not crash.
</p>
60 <div id=
"box1" class=
"box"></div>
61 <div id=
"box2" class=
"box"></div>
63 <div id=
"results"></div>