Truly independent web browser
LibWeb: Honor origin-keyed agent cluster requests
Andreas Kling2cd6b7a4137b
diff --git a/Libraries/LibWeb/DOM/Document.cpp b/Libraries/LibWeb/DOM/Document.cppindex c009dfbaa46..578994f0736 100644--- a/Libraries/LibWeb/DOM/Document.cpp+++ b/Libraries/LibWeb/DOM/Document.cpp@@ -404,12 +404,7 @@ WebIDL::ExceptionOr<GC::Ref<Document>> Document::create_and_initialize(Type type}// 7. Otherwise:else {- // FIXME: 1. Let oacHeader be the result of getting a structured field value given `Origin-Agent-Cluster` and "item" from response's header list.-- // FIXME: 2. Let requestsOAC be true if oacHeader is not null and oacHeader[0] is the boolean true; otherwise false.- [[maybe_unused]] auto requests_oac = false;-- // FIXME: 3. If navigationParams's reserved environment is a non-secure context, then set requestsOAC to false.+ // NB: The UI process performs steps 1 through 4 and passes the selected agent cluster's properties.// 4. Let agent be the result of obtaining a similar-origin window agent given navigationParams's origin, browsingContext's group, and requestsOAC.// NB: The UI process obtains the agent, and names its agent cluster.@@ -457,6 +452,9 @@ WebIDL::ExceptionOr<GC::Ref<Document>> Document::create_and_initialize(Type typeagent_cluster_cross_origin_isolation_mode);}+ // NB: The UI process selects the window's agent even when an initial about:blank Window is reused.+ as<HTML::WindowEnvironmentSettingsObject>(HTML::relevant_settings_object(*window)).set_agent_cluster_is_origin_keyed(navigation_params.agent_cluster_is_origin_keyed || navigation_params.origin.is_opaque() || navigation_params.agent_cluster_cross_origin_isolation_mode != HTML::CrossOriginIsolationMode::None);+// AD-HOC: The fetch controller is only available in the process that ran the navigation fetch. Navigation params// rebuilt from a descriptor carry the fetch's timing info directly.RefPtr<Fetch::Infrastructure::FetchTimingInfo> navigation_fetch_timing_info = navigation_params.fetch_timing_info;diff --git a/Libraries/LibWeb/HTML/BrowsingContext.cpp b/Libraries/LibWeb/HTML/BrowsingContext.cppindex 32468e97894..26a63cb7cba 100644--- a/Libraries/LibWeb/HTML/BrowsingContext.cpp+++ b/Libraries/LibWeb/HTML/BrowsingContext.cpp@@ -169,6 +169,10 @@ BrowsingContext::BrowsingContextAndDocument BrowsingContext::create_a_new_browsiagent_cluster_id,agent_cluster_cross_origin_isolation_mode);+ auto agent_cluster_is_origin_keyed = origin.is_opaque()+ || (creator && origin.is_same_origin(*creator_origin) && as<WindowEnvironmentSettingsObject>(creator->relevant_settings_object()).agent_cluster_is_origin_keyed());+ as<WindowEnvironmentSettingsObject>(relevant_settings_object(*window)).set_agent_cluster_is_origin_keyed(agent_cluster_is_origin_keyed);+// 14. Let loadTimingInfo be a new document load timing info with its navigation start time set to the result of calling// coarsen time with unsafeContextCreationTime and the new environment settings object's cross-origin isolated capability.auto load_timing_info = DOM::DocumentLoadTimingInfo();diff --git a/Libraries/LibWeb/HTML/LocalNavigable.cpp b/Libraries/LibWeb/HTML/LocalNavigable.cppindex 3f7ff21354c..d2526c2febd 100644--- a/Libraries/LibWeb/HTML/LocalNavigable.cpp+++ b/Libraries/LibWeb/HTML/LocalNavigable.cpp@@ -75,6 +75,7 @@#include <LibWeb/HTML/RemoteNavigable.h>#include <LibWeb/HTML/Scripting/ClassicScript.h>#include <LibWeb/HTML/Scripting/TemporaryExecutionContext.h>+#include <LibWeb/HTML/Scripting/WindowEnvironmentSettingsObject.h>#include <LibWeb/HTML/SessionHistoryEntry.h>#include <LibWeb/HTML/SourceSnapshotParams.h>#include <LibWeb/HTML/StructuredSerialize.h>@@ -4125,6 +4126,7 @@ GC::Ptr<DOM::Document> LocalNavigable::evaluate_javascript_url(URL::URL const& u// obtains for it is the active document's: the origins are the same, or share the site that keys the agent// cluster, since an origin-keyed window cannot set document.domain.navigation_params->agent_cluster_id = active_document()->relevant_settings_object().agent_cluster_id();+ navigation_params->agent_cluster_is_origin_keyed = as<WindowEnvironmentSettingsObject>(active_document()->relevant_settings_object()).agent_cluster_is_origin_keyed();navigation_params->agent_cluster_cross_origin_isolation_mode = active_document()->relevant_settings_object().agent_cluster_cross_origin_isolation_mode();// 17. Return the result of loading an HTML document given navigationParams.diff --git a/Libraries/LibWeb/HTML/NavigationParams.h b/Libraries/LibWeb/HTML/NavigationParams.hindex 26089749b80..589efdb1935 100644--- a/Libraries/LibWeb/HTML/NavigationParams.h+++ b/Libraries/LibWeb/HTML/NavigationParams.h@@ -74,6 +74,7 @@ struct NavigationParams : GC::Cell {// AD-HOC: The agent cluster of the agent the UI process obtained for the new Document's window, and that agent// cluster's cross-origin isolation mode.Optional<u64> agent_cluster_id;+ bool agent_cluster_is_origin_keyed { false };CrossOriginIsolationMode agent_cluster_cross_origin_isolation_mode { CrossOriginIsolationMode::None };// AD-HOC: The id the UI process gave the new Document.diff --git a/Libraries/LibWeb/HTML/NavigationParamsDescriptor.cpp b/Libraries/LibWeb/HTML/NavigationParamsDescriptor.cppindex c27797add8e..7db13bc453a 100644--- a/Libraries/LibWeb/HTML/NavigationParamsDescriptor.cpp+++ b/Libraries/LibWeb/HTML/NavigationParamsDescriptor.cpp@@ -171,6 +171,7 @@ static NavigationParamsDescriptor create_navigation_params_descriptor(Navigation.about_base_url = params.about_base_url,.user_involvement = params.user_involvement,.agent_cluster_id = params.agent_cluster_id,+ .agent_cluster_is_origin_keyed = params.agent_cluster_is_origin_keyed,.agent_cluster_cross_origin_isolation_mode = params.agent_cluster_cross_origin_isolation_mode,.new_browsing_context_group_id = params.new_browsing_context_group_id,.permissions_policy = params.permissions_policy,@@ -356,6 +357,7 @@ ErrorOr<NavigationParamsVariant> create_navigation_params_from_descriptor(JS::Renavigation_params->webdriver_bidi_network_response = move(network_response);navigation_params->webdriver_bidi_network_response_state = move(network_response_state);navigation_params->agent_cluster_id = params.agent_cluster_id;+ navigation_params->agent_cluster_is_origin_keyed = params.agent_cluster_is_origin_keyed;navigation_params->agent_cluster_cross_origin_isolation_mode = params.agent_cluster_cross_origin_isolation_mode;navigation_params->new_browsing_context_group_id = params.new_browsing_context_group_id;navigation_params->permissions_policy = move(params.permissions_policy);diff --git a/Libraries/LibWeb/HTML/Scripting/WindowEnvironmentSettingsObject.h b/Libraries/LibWeb/HTML/Scripting/WindowEnvironmentSettingsObject.hindex d165893f675..16494edd3cb 100644--- a/Libraries/LibWeb/HTML/Scripting/WindowEnvironmentSettingsObject.h+++ b/Libraries/LibWeb/HTML/Scripting/WindowEnvironmentSettingsObject.h@@ -30,6 +30,10 @@ public:virtual CrossOriginIsolationMode agent_cluster_cross_origin_isolation_mode() const override { return m_agent_cluster_cross_origin_isolation_mode; }virtual double time_origin() const override;+ // https://html.spec.whatwg.org/multipage/webappapis.html#agent-cluster-is-origin-keyed+ bool agent_cluster_is_origin_keyed() const { return m_agent_cluster_is_origin_keyed; }+ void set_agent_cluster_is_origin_keyed(bool value) { m_agent_cluster_is_origin_keyed = value; }+private:WindowEnvironmentSettingsObject(Window&, NonnullOwnPtr<JS::ExecutionContext>);@@ -37,6 +41,7 @@ private:GC::Ptr<Window> m_window;Optional<u64> m_agent_cluster_id;+ bool m_agent_cluster_is_origin_keyed { true };CrossOriginIsolationMode m_agent_cluster_cross_origin_isolation_mode { CrossOriginIsolationMode::None };};diff --git a/Libraries/LibWeb/HTML/Window.cpp b/Libraries/LibWeb/HTML/Window.cppindex 66f2e4ef846..39d79f443ea 100644--- a/Libraries/LibWeb/HTML/Window.cpp+++ b/Libraries/LibWeb/HTML/Window.cpp@@ -2292,6 +2292,13 @@ GC::Ref<External> Window::external()return *m_external;}+// https://html.spec.whatwg.org/multipage/browsers.html#dom-originagentcluster+bool Window::origin_agent_cluster() const+{+ // The originAgentCluster getter steps are to return the surrounding agent's agent cluster's is origin-keyed.+ return as<WindowEnvironmentSettingsObject>(relevant_settings_object()).agent_cluster_is_origin_keyed();+}+// https://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-navigationGC::Ref<Navigation> Window::navigation(){diff --git a/Libraries/LibWeb/HTML/Window.h b/Libraries/LibWeb/HTML/Window.hindex 94d686c8e73..bb70d13fa73 100644--- a/Libraries/LibWeb/HTML/Window.h+++ b/Libraries/LibWeb/HTML/Window.h@@ -191,6 +191,7 @@ public:[[nodiscard]] GC::Ref<Location> location();GC::Ref<History> history() const;GC::Ref<Navigation> navigation();+ bool origin_agent_cluster() const;void stop();void focus();void blur();diff --git a/Libraries/LibWeb/HTML/Window.idl b/Libraries/LibWeb/HTML/Window.idlindex a7c78794ba0..d19afde0707 100644--- a/Libraries/LibWeb/HTML/Window.idl+++ b/Libraries/LibWeb/HTML/Window.idl@@ -40,7 +40,7 @@ interface Window : EventTarget {// the user agentreadonly attribute Navigator navigator;[Replaceable, ImplementedAs=navigator] readonly attribute Navigator clientInformation; // legacy alias of .navigator- [FIXME] readonly attribute boolean originAgentCluster;+ readonly attribute boolean originAgentCluster;// user promptsundefined alert();diff --git a/Libraries/LibWebCommon/HTML/NavigationParamsDescriptor.cpp b/Libraries/LibWebCommon/HTML/NavigationParamsDescriptor.cppindex 9deed6996b4..8ed28a62a24 100644--- a/Libraries/LibWebCommon/HTML/NavigationParamsDescriptor.cpp+++ b/Libraries/LibWebCommon/HTML/NavigationParamsDescriptor.cpp@@ -240,6 +240,7 @@ ErrorOr<void> encode(Encoder& encoder, Web::HTML::NavigationParamsDescriptor conTRY(encoder.encode(params.about_base_url));TRY(encoder.encode(params.user_involvement));TRY(encoder.encode(params.agent_cluster_id));+ TRY(encoder.encode(params.agent_cluster_is_origin_keyed));TRY(encoder.encode(params.agent_cluster_cross_origin_isolation_mode));TRY(encoder.encode(params.new_browsing_context_group_id));TRY(encoder.encode(params.permissions_policy));@@ -266,6 +267,7 @@ ErrorOr<Web::HTML::NavigationParamsDescriptor> decode(Decoder& decoder).about_base_url = TRY(decoder.decode<Optional<URL::URL>>()),.user_involvement = TRY(decoder.decode<Web::HTML::UserNavigationInvolvement>()),.agent_cluster_id = TRY(decoder.decode<Optional<u64>>()),+ .agent_cluster_is_origin_keyed = TRY(decoder.decode<bool>()),.agent_cluster_cross_origin_isolation_mode = TRY(decoder.decode<Web::HTML::CrossOriginIsolationMode>()),.new_browsing_context_group_id = TRY(decoder.decode<Optional<u64>>()),.permissions_policy = TRY(decoder.decode<Optional<Web::PermissionsPolicy::PermissionsPolicy>>()),diff --git a/Libraries/LibWebCommon/HTML/NavigationParamsDescriptor.h b/Libraries/LibWebCommon/HTML/NavigationParamsDescriptor.hindex ddc4012d9c5..94341e434ea 100644--- a/Libraries/LibWebCommon/HTML/NavigationParamsDescriptor.h+++ b/Libraries/LibWebCommon/HTML/NavigationParamsDescriptor.h@@ -137,6 +137,7 @@ struct NavigationParamsDescriptor {Optional<URL::URL> about_base_url;UserNavigationInvolvement user_involvement { UserNavigationInvolvement::None };Optional<u64> agent_cluster_id;+ bool agent_cluster_is_origin_keyed { false };CrossOriginIsolationMode agent_cluster_cross_origin_isolation_mode { CrossOriginIsolationMode::None };Optional<u64> new_browsing_context_group_id;// The permissions policy the UI process created for the new Document.diff --git a/Libraries/LibWebView/CanonicalBrowsingContextGroup.cpp b/Libraries/LibWebView/CanonicalBrowsingContextGroup.cppindex dc878bf63c7..2f6cd1aa4b8 100644--- a/Libraries/LibWebView/CanonicalBrowsingContextGroup.cpp+++ b/Libraries/LibWebView/CanonicalBrowsingContextGroup.cpp@@ -12,14 +12,15 @@namespace WebView {-NonnullRefPtr<CanonicalSimilarOriginWindowAgent> CanonicalSimilarOriginWindowAgent::create(Web::HTML::CrossOriginIsolationMode agent_cluster_cross_origin_isolation_mode)+NonnullRefPtr<CanonicalSimilarOriginWindowAgent> CanonicalSimilarOriginWindowAgent::create(Web::HTML::CrossOriginIsolationMode agent_cluster_cross_origin_isolation_mode, bool agent_cluster_is_origin_keyed){- return adopt_ref(*new CanonicalSimilarOriginWindowAgent(agent_cluster_cross_origin_isolation_mode));+ return adopt_ref(*new CanonicalSimilarOriginWindowAgent(agent_cluster_cross_origin_isolation_mode, agent_cluster_is_origin_keyed));}// Random, so that it cannot collide with the id a WebContent process gives a shared worker's agent cluster.-CanonicalSimilarOriginWindowAgent::CanonicalSimilarOriginWindowAgent(Web::HTML::CrossOriginIsolationMode agent_cluster_cross_origin_isolation_mode)+CanonicalSimilarOriginWindowAgent::CanonicalSimilarOriginWindowAgent(Web::HTML::CrossOriginIsolationMode agent_cluster_cross_origin_isolation_mode, bool agent_cluster_is_origin_keyed): m_agent_cluster_id(get_random<u64>())+ , m_agent_cluster_is_origin_keyed(agent_cluster_is_origin_keyed), m_agent_cluster_cross_origin_isolation_mode(agent_cluster_cross_origin_isolation_mode){}@@ -139,13 +140,13 @@ NonnullRefPtr<CanonicalSimilarOriginWindowAgent> CanonicalBrowsingContextGroup::if (!m_agent_cluster_map.contains(key)) {// 1. Let agentCluster be a new agent cluster.// 2. Set agentCluster's cross-origin isolation mode to group's cross-origin isolation mode.- // FIXME: 3. If key is an origin:- // 1. Assert: key is origin.- // 2. Set agentCluster's is origin-keyed to true.+ // 3. If key is an origin:+ // 1. Assert: key is origin.+ // 2. Set agentCluster's is origin-keyed to true.// 4. Add the result of creating an agent, given false, to agentCluster.// NB: The agent cluster's single similar-origin window agent holds the agent cluster's id and cross-origin// isolation mode.- AgentCluster agent_cluster { CanonicalSimilarOriginWindowAgent::create(m_cross_origin_isolation_mode) };+ AgentCluster agent_cluster { CanonicalSimilarOriginWindowAgent::create(m_cross_origin_isolation_mode, key.value.has<URL::Origin>()) };// 5. Set group's agent cluster map[key] to agentCluster.m_agent_cluster_map.set(key, move(agent_cluster));diff --git a/Libraries/LibWebView/CanonicalBrowsingContextGroup.h b/Libraries/LibWebView/CanonicalBrowsingContextGroup.hindex 50a095cf9a3..a9924a18b6a 100644--- a/Libraries/LibWebView/CanonicalBrowsingContextGroup.h+++ b/Libraries/LibWebView/CanonicalBrowsingContextGroup.h@@ -24,21 +24,23 @@ namespace WebView {// https://html.spec.whatwg.org/multipage/webappapis.html#similar-origin-window-agentclass WEBVIEW_API CanonicalSimilarOriginWindowAgent final : public RefCounted<CanonicalSimilarOriginWindowAgent> {public:- static NonnullRefPtr<CanonicalSimilarOriginWindowAgent> create(Web::HTML::CrossOriginIsolationMode);+ static NonnullRefPtr<CanonicalSimilarOriginWindowAgent> create(Web::HTML::CrossOriginIsolationMode, bool agent_cluster_is_origin_keyed);RefPtr<WebContentClient> hosting_process() const;void set_hosting_process_if_unset(WebContentClient&);u64 agent_cluster_id() const { return m_agent_cluster_id; }+ bool agent_cluster_is_origin_keyed() const { return m_agent_cluster_is_origin_keyed; }// https://html.spec.whatwg.org/multipage/webappapis.html#agent-cluster-cross-origin-isolationWeb::HTML::CrossOriginIsolationMode agent_cluster_cross_origin_isolation_mode() const { return m_agent_cluster_cross_origin_isolation_mode; }private:- explicit CanonicalSimilarOriginWindowAgent(Web::HTML::CrossOriginIsolationMode);+ explicit CanonicalSimilarOriginWindowAgent(Web::HTML::CrossOriginIsolationMode, bool agent_cluster_is_origin_keyed);WeakPtr<WebContentClient> m_hosting_process;u64 m_agent_cluster_id { 0 };+ bool m_agent_cluster_is_origin_keyed { false };Web::HTML::CrossOriginIsolationMode m_agent_cluster_cross_origin_isolation_mode { Web::HTML::CrossOriginIsolationMode::None };};diff --git a/Libraries/LibWebView/CanonicalNavigable.cpp b/Libraries/LibWebView/CanonicalNavigable.cppindex 10dae66c194..2a616895c96 100644--- a/Libraries/LibWebView/CanonicalNavigable.cpp+++ b/Libraries/LibWebView/CanonicalNavigable.cpp@@ -14,6 +14,7 @@#include <LibWebCommon/HTML/HistoryOperation.h>#include <LibWebCommon/HTML/SerializationRecords.h>#include <LibWebCommon/Page/ViewportIsFullscreen.h>+#include <LibWebCommon/SecureContexts/AbstractOperations.h>#include <LibWebCommon/WebView/SiteIsolation.h>#include <LibWebView/Application.h>#include <LibWebView/BrowsingSession.h>@@ -426,11 +427,15 @@ NonnullRefPtr<CanonicalDocument> CanonicalNavigable::create_and_initialize_a_doc}// 7. Otherwise:else {- // FIXME: 1. Let oacHeader be the result of getting a structured field value given `Origin-Agent-Cluster` and "item"- // from navigationParams's response's header list.- // FIXME: 2. Let requestsOAC be true if oacHeader is not null and oacHeader[0] is the boolean true; otherwise false.- // FIXME: 3. If navigationParams's reserved environment is a non-secure context, then set requestsOAC to false.- auto requests_oac = false;+ // NB: NavigationLoader parsed the response's Origin-Agent-Cluster field for steps 1 and 2.+ auto requests_oac = navigation_params.requests_oac;++ // 3. If navigationParams's reserved environment is a non-secure context, then set requestsOAC to false.+ // NB: Derive this from canonical navigation state, since WebContent supplies the reserved environment.+ auto reserved_top_level_creation_url = m_parent ? m_parent->active_document().relevant_global_object().relevant_settings_object().top_level_creation_url().value() : creation_url;+ if (reserved_top_level_creation_url.scheme() == "data"sv+ || Web::SecureContexts::is_url_potentially_trustworthy(reserved_top_level_creation_url) == Web::SecureContexts::Trustworthiness::NotTrustworthy)+ requests_oac = false;// 4. Let agent be the result of obtaining a similar-origin window agent given navigationParams's origin,// browsingContext's group, and requestsOAC.diff --git a/Libraries/LibWebView/NavigationLoader.cpp b/Libraries/LibWebView/NavigationLoader.cppindex 27e62dbe417..2bda19c155c 100644--- a/Libraries/LibWebView/NavigationLoader.cpp+++ b/Libraries/LibWebView/NavigationLoader.cpp@@ -78,6 +78,15 @@ Optional<NavigationLoader::ResponseDocument> NavigationLoader::response_document// sourceSnapshotParams, and entry's document state's initiator origin.if (fetched_navigation_params.response.status == 204 || fetched_navigation_params.response.status == 205)return {};+ // https://html.spec.whatwg.org/multipage/document-lifecycle.html#initialise-the-document-object+ // 7.1. Let oacHeader be the result of getting a structured field value given `Origin-Agent-Cluster` and "item"+ // from navigationParams's response's header list.+ auto header_list = m_response_header_list ? NonnullRefPtr { *m_response_header_list } : HTTP::HeaderList::create(fetched_navigation_params.response.headers);+ auto oac_header = header_list->get_structured_field_value<HTTP::StructuredFields::Item>("Origin-Agent-Cluster"sv);++ // 7.2. Let requestsOAC be true if oacHeader is not null and oacHeader[0] is the boolean true; otherwise false.+ auto requests_oac = oac_header.has_value() && oac_header->bare_item.has<bool>() && oac_header->bare_item.get<bool>();+return ResponseDocument {.is_inline_content = false,.coop_enforcement_result = fetched_navigation_params.coop_enforcement_result,@@ -94,6 +103,7 @@ Optional<NavigationLoader::ResponseDocument> NavigationLoader::response_document.environment_id = {},.document_id = {},.permissions_policy = fetched_navigation_params.permissions_policy,+ .requests_oac = requests_oac,};}@@ -485,6 +495,7 @@ void NavigationLoader::set_document(CanonicalDocument const& document, Canonical}navigation_params->reserved_environment->id = window.relevant_settings_object().id();navigation_params->agent_cluster_id = window.agent().agent_cluster_id();+ navigation_params->agent_cluster_is_origin_keyed = window.agent().agent_cluster_is_origin_keyed();navigation_params->agent_cluster_cross_origin_isolation_mode = window.agent().agent_cluster_cross_origin_isolation_mode();if (&document.browsing_context() != &navigable.active_browsing_context())diff --git a/Libraries/LibWebView/NavigationLoader.h b/Libraries/LibWebView/NavigationLoader.hindex 20fd814438e..c5f2d3796c4 100644--- a/Libraries/LibWebView/NavigationLoader.h+++ b/Libraries/LibWebView/NavigationLoader.h@@ -56,6 +56,7 @@ public:Web::HTML::CrossProcessId document_id;// The permissions policy created for navigationParams in the UI process, if it handled them.Optional<Web::PermissionsPolicy::PermissionsPolicy> permissions_policy {};+ bool requests_oac { false };};Optional<ResponseDocument> response_document() const;void set_document(CanonicalDocument const&, CanonicalNavigable const&);diff --git a/Tests/LibWeb/Text/expected/wpt-import/html/browsers/origin/origin-keyed-agent-clusters/1-iframe/parent-no-child-bad-subdomain.sub.https.txt b/Tests/LibWeb/Text/expected/wpt-import/html/browsers/origin/origin-keyed-agent-clusters/1-iframe/parent-no-child-bad-subdomain.sub.https.txtindex 863bbd7f843..cf58ea51ce7 100644--- a/Tests/LibWeb/Text/expected/wpt-import/html/browsers/origin/origin-keyed-agent-clusters/1-iframe/parent-no-child-bad-subdomain.sub.https.txt+++ b/Tests/LibWeb/Text/expected/wpt-import/html/browsers/origin/origin-keyed-agent-clusters/1-iframe/parent-no-child-bad-subdomain.sub.https.txt@@ -2,26 +2,26 @@ Harness status: OKFound 21 tests-7 Pass-14 Fail+14 Pass+7 FailPass "": frame insertionFail "": setting document.domain must give sync access-Fail "": originAgentCluster must equal false+Pass "": originAgentCluster must equal falsePass "?0": frame insertionFail "?0": setting document.domain must give sync access-Fail "?0": originAgentCluster must equal false+Pass "?0": originAgentCluster must equal falsePass "true": frame insertionFail "true": setting document.domain must give sync access-Fail "true": originAgentCluster must equal false+Pass "true": originAgentCluster must equal falsePass ""?1"": frame insertionFail ""?1"": setting document.domain must give sync access-Fail ""?1"": originAgentCluster must equal false+Pass ""?1"": originAgentCluster must equal falsePass "1": frame insertionFail "1": setting document.domain must give sync access-Fail "1": originAgentCluster must equal false+Pass "1": originAgentCluster must equal falsePass "?2": frame insertionFail "?2": setting document.domain must give sync access-Fail "?2": originAgentCluster must equal false+Pass "?2": originAgentCluster must equal falsePass "(?1)": frame insertionFail "(?1)": setting document.domain must give sync access-Fail "(?1)": originAgentCluster must equal false\ No newline at end of file+Pass "(?1)": originAgentCluster must equal false\ No newline at end of filediff --git a/Tests/LibWeb/Text/expected/wpt-import/html/browsers/origin/origin-keyed-agent-clusters/1-iframe/parent-no-child-yeswithparams-subdomain.sub.https.txt b/Tests/LibWeb/Text/expected/wpt-import/html/browsers/origin/origin-keyed-agent-clusters/1-iframe/parent-no-child-yeswithparams-subdomain.sub.https.txtindex 9c5db26b287..97f07389318 100644--- a/Tests/LibWeb/Text/expected/wpt-import/html/browsers/origin/origin-keyed-agent-clusters/1-iframe/parent-no-child-yeswithparams-subdomain.sub.https.txt+++ b/Tests/LibWeb/Text/expected/wpt-import/html/browsers/origin/origin-keyed-agent-clusters/1-iframe/parent-no-child-yeswithparams-subdomain.sub.https.txt@@ -2,9 +2,8 @@ Harness status: OKFound 4 tests-1 Pass-3 Fail-Fail messageerror event must occur+4 Pass+Pass messageerror event must occurPass setting document.domain must not give sync access-Fail parent: originAgentCluster must equal false-Fail child: originAgentCluster must equal true\ No newline at end of file+Pass parent: originAgentCluster must equal false+Pass child: originAgentCluster must equal true\ No newline at end of filediff --git a/Tests/LibWeb/Text/expected/wpt-import/html/browsers/origin/origin-keyed-agent-clusters/1-iframe/parent-yes-child-no-same.sub.https.txt b/Tests/LibWeb/Text/expected/wpt-import/html/browsers/origin/origin-keyed-agent-clusters/1-iframe/parent-yes-child-no-same.sub.https.txtindex 60eef0aaf63..68f8f3b117b 100644--- a/Tests/LibWeb/Text/expected/wpt-import/html/browsers/origin/origin-keyed-agent-clusters/1-iframe/parent-yes-child-no-same.sub.https.txt+++ b/Tests/LibWeb/Text/expected/wpt-import/html/browsers/origin/origin-keyed-agent-clusters/1-iframe/parent-yes-child-no-same.sub.https.txt@@ -2,8 +2,7 @@ Harness status: OKFound 3 tests-1 Pass-2 Fail+3 PassPass setting document.domain must give sync access-Fail parent: originAgentCluster must equal true-Fail child: originAgentCluster must equal true\ No newline at end of file+Pass parent: originAgentCluster must equal true+Pass child: originAgentCluster must equal true\ No newline at end of filediff --git a/Tests/LibWeb/Text/expected/wpt-import/html/browsers/origin/origin-keyed-agent-clusters/1-iframe/parent-yes-child-yes-subdomain.sub.https.txt b/Tests/LibWeb/Text/expected/wpt-import/html/browsers/origin/origin-keyed-agent-clusters/1-iframe/parent-yes-child-yes-subdomain.sub.https.txtindex 4255b9c98ff..27cfe8a2119 100644--- a/Tests/LibWeb/Text/expected/wpt-import/html/browsers/origin/origin-keyed-agent-clusters/1-iframe/parent-yes-child-yes-subdomain.sub.https.txt+++ b/Tests/LibWeb/Text/expected/wpt-import/html/browsers/origin/origin-keyed-agent-clusters/1-iframe/parent-yes-child-yes-subdomain.sub.https.txt@@ -2,9 +2,8 @@ Harness status: OKFound 4 tests-1 Pass-3 Fail-Fail messageerror event must occur+4 Pass+Pass messageerror event must occurPass setting document.domain must not give sync access-Fail parent: originAgentCluster must equal true-Fail child: originAgentCluster must equal true\ No newline at end of file+Pass parent: originAgentCluster must equal true+Pass child: originAgentCluster must equal true\ No newline at end of filediff --git a/Tests/LibWeb/Text/expected/wpt-import/html/browsers/origin/origin-keyed-agent-clusters/about-blank.https.sub.txt b/Tests/LibWeb/Text/expected/wpt-import/html/browsers/origin/origin-keyed-agent-clusters/about-blank.https.sub.txtindex f8dabc89fef..61fbc27e825 100644--- a/Tests/LibWeb/Text/expected/wpt-import/html/browsers/origin/origin-keyed-agent-clusters/about-blank.https.sub.txt+++ b/Tests/LibWeb/Text/expected/wpt-import/html/browsers/origin/origin-keyed-agent-clusters/about-blank.https.sub.txt@@ -2,13 +2,12 @@ Harness status: OKFound 8 tests-3 Pass-5 Fail+8 PassPass parent to about:blank: setting document.domain must give sync access-Fail about:blank to child2: messageerror event must occur+Pass about:blank to child2: messageerror event must occurPass about:blank to child2: setting document.domain must not give sync access-Fail child2 to about:blank: messageerror event must occur+Pass child2 to about:blank: messageerror event must occurPass child2 to about:blank: setting document.domain must not give sync access-Fail parent: originAgentCluster must equal true-Fail about:blank: originAgentCluster must equal true-Fail child2: originAgentCluster must equal false\ No newline at end of file+Pass parent: originAgentCluster must equal true+Pass about:blank: originAgentCluster must equal true+Pass child2: originAgentCluster must equal false\ No newline at end of filediff --git a/Tests/LibWeb/Text/expected/wpt-import/html/browsers/origin/origin-keyed-agent-clusters/getter-special-cases/cross-origin-isolated.sub.https.txt b/Tests/LibWeb/Text/expected/wpt-import/html/browsers/origin/origin-keyed-agent-clusters/getter-special-cases/cross-origin-isolated.sub.https.txtindex 1bcb94a5e73..00badf3b1d8 100644--- a/Tests/LibWeb/Text/expected/wpt-import/html/browsers/origin/origin-keyed-agent-clusters/getter-special-cases/cross-origin-isolated.sub.https.txt+++ b/Tests/LibWeb/Text/expected/wpt-import/html/browsers/origin/origin-keyed-agent-clusters/getter-special-cases/cross-origin-isolated.sub.https.txt@@ -2,6 +2,6 @@ Harness status: OKFound 2 tests-2 Fail-Fail self: originAgentCluster must equal true-Fail child: originAgentCluster must equal true\ No newline at end of file+2 Pass+Pass self: originAgentCluster must equal true+Pass child: originAgentCluster must equal true\ No newline at end of filediff --git a/Tests/LibWeb/Text/expected/wpt-import/html/browsers/origin/origin-keyed-agent-clusters/getter-special-cases/data-url-no.https.txt b/Tests/LibWeb/Text/expected/wpt-import/html/browsers/origin/origin-keyed-agent-clusters/getter-special-cases/data-url-no.https.txtindex eb932500534..e5223e57fd8 100644--- a/Tests/LibWeb/Text/expected/wpt-import/html/browsers/origin/origin-keyed-agent-clusters/getter-special-cases/data-url-no.https.txt+++ b/Tests/LibWeb/Text/expected/wpt-import/html/browsers/origin/origin-keyed-agent-clusters/getter-special-cases/data-url-no.https.txt@@ -2,5 +2,5 @@ Harness status: OKFound 1 tests-1 Fail-Fail data: URL child: originAgentCluster must equal true\ No newline at end of file+1 Pass+Pass data: URL child: originAgentCluster must equal true\ No newline at end of filediff --git a/Tests/LibWeb/Text/expected/wpt-import/html/browsers/origin/origin-keyed-agent-clusters/getter-special-cases/javascript-url-yes.https.txt b/Tests/LibWeb/Text/expected/wpt-import/html/browsers/origin/origin-keyed-agent-clusters/getter-special-cases/javascript-url-yes.https.txtindex dc7cd722920..947c71ee9ed 100644--- a/Tests/LibWeb/Text/expected/wpt-import/html/browsers/origin/origin-keyed-agent-clusters/getter-special-cases/javascript-url-yes.https.txt+++ b/Tests/LibWeb/Text/expected/wpt-import/html/browsers/origin/origin-keyed-agent-clusters/getter-special-cases/javascript-url-yes.https.txt@@ -2,5 +2,5 @@ Harness status: OKFound 1 tests-1 Fail-Fail originAgentCluster must equal true\ No newline at end of file+1 Pass+Pass originAgentCluster must equal true\ No newline at end of filediff --git a/Tests/LibWeb/Text/expected/wpt-import/html/browsers/origin/origin-keyed-agent-clusters/iframe-navigation/parent-no-1-no-same-2-yes-subdomain.sub.https.txt b/Tests/LibWeb/Text/expected/wpt-import/html/browsers/origin/origin-keyed-agent-clusters/iframe-navigation/parent-no-1-no-same-2-yes-subdomain.sub.https.txtindex 5f8cb08c9c0..ec355e451a5 100644--- a/Tests/LibWeb/Text/expected/wpt-import/html/browsers/origin/origin-keyed-agent-clusters/iframe-navigation/parent-no-1-no-same-2-yes-subdomain.sub.https.txt+++ b/Tests/LibWeb/Text/expected/wpt-import/html/browsers/origin/origin-keyed-agent-clusters/iframe-navigation/parent-no-1-no-same-2-yes-subdomain.sub.https.txt@@ -2,13 +2,12 @@ Harness status: OKFound 8 tests-3 Pass-5 Fail+8 PassPass Before: parent to child: setting document.domain must give sync access-Fail before parent: originAgentCluster must equal false-Fail before child: originAgentCluster must equal false+Pass before parent: originAgentCluster must equal false+Pass before child: originAgentCluster must equal falsePass Navigation-Fail After: parent to child: messageerror event must occur+Pass After: parent to child: messageerror event must occurPass After: parent to child: setting document.domain must not give sync access-Fail after parent: originAgentCluster must equal false-Fail after child: originAgentCluster must equal true\ No newline at end of file+Pass after parent: originAgentCluster must equal false+Pass after child: originAgentCluster must equal true\ No newline at end of filediff --git a/Tests/LibWeb/Text/expected/wpt-import/html/browsers/origin/origin-keyed-agent-clusters/insecure-http.sub.txt b/Tests/LibWeb/Text/expected/wpt-import/html/browsers/origin/origin-keyed-agent-clusters/insecure-http.sub.txtindex 4ad2fbf8fdc..315bac0ce33 100644--- a/Tests/LibWeb/Text/expected/wpt-import/html/browsers/origin/origin-keyed-agent-clusters/insecure-http.sub.txt+++ b/Tests/LibWeb/Text/expected/wpt-import/html/browsers/origin/origin-keyed-agent-clusters/insecure-http.sub.txt@@ -2,8 +2,7 @@ Harness status: OKFound 3 tests-1 Pass-2 Fail+3 PassPass setting document.domain must give sync access-Fail parent: originAgentCluster must equal false-Fail child: originAgentCluster must equal false\ No newline at end of file+Pass parent: originAgentCluster must equal false+Pass child: originAgentCluster must equal false\ No newline at end of file