summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/cross-origin-opener-policy/popup-same-origin-non-initial-about-blank.https.html
blob: 2e58ea455333b61cd786a3dd0cba3b7600203207 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<!doctype html>
<title>Cross-Origin-Opener-Policy: about:blank</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script>
async_test(t => {
  const popup = window.open("resources/coop-coep.py?coop=same-origin&coep=&navigate=about:blank");
  t.add_cleanup(() => popup.close());
  assert_equals(window, popup.opener);

  popup.onload = t.step_func(() => {
    assert_true(popup.location.href.endsWith("&navigate=about:blank"));
    // Use wait_for_callback as about:blank cannot message back.
    t.step_wait_func_done(() => popup.location.href === "about:blank");
  });
}, "Navigating a popup to about:blank");
</script>