blob: cb86ff239aab0f5cc998f96df5dc3f4bdc8004b6 [file] [log] [blame]
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/common/get-host-info.sub.js"></script>
<script src="/common/utils.js"></script>
<script src="./resources/common.js"></script>
<script src="./resources/dispatcher.js"></script>
<script src="./resources/iframeTest.js"></script>
<script>
const parent_coep_require_corp = newWindow(coep_require_corp);
iframeTest("COEP:require-corp embeds same-origin COEP:none",
parent_coep_require_corp, same_origin, coep_none, EXPECT_BLOCK);
iframeTest("COEP:require-corp embeds cross-origin COEP:none",
parent_coep_require_corp, cross_origin, coep_none, EXPECT_BLOCK);
iframeTest("COEP:require-corp embeds same-origin COEP:credentialless",
parent_coep_require_corp, same_origin, coep_credentialless, EXPECT_BLOCK);
iframeTest("COEP:require-corp embeds cross-origin COEP:credentialless",
parent_coep_require_corp, cross_origin, coep_credentialless, EXPECT_BLOCK);
iframeTest("COEP:require-corp embeds same-origin COEP:require-corp",
parent_coep_require_corp, same_origin, coep_require_corp, EXPECT_LOAD);
iframeTest("COEP:require-corp embeds cross-origin COEP:require-corp",
parent_coep_require_corp, cross_origin, coep_require_corp, EXPECT_BLOCK);
// Using CORP:cross-origin might unblock previously blocked iframes.
iframeTestCORP("COEP:require-corp embeds same-origin COEP:none",
parent_coep_require_corp, same_origin, coep_none, EXPECT_BLOCK);
iframeTestCORP("COEP:require-corp embeds cross-origin COEP:none",
parent_coep_require_corp, cross_origin, coep_none, EXPECT_BLOCK);
iframeTestCORP("COEP:require-corp embeds same-origin COEP:credentialless",
parent_coep_require_corp, same_origin, coep_credentialless, EXPECT_BLOCK);
iframeTestCORP("COEP:require-corp embeds cross-origin COEP:credentialless",
parent_coep_require_corp, cross_origin, coep_credentialless, EXPECT_BLOCK);
iframeTestCORP("COEP:require-corp embeds same-origin COEP:require-corp",
parent_coep_require_corp, same_origin, coep_require_corp, EXPECT_LOAD);
iframeTestCORP("COEP:require-corp embeds cross-origin COEP:require-corp",
parent_coep_require_corp, cross_origin, coep_require_corp, EXPECT_LOAD);
</script>