2007-07-12 Mitz Pettel <mitz@webkit.org>
[WebKit-https.git] / LayoutTests / fast / history / resources / history_reload_window.html
index b102e31..46a1e34 100644 (file)
             } else {
                 console.innerHTML = tempConsole.innerHTML;
                 window.close();
-                if (window.layoutTestController)
-                    setTimeout("layoutTestController.notifyDone()", 0);
             }
         }
+
+        function closed()
+        {
+            if (window.layoutTestController)
+                opener.setTimeout("layoutTestController.notifyDone()", 0);
+        }
         </script>
     </head>
-    <body onload="test()">
+    <body onload="test()" onunload="closed()">
         <div id="console">Test Passed</div>
     </body>
 </html>