diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:47:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:47:29 +0000 |
commit | 0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d (patch) | |
tree | a31f07c9bcca9d56ce61e9a1ffd30ef350d513aa /testing/web-platform/tests/css/cssom-view/elementScroll-002.html | |
parent | Initial commit. (diff) | |
download | firefox-esr-0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d.tar.xz firefox-esr-0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d.zip |
Adding upstream version 115.8.0esr.upstream/115.8.0esr
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/css/cssom-view/elementScroll-002.html')
-rw-r--r-- | testing/web-platform/tests/css/cssom-view/elementScroll-002.html | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/cssom-view/elementScroll-002.html b/testing/web-platform/tests/css/cssom-view/elementScroll-002.html new file mode 100644 index 0000000000..a1a28aab9e --- /dev/null +++ b/testing/web-platform/tests/css/cssom-view/elementScroll-002.html @@ -0,0 +1,57 @@ +<!doctype html> +<meta charset="utf-8"> +<title>cssom-view - elementScroll - 002</title> +<link rel="help" href="https://drafts.csswg.org/cssom-view/#dom-element-scrolltop"> +<link rel="help" href="https://drafts.csswg.org/cssom-view/#dom-element-scrollleft"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<div id="scroller1" style="height: 100px; width: 100px; overflow: scroll; background: red;"> + <div style="background: green; margin-top: 100px; margin-left: 100px; width: 100px; height: 100px;"></div> +</div> +<div id="scroller2" style="height: 100px; width: 100px; overflow: hidden; background: red;"> + <div style="background: green; margin-top: 100px; padding-left: 100px; width: 100px; height: 100px;"></div> +</div> +<div id="scroller3" style="height: 100px; width: 100px; overflow: scroll; background: red;"> + <div style="background: green; padding-top: 100px; margin-left: 100px; width: 100px; height: 100px;"></div> +</div> +<div id="scroller4" style="height: 100px; width: 100px; overflow: hidden; background: red;"> + <div style="background: green; padding-top: 100px; padding-left: 100px; width: 100px; height: 100px;"></div> +</div> +<script> + test(function () { + var scroller1 = document.getElementById("scroller1"); + + scroller1.scrollTop = 100; + scroller1.scrollLeft = 100; + assert_equals(scroller1.scrollTop, 100, "changed scrollTop should be 100"); + assert_equals(scroller1.scrollLeft, 100, "changed scrollLeft should be 100"); + + }, "simple scroll with style: 'margin' and 'overflow: scroll'"); + test(function () { + var scroller2 = document.getElementById("scroller2"); + + scroller2.scrollTop = 100; + scroller2.scrollLeft = 100; + assert_equals(scroller2.scrollTop, 100, "changed scrollTop should be 100"); + assert_equals(scroller2.scrollLeft, 100, "changed scrollLeft should be 100"); + + }, "simple scroll with style: 'margin' and 'overflow: hidden'"); + test(function () { + var scroller3 = document.getElementById("scroller3"); + + scroller3.scrollTop = 100; + scroller3.scrollLeft = 100; + assert_equals(scroller3.scrollTop, 100, "changed scrollTop should be 100"); + assert_equals(scroller3.scrollLeft, 100, "changed scrollLeft should be 100"); + + }, "simple scroll with style: 'padding' and 'overflow: scroll'"); + test(function () { + var scroller4 = document.getElementById("scroller4"); + + scroller4.scrollTop = 100; + scroller4.scrollLeft = 100; + assert_equals(scroller4.scrollTop, 100, "changed scrollTop should be 100"); + assert_equals(scroller4.scrollLeft, 100, "changed scrollLeft should be 100"); + + }, "simple scroll with style: 'padding' and 'overflow: hidden'"); +</script> |