blob: 2193ec6dae6e8a40a9dde4c6463da1bf02e723c6 [file] [log] [blame]
<body>
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
function done(message)
{
document.body.innerHTML = message;
if (window.testRunner)
testRunner.notifyDone();
}
if (!window.internals)
done("FAIL: need internals API");
async function doTest(shouldFail)
{
const result = await fetch("resources/subresource-redirect.py", { mode : "no-cors" }).then(() => {
return !shouldFail;
}, () => {
return shouldFail;
});
if (!result) {
done("FAIL: reloaded = " + localStorage.reloaded);
return;
}
if (!!localStorage.reloaded) {
done("PASS");
return;
}
localStorage.reloaded = true;
internals.reloadWithoutContentExtensions();
}
doTest(!localStorage.reloaded);
</script>
</body>