diff options
Diffstat (limited to 'testing/web-platform/tests/long-animation-frame/tentative/loaf-idle.html')
-rw-r--r-- | testing/web-platform/tests/long-animation-frame/tentative/loaf-idle.html | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/testing/web-platform/tests/long-animation-frame/tentative/loaf-idle.html b/testing/web-platform/tests/long-animation-frame/tentative/loaf-idle.html new file mode 100644 index 0000000000..bc9f910bb1 --- /dev/null +++ b/testing/web-platform/tests/long-animation-frame/tentative/loaf-idle.html @@ -0,0 +1,36 @@ +<!DOCTYPE HTML> +<meta charset=utf-8> +<title>Long Animation Frame Timing: requestIdleCallback</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: requestIdleCallback</h1> +<div id="log"></div> +<script> +setup(() => + assert_implements(window.requestIdleCallback, + 'requestIdleCallback is not supported.')); + +/* +promise_test(async t => { + await expect_no_long_frame(() => requestIdleCallback(busy_wait), t); +}, 'A long busy wait in an idle callback is not a long animation frame'); +*/ + +promise_test(async t => { + const segment_duration = very_long_frame_duration / 2; + requestIdleCallback(() => { + busy_wait(segment_duration); + requestAnimationFrame(() => { + busy_wait(segment_duration); + }); + }); + await expect_long_frame(() => {}, t); +}, 'A long busy wait split between an idle callback and a ' + + 'requestAnimationFrame is a long animation frame'); + +</script> +</body> |