Video is not started even if play button has been pressed.
[framework/web/webkit-efl.git] / LayoutTests / fast / events / popup-blocking-click-in-iframe.html
1 <html>
2     <head>
3         <script>
4         if (window.testRunner) {
5             testRunner.dumpAsText();
6             testRunner.setCanOpenWindows();
7             testRunner.dumpChildFramesAsText();
8             testRunner.waitUntilDone();
9             testRunner.setCloseRemainingWindowsWhenComplete()
10             testRunner.setPopupBlockingEnabled(true);
11         }
12
13         function closeWindow(windowToClose)
14         {
15             windowToClose.close();
16             setTimeout(doneHandler, 1);
17
18             function doneHandler()
19             {
20                 if (!windowToClose.closed)
21                     setTimeout(doneHandler, 1);
22                 else if (window.testRunner)
23                     testRunner.notifyDone();
24             }
25         }
26
27         function handleClick(event) {
28             var newWindow = window.open('resources/window-opened.html', 'badName', 'width=100, height=100');
29             if (newWindow) {
30                 log("Window was opened! Test succeeded!");
31                 closeWindow(newWindow);
32             }
33
34             event.preventDefault();
35             return false;
36         }
37
38         function test()
39         {
40             if (window.testRunner) {
41                 eventSender.mouseMoveTo(2, 2);
42                 eventSender.scheduleAsynchronousClick();
43             }
44         }
45
46         function log(msg)
47         {
48             var res = document.getElementById('res');
49             res.innerHTML = res.innerHTML + msg + "<br>";
50         }
51         </script>
52     </head>
53     <body style="border: 0; margin: 0" onload="test()">
54         <iframe style="border: 0; margin: 0" src="resources/popup-blocking-click-in-iframe-otherFrame.html" id="otherFrame"></iframe>
55
56         <p>This tests that popup blocking does not supress windows opened in an iframe if the event handler is a function from an enclosing frame.</p>
57         <p>To run manually click the link in the iframe above with popup blocking enabled.</p>
58         <div id="res"></div>
59     </body>
60 </html>