Skip to content

Commit

Permalink
Origin isolation: rename the getter (but leave an alias)
Browse files Browse the repository at this point in the history
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 <domenic@chromium.org>
Reviewed-by: James MacLean <wjmaclean@chromium.org>
Reviewed-by: Nate Chapin <japhet@chromium.org>
Cr-Commit-Position: refs/heads/master@{#799235}
  • Loading branch information
domenic authored and chromium-wpt-export-bot committed Aug 18, 2020
1 parent 7607902 commit 95fd9c6
Show file tree
Hide file tree
Showing 51 changed files with 166 additions and 170 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import {
insertIframe,
testSameAgentCluster,
testOriginIsolationRestricted
testGetter
} from "../resources/helpers.mjs";

let frameIndex = 0;
Expand All @@ -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;
}
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import {
insertIframe,
testSameAgentCluster,
testOriginIsolationRestricted
testGetter
} from "../resources/helpers.mjs";

promise_setup(async () => {
Expand All @@ -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");
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import {
insertIframe,
testDifferentAgentClusters,
testOriginIsolationRestricted
testGetter
} from "../resources/helpers.mjs";

promise_setup(async () => {
Expand All @@ -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");
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import {
insertIframe,
testDifferentAgentClusters,
testOriginIsolationRestricted
testGetter
} from "../resources/helpers.mjs";

promise_setup(async () => {
Expand All @@ -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");
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import {
insertIframe,
testSameAgentCluster,
testOriginIsolationRestricted
testGetter
} from "../resources/helpers.mjs";

promise_setup(async () => {
Expand All @@ -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");
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import {
insertIframe,
testDifferentAgentClusters,
testOriginIsolationRestricted
testGetter
} from "../resources/helpers.mjs";

promise_setup(async () => {
Expand All @@ -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");
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import {
insertIframe,
testSameAgentCluster,
testOriginIsolationRestricted
testGetter
} from "../resources/helpers.mjs";

promise_setup(async () => {
Expand All @@ -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");
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import {
insertIframe,
testDifferentAgentClusters,
testOriginIsolationRestricted
testGetter
} from "../resources/helpers.mjs";

promise_setup(async () => {
Expand All @@ -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");
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import {
insertIframe,
testSameAgentCluster,
testOriginIsolationRestricted
testGetter
} from "../resources/helpers.mjs";

promise_setup(async () => {
Expand All @@ -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");
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
insertIframe,
testSameAgentCluster,
testDifferentAgentClusters,
testOriginIsolationRestricted
testGetter
} from "../resources/helpers.mjs";

promise_setup(async () => {
Expand All @@ -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");
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
insertIframe,
testSameAgentCluster,
testDifferentAgentClusters,
testOriginIsolationRestricted
testGetter
} from "../resources/helpers.mjs";

promise_setup(async () => {
Expand All @@ -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");
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
insertIframe,
testSameAgentCluster,
testDifferentAgentClusters,
testOriginIsolationRestricted
testGetter
} from "../resources/helpers.mjs";

promise_setup(async () => {
Expand All @@ -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");
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
insertIframe,
testSameAgentCluster,
testDifferentAgentClusters,
testOriginIsolationRestricted
testGetter
} from "../resources/helpers.mjs";

promise_setup(async () => {
Expand All @@ -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");
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
insertIframe,
testSameAgentCluster,
testDifferentAgentClusters,
testOriginIsolationRestricted
testGetter
} from "../resources/helpers.mjs";

promise_setup(async () => {
Expand All @@ -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");
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
insertIframe,
testSameAgentCluster,
testDifferentAgentClusters,
testOriginIsolationRestricted
testGetter
} from "../resources/helpers.mjs";

promise_setup(async () => {
Expand All @@ -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");
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import {
insertIframe,
testDifferentAgentClusters,
testOriginIsolationRestricted
testGetter
} from "../resources/helpers.mjs";

promise_setup(async () => {
Expand All @@ -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");
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import {
insertIframe,
testDifferentAgentClusters,
testOriginIsolationRestricted
testGetter
} from "../resources/helpers.mjs";

promise_setup(async () => {
Expand All @@ -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");
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
insertIframe,
testSameAgentCluster,
testDifferentAgentClusters,
testOriginIsolationRestricted
testGetter
} from "../resources/helpers.mjs";

promise_setup(async () => {
Expand All @@ -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");
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
insertIframe,
testSameAgentCluster,
testDifferentAgentClusters,
testOriginIsolationRestricted
testGetter
} from "../resources/helpers.mjs";

promise_setup(async () => {
Expand All @@ -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");
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import {
insertIframe,
testDifferentAgentClusters,
testOriginIsolationRestricted
testGetter
} from "../resources/helpers.mjs";

promise_setup(async () => {
Expand All @@ -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");
</script>
Loading

0 comments on commit 95fd9c6

Please sign in to comment.