<!DOCTYPE html>
<html>
<head>
<script>

var allowCrossOriginSubresourcesToAskForCredentials = document.location.search.includes("?allowCrossOriginSubresourcesToAskForCredentials");

function checkResult(event)
{
    if (event.type == "error")
        window.opener.postMessage((allowCrossOriginSubresourcesToAskForCredentials ? "FAIL" : "PASS") + " did not load image.", "*");
    else if (event.type == "load")
        window.opener.postMessage((allowCrossOriginSubresourcesToAskForCredentials ? "PASS" : "FAIL") + " did load image.", "*");
}
</script>
</head>
<body>
<img src="http://127.0.0.1:8080/resources/redirect.py?url=https://localhost:8443/security/mixedContent/resources/subresource/protected-image.py" onerror="checkResult(event)" onload="checkResult(event)">
</body>
</html>
