diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
commit | 26a029d407be480d791972afb5975cf62c9360a6 (patch) | |
tree | f435a8308119effd964b339f76abb83a57c29483 /testing/web-platform/tests/html/browsers/the-window-object/open-close/open-features-tokenization-innerheight-innerwidth.html | |
parent | Initial commit. (diff) | |
download | firefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz firefox-26a029d407be480d791972afb5975cf62c9360a6.zip |
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/html/browsers/the-window-object/open-close/open-features-tokenization-innerheight-innerwidth.html')
-rw-r--r-- | testing/web-platform/tests/html/browsers/the-window-object/open-close/open-features-tokenization-innerheight-innerwidth.html | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/browsers/the-window-object/open-close/open-features-tokenization-innerheight-innerwidth.html b/testing/web-platform/tests/html/browsers/the-window-object/open-close/open-features-tokenization-innerheight-innerwidth.html new file mode 100644 index 0000000000..cf3ad25514 --- /dev/null +++ b/testing/web-platform/tests/html/browsers/the-window-object/open-close/open-features-tokenization-innerheight-innerwidth.html @@ -0,0 +1,55 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>HTML: window.open `features`: tokenization -- legacy size features `innerheight`, `innerwidth`</title> +<meta name=timeout content=long> +<link rel="help" href="https://html.spec.whatwg.org/multipage/#apis-for-creating-and-navigating-browsing-contexts-by-name"> + +<!-- user agents are not required to support open features other than `noopener` + and on some platforms position and size features don't make sense --> +<meta name="flags" content="may" /> + +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/PrefixedPostMessage.js"></script> +<script> +var windowURL = 'resources/message-opener.html'; +var width = 'width=401,'; +var height = 'height=402,'; + +[ 'innerwidth=401', + ' innerwidth = 401', + 'innerwidth==401', + '\ninnerwidth= 401', + ',innerwidth=401,,', + 'INNERWIDTH=401', + 'innerWidth=401' +].forEach((features, idx, arr) => { + async_test(t => { + var prefixedMessage = new PrefixedMessageTest(); + prefixedMessage.onMessage(t.step_func_done((data, e) => { + e.source.close(); + assert_equals(data.width, 401); + })); + var win = window.open(prefixedMessage.url(windowURL) + '&expected_innerWidth=401', '', height + features); + }, `${format_value(features)} should set width of opened window`); +}); + +[ 'innerheight=402', + ' innerheight = 402', + 'innerheight==402', + '\ninnerheight= 402', + ',innerheight=402,,', + 'INNERHEIGHT=402', + 'innerHeight=402' +].forEach((features, idx, arr) => { + async_test(t => { + var prefixedMessage = new PrefixedMessageTest(); + prefixedMessage.onMessage(t.step_func_done((data, e) => { + e.source.close(); + assert_equals(data.height, 402); + })); + var win = window.open(prefixedMessage.url(windowURL) + '&expected_innerHeight=402', '', width + features); + }, `${format_value(features)} should set height of opened window`); +}); + +</script> |