blob: 932fe40c3638dd902e8e63ba47cea77227df0152 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="/js-test-resources/js-test.js"></script>
<script>
description("Tests that a same-origin script load succeeds if the server blocks cross-origin loads with a 'From-Origin: same' response header.");
jsTestIsAsync = true;
function scriptLoadError() {
testFailed("Timeout fired without script onload event fired.");
finishJSTest();
}
function scriptLoadSuccess() {
testPassed("Script load succeeded.");
finishJSTest();
}
</script>
</head>
<body>
<script src="http://127.0.0.1:8000/from-origin/resources/script.php?fromOrigin=same" onload="scriptLoadSuccess()" onerror="scriptLoadError()"></script>
</body>
</html>