blob: ac920c62175b81b6bb237c12999789a72d9817d6 [file] [log] [blame]
<body>
<script>
if (testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
const testWindow = window.open('http://127.0.0.1:8000/cache/resources/document-with-cached-unique-script.html');
var firstNumber;
window.addEventListener("message", (event) => {
if (firstNumber) {
const secondNumber = event.data;
if (firstNumber == secondNumber)
document.body.innerHTML = "PASS";
else
document.body.innerHTML = `FAIL: firstNumber={$firstNumber} secondNumber={$secondNumber}`;
if (testRunner)
testRunner.notifyDone();
return;
}
firstNumber = event.data;
if (testWindow.internals)
testWindow.internals.reloadExpiredOnly();
});
</script>