| Index: ui/compositor/layer_animation_sequence_unittest.cc
|
| diff --git a/ui/compositor/layer_animation_sequence_unittest.cc b/ui/compositor/layer_animation_sequence_unittest.cc
|
| index 3b4591762b09b5be4acf8001fa31a6b8156c40af..1e17b1a5576707f48aca188c137c004d332ab3c7 100644
|
| --- a/ui/compositor/layer_animation_sequence_unittest.cc
|
| +++ b/ui/compositor/layer_animation_sequence_unittest.cc
|
| @@ -14,6 +14,7 @@
|
| #include "ui/compositor/test/test_layer_animation_delegate.h"
|
| #include "ui/compositor/test/test_layer_animation_observer.h"
|
| #include "ui/compositor/test/test_utils.h"
|
| +#include "ui/gfx/frame_time.h"
|
| #include "ui/gfx/rect.h"
|
| #include "ui/gfx/transform.h"
|
|
|
| @@ -24,7 +25,7 @@ namespace {
|
| // Check that the sequence behaves sanely when it contains no elements.
|
| TEST(LayerAnimationSequenceTest, NoElement) {
|
| LayerAnimationSequence sequence;
|
| - base::TimeTicks start_time;
|
| + gfx::FrameTime start_time;
|
| start_time += base::TimeDelta::FromSeconds(1);
|
| sequence.set_start_time(start_time);
|
| EXPECT_TRUE(sequence.IsFinished(start_time));
|
| @@ -41,7 +42,7 @@ TEST(LayerAnimationSequenceTest, SingleElement) {
|
| float start = 0.0f;
|
| float middle = 0.5f;
|
| float target = 1.0f;
|
| - base::TimeTicks start_time;
|
| + gfx::FrameTime start_time;
|
| base::TimeDelta delta = base::TimeDelta::FromSeconds(1);
|
| sequence.AddElement(
|
| LayerAnimationElement::CreateBrightnessElement(target, delta));
|
| @@ -75,8 +76,8 @@ TEST(LayerAnimationSequenceTest, SingleThreadedElement) {
|
| float start = 0.0f;
|
| float middle = 0.5f;
|
| float target = 1.0f;
|
| - base::TimeTicks start_time;
|
| - base::TimeTicks effective_start;
|
| + gfx::FrameTime start_time;
|
| + gfx::FrameTime effective_start;
|
| base::TimeDelta delta = base::TimeDelta::FromSeconds(1);
|
| sequence.AddElement(
|
| LayerAnimationElement::CreateOpacityElement(target, delta));
|
| @@ -96,7 +97,7 @@ TEST(LayerAnimationSequenceTest, SingleThreadedElement) {
|
| 0,
|
| sequence.animation_group_id(),
|
| cc::Animation::Opacity,
|
| - (effective_start - base::TimeTicks()).InSecondsF()));
|
| + (effective_start - gfx::FrameTime()).InSecondsF()));
|
| sequence.Progress(effective_start + delta/2, &delegate);
|
| EXPECT_FLOAT_EQ(middle, sequence.last_progressed_fraction());
|
| EXPECT_TRUE(sequence.IsFinished(effective_start + delta));
|
| @@ -117,9 +118,9 @@ TEST(LayerAnimationSequenceTest, MultipleElement) {
|
| TestLayerAnimationDelegate delegate;
|
| float start_opacity = 0.0f;
|
| float target_opacity = 1.0f;
|
| - base::TimeTicks start_time;
|
| - base::TimeTicks opacity_effective_start;
|
| - base::TimeTicks transform_effective_start;
|
| + gfx::FrameTime start_time;
|
| + gfx::FrameTime opacity_effective_start;
|
| + gfx::FrameTime transform_effective_start;
|
| base::TimeDelta delta = base::TimeDelta::FromSeconds(1);
|
| sequence.AddElement(
|
| LayerAnimationElement::CreateOpacityElement(target_opacity, delta));
|
| @@ -156,7 +157,7 @@ TEST(LayerAnimationSequenceTest, MultipleElement) {
|
| 0,
|
| sequence.animation_group_id(),
|
| cc::Animation::Opacity,
|
| - (opacity_effective_start - base::TimeTicks()).InSecondsF()));
|
| + (opacity_effective_start - gfx::FrameTime()).InSecondsF()));
|
| sequence.Progress(opacity_effective_start + delta/2, &delegate);
|
| EXPECT_FLOAT_EQ(0.5, sequence.last_progressed_fraction());
|
| sequence.Progress(opacity_effective_start + delta, &delegate);
|
| @@ -187,7 +188,7 @@ TEST(LayerAnimationSequenceTest, MultipleElement) {
|
| 0,
|
| sequence.animation_group_id(),
|
| cc::Animation::Transform,
|
| - (transform_effective_start - base::TimeTicks()).InSecondsF()));
|
| + (transform_effective_start - gfx::FrameTime()).InSecondsF()));
|
| sequence.Progress(transform_effective_start + delta/2, &delegate);
|
| EXPECT_FLOAT_EQ(0.5, sequence.last_progressed_fraction());
|
| EXPECT_TRUE(sequence.IsFinished(transform_effective_start + delta));
|
| @@ -211,7 +212,7 @@ TEST(LayerAnimationSequenceTest, AbortingCyclicSequence) {
|
| TestLayerAnimationDelegate delegate;
|
| float start_brightness = 0.0f;
|
| float target_brightness = 1.0f;
|
| - base::TimeTicks start_time;
|
| + gfx::FrameTime start_time;
|
| base::TimeDelta delta = base::TimeDelta::FromSeconds(1);
|
| sequence.AddElement(
|
| LayerAnimationElement::CreateBrightnessElement(target_brightness, delta));
|
| @@ -263,7 +264,7 @@ TEST(LayerAnimationSequenceTest, SetTarget) {
|
| }
|
|
|
| TEST(LayerAnimationSequenceTest, AddObserver) {
|
| - base::TimeTicks start_time;
|
| + gfx::FrameTime start_time;
|
| base::TimeDelta delta = base::TimeDelta::FromSeconds(1);
|
| LayerAnimationSequence sequence;
|
| sequence.AddElement(
|
|
|