1
0
Fork 0
firefox/testing/web-platform/tests/html/cross-origin-opener-policy/no-https.html
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

21 lines
680 B
HTML

<!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>