blob: dc02861fd0392842d0f4b4f29eb1b0946aceacce [file] [log] [blame]
<body>
<script>
if (testRunner) {
testRunner.dumpAsText();
testRunner.setCanOpenWindows();
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>