| Index: LayoutTests/fast/events/popup-forwarded-postmessage-blocked.html
|
| diff --git a/LayoutTests/fast/events/popup-blocking-timers6.html b/LayoutTests/fast/events/popup-forwarded-postmessage-blocked.html
|
| similarity index 79%
|
| copy from LayoutTests/fast/events/popup-blocking-timers6.html
|
| copy to LayoutTests/fast/events/popup-forwarded-postmessage-blocked.html
|
| index 75891cac7e3b35a63fb3cb25c009ceb54328bb04..9db6c89605aa94183f0ec7eabbe88ac13b80c776 100644
|
| --- a/LayoutTests/fast/events/popup-blocking-timers6.html
|
| +++ b/LayoutTests/fast/events/popup-forwarded-postmessage-blocked.html
|
| @@ -3,28 +3,31 @@
|
| <script src="../../resources/js-test.js"></script>
|
| <script>
|
| var newWindow;
|
| -
|
| +
|
| if (window.testRunner) {
|
| testRunner.dumpAsText();
|
| testRunner.setCanOpenWindows();
|
| testRunner.waitUntilDone();
|
| testRunner.setPopupBlockingEnabled(true);
|
| }
|
| -
|
| +
|
| function clickHandler() {
|
| setTimeout(function() {
|
| + window.postMessage({}, "*");
|
| + }, 300);
|
| + }
|
| +
|
| + window.onmessage = function(event) {
|
| + setTimeout(function() {
|
| newWindow = window.open("about:blank");
|
| self.focus();
|
| - debug("Test calling window.open() with a 1001 ms delay. A popup should not be allowed.")
|
| + debug("Test calling window.open() in a nested call to setTimeout(). A popup should not be allowed.")
|
| shouldBeUndefined("newWindow");
|
| -
|
| if (window.testRunner)
|
| testRunner.notifyDone();
|
| - }, 1001);
|
| - if (window.eventSender)
|
| - eventSender.leapForward(1001);
|
| - }
|
| -
|
| + }, 0);
|
| + };
|
| +
|
| function clickButton() {
|
| var button = document.getElementById("test");
|
| var buttonX = button.offsetLeft + button.offsetWidth / 2;
|
| @@ -34,7 +37,7 @@
|
| eventSender.mouseDown();
|
| eventSender.mouseUp();
|
| }
|
| - }
|
| + }
|
| </script>
|
| </head>
|
| <body onload="clickButton()">
|
|
|