testing/web-platform/tests/html/cross-origin-opener-policy/no-https.html
author Dan Mosedale <dmose@mozilla.org>
Sat, 04 Dec 2021 17:37:37 +0000
changeset 601058 edcfdb2bbe36f9c40c96ac5b8201aaa1e956eca6
parent 511446 5d63921aa9d31e83a79c43c6ed90e09ae37c329c
permissions -rw-r--r--
Bug 1740393 Update preffed off "More from Mozilla 96" experiment w/QR code & email link, r=preferences-reviewers,desktop-theme-reviewers,pdahiya,dao,mstriemer Differential Revision: https://phabricator.services.mozilla.com/D132435

<!doctype html>
<meta name=timeout content=long>
<title>Cross-Origin-Opener-Policy requires secure contexts</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script>
async_test(t => {
  const popup = window.open("resources/call-functionCalledByOpenee.html");
  t.add_cleanup(() => {
    popup.close();
  });
  window.functionCalledByOpenee = t.step_func_done(() => {
    assert_false(popup.closed);
  });
  assert_equals(window, popup.opener);
}, "Cross-Origin-Opener-Policy only works over secure contexts");

test(() => {
  assert_false(window.crossOriginIsolated);
}, "Bonus: window.crossOriginIsolated");
</script>