blob: e61cd1d31373e4acfd6c17295ed9b44d4e9f7613 [file] [log] [blame]
<html>
<head>
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
function log(message)
{
var txt = document.createTextNode(message);
document.getElementById("logger").appendChild(txt);
document.getElementById("logger").appendChild(document.createElement('br'));
}
function runTest()
{
if (!sessionStorage.secondPageReached) {
document.getElementById("firstInput").value = "SuperSeekritValue";
document.getElementById("secondInput").value = "SuperSeekritValue";
// Location changes need to happen outside the onload handler to generate history entries.
setTimeout(function() {window.location = "resources/autocomplete-cleared-on-back2.html";}, 0);
return;
}
sessionStorage.removeItem("secondPageReached");
log("Input value 1 - " + document.getElementById("firstInput").value);
log("Input value 2 - " + document.getElementById("secondInput").value);
if (window.testRunner)
testRunner.notifyDone();
}
</script>
</head>
<body onload="runTest();">
This tests whether or not form input values that are designated autocomplete="off" retain their values after a navigation away from the page then returning back to it via the back button.
<form autocomplete="off">
<input type="text" id="firstInput"/>
</form>
<form>
<input autocomplete="off" id="secondInput"/>
</form>
<div id="logger"></div>
</body>
</html>