diff options
Diffstat (limited to 'testing/web-platform/tests/html/browsers/windows/auxiliary-browsing-contexts/resources/opener-setter.html')
-rw-r--r-- | testing/web-platform/tests/html/browsers/windows/auxiliary-browsing-contexts/resources/opener-setter.html | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/browsers/windows/auxiliary-browsing-contexts/resources/opener-setter.html b/testing/web-platform/tests/html/browsers/windows/auxiliary-browsing-contexts/resources/opener-setter.html new file mode 100644 index 0000000000..4112dae0ce --- /dev/null +++ b/testing/web-platform/tests/html/browsers/windows/auxiliary-browsing-contexts/resources/opener-setter.html @@ -0,0 +1,23 @@ +<!doctype html> +<meta charset="utf-8"> +<html> +<p>This window should set the window.opener attribute</p> +<script src="/common/PrefixedLocalStorage.js"></script> +<script> +var prefixedLocalStorage = new PrefixedLocalStorageResource({ + close_on_cleanup: true +}); +function checkOpener () { + if (window.name == 'iShouldSetOpenerToNull') { + window.opener = null; + return prefixedLocalStorage.setItem('openerIsNull', window.opener === null); + } + if (window.name == 'iShouldSetOpenerToTest') { + window.opener = 'test'; + return prefixedLocalStorage.setItem('openerIsTest', window.opener === "test"); + } +} +</script> +<body onload="checkOpener()"> +</body> +</html> |