diff options
Diffstat (limited to 'testing/web-platform/tests/html/browsers/windows/auxiliary-browsing-contexts/opener-noopener.html')
-rw-r--r-- | testing/web-platform/tests/html/browsers/windows/auxiliary-browsing-contexts/opener-noopener.html | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/browsers/windows/auxiliary-browsing-contexts/opener-noopener.html b/testing/web-platform/tests/html/browsers/windows/auxiliary-browsing-contexts/opener-noopener.html new file mode 100644 index 0000000000..086a96442d --- /dev/null +++ b/testing/web-platform/tests/html/browsers/windows/auxiliary-browsing-contexts/opener-noopener.html @@ -0,0 +1,25 @@ +<!doctype html> +<html> + <head> + <title>Auxiliary Browsing Contexts: window.opener noopener</title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/PrefixedLocalStorage.js"></script> + </head> + <body> + <div id="log"></div> + <script> + var prefixedLocalStorage; + setup(() => prefixedLocalStorage = new PrefixedLocalStorageTest()); + async_test(t => { + t.add_cleanup(() => prefixedLocalStorage.cleanup()); + prefixedLocalStorage.onSet('openerIsNull', t.step_func_done(e => { + assert_equals(e.newValue, 'true'); + })); + window.open(prefixedLocalStorage.url('resources/no-opener.html'), + 'iShouldNotHaveAnOpener', + 'noopener'); + }, 'Auxiliary browsing context created via `window.open` setting `noopener` should report `window.opener` `null`'); + </script> + </body> +</html> |