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

Unified Diff: cc/animation/element_animations_unittest.cc

Issue 2388943002: cc: Delete unused AnimationCurve::AffectsScale and related code (Closed)
Patch Set: Created 4 years, 2 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 | « cc/animation/element_animations.cc ('k') | cc/animation/keyframed_animation_curve.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/animation/element_animations_unittest.cc
diff --git a/cc/animation/element_animations_unittest.cc b/cc/animation/element_animations_unittest.cc
index ec1a4b54c6abc9bc5869bc9d34ac36b6d8552775..fee5a9438a674065ab9e8c2135b09e3d26d1605b 100644
--- a/cc/animation/element_animations_unittest.cc
+++ b/cc/animation/element_animations_unittest.cc
@@ -2219,63 +2219,6 @@ TEST_F(ElementAnimationsTest, FinishedAndAbortedEventsForGroup) {
EXPECT_EQ(TargetProperty::OPACITY, events->events_[1].target_property);
}
-TEST_F(ElementAnimationsTest, HasAnimationThatAffectsScale) {
- CreateTestLayer(true, false);
- AttachTimelinePlayerLayer();
- CreateImplTimelineAndPlayer();
-
- scoped_refptr<ElementAnimations> animations_impl = element_animations_impl();
-
- EXPECT_FALSE(animations_impl->HasAnimationThatAffectsScale());
-
- animations_impl->AddAnimation(CreateAnimation(
- std::unique_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 0.f, 1.f)),
- 1, TargetProperty::OPACITY));
-
- // Opacity animations don't affect scale.
- EXPECT_FALSE(animations_impl->HasAnimationThatAffectsScale());
-
- std::unique_ptr<KeyframedTransformAnimationCurve> curve1(
- KeyframedTransformAnimationCurve::Create());
-
- TransformOperations operations1;
- curve1->AddKeyframe(
- TransformKeyframe::Create(base::TimeDelta(), operations1, nullptr));
- operations1.AppendTranslate(10.0, 15.0, 0.0);
- curve1->AddKeyframe(TransformKeyframe::Create(
- base::TimeDelta::FromSecondsD(1.0), operations1, nullptr));
-
- std::unique_ptr<Animation> animation(
- Animation::Create(std::move(curve1), 2, 2, TargetProperty::TRANSFORM));
- animations_impl->AddAnimation(std::move(animation));
-
- // Translations don't affect scale.
- EXPECT_FALSE(animations_impl->HasAnimationThatAffectsScale());
-
- std::unique_ptr<KeyframedTransformAnimationCurve> curve2(
- KeyframedTransformAnimationCurve::Create());
-
- TransformOperations operations2;
- curve2->AddKeyframe(
- TransformKeyframe::Create(base::TimeDelta(), operations2, nullptr));
- operations2.AppendScale(2.0, 3.0, 4.0);
- curve2->AddKeyframe(TransformKeyframe::Create(
- base::TimeDelta::FromSecondsD(1.0), operations2, nullptr));
-
- animation =
- Animation::Create(std::move(curve2), 3, 3, TargetProperty::TRANSFORM);
- animations_impl->AddAnimation(std::move(animation));
-
- EXPECT_TRUE(animations_impl->HasAnimationThatAffectsScale());
-
- animations_impl->GetAnimationById(3)->SetRunState(Animation::FINISHED,
- TicksFromSecondsF(0.0));
-
- // Only unfinished animations should be considered by
- // HasAnimationThatAffectsScale.
- EXPECT_FALSE(animations_impl->HasAnimationThatAffectsScale());
-}
-
TEST_F(ElementAnimationsTest, HasOnlyTranslationTransforms) {
CreateTestLayer(true, false);
AttachTimelinePlayerLayer();
« no previous file with comments | « cc/animation/element_animations.cc ('k') | cc/animation/keyframed_animation_curve.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698