<body>
<script src="/resources/prevent-bfcache.js"></script>
<script>
if (window.testRunner) {
testRunner.dumpBackForwardList();
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
async function childLoaded() {
await preventBFCache();
if (window.sessionStorage.getItem("dynamic-iframe") != null) {
setTimeout(function() {
location.assign("resources/go-back.html");
}, 0);
} else {
setTimeout(function() {
if (window.testRunner)
testRunner.notifyDone();
}, 0);
}
}
var i = document.createElement("iframe");
i.src = "javascript:false";
document.body.appendChild(i);
if (window.sessionStorage.getItem("dynamic-iframe") == null) {
window.sessionStorage.setItem("dynamic-iframe", true);
i.src = "resources/back-to-dynamic-iframe-iframe.html#FAIL";
} else {
window.sessionStorage.removeItem("dynamic-iframe");
i.src = "resources/back-to-dynamic-iframe-iframe.html#PASS";
}
</script>
This test expects the iframe to be reset on backward navigation. Back-forward
cache needs to be disabled to run this test successfully.
</body>