diff options
author | sivagunturi@chromium.org <sivagunturi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-15 17:31:36 +0000 |
---|---|---|
committer | sivagunturi@chromium.org <sivagunturi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-15 17:31:36 +0000 |
commit | ac22516a1df6e674ca7c730eee4d22286f96a257 (patch) | |
tree | 96fb2af51d9b501840c7018d9cd38a9921b803cf /ui/compositor/layer_animator_unittest.cc | |
parent | 2590cbb39144fec19f67e86493392123ea67d90f (diff) | |
download | chromium_src-ac22516a1df6e674ca7c730eee4d22286f96a257.zip chromium_src-ac22516a1df6e674ca7c730eee4d22286f96a257.tar.gz chromium_src-ac22516a1df6e674ca7c730eee4d22286f96a257.tar.bz2 |
CC::LayerAnimationController should use TimeTicks and
TimeDelta to represent time.
As of now complete CC/animation code uses double type
for time durations. This patch replaces double with
TimeTicks where time stamps is used and TimeDeltas
where offset is used.
BUG=178171
Review URL: https://codereview.chromium.org/231133002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@270718 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/compositor/layer_animator_unittest.cc')
-rw-r--r-- | ui/compositor/layer_animator_unittest.cc | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/ui/compositor/layer_animator_unittest.cc b/ui/compositor/layer_animator_unittest.cc index 03800fd..66efca7 100644 --- a/ui/compositor/layer_animator_unittest.cc +++ b/ui/compositor/layer_animator_unittest.cc @@ -349,10 +349,10 @@ TEST(LayerAnimatorTest, ScheduleThreadedAnimationThatCanRunImmediately) { test_controller.animator()->OnThreadedAnimationStarted(cc::AnimationEvent( cc::AnimationEvent::Started, 0, - test_controller.GetRunningSequence(LayerAnimationElement::OPACITY)-> - animation_group_id(), + test_controller.GetRunningSequence(LayerAnimationElement::OPACITY) + ->animation_group_id(), cc::Animation::Opacity, - (effective_start - base::TimeTicks()).InSecondsF())); + effective_start)); element->Step(effective_start + delta/2); @@ -465,10 +465,10 @@ TEST(LayerAnimatorTest, ScheduleThreadedAndNonThreadedAnimations) { test_controller.animator()->OnThreadedAnimationStarted(cc::AnimationEvent( cc::AnimationEvent::Started, 0, - test_controller.GetRunningSequence(LayerAnimationElement::OPACITY)-> - animation_group_id(), + test_controller.GetRunningSequence(LayerAnimationElement::OPACITY) + ->animation_group_id(), cc::Animation::Opacity, - (effective_start - base::TimeTicks()).InSecondsF())); + effective_start)); element->Step(effective_start + delta/2); @@ -743,10 +743,10 @@ TEST(LayerAnimatorTest, StartThreadedAnimationThatCanRunImmediately) { test_controller.animator()->OnThreadedAnimationStarted(cc::AnimationEvent( cc::AnimationEvent::Started, 0, - test_controller.GetRunningSequence(LayerAnimationElement::OPACITY)-> - animation_group_id(), + test_controller.GetRunningSequence(LayerAnimationElement::OPACITY) + ->animation_group_id(), cc::Animation::Opacity, - (effective_start - base::TimeTicks()).InSecondsF())); + effective_start)); element->Step(effective_start + delta/2); @@ -876,10 +876,10 @@ TEST(LayerAnimatorTest, PreemptThreadedByImmediatelyAnimatingToNewTarget) { test_controller.animator()->OnThreadedAnimationStarted(cc::AnimationEvent( cc::AnimationEvent::Started, 0, - test_controller.GetRunningSequence(LayerAnimationElement::OPACITY)-> - animation_group_id(), + test_controller.GetRunningSequence(LayerAnimationElement::OPACITY) + ->animation_group_id(), cc::Animation::Opacity, - (effective_start - base::TimeTicks()).InSecondsF())); + effective_start)); element->Step(effective_start + delta/2); @@ -901,10 +901,10 @@ TEST(LayerAnimatorTest, PreemptThreadedByImmediatelyAnimatingToNewTarget) { test_controller.animator()->OnThreadedAnimationStarted(cc::AnimationEvent( cc::AnimationEvent::Started, 0, - test_controller.GetRunningSequence(LayerAnimationElement::OPACITY)-> - animation_group_id(), + test_controller.GetRunningSequence(LayerAnimationElement::OPACITY) + ->animation_group_id(), cc::Animation::Opacity, - (second_effective_start - base::TimeTicks()).InSecondsF())); + second_effective_start)); element->Step(second_effective_start + delta/2); @@ -1218,10 +1218,10 @@ TEST(LayerAnimatorTest, MultiPreemptThreadedByImmediatelyAnimatingToNewTarget) { test_controller.animator()->OnThreadedAnimationStarted(cc::AnimationEvent( cc::AnimationEvent::Started, 0, - test_controller.GetRunningSequence(LayerAnimationElement::OPACITY)-> - animation_group_id(), + test_controller.GetRunningSequence(LayerAnimationElement::OPACITY) + ->animation_group_id(), cc::Animation::Opacity, - (effective_start - base::TimeTicks()).InSecondsF())); + effective_start)); element->Step(effective_start + delta/2); @@ -1248,10 +1248,10 @@ TEST(LayerAnimatorTest, MultiPreemptThreadedByImmediatelyAnimatingToNewTarget) { test_controller.animator()->OnThreadedAnimationStarted(cc::AnimationEvent( cc::AnimationEvent::Started, 0, - test_controller.GetRunningSequence(LayerAnimationElement::OPACITY)-> - animation_group_id(), + test_controller.GetRunningSequence(LayerAnimationElement::OPACITY) + ->animation_group_id(), cc::Animation::Opacity, - (second_effective_start - base::TimeTicks()).InSecondsF())); + second_effective_start)); element->Step(second_effective_start + delta/2); @@ -1505,10 +1505,10 @@ TEST(LayerAnimatorTest, ThreadedCyclicSequences) { test_controller.animator()->OnThreadedAnimationStarted(cc::AnimationEvent( cc::AnimationEvent::Started, 0, - test_controller.GetRunningSequence(LayerAnimationElement::OPACITY)-> - animation_group_id(), + test_controller.GetRunningSequence(LayerAnimationElement::OPACITY) + ->animation_group_id(), cc::Animation::Opacity, - (effective_start - base::TimeTicks()).InSecondsF())); + effective_start)); element->Step(effective_start + delta); EXPECT_TRUE(test_controller.animator()->is_animating()); @@ -1518,10 +1518,10 @@ TEST(LayerAnimatorTest, ThreadedCyclicSequences) { test_controller.animator()->OnThreadedAnimationStarted(cc::AnimationEvent( cc::AnimationEvent::Started, 0, - test_controller.GetRunningSequence(LayerAnimationElement::OPACITY)-> - animation_group_id(), + test_controller.GetRunningSequence(LayerAnimationElement::OPACITY) + ->animation_group_id(), cc::Animation::Opacity, - (second_effective_start - base::TimeTicks()).InSecondsF())); + second_effective_start)); element->Step(second_effective_start + delta); @@ -1532,10 +1532,10 @@ TEST(LayerAnimatorTest, ThreadedCyclicSequences) { test_controller.animator()->OnThreadedAnimationStarted(cc::AnimationEvent( cc::AnimationEvent::Started, 0, - test_controller.GetRunningSequence(LayerAnimationElement::OPACITY)-> - animation_group_id(), + test_controller.GetRunningSequence(LayerAnimationElement::OPACITY) + ->animation_group_id(), cc::Animation::Opacity, - (third_effective_start - base::TimeTicks()).InSecondsF())); + third_effective_start)); element->Step(third_effective_start + delta); EXPECT_TRUE(test_controller.animator()->is_animating()); @@ -1545,10 +1545,10 @@ TEST(LayerAnimatorTest, ThreadedCyclicSequences) { test_controller.animator()->OnThreadedAnimationStarted(cc::AnimationEvent( cc::AnimationEvent::Started, 0, - test_controller.GetRunningSequence(LayerAnimationElement::OPACITY)-> - animation_group_id(), + test_controller.GetRunningSequence(LayerAnimationElement::OPACITY) + ->animation_group_id(), cc::Animation::Opacity, - (fourth_effective_start - base::TimeTicks()).InSecondsF())); + fourth_effective_start)); // Skip ahead by a lot. element->Step(fourth_effective_start + 1000 * delta); @@ -1560,10 +1560,10 @@ TEST(LayerAnimatorTest, ThreadedCyclicSequences) { test_controller.animator()->OnThreadedAnimationStarted(cc::AnimationEvent( cc::AnimationEvent::Started, 0, - test_controller.GetRunningSequence(LayerAnimationElement::OPACITY)-> - animation_group_id(), + test_controller.GetRunningSequence(LayerAnimationElement::OPACITY) + ->animation_group_id(), cc::Animation::Opacity, - (fifth_effective_start - base::TimeTicks()).InSecondsF())); + fifth_effective_start)); // Skip ahead by a lot. element->Step(fifth_effective_start + 999 * delta); |