| <html> |
| <body> |
| This tests opens a new window, sets a timeout to close it, then sets a timeout to navigate it via window.location. |
| We pass if we don't crash when setting the location of the already closed window. |
| <script> |
| if (window.testRunner) { |
| testRunner.dumpAsText(); |
| testRunner.setCanOpenWindows(); |
| testRunner.waitUntilDone(); |
| } |
| |
| var w = window.open('resources/set-location-after-close-new-window.html'); |
| |
| window.addEventListener("message", processMessage, false); |
| |
| function processMessage(event) { |
| if (event.data == "opened") |
| w.close(); |
| else if (event.data == "closed") { |
| w.location = ''; |
| if (window.testRunner) |
| testRunner.notifyDone(); |
| } |
| } |
| </script> |
| </body> |
| </html> |