Commit 5a194db0 authored by Fredrik Söderquist's avatar Fredrik Söderquist Committed by Commit Bot

Use NextFireIntervalDelta instead of NextFireInterval in SVGImage*Test

Avoids run-tripping TimeDelta -> double -> TimeDelta.

Bug: 856082
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: If4a6a0626be6341770ef01d368fc8a1ddf00de31
Reviewed-on: https://chromium-review.googlesource.com/1126115Reviewed-by: default avatarDaniel Bratell <bratell@opera.com>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#572560}
parent 8d4cec73
......@@ -115,7 +115,7 @@ TEST_F(SVGImageTest, TimelineSuspendAndResume) {
// true for shouldPauseAnimation, this will result in the timeline being
// suspended.
test::RunDelayedTasks(TimeDelta::FromMilliseconds(1) +
TimeDelta::FromSecondsD(timer->NextFireInterval()));
timer->NextFireIntervalDelta());
EXPECT_TRUE(chrome_client.IsSuspended());
EXPECT_FALSE(timer->IsActive());
......@@ -149,7 +149,7 @@ TEST_F(SVGImageTest, ResetAnimation) {
// Fire the timer/trigger a frame update. The timeline will remain
// suspended and no frame will be scheduled.
test::RunDelayedTasks(TimeDelta::FromMillisecondsD(1) +
TimeDelta::FromSecondsD(timer->NextFireInterval()));
timer->NextFireIntervalDelta());
EXPECT_TRUE(chrome_client.IsSuspended());
EXPECT_FALSE(timer->IsActive());
......@@ -226,7 +226,7 @@ TEST_F(SVGImagePageVisibilityTest, PageVisibilityHiddenToVisible) {
// Wait for the next animation frame to be triggered, and then trigger a new
// frame. The image animation timeline should be running.
test::RunDelayedTasks(TimeDelta::FromMilliseconds(1) +
TimeDelta::FromSecondsD(timer->NextFireInterval()));
timer->NextFireIntervalDelta());
Compositor().BeginFrame();
EXPECT_FALSE(svg_image_chrome_client.IsSuspended());
......@@ -236,7 +236,7 @@ TEST_F(SVGImagePageVisibilityTest, PageVisibilityHiddenToVisible) {
// animation timeline.)
WebView().SetVisibilityState(mojom::PageVisibilityState::kHidden, false);
test::RunDelayedTasks(TimeDelta::FromMilliseconds(1) +
TimeDelta::FromSecondsD(timer->NextFireInterval()));
timer->NextFireIntervalDelta());
EXPECT_TRUE(svg_image_chrome_client.IsSuspended());
......@@ -244,7 +244,7 @@ TEST_F(SVGImagePageVisibilityTest, PageVisibilityHiddenToVisible) {
// frame and resume the image animation.
WebView().SetVisibilityState(mojom::PageVisibilityState::kVisible, false);
test::RunDelayedTasks(TimeDelta::FromMilliseconds(1) +
TimeDelta::FromSecondsD(timer->NextFireInterval()));
timer->NextFireIntervalDelta());
Compositor().BeginFrame();
EXPECT_FALSE(svg_image_chrome_client.IsSuspended());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment