chromium/third_party/blink/web_tests/http/tests/history/cross-origin-redirect-on-back.html

<html>
<body>
<p>This test expects a HTTP fetch resulting in a redirect for the first history
navigation. This doesn't happen if the page is restored from back-forward cache,
so back-forward cache has to be disabled to test this behaviour.
</p>

<script src="/resources/prevent-bfcache.js"></script>
<script>
if (window.testRunner) {
    testRunner.dumpAsText();
    testRunner.waitUntilDone();
}

window.onload = function() {
    if (location.hash == "#back") {
        document.body.appendChild(document.createTextNode("We pass if we don't crash."));
        if (window.testRunner)
            testRunner.notifyDone();
        return;
    }

    setTimeout(async function() {
        await preventBFCache();
        history.replaceState({}, "", "#back");
        history.pushState({}, "", "http://127.0.0.1:8000/resources/redirect.php?url=http://localhost:8000/history/resources/back.html");
        location = "http://127.0.0.1:8000/history/resources/back.html";
    }, 0);
};
</script>
</body>
</html>