diff --git a/scroll-animations/view-timelines/svg-graphics-element-001.html b/scroll-animations/view-timelines/svg-graphics-element-001.html index 9b100a0b6420a3..b2a4a9acc064dd 100644 --- a/scroll-animations/view-timelines/svg-graphics-element-001.html +++ b/scroll-animations/view-timelines/svg-graphics-element-001.html @@ -36,9 +36,10 @@ const anim = target.getAnimations()[0]; await anim.ready; assert_equals(getComputedStyle(target).stroke, 'rgb(0, 0, 254)'); - scroller.scrollTop = - 0.5*(scroller.scrollHeight - scroller.clientHeight); - await waitForNextFrame(); + await runAndWaitForFrameUpdate(() => { + scroller.scrollTop = + 0.5*(scroller.scrollHeight - scroller.clientHeight); + }); assert_equals(getComputedStyle(target).stroke, 'rgb(0, 64, 127)'); }, 'View timeline attached to SVG graphics element'); diff --git a/scroll-animations/view-timelines/svg-graphics-element-002.html b/scroll-animations/view-timelines/svg-graphics-element-002.html index e173a649efc01b..b9cabe2838d888 100644 --- a/scroll-animations/view-timelines/svg-graphics-element-002.html +++ b/scroll-animations/view-timelines/svg-graphics-element-002.html @@ -38,9 +38,10 @@ const anim = target.getAnimations()[0]; await anim.ready; assert_equals(getComputedStyle(target).stroke, 'rgb(0, 0, 254)'); - scroller.scrollTop = - 0.5*(scroller.scrollHeight - scroller.clientHeight); - await waitForNextFrame(); + await runAndWaitForFrameUpdate(() => { + scroller.scrollTop = + 0.5*(scroller.scrollHeight - scroller.clientHeight); + }); assert_equals(getComputedStyle(target).stroke, 'rgb(0, 64, 127)'); }, 'View timeline attached to SVG graphics element'); diff --git a/scroll-animations/view-timelines/svg-graphics-element-003.html b/scroll-animations/view-timelines/svg-graphics-element-003.html index 48e238c8eddc34..9b70ba48a20d2d 100644 --- a/scroll-animations/view-timelines/svg-graphics-element-003.html +++ b/scroll-animations/view-timelines/svg-graphics-element-003.html @@ -39,9 +39,10 @@ const anim = target.getAnimations()[0]; await anim.ready; assert_equals(getComputedStyle(target).color, 'rgb(0, 0, 254)'); - scroller.scrollTop = - 0.5*(scroller.scrollHeight - scroller.clientHeight); - await waitForNextFrame(); + await runAndWaitForFrameUpdate(() => { + scroller.scrollTop = + 0.5*(scroller.scrollHeight - scroller.clientHeight); + }); assert_equals(getComputedStyle(target).color, 'rgb(0, 64, 127)'); }, 'View timeline attached to SVG graphics element');