5 // This flag is set by cached-page-2 when it loads.
6 // If the timer is fired before cached-page-2 loads, just bail and wait.
7 if (!window
.opener
.canExit
)
10 clearInterval(intervalId
);
11 window
.opener
.log("Back on page-1, timer is still firing.");
12 window
.opener
.log("PASS.");
13 window
.opener
.finish();
18 // Verify that this onload handler is called only once. On navigation back
19 // this page will be served from the cache, w/o firing onload.
20 window
.opener
.reportOnload();
22 intervalId
= setInterval(check
, 10);
24 window
.opener
.log("page-1, about to navigate to page-2.")
25 // Location changes need to happen outside the onload handler to generate history entries.
26 setTimeout(function() {location
.href
= "cached-page-2.html";}, 0);
29 <body onload=
"loadNext()"></body>