3 <title>Destroy and Hide Element in Animation End Event
</title>
4 <style type=
"text/css" media=
"screen">
9 background-color: blue;
10 -webkit-animation-duration:
0.2s;
13 @-webkit-keyframes move {
14 from { transform: translate(
0px,
0px); }
15 to { transform: translate(
100px,
0px); }
18 <script type=
"text/javascript" charset=
"utf-8">
19 if (window.testRunner) {
20 testRunner.dumpAsText();
21 testRunner.waitUntilDone();
25 function animationStarted()
29 if (window.GCController)
30 GCController.collect();
32 document.getElementById('results').innerHTML = 'Did not crash, so PASSED';
34 if (window.testRunner)
35 testRunner.notifyDone();
41 var box1 = document.getElementById('box1');
42 box1.addEventListener('webkitAnimationStart', function() {
43 box1.parentNode.removeChild(box1);
46 box1.style.webkitAnimationName = 'move';
48 var box2 = document.getElementById('box2');
49 box2.addEventListener('webkitAnimationStart', function() {
50 box2.style.display = 'none';
53 box2.style.webkitAnimationName = 'move';
56 window.addEventListener('load', startTest, false);
61 <p>Tests element removal and hiding within the webkitAnimationStart event handler. Should not crash.
</p>
64 <div id=
"box1" class=
"box"></div>
65 <div id=
"box2" class=
"box"></div>
67 <div id=
"results"></div>