From 95fd9c604b1dacc71e5d7a8aed2e802b66dce9b1 Mon Sep 17 00:00:00 2001 From: Domenic Denicola Date: Tue, 18 Aug 2020 12:15:31 -0700 Subject: [PATCH] Origin isolation: rename the getter (but leave an alias) This renames window.originIsolationRestricted to window.originIsolated per the latest spec changes. This largely amounts to massive test updates. window.originIsolationRestricted is retained as an alias for the duration of the origin trial so as to avoid breaking deployed code, and a wpt_internal test ensures this. Bug: 1103866 Change-Id: I4f570c79d19dc783d40beb3549d677555d1c81af Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2353013 Commit-Queue: Domenic Denicola Reviewed-by: James MacLean Reviewed-by: Nate Chapin Cr-Commit-Position: refs/heads/master@{#799235} --- ...rent-no-child-bad-subdomain.sub.https.html | 4 ++-- .../parent-no-child-yes-same.sub.https.html | 6 +++--- ...rent-no-child-yes-subdomain.sub.https.html | 6 +++--- ...ild-yeswithparams-subdomain.sub.https.html | 6 +++--- .../parent-yes-child-no-same.sub.https.html | 6 +++--- ...rent-yes-child-no-subdomain.sub.https.html | 6 +++--- .../parent-yes-child-yes-same.sub.https.html | 6 +++--- ...ent-yes-child-yes-subdomain.sub.https.html | 6 +++--- ...domain-child2-yes-subdomain.sub.https.html | 8 ++++---- ...main1-child2-yes-subdomain2.sub.https.html | 8 ++++---- ...es-subdomain-child2-no-port.sub.https.html | 8 ++++---- ...bdomain-child2-no-subdomain.sub.https.html | 8 ++++---- ...bdomain-child2-no-subdomain.sub.https.html | 8 ++++---- ...domain-child2-no-subdomain2.sub.https.html | 8 ++++---- ...domain-child2-yes-subdomain.sub.https.html | 8 ++++---- ...omain-child2-yes-subdomain2.sub.https.html | 8 ++++---- ...es-subdomain-child2-no-port.sub.https.html | 8 ++++---- ...bdomain-child2-no-subdomain.sub.https.html | 8 ++++---- ...domain-child2-yes-subdomain.sub.https.html | 8 ++++---- ...omain-child2-yes-subdomain2.sub.https.html | 8 ++++---- origin-isolation/about-blank.https.sub.html | 8 ++++---- .../csp-sandbox-no.https.html | 6 +++--- .../csp-sandbox-yes.https.html | 6 +++--- .../data-to-javascript-no.https.html | 2 +- .../data-to-javascript-yes.https.html | 2 +- .../data-url-no.https.html | 2 +- .../javascript-url-no.https.html | 2 +- .../javascript-url-yes.https.html | 2 +- .../removed-iframe.sub.https.html | 12 ++++------- .../resources/data-to-javascript-test.mjs | 4 ++-- .../resources/data-url-test.mjs | 4 ++-- .../resources/helpers.mjs | 4 ++-- .../resources/javascript-url-test.mjs | 4 ++-- .../resources/sandboxed-iframe-test.sub.mjs | 4 ++-- .../sandboxed-same-origin-iframe-test.sub.mjs | 4 ++-- .../sandboxed-iframe-no.https.html | 2 +- .../sandboxed-iframe-yes.https.html | 2 +- ...sandboxed-same-origin-iframe-no.https.html | 2 +- ...andboxed-same-origin-iframe-yes.https.html | 2 +- ...ent-no-1-no-same-2-yes-port.sub.https.html | 10 +++++----- ...o-1-no-same-2-yes-subdomain.sub.https.html | 10 +++++----- ...o-subdomain-2-yes-subdomain.sub.https.html | 10 +++++----- ...-subdomain-2-yes-subdomain2.sub.https.html | 10 +++++----- ...bdomain-yes-2-subdomain2-no.sub.https.html | 10 +++++----- ...es-subdomain-2-no-subdomain.sub.https.html | 10 +++++----- ...ent-yes-1-no-same-2-no-port.sub.https.html | 10 +++++----- ...es-1-no-same-2-no-subdomain.sub.https.html | 10 +++++----- origin-isolation/insecure-http.sub.html | 6 +++--- .../removing-iframes.sub.https.html | 10 +++++----- .../resources/child-frame-script.mjs | 4 ++-- origin-isolation/resources/helpers.mjs | 20 +++++++++---------- 51 files changed, 166 insertions(+), 170 deletions(-) diff --git a/origin-isolation/1-iframe/parent-no-child-bad-subdomain.sub.https.html b/origin-isolation/1-iframe/parent-no-child-bad-subdomain.sub.https.html index 8c18711093ce9c..27085aa151ed21 100644 --- a/origin-isolation/1-iframe/parent-no-child-bad-subdomain.sub.https.html +++ b/origin-isolation/1-iframe/parent-no-child-bad-subdomain.sub.https.html @@ -10,7 +10,7 @@ import { insertIframe, testSameAgentCluster, - testOriginIsolationRestricted + testGetter } from "../resources/helpers.mjs"; let frameIndex = 0; @@ -21,7 +21,7 @@ // Since the header values are bad there should be no isolation testSameAgentCluster([self, frameIndex], `"${badValue}"`); - testOriginIsolationRestricted(frameIndex, false, `"${badValue}"`); + testGetter(frameIndex, false, `"${badValue}"`); ++frameIndex; } diff --git a/origin-isolation/1-iframe/parent-no-child-yes-same.sub.https.html b/origin-isolation/1-iframe/parent-no-child-yes-same.sub.https.html index 034c8a3090b8e7..6a82dd212e68c2 100644 --- a/origin-isolation/1-iframe/parent-no-child-yes-same.sub.https.html +++ b/origin-isolation/1-iframe/parent-no-child-yes-same.sub.https.html @@ -10,7 +10,7 @@ import { insertIframe, testSameAgentCluster, - testOriginIsolationRestricted + testGetter } from "../resources/helpers.mjs"; promise_setup(async () => { @@ -20,6 +20,6 @@ // Since they're same-origin, and the parent loaded without isolation, the // child's request for isolation gets ignored, and both end up site-keyed. testSameAgentCluster([self, 0]); -testOriginIsolationRestricted(self, false, "parent"); -testOriginIsolationRestricted(0, false, "child"); +testGetter(self, false, "parent"); +testGetter(0, false, "child"); diff --git a/origin-isolation/1-iframe/parent-no-child-yes-subdomain.sub.https.html b/origin-isolation/1-iframe/parent-no-child-yes-subdomain.sub.https.html index 3894f560f04224..81fc9316538a9b 100644 --- a/origin-isolation/1-iframe/parent-no-child-yes-subdomain.sub.https.html +++ b/origin-isolation/1-iframe/parent-no-child-yes-subdomain.sub.https.html @@ -10,7 +10,7 @@ import { insertIframe, testDifferentAgentClusters, - testOriginIsolationRestricted + testGetter } from "../resources/helpers.mjs"; promise_setup(async () => { @@ -21,6 +21,6 @@ // so the parent ends up in the site-keyed agent cluster and the child in the // origin-keyed one. testDifferentAgentClusters([self, 0]); -testOriginIsolationRestricted(self, false, "parent"); -testOriginIsolationRestricted(0, true, "child"); +testGetter(self, false, "parent"); +testGetter(0, true, "child"); diff --git a/origin-isolation/1-iframe/parent-no-child-yeswithparams-subdomain.sub.https.html b/origin-isolation/1-iframe/parent-no-child-yeswithparams-subdomain.sub.https.html index a47729bb03252d..bd12aff3a542dd 100644 --- a/origin-isolation/1-iframe/parent-no-child-yeswithparams-subdomain.sub.https.html +++ b/origin-isolation/1-iframe/parent-no-child-yeswithparams-subdomain.sub.https.html @@ -10,7 +10,7 @@ import { insertIframe, testDifferentAgentClusters, - testOriginIsolationRestricted + testGetter } from "../resources/helpers.mjs"; promise_setup(async () => { @@ -21,6 +21,6 @@ // so the parent ends up in the site-keyed agent cluster and the child in the // origin-keyed one. testDifferentAgentClusters([self, 0]); -testOriginIsolationRestricted(self, false, "parent"); -testOriginIsolationRestricted(0, true, "child"); +testGetter(self, false, "parent"); +testGetter(0, true, "child"); diff --git a/origin-isolation/1-iframe/parent-yes-child-no-same.sub.https.html b/origin-isolation/1-iframe/parent-yes-child-no-same.sub.https.html index 7070c1b891dc88..f1ca9a9a7cdec1 100644 --- a/origin-isolation/1-iframe/parent-yes-child-no-same.sub.https.html +++ b/origin-isolation/1-iframe/parent-yes-child-no-same.sub.https.html @@ -10,7 +10,7 @@ import { insertIframe, testSameAgentCluster, - testOriginIsolationRestricted + testGetter } from "../resources/helpers.mjs"; promise_setup(async () => { @@ -21,6 +21,6 @@ // child's non-request for isolation gets ignored, and both end up origin-keyed. testSameAgentCluster([self, 0]); -testOriginIsolationRestricted(self, true, "parent"); -testOriginIsolationRestricted(0, true, "child"); +testGetter(self, true, "parent"); +testGetter(0, true, "child"); diff --git a/origin-isolation/1-iframe/parent-yes-child-no-subdomain.sub.https.html b/origin-isolation/1-iframe/parent-yes-child-no-subdomain.sub.https.html index 32e5a1768d8503..be84ecac2d1891 100644 --- a/origin-isolation/1-iframe/parent-yes-child-no-subdomain.sub.https.html +++ b/origin-isolation/1-iframe/parent-yes-child-no-subdomain.sub.https.html @@ -10,7 +10,7 @@ import { insertIframe, testDifferentAgentClusters, - testOriginIsolationRestricted + testGetter } from "../resources/helpers.mjs"; promise_setup(async () => { @@ -22,6 +22,6 @@ // agent cluster and the child ends up in the site-keyed one. testDifferentAgentClusters([self, 0]); -testOriginIsolationRestricted(self, true, "parent"); -testOriginIsolationRestricted(0, false, "child"); +testGetter(self, true, "parent"); +testGetter(0, false, "child"); diff --git a/origin-isolation/1-iframe/parent-yes-child-yes-same.sub.https.html b/origin-isolation/1-iframe/parent-yes-child-yes-same.sub.https.html index a83582f747a4fa..b08206b4478fce 100644 --- a/origin-isolation/1-iframe/parent-yes-child-yes-same.sub.https.html +++ b/origin-isolation/1-iframe/parent-yes-child-yes-same.sub.https.html @@ -10,7 +10,7 @@ import { insertIframe, testSameAgentCluster, - testOriginIsolationRestricted + testGetter } from "../resources/helpers.mjs"; promise_setup(async () => { @@ -21,6 +21,6 @@ // same origin-keyed agent cluster. testSameAgentCluster([self, 0]); -testOriginIsolationRestricted(self, true, "parent"); -testOriginIsolationRestricted(0, true, "child"); +testGetter(self, true, "parent"); +testGetter(0, true, "child"); diff --git a/origin-isolation/1-iframe/parent-yes-child-yes-subdomain.sub.https.html b/origin-isolation/1-iframe/parent-yes-child-yes-subdomain.sub.https.html index 7010e4c5f4f1a1..9a426d068aef3b 100644 --- a/origin-isolation/1-iframe/parent-yes-child-yes-subdomain.sub.https.html +++ b/origin-isolation/1-iframe/parent-yes-child-yes-subdomain.sub.https.html @@ -10,7 +10,7 @@ import { insertIframe, testDifferentAgentClusters, - testOriginIsolationRestricted + testGetter } from "../resources/helpers.mjs"; promise_setup(async () => { @@ -22,6 +22,6 @@ // origin-keyed agent cluster (the www subdomain's origin). testDifferentAgentClusters([self, 0]); -testOriginIsolationRestricted(self, true, "parent"); -testOriginIsolationRestricted(0, true, "child"); +testGetter(self, true, "parent"); +testGetter(0, true, "child"); diff --git a/origin-isolation/2-iframes/parent-no-child1-no-subdomain-child2-yes-subdomain.sub.https.html b/origin-isolation/2-iframes/parent-no-child1-no-subdomain-child2-yes-subdomain.sub.https.html index a8437c5966fbe4..55c158381275a4 100644 --- a/origin-isolation/2-iframes/parent-no-child1-no-subdomain-child2-yes-subdomain.sub.https.html +++ b/origin-isolation/2-iframes/parent-no-child1-no-subdomain-child2-yes-subdomain.sub.https.html @@ -10,7 +10,7 @@ import { insertIframe, testSameAgentCluster, - testOriginIsolationRestricted + testGetter } from "../resources/helpers.mjs"; promise_setup(async () => { @@ -30,7 +30,7 @@ testSameAgentCluster([0, 1], "child1 to child2"); testSameAgentCluster([1, 0], "child2 to child1"); -testOriginIsolationRestricted(self, false, "parent"); -testOriginIsolationRestricted(0, false, "child1"); -testOriginIsolationRestricted(1, false, "child2"); +testGetter(self, false, "parent"); +testGetter(0, false, "child1"); +testGetter(1, false, "child2"); diff --git a/origin-isolation/2-iframes/parent-no-child1-no-subdomain1-child2-yes-subdomain2.sub.https.html b/origin-isolation/2-iframes/parent-no-child1-no-subdomain1-child2-yes-subdomain2.sub.https.html index 06d58b3a9c40bb..469b1947d66598 100644 --- a/origin-isolation/2-iframes/parent-no-child1-no-subdomain1-child2-yes-subdomain2.sub.https.html +++ b/origin-isolation/2-iframes/parent-no-child1-no-subdomain1-child2-yes-subdomain2.sub.https.html @@ -11,7 +11,7 @@ insertIframe, testSameAgentCluster, testDifferentAgentClusters, - testOriginIsolationRestricted + testGetter } from "../resources/helpers.mjs"; promise_setup(async () => { @@ -32,7 +32,7 @@ testDifferentAgentClusters([0, 1], "child1 to child2"); testDifferentAgentClusters([1, 0], "child2 to child1"); -testOriginIsolationRestricted(self, false, "parent"); -testOriginIsolationRestricted(0, false, "child1"); -testOriginIsolationRestricted(1, true, "child2"); +testGetter(self, false, "parent"); +testGetter(0, false, "child1"); +testGetter(1, true, "child2"); diff --git a/origin-isolation/2-iframes/parent-no-child1-yes-subdomain-child2-no-port.sub.https.html b/origin-isolation/2-iframes/parent-no-child1-yes-subdomain-child2-no-port.sub.https.html index 68c9fe1aa6d541..eaccc8509cdc4d 100644 --- a/origin-isolation/2-iframes/parent-no-child1-yes-subdomain-child2-no-port.sub.https.html +++ b/origin-isolation/2-iframes/parent-no-child1-yes-subdomain-child2-no-port.sub.https.html @@ -11,7 +11,7 @@ insertIframe, testSameAgentCluster, testDifferentAgentClusters, - testOriginIsolationRestricted + testGetter } from "../resources/helpers.mjs"; promise_setup(async () => { @@ -31,7 +31,7 @@ testDifferentAgentClusters([0, 1], "child1 to child2"); testDifferentAgentClusters([1, 0], "child2 to child1"); -testOriginIsolationRestricted(self, false, "parent"); -testOriginIsolationRestricted(0, true, "child1"); -testOriginIsolationRestricted(1, false, "child2"); +testGetter(self, false, "parent"); +testGetter(0, true, "child1"); +testGetter(1, false, "child2"); diff --git a/origin-isolation/2-iframes/parent-no-child1-yes-subdomain-child2-no-subdomain.sub.https.html b/origin-isolation/2-iframes/parent-no-child1-yes-subdomain-child2-no-subdomain.sub.https.html index 4e95827ce680ac..5adb911ae8b466 100644 --- a/origin-isolation/2-iframes/parent-no-child1-yes-subdomain-child2-no-subdomain.sub.https.html +++ b/origin-isolation/2-iframes/parent-no-child1-yes-subdomain-child2-no-subdomain.sub.https.html @@ -11,7 +11,7 @@ insertIframe, testSameAgentCluster, testDifferentAgentClusters, - testOriginIsolationRestricted + testGetter } from "../resources/helpers.mjs"; promise_setup(async () => { @@ -32,7 +32,7 @@ testSameAgentCluster([0, 1], "child1 to child2"); testSameAgentCluster([1, 0], "child2 to child1"); -testOriginIsolationRestricted(self, false, "parent"); -testOriginIsolationRestricted(0, true, "child1"); -testOriginIsolationRestricted(1, true, "child2"); +testGetter(self, false, "parent"); +testGetter(0, true, "child1"); +testGetter(1, true, "child2"); diff --git a/origin-isolation/2-iframes/parent-yes-child1-no-subdomain-child2-no-subdomain.sub.https.html b/origin-isolation/2-iframes/parent-yes-child1-no-subdomain-child2-no-subdomain.sub.https.html index f261b8eea2cc7a..e463f328f19d1c 100644 --- a/origin-isolation/2-iframes/parent-yes-child1-no-subdomain-child2-no-subdomain.sub.https.html +++ b/origin-isolation/2-iframes/parent-yes-child1-no-subdomain-child2-no-subdomain.sub.https.html @@ -11,7 +11,7 @@ insertIframe, testSameAgentCluster, testDifferentAgentClusters, - testOriginIsolationRestricted + testGetter } from "../resources/helpers.mjs"; promise_setup(async () => { @@ -32,7 +32,7 @@ testSameAgentCluster([0, 1], "child1 to child2"); testSameAgentCluster([1, 0], "child2 to child1"); -testOriginIsolationRestricted(self, true, "parent"); -testOriginIsolationRestricted(0, false, "child1"); -testOriginIsolationRestricted(1, false, "child2"); +testGetter(self, true, "parent"); +testGetter(0, false, "child1"); +testGetter(1, false, "child2"); diff --git a/origin-isolation/2-iframes/parent-yes-child1-no-subdomain-child2-no-subdomain2.sub.https.html b/origin-isolation/2-iframes/parent-yes-child1-no-subdomain-child2-no-subdomain2.sub.https.html index 86c951dd826600..2d67979b68a355 100644 --- a/origin-isolation/2-iframes/parent-yes-child1-no-subdomain-child2-no-subdomain2.sub.https.html +++ b/origin-isolation/2-iframes/parent-yes-child1-no-subdomain-child2-no-subdomain2.sub.https.html @@ -11,7 +11,7 @@ insertIframe, testSameAgentCluster, testDifferentAgentClusters, - testOriginIsolationRestricted + testGetter } from "../resources/helpers.mjs"; promise_setup(async () => { @@ -32,7 +32,7 @@ testSameAgentCluster([0, 1], "child1 to child2"); testSameAgentCluster([1, 0], "child2 to child1"); -testOriginIsolationRestricted(self, true, "parent"); -testOriginIsolationRestricted(0, false, "child1"); -testOriginIsolationRestricted(1, false, "child2"); +testGetter(self, true, "parent"); +testGetter(0, false, "child1"); +testGetter(1, false, "child2"); diff --git a/origin-isolation/2-iframes/parent-yes-child1-no-subdomain-child2-yes-subdomain.sub.https.html b/origin-isolation/2-iframes/parent-yes-child1-no-subdomain-child2-yes-subdomain.sub.https.html index 997fa0859f1875..ecf759cde06706 100644 --- a/origin-isolation/2-iframes/parent-yes-child1-no-subdomain-child2-yes-subdomain.sub.https.html +++ b/origin-isolation/2-iframes/parent-yes-child1-no-subdomain-child2-yes-subdomain.sub.https.html @@ -11,7 +11,7 @@ insertIframe, testSameAgentCluster, testDifferentAgentClusters, - testOriginIsolationRestricted + testGetter } from "../resources/helpers.mjs"; promise_setup(async () => { @@ -32,7 +32,7 @@ testSameAgentCluster([0, 1], "child1 to child2"); testSameAgentCluster([1, 0], "child2 to child1"); -testOriginIsolationRestricted(self, true, "parent"); -testOriginIsolationRestricted(0, false, "child1"); -testOriginIsolationRestricted(1, false, "child2"); +testGetter(self, true, "parent"); +testGetter(0, false, "child1"); +testGetter(1, false, "child2"); diff --git a/origin-isolation/2-iframes/parent-yes-child1-no-subdomain-child2-yes-subdomain2.sub.https.html b/origin-isolation/2-iframes/parent-yes-child1-no-subdomain-child2-yes-subdomain2.sub.https.html index 7631bdd1bd4d16..0448076178aa3a 100644 --- a/origin-isolation/2-iframes/parent-yes-child1-no-subdomain-child2-yes-subdomain2.sub.https.html +++ b/origin-isolation/2-iframes/parent-yes-child1-no-subdomain-child2-yes-subdomain2.sub.https.html @@ -10,7 +10,7 @@ import { insertIframe, testDifferentAgentClusters, - testOriginIsolationRestricted + testGetter } from "../resources/helpers.mjs"; promise_setup(async () => { @@ -32,7 +32,7 @@ testDifferentAgentClusters([0, 1], "child1 to child2"); testDifferentAgentClusters([1, 0], "child2 to child1"); -testOriginIsolationRestricted(self, true, "parent"); -testOriginIsolationRestricted(0, false, "child1"); -testOriginIsolationRestricted(1, true, "child2"); +testGetter(self, true, "parent"); +testGetter(0, false, "child1"); +testGetter(1, true, "child2"); diff --git a/origin-isolation/2-iframes/parent-yes-child1-yes-subdomain-child2-no-port.sub.https.html b/origin-isolation/2-iframes/parent-yes-child1-yes-subdomain-child2-no-port.sub.https.html index edcdcbabd76bb5..fcdb13699710bf 100644 --- a/origin-isolation/2-iframes/parent-yes-child1-yes-subdomain-child2-no-port.sub.https.html +++ b/origin-isolation/2-iframes/parent-yes-child1-yes-subdomain-child2-no-port.sub.https.html @@ -10,7 +10,7 @@ import { insertIframe, testDifferentAgentClusters, - testOriginIsolationRestricted + testGetter } from "../resources/helpers.mjs"; promise_setup(async () => { @@ -30,7 +30,7 @@ testDifferentAgentClusters([0, 1], "child1 to child2"); testDifferentAgentClusters([1, 0], "child2 to child1"); -testOriginIsolationRestricted(self, true, "parent"); -testOriginIsolationRestricted(0, true, "child1"); -testOriginIsolationRestricted(1, false, "child2"); +testGetter(self, true, "parent"); +testGetter(0, true, "child1"); +testGetter(1, false, "child2"); diff --git a/origin-isolation/2-iframes/parent-yes-child1-yes-subdomain-child2-no-subdomain.sub.https.html b/origin-isolation/2-iframes/parent-yes-child1-yes-subdomain-child2-no-subdomain.sub.https.html index f8503312460b20..011bcd1637b818 100644 --- a/origin-isolation/2-iframes/parent-yes-child1-yes-subdomain-child2-no-subdomain.sub.https.html +++ b/origin-isolation/2-iframes/parent-yes-child1-yes-subdomain-child2-no-subdomain.sub.https.html @@ -11,7 +11,7 @@ insertIframe, testSameAgentCluster, testDifferentAgentClusters, - testOriginIsolationRestricted + testGetter } from "../resources/helpers.mjs"; promise_setup(async () => { @@ -32,7 +32,7 @@ testSameAgentCluster([0, 1], "child1 to child2"); testSameAgentCluster([1, 0], "child2 to child1"); -testOriginIsolationRestricted(self, true, "parent"); -testOriginIsolationRestricted(0, true, "child1"); -testOriginIsolationRestricted(1, true, "child2"); +testGetter(self, true, "parent"); +testGetter(0, true, "child1"); +testGetter(1, true, "child2"); diff --git a/origin-isolation/2-iframes/parent-yes-child1-yes-subdomain-child2-yes-subdomain.sub.https.html b/origin-isolation/2-iframes/parent-yes-child1-yes-subdomain-child2-yes-subdomain.sub.https.html index 6ae6fac77181e5..1a4dd4c9a655b5 100644 --- a/origin-isolation/2-iframes/parent-yes-child1-yes-subdomain-child2-yes-subdomain.sub.https.html +++ b/origin-isolation/2-iframes/parent-yes-child1-yes-subdomain-child2-yes-subdomain.sub.https.html @@ -11,7 +11,7 @@ insertIframe, testSameAgentCluster, testDifferentAgentClusters, - testOriginIsolationRestricted + testGetter } from "../resources/helpers.mjs"; promise_setup(async () => { @@ -33,7 +33,7 @@ testSameAgentCluster([0, 1], "child1 to child2"); testSameAgentCluster([1, 0], "child2 to child1"); -testOriginIsolationRestricted(self, true, "parent"); -testOriginIsolationRestricted(0, true, "child1"); -testOriginIsolationRestricted(1, true, "child2"); +testGetter(self, true, "parent"); +testGetter(0, true, "child1"); +testGetter(1, true, "child2"); diff --git a/origin-isolation/2-iframes/parent-yes-child1-yes-subdomain-child2-yes-subdomain2.sub.https.html b/origin-isolation/2-iframes/parent-yes-child1-yes-subdomain-child2-yes-subdomain2.sub.https.html index 53eaea13ca2420..852fd2d216e3be 100644 --- a/origin-isolation/2-iframes/parent-yes-child1-yes-subdomain-child2-yes-subdomain2.sub.https.html +++ b/origin-isolation/2-iframes/parent-yes-child1-yes-subdomain-child2-yes-subdomain2.sub.https.html @@ -10,7 +10,7 @@ import { insertIframe, testDifferentAgentClusters, - testOriginIsolationRestricted + testGetter } from "../resources/helpers.mjs"; promise_setup(async () => { @@ -32,7 +32,7 @@ testDifferentAgentClusters([0, 1], "child1 to child2"); testDifferentAgentClusters([1, 0], "child2 to child1"); -testOriginIsolationRestricted(self, true, "parent"); -testOriginIsolationRestricted(0, true, "child1"); -testOriginIsolationRestricted(1, true, "child2"); +testGetter(self, true, "parent"); +testGetter(0, true, "child1"); +testGetter(1, true, "child2"); diff --git a/origin-isolation/about-blank.https.sub.html b/origin-isolation/about-blank.https.sub.html index 6af31dd021f902..945243dd7efcf8 100644 --- a/origin-isolation/about-blank.https.sub.html +++ b/origin-isolation/about-blank.https.sub.html @@ -12,7 +12,7 @@ setBothDocumentDomains, testSameAgentCluster, testDifferentAgentClusters, - testOriginIsolationRestricted + testGetter } from "./resources/helpers.mjs"; promise_setup(async () => { @@ -26,9 +26,9 @@ testDifferentAgentClusters([0, 1], "about:blank to child2"); testDifferentAgentClusters([1, 0], "child2 to about:blank"); -testOriginIsolationRestricted(self, true, "parent"); -testOriginIsolationRestricted(0, true, "about:blank"); -testOriginIsolationRestricted(1, false, "child2"); +testGetter(self, true, "parent"); +testGetter(0, true, "about:blank"); +testGetter(1, false, "child2"); async function insertAboutBlankIframe() { const iframe = document.createElement("iframe"); diff --git a/origin-isolation/getter-special-cases/csp-sandbox-no.https.html b/origin-isolation/getter-special-cases/csp-sandbox-no.https.html index 22cdffc72710e0..16ecb45192950d 100644 --- a/origin-isolation/getter-special-cases/csp-sandbox-no.https.html +++ b/origin-isolation/getter-special-cases/csp-sandbox-no.https.html @@ -1,15 +1,15 @@ -window.originIsolationRestricted for a top-level frame sandboxed by CSP with no Origin-Isolation header +window.originIsolated for a top-level frame sandboxed by CSP with no Origin-Isolation header
diff --git a/origin-isolation/getter-special-cases/csp-sandbox-yes.https.html b/origin-isolation/getter-special-cases/csp-sandbox-yes.https.html index 1f3406a8b6bfbe..b9a7359974d565 100644 --- a/origin-isolation/getter-special-cases/csp-sandbox-yes.https.html +++ b/origin-isolation/getter-special-cases/csp-sandbox-yes.https.html @@ -1,15 +1,15 @@ -window.originIsolationRestricted for a top-level frame sandboxed by CSP with an Origin-Isolation header +window.originIsolated for a top-level frame sandboxed by CSP with an Origin-Isolation header
diff --git a/origin-isolation/getter-special-cases/data-to-javascript-no.https.html b/origin-isolation/getter-special-cases/data-to-javascript-no.https.html index 1155c09ff36217..cb00ef782d0cf5 100644 --- a/origin-isolation/getter-special-cases/data-to-javascript-no.https.html +++ b/origin-isolation/getter-special-cases/data-to-javascript-no.https.html @@ -1,6 +1,6 @@ -window.originIsolationRestricted for a javascript: URL navigated to from a data: URL on a non-isolated page +window.originIsolated for a javascript: URL navigated to from a data: URL on a non-isolated page diff --git a/origin-isolation/getter-special-cases/data-to-javascript-yes.https.html b/origin-isolation/getter-special-cases/data-to-javascript-yes.https.html index a6414ae8911153..6856441deff1d0 100644 --- a/origin-isolation/getter-special-cases/data-to-javascript-yes.https.html +++ b/origin-isolation/getter-special-cases/data-to-javascript-yes.https.html @@ -1,6 +1,6 @@ -window.originIsolationRestricted for a javascript: URL navigated to from a data: URL on an isolated page +window.originIsolated for a javascript: URL navigated to from a data: URL on an isolated page diff --git a/origin-isolation/getter-special-cases/data-url-no.https.html b/origin-isolation/getter-special-cases/data-url-no.https.html index dd371b81139112..5b194eaef3552f 100644 --- a/origin-isolation/getter-special-cases/data-url-no.https.html +++ b/origin-isolation/getter-special-cases/data-url-no.https.html @@ -1,6 +1,6 @@ -window.originIsolationRestricted for a data: URL on a non-isolated page +window.originIsolated for a data: URL on a non-isolated page diff --git a/origin-isolation/getter-special-cases/javascript-url-no.https.html b/origin-isolation/getter-special-cases/javascript-url-no.https.html index 71b2758e6f6a74..b75cae47cdbb6c 100644 --- a/origin-isolation/getter-special-cases/javascript-url-no.https.html +++ b/origin-isolation/getter-special-cases/javascript-url-no.https.html @@ -1,6 +1,6 @@ -window.originIsolationRestricted for a javascript: URL on a non-isolated page +window.originIsolated for a javascript: URL on a non-isolated page diff --git a/origin-isolation/getter-special-cases/javascript-url-yes.https.html b/origin-isolation/getter-special-cases/javascript-url-yes.https.html index 97b91c4cddaa4e..573b1a0b712bd6 100644 --- a/origin-isolation/getter-special-cases/javascript-url-yes.https.html +++ b/origin-isolation/getter-special-cases/javascript-url-yes.https.html @@ -1,6 +1,6 @@ -window.originIsolationRestricted for a javascript: URL on an isolated page +window.originIsolated for a javascript: URL on an isolated page diff --git a/origin-isolation/getter-special-cases/removed-iframe.sub.https.html b/origin-isolation/getter-special-cases/removed-iframe.sub.https.html index fd838cdbb55bfd..d7ad4903ab9bfb 100644 --- a/origin-isolation/getter-special-cases/removed-iframe.sub.https.html +++ b/origin-isolation/getter-special-cases/removed-iframe.sub.https.html @@ -1,13 +1,9 @@ -window.originIsolationRestricted for a removed frame +window.originIsolated for a removed frame - -
diff --git a/origin-isolation/getter-special-cases/resources/data-to-javascript-test.mjs b/origin-isolation/getter-special-cases/resources/data-to-javascript-test.mjs index e5f21ee298e8ee..3a88253ee30534 100644 --- a/origin-isolation/getter-special-cases/resources/data-to-javascript-test.mjs +++ b/origin-isolation/getter-special-cases/resources/data-to-javascript-test.mjs @@ -1,5 +1,5 @@ import { insertCustomIframe, testSupportScript } from "./helpers.mjs"; -import { waitForIframe, testOriginIsolationRestricted } from "../../resources/helpers.mjs"; +import { waitForIframe, testGetter } from "../../resources/helpers.mjs"; const testSupportScriptSuitableForNesting = testSupportScript.replace('', ''); @@ -29,5 +29,5 @@ export default () => { // The javascript: URL iframe inherits its origin from the previous occupant // of the iframe, which is a data: URL, so it should always be true. - testOriginIsolationRestricted(0, true); + testGetter(0, true); }; diff --git a/origin-isolation/getter-special-cases/resources/data-url-test.mjs b/origin-isolation/getter-special-cases/resources/data-url-test.mjs index 1b241ca1074a95..d32d8521be4718 100644 --- a/origin-isolation/getter-special-cases/resources/data-url-test.mjs +++ b/origin-isolation/getter-special-cases/resources/data-url-test.mjs @@ -1,5 +1,5 @@ import { insertCustomIframe, testSupportScript } from "./helpers.mjs"; -import { testOriginIsolationRestricted } from "../../resources/helpers.mjs"; +import { testGetter } from "../../resources/helpers.mjs"; export default () => { promise_setup(() => { @@ -9,5 +9,5 @@ export default () => { // The data: URL iframe has an opaque origin, so it should return true, since // for them site === origin so they are always "origin-isolated". - testOriginIsolationRestricted(0, true, "data: URL child"); + testGetter(0, true, "data: URL child"); }; diff --git a/origin-isolation/getter-special-cases/resources/helpers.mjs b/origin-isolation/getter-special-cases/resources/helpers.mjs index 0c91ee74b14dc8..d1e3cc17a13e28 100644 --- a/origin-isolation/getter-special-cases/resources/helpers.mjs +++ b/origin-isolation/getter-special-cases/resources/helpers.mjs @@ -18,12 +18,12 @@ export async function insertCustomIframe(src) { /** * This is the part of send-origin-isolation-header.py that allows - * us to reuse testOriginIsolationRestricted. + * us to reuse testGetter. */ export const testSupportScript = ` `; diff --git a/origin-isolation/getter-special-cases/resources/javascript-url-test.mjs b/origin-isolation/getter-special-cases/resources/javascript-url-test.mjs index 66d0f0dcf19486..de474d8cafca9c 100644 --- a/origin-isolation/getter-special-cases/resources/javascript-url-test.mjs +++ b/origin-isolation/getter-special-cases/resources/javascript-url-test.mjs @@ -1,5 +1,5 @@ import { insertCustomIframe, testSupportScript } from "./helpers.mjs"; -import { testOriginIsolationRestricted } from "../../resources/helpers.mjs"; +import { testGetter } from "../../resources/helpers.mjs"; export default ({ expected }) => { promise_setup(() => { @@ -10,5 +10,5 @@ export default ({ expected }) => { // of the iframe, which is about:blank, which in turn inherits from the // parent. So, the caller needs to tell us what to expect. - testOriginIsolationRestricted(0, expected); + testGetter(0, expected); }; diff --git a/origin-isolation/getter-special-cases/resources/sandboxed-iframe-test.sub.mjs b/origin-isolation/getter-special-cases/resources/sandboxed-iframe-test.sub.mjs index af5a6ebc6c05ed..98575b8d80ecda 100644 --- a/origin-isolation/getter-special-cases/resources/sandboxed-iframe-test.sub.mjs +++ b/origin-isolation/getter-special-cases/resources/sandboxed-iframe-test.sub.mjs @@ -1,6 +1,6 @@ import { navigateIframe, - testOriginIsolationRestricted + testGetter } from "../../resources/helpers.mjs"; export default () => { @@ -16,5 +16,5 @@ export default () => { // Sandboxed iframes have an opaque origin, so it should return true, since // for them site === origin so they are always "origin-isolated". - testOriginIsolationRestricted(0, true); + testGetter(0, true); }; diff --git a/origin-isolation/getter-special-cases/resources/sandboxed-same-origin-iframe-test.sub.mjs b/origin-isolation/getter-special-cases/resources/sandboxed-same-origin-iframe-test.sub.mjs index 931e798af44a4f..272f805870c932 100644 --- a/origin-isolation/getter-special-cases/resources/sandboxed-same-origin-iframe-test.sub.mjs +++ b/origin-isolation/getter-special-cases/resources/sandboxed-same-origin-iframe-test.sub.mjs @@ -1,6 +1,6 @@ import { navigateIframe, - testOriginIsolationRestricted + testGetter } from "../../resources/helpers.mjs"; export default ({ expected }) => { @@ -16,5 +16,5 @@ export default ({ expected }) => { // Since the allow-same-origin token is set, this should behave like a normal // iframe, and follow the embedder. - testOriginIsolationRestricted(0, expected); + testGetter(0, expected); }; diff --git a/origin-isolation/getter-special-cases/sandboxed-iframe-no.https.html b/origin-isolation/getter-special-cases/sandboxed-iframe-no.https.html index 301e2448455108..bc2276fede8ac7 100644 --- a/origin-isolation/getter-special-cases/sandboxed-iframe-no.https.html +++ b/origin-isolation/getter-special-cases/sandboxed-iframe-no.https.html @@ -1,6 +1,6 @@ -window.originIsolationRestricted for a sandboxed iframe on a non-isolated page +window.originIsolated for a sandboxed iframe on a non-isolated page diff --git a/origin-isolation/getter-special-cases/sandboxed-iframe-yes.https.html b/origin-isolation/getter-special-cases/sandboxed-iframe-yes.https.html index ab394083fd5dc4..5805d3421ebe25 100644 --- a/origin-isolation/getter-special-cases/sandboxed-iframe-yes.https.html +++ b/origin-isolation/getter-special-cases/sandboxed-iframe-yes.https.html @@ -1,6 +1,6 @@ -window.originIsolationRestricted for a sandboxed iframe on an isolated page +window.originIsolated for a sandboxed iframe on an isolated page diff --git a/origin-isolation/getter-special-cases/sandboxed-same-origin-iframe-no.https.html b/origin-isolation/getter-special-cases/sandboxed-same-origin-iframe-no.https.html index 6e500d8936dcf6..a1b44a1e5b3477 100644 --- a/origin-isolation/getter-special-cases/sandboxed-same-origin-iframe-no.https.html +++ b/origin-isolation/getter-special-cases/sandboxed-same-origin-iframe-no.https.html @@ -1,6 +1,6 @@ -window.originIsolationRestricted for a sandboxed, but same-origin, iframe on a non-isolated page +window.originIsolated for a sandboxed, but same-origin, iframe on a non-isolated page diff --git a/origin-isolation/getter-special-cases/sandboxed-same-origin-iframe-yes.https.html b/origin-isolation/getter-special-cases/sandboxed-same-origin-iframe-yes.https.html index a6ff0a00424177..b9339afae2e802 100644 --- a/origin-isolation/getter-special-cases/sandboxed-same-origin-iframe-yes.https.html +++ b/origin-isolation/getter-special-cases/sandboxed-same-origin-iframe-yes.https.html @@ -1,6 +1,6 @@ -window.originIsolationRestricted for a sandboxed, but same-origin, iframe on an isolated page +window.originIsolated for a sandboxed, but same-origin, iframe on an isolated page diff --git a/origin-isolation/iframe-navigation/parent-no-1-no-same-2-yes-port.sub.https.html b/origin-isolation/iframe-navigation/parent-no-1-no-same-2-yes-port.sub.https.html index ff9ea4dca8c3ef..85ee2f677f31dd 100644 --- a/origin-isolation/iframe-navigation/parent-no-1-no-same-2-yes-port.sub.https.html +++ b/origin-isolation/iframe-navigation/parent-no-1-no-same-2-yes-port.sub.https.html @@ -13,7 +13,7 @@ setBothDocumentDomains, testSameAgentCluster, testDifferentAgentClusters, - testOriginIsolationRestricted + testGetter } from "../resources/helpers.mjs"; let frame1; @@ -24,8 +24,8 @@ // Nobody requested isolation yet. testSameAgentCluster([self, 0], "Before: parent to child"); -testOriginIsolationRestricted(self, false, "before parent"); -testOriginIsolationRestricted(0, false, "before child"); +testGetter(self, false, "before parent"); +testGetter(0, false, "before child"); promise_test(async () => { await navigateIframe(frame1, "{{hosts[][]}}:{{ports[https][1]}}", "?1"); @@ -35,6 +35,6 @@ // Since the new page is different-origin, it should be isolated. testDifferentAgentClusters([self, 0], "After: parent to child"); -testOriginIsolationRestricted(self, false, "after parent"); -testOriginIsolationRestricted(0, true, "after child"); +testGetter(self, false, "after parent"); +testGetter(0, true, "after child"); diff --git a/origin-isolation/iframe-navigation/parent-no-1-no-same-2-yes-subdomain.sub.https.html b/origin-isolation/iframe-navigation/parent-no-1-no-same-2-yes-subdomain.sub.https.html index f599cb986d93a3..bb39de648acf17 100644 --- a/origin-isolation/iframe-navigation/parent-no-1-no-same-2-yes-subdomain.sub.https.html +++ b/origin-isolation/iframe-navigation/parent-no-1-no-same-2-yes-subdomain.sub.https.html @@ -13,7 +13,7 @@ setBothDocumentDomains, testSameAgentCluster, testDifferentAgentClusters, - testOriginIsolationRestricted + testGetter } from "../resources/helpers.mjs"; let frame1; @@ -24,8 +24,8 @@ // Nobody requested isolation yet. testSameAgentCluster([self, 0], "Before: parent to child"); -testOriginIsolationRestricted(self, false, "before parent"); -testOriginIsolationRestricted(0, false, "before child"); +testGetter(self, false, "before parent"); +testGetter(0, false, "before child"); promise_test(async () => { await navigateIframe(frame1, "{{hosts[][www]}}", "?1"); @@ -35,6 +35,6 @@ // Since the new page is different-origin, it should be isolated. testDifferentAgentClusters([self, 0], "After: parent to child"); -testOriginIsolationRestricted(self, false, "after parent"); -testOriginIsolationRestricted(0, true, "after child"); +testGetter(self, false, "after parent"); +testGetter(0, true, "after child"); diff --git a/origin-isolation/iframe-navigation/parent-no-1-no-subdomain-2-yes-subdomain.sub.https.html b/origin-isolation/iframe-navigation/parent-no-1-no-subdomain-2-yes-subdomain.sub.https.html index 8777b656e335e5..b52ca783f6f711 100644 --- a/origin-isolation/iframe-navigation/parent-no-1-no-subdomain-2-yes-subdomain.sub.https.html +++ b/origin-isolation/iframe-navigation/parent-no-1-no-subdomain-2-yes-subdomain.sub.https.html @@ -12,7 +12,7 @@ navigateIframe, setBothDocumentDomains, testSameAgentCluster, - testOriginIsolationRestricted + testGetter } from "../resources/helpers.mjs"; let frame1; @@ -23,8 +23,8 @@ // Nobody requested isolation yet. testSameAgentCluster([self, 0], "Before: parent to child"); -testOriginIsolationRestricted(self, false, "before parent"); -testOriginIsolationRestricted(0, false, "before child"); +testGetter(self, false, "before parent"); +testGetter(0, false, "before child"); promise_test(async () => { await navigateIframe(frame1, "{{hosts[][www]}}", "?1"); @@ -35,6 +35,6 @@ // isolation request is ignored; instead we continue isolating. testSameAgentCluster([self, 0], "After: parent to child"); -testOriginIsolationRestricted(self, false, "after parent"); -testOriginIsolationRestricted(0, false, "after child"); +testGetter(self, false, "after parent"); +testGetter(0, false, "after child"); diff --git a/origin-isolation/iframe-navigation/parent-no-1-no-subdomain-2-yes-subdomain2.sub.https.html b/origin-isolation/iframe-navigation/parent-no-1-no-subdomain-2-yes-subdomain2.sub.https.html index 22f35eb9149c49..67e99cee090ad9 100644 --- a/origin-isolation/iframe-navigation/parent-no-1-no-subdomain-2-yes-subdomain2.sub.https.html +++ b/origin-isolation/iframe-navigation/parent-no-1-no-subdomain-2-yes-subdomain2.sub.https.html @@ -13,7 +13,7 @@ setBothDocumentDomains, testSameAgentCluster, testDifferentAgentClusters, - testOriginIsolationRestricted + testGetter } from "../resources/helpers.mjs"; let frame1; @@ -24,8 +24,8 @@ // Nobody requested isolation yet. testSameAgentCluster([self, 0], "Before: parent to child"); -testOriginIsolationRestricted(self, false, "before parent"); -testOriginIsolationRestricted(0, false, "before child"); +testGetter(self, false, "before parent"); +testGetter(0, false, "before child"); promise_test(async () => { await navigateIframe(frame1, "{{hosts[][www1]}}", "?1"); @@ -36,6 +36,6 @@ // isolation request is respected. testDifferentAgentClusters([self, 0], "After: parent to child"); -testOriginIsolationRestricted(self, false, "after parent"); -testOriginIsolationRestricted(0, true, "after child"); +testGetter(self, false, "after parent"); +testGetter(0, true, "after child"); diff --git a/origin-isolation/iframe-navigation/parent-no-1-subdomain-yes-2-subdomain2-no.sub.https.html b/origin-isolation/iframe-navigation/parent-no-1-subdomain-yes-2-subdomain2-no.sub.https.html index ac51e6ef80c96b..1b7dd01947f69e 100644 --- a/origin-isolation/iframe-navigation/parent-no-1-subdomain-yes-2-subdomain2-no.sub.https.html +++ b/origin-isolation/iframe-navigation/parent-no-1-subdomain-yes-2-subdomain2-no.sub.https.html @@ -13,7 +13,7 @@ setBothDocumentDomains, testSameAgentCluster, testDifferentAgentClusters, - testOriginIsolationRestricted + testGetter } from "../resources/helpers.mjs"; let frame1; @@ -24,8 +24,8 @@ // Since they are different-origin, the child's isolation request is respected. testDifferentAgentClusters([self, 0], "Before: parent to child"); -testOriginIsolationRestricted(self, false, "before parent"); -testOriginIsolationRestricted(0, true, "before child"); +testGetter(self, false, "before parent"); +testGetter(0, true, "before child"); promise_test(async () => { await navigateIframe(frame1, "{{hosts[][www1]}}"); @@ -36,6 +36,6 @@ // doesn't somehow get isolated just because its predecessor was. testSameAgentCluster([self, 0], "After: parent to child"); -testOriginIsolationRestricted(self, false, "after parent"); -testOriginIsolationRestricted(0, false, "after child"); +testGetter(self, false, "after parent"); +testGetter(0, false, "after child"); diff --git a/origin-isolation/iframe-navigation/parent-no-1-yes-subdomain-2-no-subdomain.sub.https.html b/origin-isolation/iframe-navigation/parent-no-1-yes-subdomain-2-no-subdomain.sub.https.html index 425983423ba746..783f5870a839b1 100644 --- a/origin-isolation/iframe-navigation/parent-no-1-yes-subdomain-2-no-subdomain.sub.https.html +++ b/origin-isolation/iframe-navigation/parent-no-1-yes-subdomain-2-no-subdomain.sub.https.html @@ -12,7 +12,7 @@ navigateIframe, setBothDocumentDomains, testDifferentAgentClusters, - testOriginIsolationRestricted + testGetter } from "../resources/helpers.mjs"; let frame1; @@ -23,8 +23,8 @@ // Since they are different-origin, the child's isolation request is respected. testDifferentAgentClusters([self, 0], "Before: parent to child"); -testOriginIsolationRestricted(self, false, "before parent"); -testOriginIsolationRestricted(0, true, "before child"); +testGetter(self, false, "before parent"); +testGetter(0, true, "before child"); promise_test(async () => { await navigateIframe(frame1, "{{hosts[][www]}}"); @@ -35,6 +35,6 @@ // non-isolation request is ignored; instead we continue isolating. testDifferentAgentClusters([self, 0], "After: parent to child"); -testOriginIsolationRestricted(self, false, "after parent"); -testOriginIsolationRestricted(0, true, "after child"); +testGetter(self, false, "after parent"); +testGetter(0, true, "after child"); diff --git a/origin-isolation/iframe-navigation/parent-yes-1-no-same-2-no-port.sub.https.html b/origin-isolation/iframe-navigation/parent-yes-1-no-same-2-no-port.sub.https.html index 2d9c9ac98d02c4..461fd0ddc4b886 100644 --- a/origin-isolation/iframe-navigation/parent-yes-1-no-same-2-no-port.sub.https.html +++ b/origin-isolation/iframe-navigation/parent-yes-1-no-same-2-no-port.sub.https.html @@ -13,7 +13,7 @@ setBothDocumentDomains, testSameAgentCluster, testDifferentAgentClusters, - testOriginIsolationRestricted + testGetter } from "../resources/helpers.mjs"; let frame1; @@ -25,8 +25,8 @@ // so it gets isolated too. testSameAgentCluster([self, 0], "Before: parent to child"); -testOriginIsolationRestricted(self, true, "before parent"); -testOriginIsolationRestricted(0, true, "before child"); +testGetter(self, true, "before parent"); +testGetter(0, true, "before child"); promise_test(async () => { await navigateIframe(frame1, "{{hosts[][]}}:{{ports[https][1]}}"); @@ -36,6 +36,6 @@ // Since the new page is different-origin, its non-request should be respected. testDifferentAgentClusters([self, 0], "After: parent to child"); -testOriginIsolationRestricted(self, true, "after parent"); -testOriginIsolationRestricted(0, false, "after child"); +testGetter(self, true, "after parent"); +testGetter(0, false, "after child"); diff --git a/origin-isolation/iframe-navigation/parent-yes-1-no-same-2-no-subdomain.sub.https.html b/origin-isolation/iframe-navigation/parent-yes-1-no-same-2-no-subdomain.sub.https.html index abf0da2b5d60a0..6832cd03858cab 100644 --- a/origin-isolation/iframe-navigation/parent-yes-1-no-same-2-no-subdomain.sub.https.html +++ b/origin-isolation/iframe-navigation/parent-yes-1-no-same-2-no-subdomain.sub.https.html @@ -13,7 +13,7 @@ setBothDocumentDomains, testSameAgentCluster, testDifferentAgentClusters, - testOriginIsolationRestricted + testGetter } from "../resources/helpers.mjs"; let frame1; @@ -25,8 +25,8 @@ // so it gets isolated too. testSameAgentCluster([self, 0], "Before: parent to child"); -testOriginIsolationRestricted(self, true, "before parent"); -testOriginIsolationRestricted(0, true, "before child"); +testGetter(self, true, "before parent"); +testGetter(0, true, "before child"); promise_test(async () => { await navigateIframe(frame1, "{{hosts[][www]}}"); @@ -36,6 +36,6 @@ // Since the new page is different-origin, its non-request should be respected. testDifferentAgentClusters([self, 0], "After: parent to child"); -testOriginIsolationRestricted(self, true, "after parent"); -testOriginIsolationRestricted(0, false, "after child"); +testGetter(self, true, "after parent"); +testGetter(0, false, "after child"); diff --git a/origin-isolation/insecure-http.sub.html b/origin-isolation/insecure-http.sub.html index 583ca2f441b19f..18e0216e2627a2 100644 --- a/origin-isolation/insecure-http.sub.html +++ b/origin-isolation/insecure-http.sub.html @@ -10,7 +10,7 @@ import { insertIframe, testSameAgentCluster, - testOriginIsolationRestricted + testGetter } from "./resources/helpers.mjs"; promise_setup(async () => { @@ -21,6 +21,6 @@ // So both end up in the site-keyed agent cluster. testSameAgentCluster([self, 0]); -testOriginIsolationRestricted(self, false, "parent"); -testOriginIsolationRestricted(0, false, "child"); +testGetter(self, false, "parent"); +testGetter(0, false, "child"); diff --git a/origin-isolation/removing-iframes.sub.https.html b/origin-isolation/removing-iframes.sub.https.html index 3a6d91c447a972..cbe13af820798a 100644 --- a/origin-isolation/removing-iframes.sub.https.html +++ b/origin-isolation/removing-iframes.sub.https.html @@ -11,7 +11,7 @@ insertIframe, testSameAgentCluster, testDifferentAgentClusters, - testOriginIsolationRestricted + testGetter } from "./resources/helpers.mjs"; let frame1; @@ -23,8 +23,8 @@ // as is the child's non-request. So the parent ends up in the origin-keyed // agent cluster and the child ends up in the site-keyed one. testDifferentAgentClusters([self, 0], "Before"); -testOriginIsolationRestricted(self, true, "parent"); -testOriginIsolationRestricted(0, false, "child1"); +testGetter(self, true, "parent"); +testGetter(0, false, "child1"); promise_test(async () => { frame1.remove(); @@ -41,6 +41,6 @@ testSameAgentCluster([0, 1], "child2 to child3"); testSameAgentCluster([1, 0], "child3 to child2"); -testOriginIsolationRestricted(0, false, "child2"); -testOriginIsolationRestricted(1, false, "child3"); +testGetter(0, false, "child2"); +testGetter(1, false, "child3"); diff --git a/origin-isolation/resources/child-frame-script.mjs b/origin-isolation/resources/child-frame-script.mjs index 783e36092daae6..0d901fe5944793 100644 --- a/origin-isolation/resources/child-frame-script.mjs +++ b/origin-isolation/resources/child-frame-script.mjs @@ -38,8 +38,8 @@ window.onmessage = async (e) => { } else { parent.postMessage("something wierd happened", "*"); } - } else if (e.data.command === "get originIsolationRestricted") { - parent.postMessage(self.originIsolationRestricted, "*"); + } else if (e.data.command === "get originIsolated") { + parent.postMessage(self.originIsolated, "*"); } // We could also receive e.data === "WebAssembly.Module message received", diff --git a/origin-isolation/resources/helpers.mjs b/origin-isolation/resources/helpers.mjs index 73f9406b476bb4..b8ea2bf98dedc4 100644 --- a/origin-isolation/resources/helpers.mjs +++ b/origin-isolation/resources/helpers.mjs @@ -177,28 +177,28 @@ export function testDifferentAgentClusters(testFrames, testLabelPrefix) { } /** - * Creates a promise_test() to check the value of the originIsolationRestricted - * getter in the given testFrame. + * Creates a promise_test() to check the value of the originIsolated getter in + * the given testFrame. * @param {Window|number} testFrame - Either self, or a frame index to test. - * @param {boolean} expected - The expected value for originIsolationRestricted. + * @param {boolean} expected - The expected value for originIsolated. * @param {string=} testLabelPrefix - A prefix used in the test names. This can * be omitted if the function is only used once in a test file. */ -export function testOriginIsolationRestricted(testFrame, expected, testLabelPrefix) { +export function testGetter(testFrame, expected, testLabelPrefix) { const prefix = testLabelPrefix === undefined ? "" : `${testLabelPrefix}: `; if (testFrame === self) { // Need to use promise_test() even though it's sync because we use // promise_setup() in many tests. promise_test(async () => { - assert_equals(self.originIsolationRestricted, expected); - }, `${prefix}originIsolationRestricted must equal ${expected}`); + assert_equals(self.originIsolated, expected); + }, `${prefix}originIsolated must equal ${expected}`); } else { promise_test(async () => { const frameWindow = frames[testFrame]; - const result = await getOriginIsolationRestricted(frameWindow); + const result = await accessOriginIsolated(frameWindow); assert_equals(result, expected); - }, `${prefix}originIsolationRestricted must equal ${expected}`); + }, `${prefix}originIsolated must equal ${expected}`); } } @@ -241,10 +241,10 @@ export async function setBothDocumentDomains(frameWindow) { assert_equals(whatHappened, "document.domain is set"); } -async function getOriginIsolationRestricted(frameWindow) { +async function accessOriginIsolated(frameWindow) { // This function is coupled to ./send-origin-isolation-header.py, which ensures // that sending such a message will result in a message back. - frameWindow.postMessage({ command: "get originIsolationRestricted" }, "*"); + frameWindow.postMessage({ command: "get originIsolated" }, "*"); return waitForMessage(frameWindow); }