blob: f9e125ed1ea65f7a3f50de310c3f9fb859b6f7f7 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="/js-test-resources/js-test.js"></script>
<script>
description("Tests that a cross-origin document load fails if the server blocks cross-origin loads with a 'From-Origin: same' response header and the iframe is sandboxed.");
jsTestIsAsync = true;
testRunner.dumpChildFramesAsText();
function iframeLoadError() {
testPassed("Timeout fired without iframe onload event fired.");
finishJSTest();
}
function iframeLoadSuccess() {
testFailed("Document load succeeded.");
finishJSTest();
}
setTimeout("iframeLoadError()", 500);
</script>
</head>
<body>
<iframe src="http://localhost:8000/from-origin/resources/iframe.php?fromOrigin=same" sandbox="" onload="iframeLoadSuccess()"></iframe>
</body>
</html>