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

Unified Diff: Source/core/animation/CompositorAnimationsTest.cpp

Issue 812013002: Define step timing function for the cc animation framework. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Codereview fixes Created 6 years 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
Index: Source/core/animation/CompositorAnimationsTest.cpp
diff --git a/Source/core/animation/CompositorAnimationsTest.cpp b/Source/core/animation/CompositorAnimationsTest.cpp
index 3b3d67e9158096b43da2f9cbb4fff01e89caa5d3..e3709360806702a6eaabf5e5c63ac383ecfebb28 100644
--- a/Source/core/animation/CompositorAnimationsTest.cpp
+++ b/Source/core/animation/CompositorAnimationsTest.cpp
@@ -455,12 +455,6 @@ TEST_F(AnimationCompositorAnimationsTest, ConvertTimingForCompositorDirectionIte
EXPECT_EQ(m_compositorTiming.direction, Timing::PlaybackDirectionAlternateReverse);
}
-TEST_F(AnimationCompositorAnimationsTest, isCandidateForAnimationOnCompositorTimingTimingFunctionPassThru)
-{
- m_timing.timingFunction = m_stepTimingFunction;
- EXPECT_FALSE(isCandidateForAnimationOnCompositor(m_timing, *m_keyframeAnimationEffect2.get()));
-}
-
TEST_F(AnimationCompositorAnimationsTest, isCandidateForAnimationOnCompositorTimingFunctionLinear)
{
m_timing.timingFunction = m_linearTimingFunction;
@@ -482,7 +476,7 @@ TEST_F(AnimationCompositorAnimationsTest, isCandidateForAnimationOnCompositorTim
TEST_F(AnimationCompositorAnimationsTest, isCandidateForAnimationOnCompositorTimingFunctionSteps)
{
m_timing.timingFunction = m_stepTimingFunction;
- EXPECT_FALSE(isCandidateForAnimationOnCompositor(m_timing, *m_keyframeAnimationEffect2.get()));
+ EXPECT_TRUE(isCandidateForAnimationOnCompositor(m_timing, *m_keyframeAnimationEffect2.get()));
EXPECT_FALSE(isCandidateForAnimationOnCompositor(m_timing, *m_keyframeAnimationEffect5.get()));
}
@@ -531,32 +525,32 @@ TEST_F(AnimationCompositorAnimationsTest, isCandidateForAnimationOnCompositorTim
EXPECT_TRUE(isCandidateForAnimationOnCompositor(m_timing, *m_keyframeAnimationEffect5.get()));
}
-TEST_F(AnimationCompositorAnimationsTest, isCandidateForAnimationOnCompositorTimingFunctionWithStepNotOkay)
+TEST_F(AnimationCompositorAnimationsTest, isCandidateForAnimationOnCompositorTimingFunctionWithStepOkay)
{
(*m_keyframeVector2)[0]->setEasing(m_stepTimingFunction.get());
m_keyframeAnimationEffect2 = AnimatableValueKeyframeEffectModel::create(*m_keyframeVector2);
- EXPECT_FALSE(isCandidateForAnimationOnCompositor(m_timing, *m_keyframeAnimationEffect2.get()));
+ EXPECT_TRUE(isCandidateForAnimationOnCompositor(m_timing, *m_keyframeAnimationEffect2.get()));
(*m_keyframeVector5)[0]->setEasing(m_stepTimingFunction.get());
(*m_keyframeVector5)[1]->setEasing(m_linearTimingFunction.get());
(*m_keyframeVector5)[2]->setEasing(m_cubicEaseTimingFunction.get());
(*m_keyframeVector5)[3]->setEasing(m_linearTimingFunction.get());
m_keyframeAnimationEffect5 = AnimatableValueKeyframeEffectModel::create(*m_keyframeVector5);
- EXPECT_FALSE(isCandidateForAnimationOnCompositor(m_timing, *m_keyframeAnimationEffect5.get()));
+ EXPECT_TRUE(isCandidateForAnimationOnCompositor(m_timing, *m_keyframeAnimationEffect5.get()));
(*m_keyframeVector5)[0]->setEasing(m_linearTimingFunction.get());
(*m_keyframeVector5)[1]->setEasing(m_stepTimingFunction.get());
(*m_keyframeVector5)[2]->setEasing(m_cubicEaseTimingFunction.get());
(*m_keyframeVector5)[3]->setEasing(m_linearTimingFunction.get());
m_keyframeAnimationEffect5 = AnimatableValueKeyframeEffectModel::create(*m_keyframeVector5);
- EXPECT_FALSE(isCandidateForAnimationOnCompositor(m_timing, *m_keyframeAnimationEffect5.get()));
+ EXPECT_TRUE(isCandidateForAnimationOnCompositor(m_timing, *m_keyframeAnimationEffect5.get()));
(*m_keyframeVector5)[0]->setEasing(m_linearTimingFunction.get());
(*m_keyframeVector5)[1]->setEasing(m_cubicEaseTimingFunction.get());
(*m_keyframeVector5)[2]->setEasing(m_cubicEaseTimingFunction.get());
(*m_keyframeVector5)[3]->setEasing(m_stepTimingFunction.get());
m_keyframeAnimationEffect5 = AnimatableValueKeyframeEffectModel::create(*m_keyframeVector5);
- EXPECT_FALSE(isCandidateForAnimationOnCompositor(m_timing, *m_keyframeAnimationEffect5.get()));
+ EXPECT_TRUE(isCandidateForAnimationOnCompositor(m_timing, *m_keyframeAnimationEffect5.get()));
}
TEST_F(AnimationCompositorAnimationsTest, isCandidateForAnimationOnCompositor)
« no previous file with comments | « Source/core/animation/CompositorAnimations.cpp ('k') | Source/core/animation/CompositorAnimationsTestHelper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698