[WK2] selection does not disappear after coping the text
[framework/web/webkit-efl.git] / LayoutTests / animations / body-removal-crash.html
1 <html>
2 <head id="b">
3   <style id="a" type="text/css" media="screen">
4     #box {
5       -webkit-animation-duration: 2s;
6       -webkit-animation-timing-function: linear;
7       -webkit-animation-name: anim;
8       background-color: blue;
9       width: 100px;
10       height: 100px;
11     }
12     @-webkit-keyframes anim {
13         from { -webkit-transform: rotate(0) scale(1,1); }
14         to   { -webkit-transform: rotate(360deg) scale(2,4); }
15     }
16   </style>
17 </head>
18 <body>
19 <div id="box">
20 </div>
21 <p>This should not crash</p>
22 </body>
23 </html>
24
25 <script>
26
27 var element;
28
29 function crash() {
30     // trigger style processing
31     document.alinkColor = "aaa";
32     // now remove the body and insert it in a different location
33     element = document.body;
34     element.parentNode.removeChild(element);
35     document.getElementById("a").parentNode.insertBefore(element, document.getElementById("a").nextSibling);
36     setTimeout(cleanup, 0);
37 }
38
39 function cleanup() {
40   document.getElementById("b").parentNode.insertBefore(element, document.getElementById("b").nextSibling);
41   
42   if (window.layoutTestController)
43       layoutTestController.notifyDone();
44 }
45
46 if (window.layoutTestController) {
47     layoutTestController.dumpAsText();
48     layoutTestController.waitUntilDone();
49 }
50
51 crash();
52 </script>