| Index: LayoutTests/http/tests/security/aboutBlank/xss-DENIED-set-opener.html
|
| diff --git a/LayoutTests/http/tests/security/aboutBlank/xss-DENIED-set-opener.html b/LayoutTests/http/tests/security/aboutBlank/xss-DENIED-set-opener.html
|
| index b4120c53707fb36ce5161248ab0f425dde6f5fea..415388cd7aade30ceb8543f01e566c1fb3ece52c 100644
|
| --- a/LayoutTests/http/tests/security/aboutBlank/xss-DENIED-set-opener.html
|
| +++ b/LayoutTests/http/tests/security/aboutBlank/xss-DENIED-set-opener.html
|
| @@ -26,7 +26,7 @@
|
| var try_control = 'write(window.opener.top.frames[1], ' + libwrapjs.in_string(message_success) + ');';
|
| var control = 'setTimeout(function() {' + try_control + '}, 200);\n';
|
|
|
| - var sigDone = 'setTimeout(function() { if (window.testRunner) testRunner.globalFlag = true; }, 300);';
|
| + var sigDone = 'setTimeout(function() { window.opener.top.postMessage(\'done\', \'*\'); }, 300);';
|
|
|
| var payload = write_func + attack + control + sigDone;
|
| code = libwrapjs.in_script_tag(payload);
|
| @@ -46,12 +46,11 @@
|
|
|
| runTest = function()
|
| {
|
| + window.addEventListener('message', function () { closeWindowAndNotifyDone(openedWindow); });
|
| openedWindow = window.open('', 'attacker');
|
| openedWindow.document.write(code);
|
| openedWindow.document.close();
|
|
|
| - setTimeout(pollForDone, 1);
|
| -
|
| try {
|
| window.open.call(frames[0], '', 'attacker');
|
| log("FAIL: 'window.open' called on another frame should throw.");
|
| @@ -59,15 +58,6 @@
|
| log("PASS: 'window.open' called on another frame threw: " + e);
|
| }
|
| }
|
| -
|
| - pollForDone = function()
|
| - {
|
| - if (!testRunner.globalFlag) {
|
| - setTimeout(pollForDone, 1);
|
| - return;
|
| - }
|
| - closeWindowAndNotifyDone(openedWindow);
|
| - }
|
| </script>
|
| </head>
|
| <body>
|
|
|