blob: 678bc06ee003b4dcd85e770cdb69582258141cdb [file] [log] [blame]
<html>
<p>Test that setting local storage, reloading and getting local storage works.</p>
<pre id=log></pre>
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
function log(msg)
{
document.getElementById("log").innerHTML += msg + "\n";
}
var haveReloaded = localStorage.getItem("reloaded") == "YES";
localStorage.removeItem("reloaded");
if (haveReloaded) {
log("Reloaded");
if (window.testRunner)
testRunner.notifyDone();
} else {
setTimeout(() => {
localStorage.setItem("reloaded", "YES");
console.log("Reloading...");
window.location.reload();
}, 0);
}
</script>
</html>