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

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

Issue 1819783002: Blink Platform UnitBezier: Implement Slope and Range methods. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address codereview issues. Created 4 years, 9 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
Index: third_party/WebKit/Source/platform/animation/TimingFunctionTest.cpp
diff --git a/third_party/WebKit/Source/platform/animation/TimingFunctionTest.cpp b/third_party/WebKit/Source/platform/animation/TimingFunctionTest.cpp
index b2ad85cbc4fe8db8ab0832c147a7f443b0974a4b..8e5bd0103f6a293d78196301e574bf2bcb20d30e 100644
--- a/third_party/WebKit/Source/platform/animation/TimingFunctionTest.cpp
+++ b/third_party/WebKit/Source/platform/animation/TimingFunctionTest.cpp
@@ -451,7 +451,7 @@ static void checkCubicRegions2(double x1, double y1, double x2, double y2)
EXPECT_EQ(1, regions.at(1).end);
UnitBezier bezier = UnitBezier(x1, y1, x2, y2);
- EXPECT_FLOAT_EQ(0.5, bezier.solve(regions.at(0).end, std::numeric_limits<double>::epsilon()));
+ EXPECT_FLOAT_EQ(0.5, bezier.solveWithEpsilon(regions.at(0).end, std::numeric_limits<double>::epsilon()));
}
static void checkCubicRegions4(double x1, double y1, double x2, double y2)
@@ -473,8 +473,8 @@ static void checkCubicRegions4(double x1, double y1, double x2, double y2)
EXPECT_EQ(1, regions.at(3).end);
UnitBezier bezier = UnitBezier(x1, y1, x2, y2);
- EXPECT_FLOAT_EQ(0.5, bezier.solve(regions.at(0).end, std::numeric_limits<double>::epsilon()));
- EXPECT_FLOAT_EQ(0.5, bezier.solve(regions.at(1).end, std::numeric_limits<double>::epsilon()));
+ EXPECT_FLOAT_EQ(0.5, bezier.solveWithEpsilon(regions.at(0).end, std::numeric_limits<double>::epsilon()));
+ EXPECT_FLOAT_EQ(0.5, bezier.solveWithEpsilon(regions.at(1).end, std::numeric_limits<double>::epsilon()));
}
TEST_F(TimingFunctionTest, StepsPartitioning)

Powered by Google App Engine
This is Rietveld 408576698