1 <p>Test pageshow/pagehide event behavior when navigating back to an uncached page.
</p>
3 if (window
.testRunner
) {
4 testRunner
.dumpAsText();
5 testRunner
.waitUntilDone();
8 window
.onload = function(evt
) {
9 alert("window.onload");
10 if (window
.name
== 'pageshow/pagehide') {
13 window
.onpagehide
= null;
14 setTimeout(function() { if (window
.testRunner
) testRunner
.notifyDone(); }, 10);
16 window
.name
= "pageshow/pagehide";
17 setTimeout('window.location = "data:text/html,<script>history.back();</scr" + "ipt>"', 0);
21 window
.onunload = function() {} // prevent caching
23 window
.onpageshow = function(evt
) {
24 alert("window.onpageshow" + ", target = " + evt
.target
+ ", persisted = " + evt
.persisted
);
27 window
.onpagehide = function(evt
) {
28 alert("window.onpagehide" + ", target = " + evt
.target
+ ", persisted = " + evt
.persisted
);