Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Origin-keyed agent clusters: make COI imply origin-keying
All other observable impacts of origin-keying, namely the impact on postMessage and document.domain, are already in place for cross-origin isolated agent clusters. So we only need to update the window.originAgentCluster getter. Fixed: 1163687 Change-Id: Ie10f26def8de2046d2b0ce69b37d56b3c89db57b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2630231 Reviewed-by: Yutaka Hirano <yhirano@chromium.org> Commit-Queue: Domenic Denicola <domenic@chromium.org> Cr-Commit-Position: refs/heads/master@{#844135}
- Loading branch information
1 parent
93c6fac
commit 7cfb87e
Showing
4 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
...gin/origin-keyed-agent-clusters/getter-special-cases/cross-origin-isolated.sub.https.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<!DOCTYPE html> | ||
<meta charset="utf-8"> | ||
<title>window.originAgentCluster must be implied by cross-origin isolation</title> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
|
||
<iframe src="//{{domains[www1]}}:{{location[port]}}/html/browsers/origin/origin-keyed-agent-clusters/resources/coep-frame.html"></iframe> | ||
|
||
<div id="log"></div> | ||
|
||
<script type="module"> | ||
import { testGetter } from "../resources/helpers.mjs"; | ||
|
||
setup({ explicit_done: true }); | ||
|
||
window.onload = () => { | ||
// Cross-origin isolated pages are always origin-keyed. | ||
testGetter(self, true, "self"); | ||
|
||
// Child frames of cross-origin isolated pages must also be cross-origin | ||
// isolated, and thus also origin-keyed. Make sure the implementation doesn't | ||
// treat them specially in some wierd way, for the purposes of this | ||
// implication. | ||
testGetter(0, true, "child"); | ||
|
||
done(); | ||
}; | ||
</script> |
2 changes: 2 additions & 0 deletions
2
...in-keyed-agent-clusters/getter-special-cases/cross-origin-isolated.sub.https.html.headers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Cross-Origin-Embedder-Policy: require-corp | ||
Cross-Origin-Opener-Policy: same-origin |
5 changes: 5 additions & 0 deletions
5
html/browsers/origin/origin-keyed-agent-clusters/resources/coep-frame.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<!DOCTYPE html> | ||
<meta charset="utf-8"> | ||
<title>A page with COEP set that will respond when asked</title> | ||
|
||
<script type="module" src="send-header-page-script.mjs"></script> |
2 changes: 2 additions & 0 deletions
2
html/browsers/origin/origin-keyed-agent-clusters/resources/coep-frame.html.headers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Cross-Origin-Embedder-Policy: require-corp | ||
Cross-Origin-Resource-Policy: cross-origin |