diff --git a/css/css-anchor-position/anchor-scroll-js-expose.html b/css/css-anchor-position/anchor-scroll-js-expose.html index 968ce5ab68306a..0f202c5bbf78bf 100644 --- a/css/css-anchor-position/anchor-scroll-js-expose.html +++ b/css/css-anchor-position/anchor-scroll-js-expose.html @@ -55,7 +55,11 @@ scroller.scrollLeft = 1300; // Ensure up-to-date scroll snapshot. - await new Promise(resolve => requestAnimationFrame(resolve)); + await new Promise(resolve => { + requestAnimationFrame(() => { + requestAnimationFrame(resolve); + }); + }); }); promise_test(async () => {