blob: 75576bfa3e42a557ed9aeb9cdf4aaacb3bf6b5ee [file] [log] [blame]
<!DOCTYPE html>
<p>Checks that when going back to a page that frames that were navigated, that the final URL of the frames is loaded directly, instead the initial URL. Four alerts should appear, in this order:</p>
<li>Initial URL loaded.</li>
<li>Final URL loaded.</li>
<li>Going back.</li>
<li>Final URL loaded.</li>
<iframe a width="200" height="200" onunload=""></iframe>
if (window.testRunner) {
} else {
// Disable page cache when not running under the DRT.
onunload = function() {};
function runTest()
if (sessionStorage.didNav) {
delete sessionStorage.didNav;
if (window.testRunner)
} else {
// Navigate a timeout to make sure we generate a history entry that we can go back to.
setTimeout(function() {location.href = 'resources/alert-then-back.html';}, 0);
sessionStorage.didNav = true;
// Wait for the onload event before starting the first navigation. Not waiting
// may cause the second history entry to replace the current one instead of
// being appended. history.back() failed for this reason.
// See
window.onload = function() {
document.querySelector("iframe").src = "resources/frame-initial-url.html"