blob: db3a8bdf1206e8c20f9e55bab81c5f1f6da10986 [file] [log] [blame]
<html>
<script>
if (window.testRunner) {
testRunner.waitUntilDone();
testRunner.dumpAsText();
}
function loadAfterPrefetch()
{
window.location.assign('http://localhost:8000/cache/resources/prefetched-main-resource.php');
}
function runTest() {
var link = document.createElement("link");
link.rel = "prefetch";
link.href = "http://localhost:8000/cache/resources/prefetched-main-resource.php";
if (internals)
internals.addPrefetchLoadEventListener(link, () => { loadAfterPrefetch(); });
document.body.appendChild(link);
}
</script>
<body onload="runTest()">
</body>
</html>