summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-viewport/zoom/scroll-top-test-with-zoom.html
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:37 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:37 +0000
commita90a5cba08fdf6c0ceb95101c275108a152a3aed (patch)
tree532507288f3defd7f4dcf1af49698bcb76034855 /testing/web-platform/tests/css/css-viewport/zoom/scroll-top-test-with-zoom.html
parentAdding debian version 126.0.1-1. (diff)
downloadfirefox-a90a5cba08fdf6c0ceb95101c275108a152a3aed.tar.xz
firefox-a90a5cba08fdf6c0ceb95101c275108a152a3aed.zip
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/css/css-viewport/zoom/scroll-top-test-with-zoom.html')
-rw-r--r--testing/web-platform/tests/css/css-viewport/zoom/scroll-top-test-with-zoom.html33
1 files changed, 33 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-viewport/zoom/scroll-top-test-with-zoom.html b/testing/web-platform/tests/css/css-viewport/zoom/scroll-top-test-with-zoom.html
new file mode 100644
index 0000000000..9656fe120e
--- /dev/null
+++ b/testing/web-platform/tests/css/css-viewport/zoom/scroll-top-test-with-zoom.html
@@ -0,0 +1,33 @@
+<!doctype html>
+<title>Scroll Top Test with Zoom</title>
+<link rel="help" href="https://drafts.csswg.org/css-viewport/#zoom-property">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<style>
+ #container {
+ width: 200px;
+ height: 100px;
+ border: solid thick;
+ overflow: auto;
+ }
+</style>
+<div id="container">
+ <div style="width: 100px; height: 2000px"></div>
+</div>
+
+<script>
+ var container = document.getElementById('container');
+ container.scrollTop = 77;
+ test(function() {
+ assert_equals(container.scrollTop, 77, "Initial scrollTop should be 77");
+ }, "Initial scrollTop with no zoom");
+
+ document.body.style.zoom = 1.2;
+ document.body.offsetTop;
+
+ document.body.style.zoom = 1;
+ test(function() {
+ assert_equals(container.scrollTop, 77, "scrollTop should remain consistent after resetting zoom");
+ }, "scrollTop after resetting zoom");
+ done();
+</script>