Commit 3187f5e6 authored by Domenic Denicola's avatar Domenic Denicola Committed by Chromium LUCI CQ

Origin-keyed agent clusters: update WPT for the rename

942aca88 performed the minimal updates
to the implementation and tests to shift from "origin isolation" to
"origin-keyed agent clusters". This is part of the followup work to
fully reflect the rename, in this case focused on the web platform
tests.

The majority of changes are comment and <title> changes, although some
assertion messages are also updated.

Note that instead of renaming the top-level directory, we move it under
html/, since the the specification is now part of the HTML Standard.

Bug: 1158853
Change-Id: I008bb0b5f8c1f943849dfa5fd24cfc99a552f4dd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2616819
Commit-Queue: Domenic Denicola <domenic@chromium.org>
Reviewed-by: default avatarJames MacLean <wjmaclean@chromium.org>
Cr-Commit-Position: refs/heads/master@{#842131}
parent fb3733fb
...@@ -25,5 +25,5 @@ crbug.com/956688 wpt_internal/js-self-profiling/* [ Skip ] ...@@ -25,5 +25,5 @@ crbug.com/956688 wpt_internal/js-self-profiling/* [ Skip ]
crbug.com/1106413 external/wpt/webmessaging/multi-globals/broadcastchannel-current.sub.html [ Failure ] crbug.com/1106413 external/wpt/webmessaging/multi-globals/broadcastchannel-current.sub.html [ Failure ]
crbug.com/1106413 external/wpt/webmessaging/multi-globals/broadcastchannel-incumbent.sub.html [ Failure ] crbug.com/1106413 external/wpt/webmessaging/multi-globals/broadcastchannel-incumbent.sub.html [ Failure ]
# Opt-in origin isolation is intentionally disabled with --disable-site-isolation-trials. # Opt-in origin-keying is intentionally disabled with --disable-site-isolation-trials.
virtual/no-auto-wpt-origin-isolation/external/wpt/origin-isolation/* [ Skip ] virtual/no-auto-wpt-origin-isolation/external/wpt/html/browsers/origin/origin-keyed-agent-clusters/* [ Skip ]
...@@ -1956,15 +1956,15 @@ crbug.com/669083 http/tests/security/frameNavigation/xss-DENIED-top-navigation-w ...@@ -1956,15 +1956,15 @@ crbug.com/669083 http/tests/security/frameNavigation/xss-DENIED-top-navigation-w
# 3) site isolation is enabled without also enabling # 3) site isolation is enabled without also enabling
# IsolatedCodeCache (tests disabled by the test expectation below). # IsolatedCodeCache (tests disabled by the test expectation below).
http/tests/devtools/isolated-code-cache/cross-origin-test.js [ Skip ] http/tests/devtools/isolated-code-cache/cross-origin-test.js [ Skip ]
# ----------------------- origin isolation ------------------------------ # ----------------------- origin-keyed agent clusters --------------------
# Origin isolation web platform tests are for the opt-in Origin Isolation # Origin-keyed agent clusters web platform tests are for the feature at
# feature at https://github.com/WICG/origin-isolation. It doesn't make sense to # https://html.spec.whatwg.org/#origin-keyed-agent-clusters. It doesn't make
# test that feature when web-platform.test domains are being forced into # sense to test that feature when web-platform.test domains are being forced
# origin-isolation mode. Note that since we also want coverage of this feature # into origin-isolation mode. Note that since we also want coverage of this
# with site isolation enabled, we use a different virtual test suite than # feature with site isolation enabled, we use a different virtual test suite
# not-site-per-process, named no-auto-wpt-origin-isolation. # than not-site-per-process, named no-auto-wpt-origin-isolation.
external/wpt/origin-isolation/* [ Skip ] external/wpt/html/browsers/origin/origin-keyed-agent-clusters/* [ Skip ]
virtual/no-auto-wpt-origin-isolation/external/wpt/origin-isolation/* [ Pass ] virtual/no-auto-wpt-origin-isolation/external/wpt/html/browsers/origin/origin-keyed-agent-clusters/* [ Pass ]
# ==== Tests incompatible with the default WPT Origin Isolation end here ==^^ # ==== Tests incompatible with the default WPT Origin Isolation end here ==^^
# Tests using testRunner.useUnfortunateSynchronousResizeMode occasionally fail on Win7, # Tests using testRunner.useUnfortunateSynchronousResizeMode occasionally fail on Win7,
......
...@@ -517,7 +517,7 @@ ...@@ -517,7 +517,7 @@
}, },
{ {
"prefix": "no-auto-wpt-origin-isolation", "prefix": "no-auto-wpt-origin-isolation",
"bases": ["external/wpt/origin-isolation"], "bases": ["external/wpt/html/browsers/origin/origin-keyed-agent-clusters"],
"args": ["--disable-auto-wpt-origin-isolation"] "args": ["--disable-auto-wpt-origin-isolation"]
}, },
{ {
......
<!DOCTYPE html> <!DOCTYPE html>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Parent is not isolated, child attempts to isolate but uses a bad header value, child is a subdomain of the parent</title> <title>Parent is site-keyed, child attempts to origin-key but uses a bad header value, child is a subdomain of the parent</title>
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
...@@ -19,7 +19,7 @@ for (const badValue of ["", "?0", "true", "\"?1\"", "1", "?2", "(?1)"]) { ...@@ -19,7 +19,7 @@ for (const badValue of ["", "?0", "true", "\"?1\"", "1", "?2", "(?1)"]) {
await insertIframe("{{hosts[][www]}}", badValue); await insertIframe("{{hosts[][www]}}", badValue);
}, `"${badValue}": frame insertion`); }, `"${badValue}": frame insertion`);
// Since the header values are bad there should be no isolation // Since the header values are bad they should be site-keyed.
testSameAgentCluster([self, frameIndex], `"${badValue}"`); testSameAgentCluster([self, frameIndex], `"${badValue}"`);
testGetter(frameIndex, false, `"${badValue}"`); testGetter(frameIndex, false, `"${badValue}"`);
++frameIndex; ++frameIndex;
......
<!DOCTYPE html> <!DOCTYPE html>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Parent is not isolated, child is isolated, child is different-origin to the parent because of a port mismatch</title> <title>Parent is site-keyed, child is origin-keyed, child is different-origin to the parent because of a port mismatch</title>
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
...@@ -17,8 +17,8 @@ promise_setup(async () => { ...@@ -17,8 +17,8 @@ promise_setup(async () => {
await insertIframe("{{hosts[][]}}:{{ports[https][1]}}", "?1"); await insertIframe("{{hosts[][]}}:{{ports[https][1]}}", "?1");
}); });
// Since they're different-origin, the child's isolation request is respected, // Since they're different-origin, the child's request is respected, so the
// so the parent ends up in the site-keyed agent cluster and the child in the // parent ends up in the site-keyed agent cluster and the child in the
// origin-keyed one. // origin-keyed one.
testDifferentAgentClusters([self, 0]); testDifferentAgentClusters([self, 0]);
......
<!DOCTYPE html> <!DOCTYPE html>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Parent is not isolated, child is isolated, child is same-origin to the parent</title> <title>Parent is site-keyed, child is origin-keyed, child is same-origin to the parent</title>
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
...@@ -17,8 +17,9 @@ promise_setup(async () => { ...@@ -17,8 +17,9 @@ promise_setup(async () => {
await insertIframe("{{hosts[][]}}", "?1"); await insertIframe("{{hosts[][]}}", "?1");
}); });
// Since they're same-origin, and the parent loaded without isolation, the // Since they're same-origin, and the parent loaded in the site-keyed agent
// child's request for isolation gets ignored, and both end up site-keyed. // cluster, the child's request for origin-keying gets ignored, and both end up
// site-keyed.
testSameAgentCluster([self, 0]); testSameAgentCluster([self, 0]);
testGetter(self, false, "parent"); testGetter(self, false, "parent");
......
<!DOCTYPE html> <!DOCTYPE html>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Parent is not isolated, child is reached via a redirect response with no header, child final response does have the header</title> <title>Parent is site-keyed, child is reached via a redirect response with no header, child final response does have the header</title>
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
...@@ -17,8 +17,8 @@ promise_setup(async () => { ...@@ -17,8 +17,8 @@ promise_setup(async () => {
await insertIframe("{{hosts[][www]}}", "?1", { redirectFirst: true }); await insertIframe("{{hosts[][www]}}", "?1", { redirectFirst: true });
}); });
// Since they're different-origin, the child's isolation request is respected, // Since they're different-origin, the child's request is respected, so the
// so the parent ends up in the site-keyed agent cluster and the child in the // parent ends up in the site-keyed agent cluster and the child in the
// origin-keyed one. // origin-keyed one.
testDifferentAgentClusters([self, 0]); testDifferentAgentClusters([self, 0]);
......
<!DOCTYPE html> <!DOCTYPE html>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Parent is not isolated, child is isolated, child is a subdomain of the parent</title> <title>Parent is site-keyed, child is origin-keyed, child is a subdomain of the parent</title>
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
...@@ -17,8 +17,8 @@ promise_setup(async () => { ...@@ -17,8 +17,8 @@ promise_setup(async () => {
await insertIframe("{{hosts[][www]}}", "?1"); await insertIframe("{{hosts[][www]}}", "?1");
}); });
// Since they're different-origin, the child's isolation request is respected, // Since they're different-origin, the child's request is respected, so the
// so the parent ends up in the site-keyed agent cluster and the child in the // parent ends up in the site-keyed agent cluster and the child in the
// origin-keyed one. // origin-keyed one.
testDifferentAgentClusters([self, 0]); testDifferentAgentClusters([self, 0]);
......
<!DOCTYPE html> <!DOCTYPE html>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Parent is not isolated, child is isolated using parameters on its structured header, child is a subdomain of the parent</title> <title>Parent is site-keyed, child is origin-keyed using parameters on its structured header, child is a subdomain of the parent</title>
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
...@@ -17,8 +17,8 @@ promise_setup(async () => { ...@@ -17,8 +17,8 @@ promise_setup(async () => {
await insertIframe("{{hosts[][www]}}", "?1;param1;param2=value2"); await insertIframe("{{hosts[][www]}}", "?1;param1;param2=value2");
}); });
// Since they're different-origin, the child's isolation request is respected, // Since they're different-origin, the child's request is respected, so the
// so the parent ends up in the site-keyed agent cluster and the child in the // parent ends up in the site-keyed agent cluster and the child in the
// origin-keyed one. // origin-keyed one.
testDifferentAgentClusters([self, 0]); testDifferentAgentClusters([self, 0]);
......
<!DOCTYPE html> <!DOCTYPE html>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Parent is isolated, child is not isolated, child is is different-origin to the parent because of a port mismatch</title> <title>Parent is origin-keyed, child is site-keyed, child is is different-origin to the parent because of a port mismatch</title>
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
...@@ -17,9 +17,9 @@ promise_setup(async () => { ...@@ -17,9 +17,9 @@ promise_setup(async () => {
await insertIframe("{{hosts[][]}}:{{ports[https][1]}}"); await insertIframe("{{hosts[][]}}:{{ports[https][1]}}");
}); });
// Since they're different-origin, the parent's isolation request is respected, // Since they're different-origin, the parent's request is respected, as is the
// as is the child's non-request. So the parent ends up in the origin-keyed // child's non-request. So the parent ends up in the origin-keyed agent cluster
// agent cluster and the child ends up in the site-keyed one. // and the child ends up in the site-keyed one.
testDifferentAgentClusters([self, 0]); testDifferentAgentClusters([self, 0]);
testGetter(self, true, "parent"); testGetter(self, true, "parent");
......
<!DOCTYPE html> <!DOCTYPE html>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Parent is isolated, child is not isolated, child is same-origin to the parent</title> <title>Parent is origin-keyed, child is site-keyed, child is same-origin to the parent</title>
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
...@@ -17,8 +17,8 @@ promise_setup(async () => { ...@@ -17,8 +17,8 @@ promise_setup(async () => {
await insertIframe("{{hosts[][]}}"); await insertIframe("{{hosts[][]}}");
}); });
// Since they're same-origin, and the parent loaded with isolation, the // Since they're same-origin, and the parent loaded with origin-keying, the
// child's non-request for isolation gets ignored, and both end up origin-keyed. // child's non-request gets ignored, and both end up origin-keyed.
testSameAgentCluster([self, 0]); testSameAgentCluster([self, 0]);
testGetter(self, true, "parent"); testGetter(self, true, "parent");
......
<!DOCTYPE html> <!DOCTYPE html>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Parent is isolated, child is not isolated, child is a subdomain of the parent</title> <title>Parent is origin-keyed, child is site-keyed, child is a subdomain of the parent</title>
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
...@@ -17,9 +17,9 @@ promise_setup(async () => { ...@@ -17,9 +17,9 @@ promise_setup(async () => {
await insertIframe("{{hosts[][www]}}"); await insertIframe("{{hosts[][www]}}");
}); });
// Since they're different-origin, the parent's isolation request is respected, // Since they're different-origin, the parent's request is respected, as is the
// as is the child's non-request. So the parent ends up in the origin-keyed // child's non-request. So the parent ends up in the origin-keyed agent cluster
// agent cluster and the child ends up in the site-keyed one. // and the child ends up in the site-keyed one.
testDifferentAgentClusters([self, 0]); testDifferentAgentClusters([self, 0]);
testGetter(self, true, "parent"); testGetter(self, true, "parent");
......
<!DOCTYPE html> <!DOCTYPE html>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Parent is isolated, child is not isolated, child is different-origin to the parent because of a port mismatch</title> <title>Parent is origin-keyed, child is site-keyed, child is different-origin to the parent because of a port mismatch</title>
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
...@@ -17,7 +17,7 @@ promise_setup(async () => { ...@@ -17,7 +17,7 @@ promise_setup(async () => {
await insertIframe("{{hosts[][]}}:{{ports[https][1]}}", "?1"); await insertIframe("{{hosts[][]}}:{{ports[https][1]}}", "?1");
}); });
// Both request isolation, so the parent ends up in one origin-keyed agent // Both request origin-keying, so the parent ends up in one origin-keyed agent
// cluster (the default port's origin), and the child ends up in a different // cluster (the default port's origin), and the child ends up in a different
// origin-keyed agent cluster (the other port's origin). // origin-keyed agent cluster (the other port's origin).
testDifferentAgentClusters([self, 0]); testDifferentAgentClusters([self, 0]);
......
<!DOCTYPE html> <!DOCTYPE html>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Parent is isolated, child is not isolated, child is same-origin to the parent</title> <title>Parent is origin-keyed, child is site-keyed, child is same-origin to the parent</title>
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
...@@ -17,8 +17,8 @@ promise_setup(async () => { ...@@ -17,8 +17,8 @@ promise_setup(async () => {
await insertIframe("{{hosts[][]}}", "?1"); await insertIframe("{{hosts[][]}}", "?1");
}); });
// Both request isolation, and they're same-origin, so they both end up in the // Both request origin-keying, and they're same-origin, so they both end up in
// same origin-keyed agent cluster. // the same origin-keyed agent cluster.
testSameAgentCluster([self, 0]); testSameAgentCluster([self, 0]);
testGetter(self, true, "parent"); testGetter(self, true, "parent");
......
<!DOCTYPE html> <!DOCTYPE html>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Parent is isolated, child is not isolated, child is a subdomain of the parent</title> <title>Parent is origin-keyed, child is site-keyed, child is a subdomain of the parent</title>
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
...@@ -17,7 +17,7 @@ promise_setup(async () => { ...@@ -17,7 +17,7 @@ promise_setup(async () => {
await insertIframe("{{hosts[][www]}}", "?1"); await insertIframe("{{hosts[][www]}}", "?1");
}); });
// Both request isolation, so the parent ends up in one origin-keyed agent // Both request origin-keying, so the parent ends up in one origin-keyed agent
// cluster (the base domain's origin), and the child ends up in a different // cluster (the base domain's origin), and the child ends up in a different
// origin-keyed agent cluster (the www subdomain's origin). // origin-keyed agent cluster (the www subdomain's origin).
testDifferentAgentClusters([self, 0]); testDifferentAgentClusters([self, 0]);
......
<!DOCTYPE html> <!DOCTYPE html>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Parent is not isolated, subdomain child 1 is not isolated, same-subdomain child 2 is isolated</title> <title>Parent is site-keyed, subdomain child 1 is site-keyed, same-subdomain child 2 is origin-keyed</title>
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
...@@ -14,15 +14,15 @@ import { ...@@ -14,15 +14,15 @@ import {
} from "../resources/helpers.mjs"; } from "../resources/helpers.mjs";
promise_setup(async () => { promise_setup(async () => {
// Must be sequential, not parallel: the non-isolated frame must load first. // Must be sequential, not parallel: the site-keyed frame must load first.
await insertIframe("{{hosts[][www]}}"); await insertIframe("{{hosts[][www]}}");
await insertIframe("{{hosts[][www]}}", "?1"); await insertIframe("{{hosts[][www]}}", "?1");
}); });
// Since they're different-origin, the parent's isolation non-request is // Since they're different-origin, the parent's non-request is respected, as is
// respected, as is child 1's non-request. child 2 requests isolation // child 1's non-request. child 2 requests origin-keying but is ignored, since
// but is ignored, since child 1 is in the same browsing context group. // child 1 is in the same browsing context group.
// //
// So, everyone ends up in the site-keyed agent cluster. // So, everyone ends up in the site-keyed agent cluster.
testSameAgentCluster([self, 0], "Parent to child1"); testSameAgentCluster([self, 0], "Parent to child1");
......
<!DOCTYPE html> <!DOCTYPE html>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Parent is not isolated, subdomain child 1 is not isolated, different-port-same-subdomain child 2 is isolated</title> <title>Parent is site-keyed, subdomain child 1 is site-keyed, different-port-same-subdomain child 2 is origin-keyed</title>
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
......
<!DOCTYPE html> <!DOCTYPE html>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Parent is not isolated, subdomain child 1 is not isolated, different-subdomain child 2 is isolated</title> <title>Parent is site-keyed, subdomain child 1 is site-keyed, different-subdomain child 2 is origin-keyed</title>
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
......
<!DOCTYPE html> <!DOCTYPE html>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Parent is not isolated, subdomain child 1 is isolated, non-subdomain but different-port child 2 is not isolated</title> <title>Parent is site-keyed, subdomain child 1 is origin-keyed, non-subdomain but different-port child 2 is site-keyed</title>
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
......
<!DOCTYPE html> <!DOCTYPE html>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Parent is not isolated, subdomain child 1 is isolated, same-subdomain child 2 is not isolated</title> <title>Parent is site-keyed, subdomain child 1 is origin-keyed, same-subdomain child 2 is site-keyed</title>
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
...@@ -15,15 +15,15 @@ import { ...@@ -15,15 +15,15 @@ import {
} from "../resources/helpers.mjs"; } from "../resources/helpers.mjs";
promise_setup(async () => { promise_setup(async () => {
// Must be sequential, not parallel: the isolated frame must load first. // Must be sequential, not parallel: the origin-keyed frame must load first.
await insertIframe("{{hosts[][www]}}", "?1"); await insertIframe("{{hosts[][www]}}", "?1");
await insertIframe("{{hosts[][www]}}"); await insertIframe("{{hosts[][www]}}");
}); });
// Since they're different-origin, the parent's isolation non-request is // Since they're different-origin, the parent's non-request is respected, as is
// respected, as is child 1's request. child 2's non-request is // child 1's request. child 2's non-request is ignored, since child 1 is in the
// ignored, since child 1 is in the same browsing context group. // same browsing context group.
// //
// So, the parent ends up in the site-keyed agent cluster, and both children end // So, the parent ends up in the site-keyed agent cluster, and both children end
// up in an origin-keyed agent cluster. // up in an origin-keyed agent cluster.
......
<!DOCTYPE html> <!DOCTYPE html>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Parent is isolated, subdomain child 1 is not isolated, same-subdomain child 2 is not isolated</title> <title>Parent is origin-keyed, subdomain child 1 is site-keyed, same-subdomain child 2 is site-keyed</title>
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
......
<!DOCTYPE html> <!DOCTYPE html>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Parent is isolated, subdomain child 1 is not isolated, different-subdomain child 2 is not isolated</title> <title>Parent is origin-keyed, subdomain child 1 is site-keyed, different-subdomain child 2 is site-keyed</title>
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
......
<!DOCTYPE html> <!DOCTYPE html>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Parent is isolated, subdomain child 1 is not isolated, same-subdomain child 2 is isolated</title> <title>Parent is origin-keyed, subdomain child 1 is site-keyed, same-subdomain child 2 is origin-keyed</title>
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
...@@ -21,9 +21,9 @@ promise_setup(async () => { ...@@ -21,9 +21,9 @@ promise_setup(async () => {
}); });
// Since they're different-origin, the parent's isolation request is respected, // Since they're different-origin, the parent's request is respected, as is
// as is child 1's non-request. child 2 requests isolation but is // child 1's non-request. child 2 requests origin-keying but is ignored, since
// ignored, since child 1 is in the same browsing context group. // child 1 is in the same browsing context group.
// //
// So, the parent ends up in the origin-keyed agent cluster, and both children // So, the parent ends up in the origin-keyed agent cluster, and both children
// ends up in the site-keyed one. // ends up in the site-keyed one.
......
<!DOCTYPE html> <!DOCTYPE html>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Parent is isolated, subdomain child 1 is not isolated, different-subdomain child 2 is isolated</title> <title>Parent is origin-keyed, subdomain child 1 is site-keyed, different-subdomain child 2 is origin-keyed</title>
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
......
<!DOCTYPE html> <!DOCTYPE html>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Parent is isolated, subdomain child 1 is not isolated, different-port-same-subdomain child 2 is isolated</title> <title>Parent is origin-keyed, subdomain child 1 is site-keyed, different-port-same-subdomain child 2 is origin-keyed</title>
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
......
<!DOCTYPE html> <!DOCTYPE html>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Parent is isolated, subdomain child 1 is isolated, non-subdomain but different-port child 2 is not isolated</title> <title>Parent is origin-keyed, subdomain child 1 is origin-keyed, non-subdomain but different-port child 2 is site-keyed</title>
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
......
<!DOCTYPE html> <!DOCTYPE html>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Parent is isolated, subdomain child 1 is isolated, same-subdomain child 2 is not isolated</title> <title>Parent is origin-keyed, subdomain child 1 is origin-keyed, same-subdomain child 2 is site-keyed</title>
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
...@@ -15,15 +15,15 @@ import { ...@@ -15,15 +15,15 @@ import {
} from "../resources/helpers.mjs"; } from "../resources/helpers.mjs";
promise_setup(async () => { promise_setup(async () => {
// Must be sequential, not parallel: the isolated frame must load first. // Must be sequential, not parallel: the origin-keyed frame must load first.
await insertIframe("{{hosts[][www]}}", "?1"); await insertIframe("{{hosts[][www]}}", "?1");
await insertIframe("{{hosts[][www]}}"); await insertIframe("{{hosts[][www]}}");
}); });
// Since they're different-origin, the parent's isolation request is respected, // Since they're different-origin, the parent's request is respected, as is
// as is child 1's request. child 2's non-request is ignored, since // child 1's request. child 2's non-request is ignored, since child 1 is in the
// child 1 is in the same browsing context group. // same browsing context group.
// //
// So, the parent ends up in the origin-keyed agent cluster, and both children // So, the parent ends up in the origin-keyed agent cluster, and both children
// ends up in a different origin-keyed agent cluster. // ends up in a different origin-keyed agent cluster.
......
<!DOCTYPE html> <!DOCTYPE html>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Parent is isolated, subdomain child 1 is isolated, same-subdomain child 2 is not isolated</title> <title>Parent is origin-keyed, subdomain child 1 is origin-keyed, same-subdomain child 2 is site-keyed</title>
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
...@@ -22,9 +22,9 @@ promise_setup(async () => { ...@@ -22,9 +22,9 @@ promise_setup(async () => {
}); });
// Since they're different-origin, the parent's isolation request is respected, // Since they're different-origin, the parent's request is respected, as is
// as is child 1's request. child 2's request is redundant, since // child 1's request. child 2's request is redundant, since child 1 is in the
// child 1 is in the same browsing context group. // same browsing context group.
// //
// So, the parent ends up in the origin-keyed agent cluster, and both children // So, the parent ends up in the origin-keyed agent cluster, and both children
// ends up in a different origin-keyed agent cluster. // ends up in a different origin-keyed agent cluster.
......
<!DOCTYPE html> <!DOCTYPE html>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Parent is isolated, subdomain child 1 is isolated, different-subdomain child 2 is isolated</title> <title>Parent is origin-keyed, subdomain child 1 is origin-keyed, different-subdomain child 2 is origin-keyed</title>
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
......
<!DOCTYPE html> <!DOCTYPE html>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Parent is isolated, subdomain child 1 is isolated, different-port-same-subdomain child 2 is isolated</title> <title>Parent is origin-keyed, subdomain child 1 is origin-keyed, different-port-same-subdomain child 2 is origin-keyed</title>
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
......
spec: https://github.com/WICG/origin-isolation spec: https://html.spec.whatwg.org/multipage/#origin-keyed-agent-clusters
suggested_reviewers: suggested_reviewers:
- domenic - domenic
- annevk - annevk
......
# Origin isolation tests # Origin-keyed agent clusters tests
These tests are for the proposal at These are tests for the [origin-keyed agent clusters](https://html.spec.whatwg.org/multipage/origin.html#origin-keyed-agent-clusters)
[WICG/origin-isolation](https://github.com/WICG/origin-isolation). They should feature.
eventually move into a subdirectory of `html/` if/when that proposal merges into
the HTML Standard.
TODO: in [whatwg/html#6214](https://github.com/whatwg/html/pull/6214), the
header was renamed from `Origin-Isolation` to `Origin-Agent-Cluster`, and the
getter was renamed from `window.originIsolated` to `window.originAgentCluster`.
The tests reflect this in their expectations, but all their messaging, names,
and even the name of this folder, do not yet reflect it. That work is being
tracked in <https://crbug.com/1157917>.
## Test filenames ## Test filenames
...@@ -22,7 +13,8 @@ parent-[yes|no]-child1-[yes|no]-[designator]-child2-[yes|no]-[designator] ...@@ -22,7 +13,8 @@ parent-[yes|no]-child1-[yes|no]-[designator]-child2-[yes|no]-[designator]
Here: Here:
* `yes` or `no` refers to whether the `Origin-Isolation` header is set or unset. * `yes` or `no` refers to whether the `Origin-Agent-Cluster` header is set or
unset.
* `designator` explains how the child differs from the parent: e.g. by being a * `designator` explains how the child differs from the parent: e.g. by being a
subdomain, or having a different port, or both. There's also `same` if it's subdomain, or having a different port, or both. There's also `same` if it's
same-origin. same-origin.
......
<!DOCTYPE html> <!DOCTYPE html>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Setting document.domain does not change same-originness</title> <title>Setting document.domain does not change same-originness when origin-keyed</title>
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
<!-- <!--
Other tests check that using document.domain doesn't allow cross-origin Other tests check that using document.domain doesn't allow cross-origin
access. This test ensures a different, more subtle property: that origin access. This test ensures a different, more subtle property: that
isolation makes document.domain into a no-op in other ways. origin-keying makes document.domain into a no-op in other ways.
--> -->
<iframe src="resources/frame.html"></iframe> <iframe src="resources/frame.html"></iframe>
<iframe src="//{{domains[www1]}}:{{location[port]}}/origin-isolation/resources/frame.html"></iframe> <iframe src="//{{domains[www1]}}:{{location[port]}}/html/browsers/origin/origin-keyed-agent-clusters/resources/frame.html"></iframe>
<script type="module"> <script type="module">
setup({ explicit_done: true }); setup({ explicit_done: true });
...@@ -23,8 +23,8 @@ window.onload = () => { ...@@ -23,8 +23,8 @@ window.onload = () => {
// the two would then be considered cross-origin. // the two would then be considered cross-origin.
document.domain = document.domain; document.domain = document.domain;
// However, because we're using origin isolation, this shouldn't have any // However, because we're origin-keyed, this shouldn't have any impact. The
// impact. The test fails if this throws, and passes if it succeeds. // test fails if this throws, and passes if it succeeds.
frames[0].document; frames[0].document;
}, "Setting document.domain must not change same-originness"); }, "Setting document.domain must not change same-originness");
...@@ -44,7 +44,7 @@ window.onload = () => { ...@@ -44,7 +44,7 @@ window.onload = () => {
assert_equals(e.data.type, "new document.domain"); assert_equals(e.data.type, "new document.domain");
assert_equals(e.data.result, "{{domains[www1]}}"); assert_equals(e.data.result, "{{domains[www1]}}");
}); });
}, "Having an origin-isolated subdomain child try to set document.domain " + }, "Having an origin-keyed subdomain child try to set document.domain " +
"must not change the document.domain value it sees"); "must not change the document.domain value it sees");
done(); done();
......
<!DOCTYPE html> <!DOCTYPE html>
<meta charset="utf-8"> <meta charset="utf-8">
<title>window.originIsolated for a top-level frame sandboxed by CSP with no Origin-Isolation header</title> <title>window.originAgentCluster for a top-level frame sandboxed by CSP with no Origin-Agent-Cluster header</title>
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
...@@ -10,6 +10,6 @@ ...@@ -10,6 +10,6 @@
import { testGetter } from "../resources/helpers.mjs"; import { testGetter } from "../resources/helpers.mjs";
// Even without the header, sandboxing makes this page have an opaque origin, // Even without the header, sandboxing makes this page have an opaque origin,
// so it is origin-isolated. // so it is origin-keyed.
testGetter(self, true); testGetter(self, true);
</script> </script>
<!DOCTYPE html> <!DOCTYPE html>
<meta charset="utf-8"> <meta charset="utf-8">
<title>window.originIsolated for a top-level frame sandboxed by CSP with an Origin-Isolation header</title> <title>window.originAgentCluster for a top-level frame sandboxed by CSP with an Origin-Agent-Cluster header</title>
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<script type="module"> <script type="module">
import { testGetter } from "../resources/helpers.mjs"; import { testGetter } from "../resources/helpers.mjs";
// We're definitely origin-isolated: both the CSP sandboxing and the // We're definitely origin-keyed: both the CSP sandboxing and the
// Origin-Isolation header should ensure this. // Origin-Agent-Cluster header should ensure this.
testGetter(self, true); testGetter(self, true);
</script> </script>
<!DOCTYPE html> <!DOCTYPE html>
<meta charset="utf-8"> <meta charset="utf-8">
<title>window.originIsolated for a javascript: URL navigated to from a data: URL on a non-isolated page</title> <title>window.originAgentCluster for a javascript: URL navigated to from a data: URL on a site-keyed page</title>
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
......
<!DOCTYPE html> <!DOCTYPE html>
<meta charset="utf-8"> <meta charset="utf-8">
<title>window.originIsolated for a javascript: URL navigated to from a data: URL on an isolated page</title> <title>window.originAgentCluster for a javascript: URL navigated to from a data: URL on an origin-keyed page</title>
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
......
<!DOCTYPE html> <!DOCTYPE html>
<meta charset="utf-8"> <meta charset="utf-8">
<title>window.originIsolated for a data: URL on a non-isolated page</title> <title>window.originAgentCluster for a data: URL on a site-keyed page</title>
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
......
<!DOCTYPE html> <!DOCTYPE html>
<meta charset="utf-8"> <meta charset="utf-8">
<title>window.originIsolationRestricted for a data: URL on an isolated page</title> <title>window.originAgentCluster for a data: URL on an origin-keyed page</title>
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
......
<!DOCTYPE html> <!DOCTYPE html>
<meta charset="utf-8"> <meta charset="utf-8">
<title>window.originIsolated for a javascript: URL on a non-isolated page</title> <title>window.originAgentCluster for a javascript: URL on a site-keyed page</title>
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
......
<!DOCTYPE html> <!DOCTYPE html>
<meta charset="utf-8"> <meta charset="utf-8">
<title>window.originIsolated for a javascript: URL on an isolated page</title> <title>window.originAgentCluster for a javascript: URL on an origin-keyed page</title>
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
......
<!DOCTYPE html> <!DOCTYPE html>
<meta charset="utf-8"> <meta charset="utf-8">
<title>window.originIsolated for a removed frame</title> <title>window.originAgentCluster for a removed frame</title>
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
...@@ -23,5 +23,5 @@ promise_test(async () => { ...@@ -23,5 +23,5 @@ promise_test(async () => {
assert_equals(frameWindow.originAgentCluster, true, "before"); assert_equals(frameWindow.originAgentCluster, true, "before");
iframe.remove(); iframe.remove();
assert_equals(frameWindow.originAgentCluster, true, "after"); assert_equals(frameWindow.originAgentCluster, true, "after");
}, "Removing the iframe does not change originIsolated"); }, "Removing the iframe does not change originAgentCluster");
</script> </script>
...@@ -7,7 +7,7 @@ export default () => { ...@@ -7,7 +7,7 @@ export default () => {
}); });
// The data: URL iframe has an opaque origin, so it should return true, since // The data: URL iframe has an opaque origin, so it should return true, since
// for them site === origin so they are always "origin-isolated". // for them site === origin so they are always origin-keyed.
testGetter(0, true, "data: URL child"); testGetter(0, true, "data: URL child");
}; };
import { waitForIframe } from "../../resources/helpers.mjs"; import { waitForIframe } from "../../resources/helpers.mjs";
/** /**
* Inserts an iframe, not specialized for origin-isolation testing, pointing to * Inserts an iframe, not specialized for origin-keyed agent cluster testing,
* a custom URL. This is just a wrapper to remove some boilerplate. * pointing to a custom URL. This is just a wrapper to remove some boilerplate.
* @param {string} src - The src="" value for the iframe * @param {string} src - The src="" value for the iframe
*/ */
export async function insertCustomIframe(src) { export async function insertCustomIframe(src) {
...@@ -17,8 +17,7 @@ export async function insertCustomIframe(src) { ...@@ -17,8 +17,7 @@ export async function insertCustomIframe(src) {
} }
/** /**
* This is the part of send-origin-isolation-header.py that allows * This is the part of send-oac-header.py that allows us to reuse testGetter.
* us to reuse testGetter.
*/ */
export const testSupportScript = ` export const testSupportScript = `
<script> <script>
......
...@@ -15,6 +15,6 @@ export default () => { ...@@ -15,6 +15,6 @@ export default () => {
}); });
// Sandboxed iframes have an opaque origin, so it should return true, since // Sandboxed iframes have an opaque origin, so it should return true, since
// for them site === origin so they are always "origin-isolated". // for them site === origin so they are always origin-keyed.
testGetter(0, true); testGetter(0, true);
}; };
<!DOCTYPE html> <!DOCTYPE html>
<meta charset="utf-8"> <meta charset="utf-8">
<title>window.originIsolated for a sandboxed iframe on a non-isolated page</title> <title>window.originAgentCluster for a sandboxed iframe on a site-keyed page</title>
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
......
<!DOCTYPE html> <!DOCTYPE html>
<meta charset="utf-8"> <meta charset="utf-8">
<title>window.originIsolated for a sandboxed iframe on an isolated page</title> <title>window.originAgentCluster for a sandboxed iframe on an origin-keyed page</title>
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
......
<!DOCTYPE html> <!DOCTYPE html>
<meta charset="utf-8"> <meta charset="utf-8">
<title>window.originIsolated for a sandboxed, but same-origin, iframe on a non-isolated page</title> <title>window.originAgentCluster for a sandboxed, but same-origin, iframe on a site-keyed page</title>
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
......
<!DOCTYPE html> <!DOCTYPE html>
<meta charset="utf-8"> <meta charset="utf-8">
<title>window.originIsolated for a sandboxed, but same-origin, iframe on an isolated page</title> <title>window.originAgentCluster for a sandboxed, but same-origin, iframe on an origin-keyed page</title>
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
......
<!DOCTYPE html> <!DOCTYPE html>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Parent is isolated, child1 is not isolated, child1 navigates to a different site, child2 gets inserted and is isolated, child1 navigates back</title> <title>Parent is origin-keyed, child1 is site-keyed, child1 navigates to a different site, child2 gets inserted and is origin-keyed, child1 navigates back</title>
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
...@@ -21,9 +21,9 @@ promise_setup(async () => { ...@@ -21,9 +21,9 @@ promise_setup(async () => {
frame1 = await insertIframe("{{hosts[][www]}}"); frame1 = await insertIframe("{{hosts[][www]}}");
}); });
// Since they're different-origin, the parent's isolation request is respected, // Since they're different-origin, the parent's origin-keying request is
// as is the child's non-request. So the parent ends up in the origin-keyed // respected, as is the child's non-request. So the parent ends up in the
// agent cluster and the child ends up in the site-keyed one. // origin-keyed agent cluster and the child ends up in the site-keyed one.
testDifferentAgentClusters([self, 0], "Before navigation: parent to child1"); testDifferentAgentClusters([self, 0], "Before navigation: parent to child1");
// Navigate the iframe to a different site. These, of course, must not be in the // Navigate the iframe to a different site. These, of course, must not be in the
...@@ -34,7 +34,7 @@ promise_test(async () => { ...@@ -34,7 +34,7 @@ promise_test(async () => {
}, "Navigation"); }, "Navigation");
// Now insert a second iframe, pointing to the same place as the first one // Now insert a second iframe, pointing to the same place as the first one
// originally did, but this time with origin isolation enabled. Because of the // originally did, but this time with origin-keying requested. Because of the
// historical map of agent cluster keys for the browsing context group, the new // historical map of agent cluster keys for the browsing context group, the new
// iframe should still end up in the site-keyed agent cluster. // iframe should still end up in the site-keyed agent cluster.
...@@ -45,7 +45,7 @@ promise_test(async () => { ...@@ -45,7 +45,7 @@ promise_test(async () => {
testDifferentAgentClusters([self, 1], "After navigation: parent to child2"); testDifferentAgentClusters([self, 1], "After navigation: parent to child2");
// Now navigate the first iframe back. The resulting Document should be put in // Now navigate the first iframe back. The resulting Document should be put in
// the site agent cluster, together with the second iframe's Document. // the site-keyed agent cluster, together with the second iframe's Document.
promise_test(async () => { promise_test(async () => {
const waitPromise = waitForIframe(frame1); const waitPromise = waitForIframe(frame1);
......
<!DOCTYPE html> <!DOCTYPE html>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Parent is not isolated, navigate a frame from same-origin non-isolated to different-origin (different-port) isolated</title> <title>Parent is site-keyed, navigate a frame from same-origin site-keyed to different-origin (different-port) origin-keyed</title>
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
...@@ -21,7 +21,7 @@ promise_setup(async () => { ...@@ -21,7 +21,7 @@ promise_setup(async () => {
frame1 = await insertIframe("{{hosts[][]}}"); frame1 = await insertIframe("{{hosts[][]}}");
}); });
// Nobody requested isolation yet. // Nobody requested origin-keying yet.
testSameAgentCluster([self, 0], "Before: parent to child"); testSameAgentCluster([self, 0], "Before: parent to child");
testGetter(self, false, "before parent"); testGetter(self, false, "before parent");
...@@ -32,7 +32,8 @@ promise_test(async () => { ...@@ -32,7 +32,8 @@ promise_test(async () => {
await setBothDocumentDomains(frames[0]); await setBothDocumentDomains(frames[0]);
}, "Navigation"); }, "Navigation");
// Since the new page is different-origin, it should be isolated. // Since the new page is different-origin, its origin-keying request should be
// respected.
testDifferentAgentClusters([self, 0], "After: parent to child"); testDifferentAgentClusters([self, 0], "After: parent to child");
testGetter(self, false, "after parent"); testGetter(self, false, "after parent");
......
<!DOCTYPE html> <!DOCTYPE html>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Parent is not isolated, navigate a frame from same-origin non-isolated to different-origin (subdomain) isolated</title> <title>Parent is site-keyed, navigate a frame from same-origin site-keyed to different-origin (subdomain) origin-keyed</title>
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
...@@ -21,7 +21,7 @@ promise_setup(async () => { ...@@ -21,7 +21,7 @@ promise_setup(async () => {
frame1 = await insertIframe("{{hosts[][]}}"); frame1 = await insertIframe("{{hosts[][]}}");
}); });
// Nobody requested isolation yet. // Nobody requested origin-keying yet.
testSameAgentCluster([self, 0], "Before: parent to child"); testSameAgentCluster([self, 0], "Before: parent to child");
testGetter(self, false, "before parent"); testGetter(self, false, "before parent");
...@@ -32,7 +32,8 @@ promise_test(async () => { ...@@ -32,7 +32,8 @@ promise_test(async () => {
await setBothDocumentDomains(frames[0]); await setBothDocumentDomains(frames[0]);
}, "Navigation"); }, "Navigation");
// Since the new page is different-origin, it should be isolated. // Since the new page is different-origin, its origin-keying request should be
// respected.
testDifferentAgentClusters([self, 0], "After: parent to child"); testDifferentAgentClusters([self, 0], "After: parent to child");
testGetter(self, false, "after parent"); testGetter(self, false, "after parent");
......
<!DOCTYPE html> <!DOCTYPE html>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Parent is not isolated, navigate a frame from a subdomain non-isolated to the same subdomain isolated</title> <title>Parent is site-keyed, navigate a frame from a subdomain site-keyed to the same subdomain origin-keyed</title>
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
...@@ -20,7 +20,7 @@ promise_setup(async () => { ...@@ -20,7 +20,7 @@ promise_setup(async () => {
frame1 = await insertIframe("{{hosts[][www]}}"); frame1 = await insertIframe("{{hosts[][www]}}");
}); });
// Nobody requested isolation yet. // Nobody requested origin-keying yet.
testSameAgentCluster([self, 0], "Before: parent to child"); testSameAgentCluster([self, 0], "Before: parent to child");
testGetter(self, false, "before parent"); testGetter(self, false, "before parent");
...@@ -31,8 +31,8 @@ promise_test(async () => { ...@@ -31,8 +31,8 @@ promise_test(async () => {
await setBothDocumentDomains(frames[0]); await setBothDocumentDomains(frames[0]);
}, "Navigation"); }, "Navigation");
// Because this subdomain was previously non-isolated, the second load's // Because this subdomain was previously site-keyed, the second load's
// isolation request is ignored; instead we continue isolating. // origin-keying request is ignored; instead we continue with site-keying.
testSameAgentCluster([self, 0], "After: parent to child"); testSameAgentCluster([self, 0], "After: parent to child");
testGetter(self, false, "after parent"); testGetter(self, false, "after parent");
......
<!DOCTYPE html> <!DOCTYPE html>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Parent is not isolated, navigate a frame from a subdomain non-isolated to a second-subdomain isolated</title> <title>Parent is site-keyed, navigate a frame from a subdomain site-keyed to a second-subdomain origin-keyed</title>
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
...@@ -21,7 +21,7 @@ promise_setup(async () => { ...@@ -21,7 +21,7 @@ promise_setup(async () => {
frame1 = await insertIframe("{{hosts[][www]}}"); frame1 = await insertIframe("{{hosts[][www]}}");
}); });
// Nobody requested isolation yet. // Nobody requested origin-keying yet.
testSameAgentCluster([self, 0], "Before: parent to child"); testSameAgentCluster([self, 0], "Before: parent to child");
testGetter(self, false, "before parent"); testGetter(self, false, "before parent");
...@@ -33,7 +33,7 @@ promise_test(async () => { ...@@ -33,7 +33,7 @@ promise_test(async () => {
}, "Navigation"); }, "Navigation");
// Because we're going to a different subdomain (and thus different origin), the // Because we're going to a different subdomain (and thus different origin), the
// isolation request is respected. // origin-keying request is respected.
testDifferentAgentClusters([self, 0], "After: parent to child"); testDifferentAgentClusters([self, 0], "After: parent to child");
testGetter(self, false, "after parent"); testGetter(self, false, "after parent");
......
<!DOCTYPE html> <!DOCTYPE html>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Parent is not isolated, navigate a frame from a subdomain isolated to a second-subdomain non-isolated</title> <title>Parent is site-keyed, navigate a frame from a subdomain origin-keyed to a second-subdomain site-keyed</title>
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
...@@ -21,7 +21,8 @@ promise_setup(async () => { ...@@ -21,7 +21,8 @@ promise_setup(async () => {
frame1 = await insertIframe("{{hosts[][www]}}", "?1"); frame1 = await insertIframe("{{hosts[][www]}}", "?1");
}); });
// Since they are different-origin, the child's isolation request is respected. // Since they are different-origin, the child's origin-keying request is
// respected.
testDifferentAgentClusters([self, 0], "Before: parent to child"); testDifferentAgentClusters([self, 0], "Before: parent to child");
testGetter(self, false, "before parent"); testGetter(self, false, "before parent");
...@@ -32,8 +33,9 @@ promise_test(async () => { ...@@ -32,8 +33,9 @@ promise_test(async () => {
await setBothDocumentDomains(frames[0]); await setBothDocumentDomains(frames[0]);
}, "Navigation"); }, "Navigation");
// Make sure that the different-subdomain page (which doesn't request isolation) // Make sure that the different-subdomain page (which doesn't request
// doesn't somehow get isolated just because its predecessor was. // origin-keying) doesn't somehow get origin-keyed just because its predecessor
// was.
testSameAgentCluster([self, 0], "After: parent to child"); testSameAgentCluster([self, 0], "After: parent to child");
testGetter(self, false, "after parent"); testGetter(self, false, "after parent");
......
<!DOCTYPE html> <!DOCTYPE html>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Parent is not isolated, navigate a frame from a subdomain isolated to the same subdomain non-isolated</title> <title>Parent is site-keyed, navigate a frame from a subdomain origin-keyed to the same subdomain site-keyed</title>
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
...@@ -20,7 +20,8 @@ promise_setup(async () => { ...@@ -20,7 +20,8 @@ promise_setup(async () => {
frame1 = await insertIframe("{{hosts[][www]}}", "?1"); frame1 = await insertIframe("{{hosts[][www]}}", "?1");
}); });
// Since they are different-origin, the child's isolation request is respected. // Since they are different-origin, the child's origin-keying request is
// respected.
testDifferentAgentClusters([self, 0], "Before: parent to child"); testDifferentAgentClusters([self, 0], "Before: parent to child");
testGetter(self, false, "before parent"); testGetter(self, false, "before parent");
...@@ -31,8 +32,8 @@ promise_test(async () => { ...@@ -31,8 +32,8 @@ promise_test(async () => {
await setBothDocumentDomains(frames[0]); await setBothDocumentDomains(frames[0]);
}, "Navigation"); }, "Navigation");
// Because this subdomain was previously isolated, the second load's // Because this subdomain was previously origin-keyed, the second load's
// non-isolation request is ignored; instead we continue isolating. // non-request is ignored; instead we continue origin-keying.
testDifferentAgentClusters([self, 0], "After: parent to child"); testDifferentAgentClusters([self, 0], "After: parent to child");
testGetter(self, false, "after parent"); testGetter(self, false, "after parent");
......
<!DOCTYPE html> <!DOCTYPE html>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Parent is isolated, navigate a frame from same-origin non-isolated to different-origin (different-port) isolated</title> <title>Parent is origin-keyed, navigate a frame from same-origin site-keyed to different-origin (different-port) origin-keyed</title>
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
...@@ -21,8 +21,8 @@ promise_setup(async () => { ...@@ -21,8 +21,8 @@ promise_setup(async () => {
frame1 = await insertIframe("{{hosts[][]}}"); frame1 = await insertIframe("{{hosts[][]}}");
}); });
// Since the parent is isolated, the same-origin child's non-request is ignored, // Since the parent is origin-keyed, the same-origin child's non-request is
// so it gets isolated too. // ignored, so it gets origin-keyed too.
testSameAgentCluster([self, 0], "Before: parent to child"); testSameAgentCluster([self, 0], "Before: parent to child");
testGetter(self, true, "before parent"); testGetter(self, true, "before parent");
......
<!DOCTYPE html> <!DOCTYPE html>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Parent is isolated, navigate a frame from same-origin non-isolated to different-origin (subdomain) isolated</title> <title>Parent is origin-keyed, navigate a frame from same-origin site-keyed to different-origin (subdomain) origin-keyed</title>
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
...@@ -21,8 +21,8 @@ promise_setup(async () => { ...@@ -21,8 +21,8 @@ promise_setup(async () => {
frame1 = await insertIframe("{{hosts[][]}}"); frame1 = await insertIframe("{{hosts[][]}}");
}); });
// Since the parent is isolated, the same-origin child's non-request is ignored, // Since the parent is origin-keyed, the same-origin child's non-request is
// so it gets isolated too. // ignored, so it gets origin-keyed too.
testSameAgentCluster([self, 0], "Before: parent to child"); testSameAgentCluster([self, 0], "Before: parent to child");
testGetter(self, true, "before parent"); testGetter(self, true, "before parent");
......
<!DOCTYPE html> <!DOCTYPE html>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Parent requests isolation, child requests isolation, child is a subdomain of the parent, but all over insecure HTTP</title> <title>Parent requests origin-keying, child requests origin-keying, child is a subdomain of the parent, but all over insecure HTTP</title>
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
...@@ -17,7 +17,7 @@ promise_setup(async () => { ...@@ -17,7 +17,7 @@ promise_setup(async () => {
await insertIframe("{{hosts[][www]}}", "?1"); await insertIframe("{{hosts[][www]}}", "?1");
}); });
// All isolation requests are ignored, since this is over insecure HTTP. // All origin-keying requests are ignored, since this is over insecure HTTP.
// So both end up in the site-keyed agent cluster. // So both end up in the site-keyed agent cluster.
testSameAgentCluster([self, 0]); testSameAgentCluster([self, 0]);
......
<!DOCTYPE html> <!DOCTYPE html>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Opener is not isolated, openee is isolated, openee is different-origin to the opener because of a port mismatch</title> <title>Opener is site-keyed, openee is origin-keyed, openee is different-origin to the opener because of a port mismatch</title>
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
...@@ -18,9 +18,9 @@ promise_setup(async () => { ...@@ -18,9 +18,9 @@ promise_setup(async () => {
openee = await openWindow("{{hosts[][]}}:{{ports[https][1]}}", "?1"); openee = await openWindow("{{hosts[][]}}:{{ports[https][1]}}", "?1");
}); });
// Since they're different-origin, the openee's isolation request is respected, // Since they're different-origin, the openee's origin-keying request is
// so the opener ends up in the site-keyed agent cluster and the openee in the // respected, so the opener ends up in the site-keyed agent cluster and the
// origin-keyed one. // openee in the origin-keyed one.
testOpenedWindowIsInADifferentAgentCluster(() => openee); testOpenedWindowIsInADifferentAgentCluster(() => openee);
testGetter(self, false, "opener"); testGetter(self, false, "opener");
......
<!DOCTYPE html> <!DOCTYPE html>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Opener is not isolated, openee is isolated, openee is same-origin to the opener</title> <title>Opener is site-keyed, openee is origin-keyed, openee is same-origin to the opener</title>
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
...@@ -18,8 +18,8 @@ promise_setup(async () => { ...@@ -18,8 +18,8 @@ promise_setup(async () => {
openee = await openWindow("{{hosts[][]}}", "?1"); openee = await openWindow("{{hosts[][]}}", "?1");
}); });
// Since they're same-origin, and the opener loaded without isolation, the // Since they're same-origin, and the opener loaded with site-keying, the
// child's request for isolation gets ignored, and both end up site-keyed. // child's request for origin-keying gets ignored, and both end up site-keyed.
testOpenedWindowIsInSameAgentCluster(() => openee); testOpenedWindowIsInSameAgentCluster(() => openee);
testGetter(self, false, "opener"); testGetter(self, false, "opener");
......
<!DOCTYPE html> <!DOCTYPE html>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Opener is not isolated, openee is isolated, openee is a subdomain of the opener</title> <title>Opener is site-keyed, openee is origin-keyed, openee is a subdomain of the opener</title>
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
...@@ -18,9 +18,9 @@ promise_setup(async () => { ...@@ -18,9 +18,9 @@ promise_setup(async () => {
openee = await openWindow("{{hosts[][www]}}", "?1"); openee = await openWindow("{{hosts[][www]}}", "?1");
}); });
// Since they're different-origin, the openee's isolation request is respected, // Since they're different-origin, the openee's origin-keying request is
// so the opener ends up in the site-keyed agent cluster and the openee in the // respected, so the opener ends up in the site-keyed agent cluster and the
// origin-keyed one. // openee in the origin-keyed one.
testOpenedWindowIsInADifferentAgentCluster(() => openee); testOpenedWindowIsInADifferentAgentCluster(() => openee);
testGetter(self, false, "opener"); testGetter(self, false, "opener");
......
<!DOCTYPE html> <!DOCTYPE html>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Opener is isolated, openee is not isolated, openee is different-origin to the opener because of a port mismatch</title> <title>Opener is origin-keyed, openee is site-keyed, openee is different-origin to the opener because of a port mismatch</title>
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
...@@ -18,9 +18,9 @@ promise_setup(async () => { ...@@ -18,9 +18,9 @@ promise_setup(async () => {
openee = await openWindow("{{hosts[][]}}:{{ports[https][1]}}"); openee = await openWindow("{{hosts[][]}}:{{ports[https][1]}}");
}); });
// Since they're different-origin, the openee's isolation non-request is // Since they're different-origin, the openee's non-request is respected, so the
// respected, so the opener ends up in the origin-keyed agent cluster and the // opener ends up in the origin-keyed agent cluster and the openee in the
// openee in the site-keyed one. // site-keyed one.
testOpenedWindowIsInADifferentAgentCluster(() => openee); testOpenedWindowIsInADifferentAgentCluster(() => openee);
testGetter(self, true, "opener"); testGetter(self, true, "opener");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment