Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / fast / loader / stateobjects / resources / replacestate-in-iframe-window-child.html
index 970d6c4..1be76c0 100644 (file)
@@ -1,17 +1,15 @@
 <script>
-window.onload = function() {
-  if (!sessionStorage.beganTest) {
-    sessionStorage.beganTest = true;
-    top.opener.windowLoaded();
-  }
-}
-
 window.onunload = function() {
   // No page cache
 }
 
-window.onpopstate = function(e) {
-  alert("onpopstate");
-  top.opener.notifyDone(window == parent ? "FAIL" : "PASS");
+window.onpageshow = function(e) {
+  alert("onpageshow");
+  if (!sessionStorage.beganTest) {
+    sessionStorage.beganTest = true;
+    top.opener.windowLoaded();
+  } else {
+    top.opener.notifyDone(window == parent ? "FAIL" : "PASS");
+  }
 }
 </script>