blob: 8f8c2d53f781c3e41d67e507c20592fc4c3f5f24 [file] [log] [blame]
<html>
<head>
<script>
function saveAndCheckRandomNumber() {
if (!sessionStorage.lastRandom) {
sessionStorage.lastRandom = randomNumber;
} else {
window.passed = sessionStorage.lastRandom != randomNumber;
}
}
</script>
<script type="text/javascript" src="resources/cache-simulator.cgi?uniqueId=1&Cache-control=no-store,no-cache,private,must-revalidate,max-age=0"></script>
<script type="text/javascript" src="resources/cache-simulator.cgi?uniqueId=2&Cache-control=no-store,no-cache,private,must-revalidate,max-age=0" onload="saveAndCheckRandomNumber();"></script>
</head>
<body>
<script type="text/javascript">
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
if (document.referrer != document.location.toString()) {
console.log('Reloading');
document.location.reload();
} else {
if (window.passed === true) {
document.body.innerText = "PASS";
} else if (window.passed === false) {
document.body.innerText = "FAIL";
} else {
document.body.innerText = "ERROR";
}
delete sessionStorage.lastRandom;
if (window.testRunner) {
testRunner.notifyDone();
}
}
</script>
</body>
</html>