<!DOCTYPE html>
<html>
<head>
<script src="/js-test-resources/js-test.js"></script>
</head>
<body>
<script>
description("Tests support for Referrer-Policy HTTP header.");
jsTestIsAsync = true;

const sourceOrigin = "https://127.0.0.1:8443/";
const crossOrigin = "https://localhost:8443/";
const downgradedOrigin = "http://127.0.0.1:8000/";
const fullSourceURL = "fullSourceURL";

// [Referrer-Policy header, expected referrer, destination origin].
let tests = [
    ["no-referrer", "", crossOrigin],
    ["no-referrer", "", sourceOrigin],
    ["no-referrer", "", downgradedOrigin],
    ["origin", sourceOrigin, crossOrigin],
    ["origin", sourceOrigin, sourceOrigin],
    ["origin", sourceOrigin, downgradedOrigin],
    ["unsafe-url", fullSourceURL, crossOrigin],
    ["unsafe-url", fullSourceURL, sourceOrigin],
    ["unsafe-url", fullSourceURL, downgradedOrigin],
    ["no-referrer-when-downgrade", fullSourceURL, crossOrigin],
    ["no-referrer-when-downgrade", fullSourceURL, sourceOrigin],
    ["no-referrer-when-downgrade", "", downgradedOrigin],
    ["same-origin", "", crossOrigin],
    ["same-origin", fullSourceURL, sourceOrigin],
    ["same-origin", "", downgradedOrigin],
    ["strict-origin", sourceOrigin, crossOrigin],
    ["strict-origin", sourceOrigin, sourceOrigin],
    ["strict-origin", "", downgradedOrigin],
    ["strict-origin-when-cross-origin", sourceOrigin, crossOrigin],
    ["strict-origin-when-cross-origin", fullSourceURL, sourceOrigin],
    ["strict-origin-when-cross-origin", "", downgradedOrigin],
    ["origin-when-cross-origin", sourceOrigin, crossOrigin],
    ["origin-when-cross-origin", fullSourceURL, sourceOrigin],
    ["origin-when-cross-origin", sourceOrigin, downgradedOrigin],
    ["invalid", fullSourceURL, crossOrigin],
    ["invalid", fullSourceURL, sourceOrigin],
    ["invalid", "", downgradedOrigin],
    ["", fullSourceURL, crossOrigin],
    ["", fullSourceURL, sourceOrigin],
    ["", "", downgradedOrigin],
];

let currentTestIndex = 0;
let isTestingMultipart = false;

onmessage = (msg) => {
    actualReferrer = msg.data;
    if (currentTest[1] === fullSourceURL)
        shouldBeEqualToString("actualReferrer", sourceOrigin + "security/resources/serve-referrer-policy-and-test.php?value=" + currentTest[0] + "&destinationOrigin=" + currentTest[2] + "&isTestingMultipart=" + (isTestingMultipart ? "1" : "0"));
    else
        shouldBeEqualToString("actualReferrer", "" + currentTest[1]);
    debug("");

    frame.remove();
    currentTestIndex++;
    runNextTest();
}

function runNextTest()
{
    if (currentTestIndex >= tests.length) {
        if (!isTestingMultipart) {
            isTestingMultipart = true;
            currentTestIndex = 0;
        } else {
            finishJSTest();
            return;
        }
    }

    currentTest = tests[currentTestIndex];
    debug("Testing 'Referrer-Policy: " + currentTest[0] + "' - referrer origin: " + sourceOrigin + " - destination origin: " + currentTest[2] + " - isMultipartResponse? " + isTestingMultipart);
    frame = document.createElement("iframe");
    frame.src = sourceOrigin + "security/resources/serve-referrer-policy-and-test.php?value=" + currentTest[0] + "&destinationOrigin=" + currentTest[2] + "&isTestingMultipart=" + (isTestingMultipart ? "1" : "0");
    document.body.appendChild(frame);    
}

runNextTest();
</script>
</body>
</html>
