<!DOCTYPE HTML>
<html>
<head>
<script src="/js-test-resources/js-test.js"></script>
<script>
description("Verifying that navigator.sendBeacon() to non-CORS cross-origin redirect fails.");

window.jsTestIsAsync = true;

function test() {
    if (window.testRunner) {
        testRunner.dumpAsText();
        //testRunner.dumpPingLoaderCallbacks();
    }

    shouldBeTrue('navigator.sendBeacon("http://127.0.0.1:8080/navigation/resources/redirection-response.py?status=302&target=/non-existent.py", "CrossOrigin");');
    // Wait a while for the redirect response handling to happen before finishing up.
    setTimeout(finishJSTest, 200);
}
</script>
</head>
<body onload="test();">
</body>
</html>
