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