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

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

Issue 878863002: Animation: Add CSSPropertyClip and CSSPropertyBorderImageSlice to StringKeyframe (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Implement Eric's changes Created 5 years, 10 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: Source/core/animation/LengthBoxStyleInterpolationTest.cpp
diff --git a/Source/core/animation/LengthBoxStyleInterpolationTest.cpp b/Source/core/animation/LengthBoxStyleInterpolationTest.cpp
index 8d2beb4a6158c2cf03735d4f6e9e421c38c01d30..9e4458728a78cbf9a413e7b1fdb6f95c30514b76 100644
--- a/Source/core/animation/LengthBoxStyleInterpolationTest.cpp
+++ b/Source/core/animation/LengthBoxStyleInterpolationTest.cpp
@@ -18,17 +18,17 @@ class AnimationLengthBoxStyleInterpolationTest : public ::testing::Test {
protected:
static PassOwnPtrWillBeRawPtr<InterpolableValue> lengthBoxToInterpolableValue(const CSSValue& value)
{
- return LengthBoxStyleInterpolation::lengthBoxtoInterpolableValue(value);
+ return LengthBoxStyleInterpolation::lengthBoxtoInterpolableValue(value, value, false);
}
- static PassRefPtrWillBeRawPtr<CSSValue> interpolableValueToLengthBox(InterpolableValue* value)
+ static PassRefPtrWillBeRawPtr<CSSValue> interpolableValueToLengthBox(InterpolableValue* value, const CSSValue& start, const CSSValue& end)
{
- return LengthBoxStyleInterpolation::interpolableValueToLengthBox(value);
+ return LengthBoxStyleInterpolation::interpolableValueToLengthBox(value, start, end);
}
static PassRefPtrWillBeRawPtr<CSSValue> roundTrip(PassRefPtrWillBeRawPtr<CSSValue> value)
{
- return interpolableValueToLengthBox(lengthBoxToInterpolableValue(*value).get());
+ return interpolableValueToLengthBox(lengthBoxToInterpolableValue(*value).get(), *value, *value);
}
static void testPrimitiveValue(RefPtrWillBeRawPtr<CSSValue> value, double left, double right, double top, double bottom, CSSPrimitiveValue::UnitType unitType)
@@ -128,7 +128,7 @@ TEST_F(AnimationLengthBoxStyleInterpolationTest, SingleUnitBox)
rectEms->setBottom(CSSPrimitiveValue::create(-10, CSSPrimitiveValue::CSS_EMS));
value = roundTrip(CSSPrimitiveValue::create(rectEms.release()));
- testPrimitiveValue(value, 0, 0, 0, 0, CSSPrimitiveValue::CSS_EMS);
+ testPrimitiveValue(value, -10, -10, -10, -10, CSSPrimitiveValue::CSS_EMS);
}
TEST_F(AnimationLengthBoxStyleInterpolationTest, MultipleValues)
@@ -149,7 +149,7 @@ TEST_F(AnimationLengthBoxStyleInterpolationTest, MultipleValues)
rectPer->setBottom(CSSPrimitiveValue::create(-30, CSSPrimitiveValue::CSS_PERCENTAGE));
value = roundTrip(CSSPrimitiveValue::create(rectPer.release()));
- testPrimitiveValue(value, 30, 0, 30, 0, CSSPrimitiveValue::CSS_PERCENTAGE);
+ testPrimitiveValue(value, 30, -30, 30, -30, CSSPrimitiveValue::CSS_PERCENTAGE);
}
TEST_F(AnimationLengthBoxStyleInterpolationTest, ZeroBorderImageSlice)

Powered by Google App Engine
This is Rietveld 408576698