summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/browsers/origin/origin-keyed-agent-clusters/popups/opener-no-openee-yes-subdomain.sub.https.html
blob: f96d2273d5e73ff75581df5ba465c0cc4ffdf0f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<!DOCTYPE html>
<meta charset="utf-8">
<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/testharnessreport.js"></script>

<div id="log"></div>

<script type="module">
import {
  openWindow,
  testOpenedWindowIsInADifferentAgentCluster,
  testGetter
} from "../resources/helpers.mjs";

let openee;
promise_setup(async () => {
  openee = await openWindow("{{hosts[][www]}}", "?1");
});

// Since they're different-origin, the openee's origin-keying request is
// respected, so the opener ends up in the site-keyed agent cluster and the
// openee in the origin-keyed one.
testOpenedWindowIsInADifferentAgentCluster(() => openee);

testGetter(self, false, "opener");
testGetter(() => openee, true, "openee");
</script>