Skip to content

Commit b06eacb

Browse files
committed
Implement the Origin-Agent-Cluster header
https://bugs.webkit.org/show_bug.cgi?id=216618 rdar://69452369 Reviewed by NOBODY (OOPS!). This implements origin-keyed agent clusters and gates it behind OriginAgentClusterEnabled (set to preview). It is standardized here: https://html.spec.whatwg.org/multipage/browsers.html#origin-isolation This new keying does not impact process allocation, although we could decide to make it impact that in the future if we wanted to. It impacts document.domain, serialization and deserialization of certain objects, and the new window.originAgentCluster getter. We add a new test that is upstreamed at web-platform-tests/wpt#60311 that catches an issue with our existing agent cluster implementation for opaque origins and we also fix that issue. As the test infrastructure continues to use the same browsing context group for each test, we add a way to reset the browsing context group state so it appears as if you are getting a fresh browsing context group when you start a new test. The subtest failures of regression-1399759.https.sub.html are due to about:blank inheriting from the parent instead of the initiator of the navigation. That's a distinct issue from this new feature. going-back.sub.https.html is skipped because it times out on some bots at the history.back() step, while the feature-related assertions pass. I suspect it's related to the bfcache. I could not reproduce it locally (1000 iterations of the test as well as 10 full-directory runs).
1 parent 1682be9 commit b06eacb

100 files changed

Lines changed: 936 additions & 18 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

LayoutTests/TestExpectations

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,7 @@ imported/w3c/web-platform-tests/html/browsers/browsing-the-web/history-traversal
788788
imported/w3c/web-platform-tests/html/browsers/browsing-the-web/history-traversal/pageswap/pageswap-traverse-navigation-cross-origin-redirect-no-bfcache.https.sub.html [ Skip ]
789789
imported/w3c/web-platform-tests/html/browsers/history/the-history-interface/history_pushstate_url.html [ Skip ]
790790
imported/w3c/web-platform-tests/html/browsers/history/the-history-interface/traverse_the_history_3.html [ Skip ]
791-
imported/w3c/web-platform-tests/html/browsers/origin/origin-keyed-agent-clusters/ [ Skip ]
791+
imported/w3c/web-platform-tests/html/browsers/origin/origin-keyed-agent-clusters/going-back.sub.https.html [ Skip ]
792792
imported/w3c/web-platform-tests/html/browsers/origin/relaxing-the-same-origin-restriction/document_domain_feature_policy.tentative.sub.html [ Skip ]
793793
imported/w3c/web-platform-tests/html/browsers/sandboxing/sandbox-document-open.html [ Skip ]
794794
imported/w3c/web-platform-tests/html/browsers/sandboxing/sandbox-inherited-from-required-csp.html [ Skip ]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
2+
PASS "": frame insertion
3+
PASS "": setting document.domain must give sync access
4+
PASS "": originAgentCluster must equal false
5+
PASS "?0": frame insertion
6+
PASS "?0": setting document.domain must give sync access
7+
PASS "?0": originAgentCluster must equal false
8+
PASS "true": frame insertion
9+
PASS "true": setting document.domain must give sync access
10+
PASS "true": originAgentCluster must equal false
11+
PASS ""?1"": frame insertion
12+
PASS ""?1"": setting document.domain must give sync access
13+
PASS ""?1"": originAgentCluster must equal false
14+
PASS "1": frame insertion
15+
PASS "1": setting document.domain must give sync access
16+
PASS "1": originAgentCluster must equal false
17+
PASS "?2": frame insertion
18+
PASS "?2": setting document.domain must give sync access
19+
PASS "?2": originAgentCluster must equal false
20+
PASS "(?1)": frame insertion
21+
PASS "(?1)": setting document.domain must give sync access
22+
PASS "(?1)": originAgentCluster must equal false
23+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
PASS messageerror event must occur
3+
PASS setting document.domain must not give sync access
4+
PASS parent: originAgentCluster must equal false
5+
PASS child: originAgentCluster must equal true
6+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
2+
PASS setting document.domain must give sync access
3+
PASS parent: originAgentCluster must equal false
4+
PASS child: originAgentCluster must equal false
5+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
PASS messageerror event must occur
3+
PASS setting document.domain must not give sync access
4+
PASS parent: originAgentCluster must equal false
5+
PASS child: originAgentCluster must equal true
6+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
PASS messageerror event must occur
3+
PASS setting document.domain must not give sync access
4+
PASS parent: originAgentCluster must equal false
5+
PASS child: originAgentCluster must equal true
6+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
PASS messageerror event must occur
3+
PASS setting document.domain must not give sync access
4+
PASS parent: originAgentCluster must equal false
5+
PASS child: originAgentCluster must equal true
6+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
PASS messageerror event must occur
3+
PASS setting document.domain must not give sync access
4+
PASS parent: originAgentCluster must equal true
5+
PASS child: originAgentCluster must equal false
6+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
2+
PASS setting document.domain must give sync access
3+
PASS parent: originAgentCluster must equal true
4+
PASS child: originAgentCluster must equal true
5+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
PASS messageerror event must occur
3+
PASS setting document.domain must not give sync access
4+
PASS parent: originAgentCluster must equal true
5+
PASS child: originAgentCluster must equal false
6+

0 commit comments

Comments
 (0)