| Index: ui/gfx/animation/multi_animation_unittest.cc
|
| diff --git a/ui/gfx/animation/multi_animation_unittest.cc b/ui/gfx/animation/multi_animation_unittest.cc
|
| index b8a11fdacf2bfa2c5bb18d7f57f2f1a448ec7f8b..30da2ee8c0b489a5255a252d64c5523166a54e4e 100644
|
| --- a/ui/gfx/animation/multi_animation_unittest.cc
|
| +++ b/ui/gfx/animation/multi_animation_unittest.cc
|
| @@ -18,20 +18,20 @@ TEST(MultiAnimationTest, Basic) {
|
| MultiAnimation animation(parts, MultiAnimation::GetDefaultTimerInterval());
|
| AnimationContainerElement* as_element =
|
| static_cast<AnimationContainerElement*>(&animation);
|
| - as_element->SetStartTime(base::TimeTicks());
|
| + as_element->SetStartTime(gfx::FrameTime());
|
|
|
| // Step to 50, which is half way through the first part.
|
| - as_element->Step(base::TimeTicks() + base::TimeDelta::FromMilliseconds(50));
|
| + as_element->Step(gfx::FrameTime() + base::TimeDelta::FromMilliseconds(50));
|
| EXPECT_EQ(.5, animation.GetCurrentValue());
|
|
|
| // Step to 120, which is 20% through the second part.
|
| - as_element->Step(base::TimeTicks() +
|
| + as_element->Step(gfx::FrameTime() +
|
| base::TimeDelta::FromMilliseconds(120));
|
| EXPECT_DOUBLE_EQ(Tween::CalculateValue(Tween::EASE_OUT, .2),
|
| animation.GetCurrentValue());
|
|
|
| // Step to 320, which is 20% through the second part.
|
| - as_element->Step(base::TimeTicks() +
|
| + as_element->Step(gfx::FrameTime() +
|
| base::TimeDelta::FromMilliseconds(320));
|
| EXPECT_DOUBLE_EQ(Tween::CalculateValue(Tween::EASE_OUT, .2),
|
| animation.GetCurrentValue());
|
| @@ -47,15 +47,15 @@ TEST(MultiAnimationTest, DifferingStartAndEnd) {
|
| MultiAnimation animation(parts, MultiAnimation::GetDefaultTimerInterval());
|
| AnimationContainerElement* as_element =
|
| static_cast<AnimationContainerElement*>(&animation);
|
| - as_element->SetStartTime(base::TimeTicks());
|
| + as_element->SetStartTime(gfx::FrameTime());
|
|
|
| // Step to 0. Because the start_time is 100, this should be 100ms into the
|
| // animation
|
| - as_element->Step(base::TimeTicks());
|
| + as_element->Step(gfx::FrameTime());
|
| EXPECT_EQ(.25, animation.GetCurrentValue());
|
|
|
| // Step to 100, which is effectively 200ms into the animation.
|
| - as_element->Step(base::TimeTicks() + base::TimeDelta::FromMilliseconds(100));
|
| + as_element->Step(gfx::FrameTime() + base::TimeDelta::FromMilliseconds(100));
|
| EXPECT_EQ(.5, animation.GetCurrentValue());
|
| }
|
|
|
| @@ -66,11 +66,11 @@ TEST(MultiAnimationTest, DontCycle) {
|
| MultiAnimation animation(parts, MultiAnimation::GetDefaultTimerInterval());
|
| AnimationContainerElement* as_element =
|
| static_cast<AnimationContainerElement*>(&animation);
|
| - as_element->SetStartTime(base::TimeTicks());
|
| + as_element->SetStartTime(gfx::FrameTime());
|
| animation.set_continuous(false);
|
|
|
| // Step to 300, which is greater than the cycle time.
|
| - as_element->Step(base::TimeTicks() + base::TimeDelta::FromMilliseconds(300));
|
| + as_element->Step(gfx::FrameTime() + base::TimeDelta::FromMilliseconds(300));
|
| EXPECT_EQ(1.0, animation.GetCurrentValue());
|
| EXPECT_FALSE(animation.is_animating());
|
| }
|
| @@ -82,10 +82,10 @@ TEST(MultiAnimationTest, Cycle) {
|
| MultiAnimation animation(parts, MultiAnimation::GetDefaultTimerInterval());
|
| AnimationContainerElement* as_element =
|
| static_cast<AnimationContainerElement*>(&animation);
|
| - as_element->SetStartTime(base::TimeTicks());
|
| + as_element->SetStartTime(gfx::FrameTime());
|
|
|
| // Step to 300, which is greater than the cycle time.
|
| - as_element->Step(base::TimeTicks() + base::TimeDelta::FromMilliseconds(300));
|
| + as_element->Step(gfx::FrameTime() + base::TimeDelta::FromMilliseconds(300));
|
| EXPECT_EQ(.5, animation.GetCurrentValue());
|
| }
|
|
|
|
|