Index: LayoutTests/fast/loader/stateobjects/resources/replacestate-in-iframe-window-child.html |
diff --git a/LayoutTests/fast/loader/stateobjects/resources/replacestate-in-iframe-window-child.html b/LayoutTests/fast/loader/stateobjects/resources/replacestate-in-iframe-window-child.html |
index c83f9c82804dc287b0b3d479e2c07fecd8596e52..970d6c4936080fdbf5d1614303b6ab9e3a469f05 100644 |
--- a/LayoutTests/fast/loader/stateobjects/resources/replacestate-in-iframe-window-child.html |
+++ b/LayoutTests/fast/loader/stateobjects/resources/replacestate-in-iframe-window-child.html |
@@ -1,15 +1,16 @@ |
<script> |
-onunload = function() { |
+window.onload = function() { |
+ if (!sessionStorage.beganTest) { |
+ sessionStorage.beganTest = true; |
+ top.opener.windowLoaded(); |
+ } |
+} |
+ |
+window.onunload = function() { |
// No page cache |
} |
-onpopstate = function(e) { |
- if (!sessionStorage.beganTest) { |
- sessionStorage.beganTest = true; |
- top.opener.windowLoaded(); |
- return; |
- } |
- |
+window.onpopstate = function(e) { |
alert("onpopstate"); |
top.opener.notifyDone(window == parent ? "FAIL" : "PASS"); |
} |