4 if (window.testRunner) {
5 testRunner.dumpAsText();
6 testRunner.setCanOpenWindows();
7 testRunner.dumpChildFramesAsText();
8 testRunner.waitUntilDone();
9 testRunner.setCloseRemainingWindowsWhenComplete()
10 testRunner.setPopupBlockingEnabled(true);
13 function closeWindow(windowToClose)
15 windowToClose.close();
16 setTimeout(doneHandler, 1);
18 function doneHandler()
20 if (!windowToClose.closed)
21 setTimeout(doneHandler, 1);
22 else if (window.testRunner)
23 testRunner.notifyDone();
27 function handleClick(event) {
28 var newWindow = window.open('resources/window-opened.html', 'badName', 'width=100, height=100');
30 log("Window was opened! Test succeeded!");
31 closeWindow(newWindow);
34 event.preventDefault();
40 if (window.testRunner) {
41 eventSender.mouseMoveTo(2, 2);
42 eventSender.scheduleAsynchronousClick();
48 var res = document.getElementById('res');
49 res.innerHTML = res.innerHTML + msg + "<br>";
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>
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>