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 /gfx/layers/apz/test/reftest/checkerboard-on-subscroller.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 'gfx/layers/apz/test/reftest/checkerboard-on-subscroller.html')
-rw-r--r-- | gfx/layers/apz/test/reftest/checkerboard-on-subscroller.html | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/gfx/layers/apz/test/reftest/checkerboard-on-subscroller.html b/gfx/layers/apz/test/reftest/checkerboard-on-subscroller.html new file mode 100644 index 0000000000..8fe30dd25f --- /dev/null +++ b/gfx/layers/apz/test/reftest/checkerboard-on-subscroller.html @@ -0,0 +1,40 @@ +<!DOCTYPE html> +<html class="reftest-wait reftest-no-flush"> +<style> +#outer { + position: absolute; + overflow: scroll; + width: 50vw; + height: 90vh; + border: 1px solid black; + scrollbar-width: none; +} +#inner { + overflow-y: hidden; + width: 100%; +} +.spacer { + width: 60vw; + height: 5000px; + background-color: blue; +} +</style> +<div id="outer"> + <div id="inner"> + <div class="spacer"></div> + </div> +</div> +<script> +document.addEventListener('MozReftestInvalidate', async () => { + outer.style.width = "90vw"; + await new Promise(resolve => requestAnimationFrame(resolve)); + await new Promise(resolve => requestAnimationFrame(resolve)); + + const scrollEndPromise = new Promise(resolve => outer.addEventListener("scrollend", resolve)); + outer.scrollBy({ top: 5000, behavior: "smooth" }); + await scrollEndPromise; + + document.documentElement.classList.remove('reftest-wait'); +}, false); +</script> +</html> |