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/long-animation-frame/tentative/loaf-user-callback.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/long-animation-frame/tentative/loaf-user-callback.html')
-rw-r--r-- | testing/web-platform/tests/long-animation-frame/tentative/loaf-user-callback.html | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/testing/web-platform/tests/long-animation-frame/tentative/loaf-user-callback.html b/testing/web-platform/tests/long-animation-frame/tentative/loaf-user-callback.html new file mode 100644 index 0000000000..3d868af87f --- /dev/null +++ b/testing/web-platform/tests/long-animation-frame/tentative/loaf-user-callback.html @@ -0,0 +1,56 @@ +<!DOCTYPE HTML> +<meta charset=utf-8> +<title>Long Animation Frame Timing: basic</title> +<meta name="timeout" content="long"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="resources/utils.js"></script> + +<body> +<h1>Long Animation Frame: user callbacks</h1> +<div id="log"></div> +<script> + +test_self_user_callback(t => + t.step_timeout(() => busy_wait()), "TimerHandler:setTimeout"); + +test_self_user_callback(() => { + const interval = setInterval(() => { + busy_wait(); + clearInterval(interval); + }, 10); +}, "TimerHandler:setInterval"); +test_self_user_callback(() => + requestAnimationFrame(() => busy_wait()), "FrameRequestCallback"); + +test_self_user_callback(t => { + const element = document.createElement("div"); + document.body.appendChild(element); + t.add_cleanup(() => element.remove()); + new ResizeObserver((entries, observer) => { + busy_wait(very_long_frame_duration); + observer.disconnect(); + }).observe(element); +}, "ResizeObserverCallback"); + +test_self_user_callback(t => { + const element = document.createElement("div"); + element.innerText = "123"; + t.add_cleanup(() => element.remove()); + new IntersectionObserver((entries, observer) => { + busy_wait(very_long_frame_duration); + observer.disconnect(); + }).observe(element); + document.body.appendChild(element); +}, "IntersectionObserverCallback"); + +test_self_user_callback(t => + scheduler.postTask(() => busy_wait()), "SchedulerPostTaskCallback"); + + test_self_user_callback(t => { + new PerformanceObserver(() => busy_wait()).observe( + {type: "navigation", buffered: true}); +}, "PerformanceObserverCallback"); + +</script> +</body> |