Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(395)

Unified Diff: ui/compositor/layer_animation_sequence_unittest.cc

Issue 231133002: CC::Animations should use TimeTicks & TimeDelta to represent time (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Code changed as per review comments Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/compositor/layer_animation_sequence.cc ('k') | ui/compositor/layer_animator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 86f9ecf469543abeb730da37648e68ebd7fc301a..657797415786d50e0aed45fab8377cfb9e30b8a8 100644
--- a/ui/compositor/layer_animation_sequence_unittest.cc
+++ b/ui/compositor/layer_animation_sequence_unittest.cc
@@ -92,12 +92,12 @@ TEST(LayerAnimationSequenceTest, SingleThreadedElement) {
sequence.Progress(start_time, &delegate);
EXPECT_FLOAT_EQ(start, sequence.last_progressed_fraction());
effective_start = start_time + delta;
- sequence.OnThreadedAnimationStarted(cc::AnimationEvent(
- cc::AnimationEvent::Started,
- 0,
- sequence.animation_group_id(),
- cc::Animation::Opacity,
- (effective_start - base::TimeTicks()).InSecondsF()));
+ sequence.OnThreadedAnimationStarted(
+ cc::AnimationEvent(cc::AnimationEvent::Started,
+ 0,
+ sequence.animation_group_id(),
+ cc::Animation::Opacity,
+ effective_start));
sequence.Progress(effective_start + delta/2, &delegate);
EXPECT_FLOAT_EQ(middle, sequence.last_progressed_fraction());
EXPECT_TRUE(sequence.IsFinished(effective_start + delta));
@@ -149,12 +149,12 @@ TEST(LayerAnimationSequenceTest, MultipleElement) {
EXPECT_FLOAT_EQ(0.0, sequence.last_progressed_fraction());
opacity_effective_start = start_time + delta;
EXPECT_EQ(starting_group_id, sequence.animation_group_id());
- sequence.OnThreadedAnimationStarted(cc::AnimationEvent(
- cc::AnimationEvent::Started,
- 0,
- sequence.animation_group_id(),
- cc::Animation::Opacity,
- (opacity_effective_start - base::TimeTicks()).InSecondsF()));
+ sequence.OnThreadedAnimationStarted(
+ cc::AnimationEvent(cc::AnimationEvent::Started,
+ 0,
+ sequence.animation_group_id(),
+ cc::Animation::Opacity,
+ opacity_effective_start));
sequence.Progress(opacity_effective_start + delta/2, &delegate);
EXPECT_FLOAT_EQ(0.5, sequence.last_progressed_fraction());
sequence.Progress(opacity_effective_start + delta, &delegate);
@@ -180,12 +180,12 @@ TEST(LayerAnimationSequenceTest, MultipleElement) {
EXPECT_FLOAT_EQ(0.0, sequence.last_progressed_fraction());
transform_effective_start = opacity_effective_start + 3 * delta;
EXPECT_NE(starting_group_id, sequence.animation_group_id());
- sequence.OnThreadedAnimationStarted(cc::AnimationEvent(
- cc::AnimationEvent::Started,
- 0,
- sequence.animation_group_id(),
- cc::Animation::Transform,
- (transform_effective_start - base::TimeTicks()).InSecondsF()));
+ sequence.OnThreadedAnimationStarted(
+ cc::AnimationEvent(cc::AnimationEvent::Started,
+ 0,
+ sequence.animation_group_id(),
+ cc::Animation::Transform,
+ transform_effective_start));
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));
« no previous file with comments | « ui/compositor/layer_animation_sequence.cc ('k') | ui/compositor/layer_animator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698