blob: b94f9392d462e880bc96f8cf49ba188eb63a2da8 [file] [log] [blame]
<!DOCTYPE html>
<meta charset="utf-8">
<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/testharnessreport.js"></script>
<div id="log"></div>
<script type="module">
import {
insertIframe,
testDifferentAgentClusters,
testGetter
} from "../resources/helpers.mjs";
promise_setup(async () => {
// Order of loading should not matter, but we make it sequential to ensure the
// tests are deterministic.
await insertIframe("{{hosts[][www]}}", "?1");
await insertIframe("{{hosts[][www1]}}", "?1");
});
// Since everybody is different-origin, everyone's requests get
// respected.
//
// So, the parent ends up in its origin-keyed agent cluster, child 1 ends up in
// a second origin-keyed agent cluster, and child 2 ends up in a third
// origin-keyed agent cluster.
testDifferentAgentClusters([self, 0], "Parent to child1");
testDifferentAgentClusters([self, 1], "Parent to child2");
testDifferentAgentClusters([0, 1], "child1 to child2");
testDifferentAgentClusters([1, 0], "child2 to child1");
testGetter(self, true, "parent");
testGetter(0, true, "child1");
testGetter(1, true, "child2");
</script>