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

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

Issue 813233002: Animation: Fix loss of type information when interpolating value of 0 (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix second accumulateLength method 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/LengthPairStyleInterpolationTest.cpp
diff --git a/Source/core/animation/LengthPairStyleInterpolationTest.cpp b/Source/core/animation/LengthPairStyleInterpolationTest.cpp
index 400f7714308b7afe22575b53b4b44c82f9ad2e9a..1b6d10b40383843df680ddabb7a2cb0d57e9f7b4 100644
--- a/Source/core/animation/LengthPairStyleInterpolationTest.cpp
+++ b/Source/core/animation/LengthPairStyleInterpolationTest.cpp
@@ -59,19 +59,19 @@ TEST_F(LengthPairStyleInterpolationTest, ZeroTest)
RefPtrWillBeRawPtr<CSSPrimitiveValue> secondPc = CSSPrimitiveValue::create(0, CSSPrimitiveValue::CSS_PERCENTAGE);
RefPtrWillBeRawPtr<Pair> pairPc = Pair::create(firstPc, secondPc, Pair::KeepIdenticalValues);
RefPtrWillBeRawPtr<CSSValue> value2 = roundTrip(CSSPrimitiveValue::create(pairPc.release()), ValueRangeNonNegative);
- testPrimitiveValue(value2, 0, 0, CSSPrimitiveValue::CSS_PX);
+ testPrimitiveValue(value2, 0, 0, CSSPrimitiveValue::CSS_PERCENTAGE);
RefPtrWillBeRawPtr<CSSPrimitiveValue> firstEms = CSSPrimitiveValue::create(0, CSSPrimitiveValue::CSS_EMS);
RefPtrWillBeRawPtr<CSSPrimitiveValue> secondEms = CSSPrimitiveValue::create(0, CSSPrimitiveValue::CSS_EMS);
RefPtrWillBeRawPtr<Pair> pairEms = Pair::create(firstEms, secondEms, Pair::KeepIdenticalValues);
RefPtrWillBeRawPtr<CSSValue> value3 = roundTrip(CSSPrimitiveValue::create(pairEms.release()), ValueRangeNonNegative);
- testPrimitiveValue(value3, 0, 0, CSSPrimitiveValue::CSS_PX);
+ testPrimitiveValue(value3, 0, 0, CSSPrimitiveValue::CSS_EMS);
RefPtrWillBeRawPtr<CSSPrimitiveValue> firstPcNeg = CSSPrimitiveValue::create(0, CSSPrimitiveValue::CSS_PERCENTAGE);
RefPtrWillBeRawPtr<CSSPrimitiveValue> secondPcNeg = CSSPrimitiveValue::create(0, CSSPrimitiveValue::CSS_PERCENTAGE);
RefPtrWillBeRawPtr<Pair> pairPcNeg = Pair::create(firstPcNeg, secondPcNeg, Pair::KeepIdenticalValues);
RefPtrWillBeRawPtr<CSSValue> value4 = roundTrip(CSSPrimitiveValue::create(pairPcNeg.release()), ValueRangeAll);
- testPrimitiveValue(value4, 0, 0, CSSPrimitiveValue::CSS_PX);
+ testPrimitiveValue(value4, 0, 0, CSSPrimitiveValue::CSS_PERCENTAGE);
}
TEST_F(LengthPairStyleInterpolationTest, MultipleValueTest)

Powered by Google App Engine
This is Rietveld 408576698