diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
commit | 36d22d82aa202bb199967e9512281e9a53db42c9 (patch) | |
tree | 105e8c98ddea1c1e4784a60a5a6410fa416be2de /dom/tests/mochitest/dom-level0/innerWidthHeight_script.html | |
parent | Initial commit. (diff) | |
download | firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.tar.xz firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.zip |
Adding upstream version 115.7.0esr.upstream/115.7.0esrupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | dom/tests/mochitest/dom-level0/innerWidthHeight_script.html | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/dom/tests/mochitest/dom-level0/innerWidthHeight_script.html b/dom/tests/mochitest/dom-level0/innerWidthHeight_script.html new file mode 100644 index 0000000000..08f90111df --- /dev/null +++ b/dom/tests/mochitest/dom-level0/innerWidthHeight_script.html @@ -0,0 +1,31 @@ +<!DOCTYPE html> +<html> +<head> + <meta name="viewport" content="width=320,height=320" /> + <title>Bug 602580 - Test layout viewport and visual viewport sizes with meta tags and changed innerWidth</title> + <script class="testbody" type="text/javascript"> + function runSubTest() + { + /* CSS viewport is set the by the meta tag in this document. */ + window.opener.is(document.documentElement.clientWidth, 320, "CSS viewport width is meta viewport width"); + window.opener.is(document.documentElement.clientHeight, 320, "CSS viewport height is meta viewport height"); + + /* Visual viewport values can be changed by setting window.innerWidth and innerHeight. */ + var oldWidth = window.innerWidth; + var oldHeight = window.innerHeight; + + window.innerWidth = 300; + window.opener.is(window.innerWidth, 300, "visual viewport width returns set value"); + window.innerWidth = oldWidth; + + window.innerHeight = 300; + window.opener.is(window.innerHeight, 300, "visual viewport height returns set value"); + window.innerHeight = oldHeight; + + window.opener.finish(); + } + </script> +</head> +<body onload="runSubTest()"> +</body> +</html> |