diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 14:29:10 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 14:29:10 +0000 |
commit | 2aa4a82499d4becd2284cdb482213d541b8804dd (patch) | |
tree | b80bf8bf13c3766139fbacc530efd0dd9d54394c /dom/tests/mochitest/dom-level0/innerWidthHeight_script.html | |
parent | Initial commit. (diff) | |
download | firefox-2aa4a82499d4becd2284cdb482213d541b8804dd.tar.xz firefox-2aa4a82499d4becd2284cdb482213d541b8804dd.zip |
Adding upstream version 86.0.1.upstream/86.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/tests/mochitest/dom-level0/innerWidthHeight_script.html')
-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> |