| <!DOCTYPE html> |
| <html> |
| <head> |
| <script> |
| if (window.testRunner) { |
| testRunner.dumpAsText(); |
| testRunner.setXSSAuditorEnabled(true); |
| testRunner.setCanOpenWindows(); |
| testRunner.setCloseRemainingWindowsWhenComplete(true); |
| testRunner.waitUntilDone(); |
| } |
| </script> |
| </head> |
| <body> |
| <p>This test PASSED if we don't trigger an assertion failure when opening a pop-up window without a URL. To run this test by hand, ensure that pop-up windows aren't blocked before loading this page.</p> |
| <pre id="console"></pre> |
| <script> |
| function finish() |
| { |
| document.getElementById("console").innerText = "PASSED"; |
| if (window.testRunner) |
| testRunner.notifyDone(); |
| } |
| |
| function runTest() |
| { |
| var childWindow = window.open(""); |
| if (!childWindow) { |
| document.getElementById("console").innerText = "FAILED to open pop-up window. Ensure that pop-up windows aren't blocked."; |
| return; |
| } |
| |
| childWindow.document.open(); |
| childWindow.document.write("PASSED"); |
| |
| <!-- Break up the HTML Script Element so it is not interpreted by HTML4 parsers as per <http://www.w3.org/TR/html4/types.html#type-cdata>. --> |
| childWindow.document.write("<scr" + "ipt>window.opener.finish()<" + "/script>"); |
| |
| childWindow.document.close(); |
| } |
| runTest(); |
| </script> |
| </body> |
| </html> |