2 <script src=
"../../../../resources/js-test.js"></script>
4 description("Updating window.location after the window has been closed, without crashing.");
6 // This tests opens a new window, sets a timeout to close it, then
7 // sets a timeout to navigate it via window.location. We pass if we
8 // don't crash when setting the location of the already closed window,
9 // or when shutting down just after.
11 if (window
.testRunner
) {
12 testRunner
.dumpAsText();
13 testRunner
.setCanOpenWindows();
14 testRunner
.waitUntilDone();
17 var w
= window
.open('../../../../resources/window-postmessage-open-close.html');
19 window
.addEventListener("message", processMessage
, false);
22 // Clear out window and force a GC to finalize the Window
23 // object and its wrapper. Verifies that the shutdown is
24 // done in an orderly manner.
27 if (window
.testRunner
)
28 testRunner
.notifyDone();
31 function processMessage(event
) {
32 if (event
.data
== "opened")
34 else if (event
.data
== "closed") {
36 setInterval(finish
, 0);