[WK2] selection does not disappear after coping the text
[framework/web/webkit-efl.git] / LayoutTests / fullscreen / full-screen-remove-ancestor-during-transition.html
1 <script src="../fast/js/resources/js-test-pre.js"></script>
2 <script>
3 if (window.layoutTestController) {
4     layoutTestController.dumpAsText();
5     layoutTestController.waitUntilDone();
6 }
7
8 function runWithKeyDown(fn)
9 {
10     document.addEventListener('keydown', function() { fn(); }, false);
11     if (window.layoutTestController) {
12         eventSender.keyDown('a');
13     }
14 }
15
16 function init() {
17     // Bail out early if the full screen API is not enabled or is missing:
18     if (Element.prototype.webkitRequestFullScreen == undefined) {
19         alert("Fullscreen API not available.");
20     } else {
21         runWithKeyDown(goFullScreen);
22     }
23 }
24
25 function goFullScreen() {
26     var iframe = document.getElementById('block1');
27     var element = iframe.contentDocument.documentElement;
28     setTimeout(function () {
29         iframe.parentNode.removeChild(iframe);
30         gc();
31         setTimeout(function () {
32             if (window.layoutTestController) {
33                 layoutTestController.notifyDone();
34             }
35         }, 0);
36     }, 0);
37     element.webkitRequestFullScreen();
38 }
39 </script>
40 <body onload="init()">
41     <iframe webkitallowfullscreen src="resources/inner.html" id="block1"></iframe>
42     PASS
43 </body>