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

Unified Diff: third_party/WebKit/Source/platform/animation/CompositorFloatAnimationCurveTest.cpp

Issue 2032643003: CC Animation: Erase EaseTimingFunction helpers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gmock
Patch Set: Created 4 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 | « cc/trees/layer_tree_host_unittest_animation.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/animation/CompositorFloatAnimationCurveTest.cpp
diff --git a/third_party/WebKit/Source/platform/animation/CompositorFloatAnimationCurveTest.cpp b/third_party/WebKit/Source/platform/animation/CompositorFloatAnimationCurveTest.cpp
index 8059c299c567e86c3c468bb83af3eee198399d80..4b90c132d6492fa1ba783b9056736c4945199267 100644
--- a/third_party/WebKit/Source/platform/animation/CompositorFloatAnimationCurveTest.cpp
+++ b/third_party/WebKit/Source/platform/animation/CompositorFloatAnimationCurveTest.cpp
@@ -119,7 +119,7 @@ TEST(WebFloatAnimationCurveTest, EaseTimingFunction)
curve->addLinearKeyframe(CompositorFloatKeyframe(1, 1));
std::unique_ptr<cc::TimingFunction> timingFunction(
- cc::EaseTimingFunction::Create());
+ cc::CubicBezierTimingFunction::CreatePreset(CubicBezierTimingFunction::EaseType::EASE));
for (int i = 0; i <= 4; ++i) {
const double time = i * 0.25;
EXPECT_FLOAT_EQ(timingFunction->GetValue(time), curve->getValue(time));
@@ -147,7 +147,7 @@ TEST(WebFloatAnimationCurveTest, EaseInTimingFunction)
curve->addLinearKeyframe(CompositorFloatKeyframe(1, 1));
std::unique_ptr<cc::TimingFunction> timingFunction(
- cc::EaseInTimingFunction::Create());
+ cc::CubicBezierTimingFunction::CreatePreset(CubicBezierTimingFunction::EaseType::EASE_IN));
for (int i = 0; i <= 4; ++i) {
const double time = i * 0.25;
EXPECT_FLOAT_EQ(timingFunction->GetValue(time), curve->getValue(time));
@@ -162,7 +162,7 @@ TEST(WebFloatAnimationCurveTest, EaseOutTimingFunction)
curve->addLinearKeyframe(CompositorFloatKeyframe(1, 1));
std::unique_ptr<cc::TimingFunction> timingFunction(
- cc::EaseOutTimingFunction::Create());
+ cc::CubicBezierTimingFunction::CreatePreset(CubicBezierTimingFunction::EaseType::EASE_OUT));
for (int i = 0; i <= 4; ++i) {
const double time = i * 0.25;
EXPECT_FLOAT_EQ(timingFunction->GetValue(time), curve->getValue(time));
@@ -177,7 +177,7 @@ TEST(WebFloatAnimationCurveTest, EaseInOutTimingFunction)
curve->addLinearKeyframe(CompositorFloatKeyframe(1, 1));
std::unique_ptr<cc::TimingFunction> timingFunction(
- cc::EaseInOutTimingFunction::Create());
+ cc::CubicBezierTimingFunction::CreatePreset(CubicBezierTimingFunction::EaseType::EASE_IN_OUT));
for (int i = 0; i <= 4; ++i) {
const double time = i * 0.25;
EXPECT_FLOAT_EQ(timingFunction->GetValue(time), curve->getValue(time));
@@ -211,7 +211,7 @@ TEST(WebFloatAnimationCurveTest, DefaultTimingFunction)
curve->addLinearKeyframe(CompositorFloatKeyframe(1, 1));
std::unique_ptr<cc::TimingFunction> timingFunction(
- cc::EaseTimingFunction::Create());
+ cc::CubicBezierTimingFunction::CreatePreset(CubicBezierTimingFunction::EaseType::EASE));
for (int i = 0; i <= 4; ++i) {
const double time = i * 0.25;
EXPECT_FLOAT_EQ(timingFunction->GetValue(time), curve->getValue(time));
« no previous file with comments | « cc/trees/layer_tree_host_unittest_animation.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698