Index: Source/core/animation/LengthStyleInterpolationTest.cpp |
diff --git a/Source/core/animation/LengthStyleInterpolationTest.cpp b/Source/core/animation/LengthStyleInterpolationTest.cpp |
index d89505efda48ff55afbebd3c75c9cfb20f1c6ab5..48917c605faaa1418b1ada3622d9b0c09833a0ea 100644 |
--- a/Source/core/animation/LengthStyleInterpolationTest.cpp |
+++ b/Source/core/animation/LengthStyleInterpolationTest.cpp |
@@ -14,7 +14,7 @@ namespace blink { |
class AnimationLengthStyleInterpolationTest : public ::testing::Test { |
protected: |
- static PassOwnPtrWillBeRawPtr<InterpolableValue> lengthToInterpolableValue(const CSSValue& value) |
+ static InterpolableValue* lengthToInterpolableValue(const CSSValue& value) |
{ |
return LengthStyleInterpolation::toInterpolableValue(value); |
} |
@@ -26,7 +26,7 @@ protected: |
static PassRefPtrWillBeRawPtr<CSSValue> roundTrip(PassRefPtrWillBeRawPtr<CSSValue> value) |
{ |
- return interpolableValueToLength(lengthToInterpolableValue(*value).get(), RangeAll); |
+ return interpolableValueToLength(lengthToInterpolableValue(*value), RangeAll); |
} |
static void testPrimitiveValue(RefPtrWillBeRawPtr<CSSValue> value, double doubleValue, CSSPrimitiveValue::UnitType unitType) |
@@ -36,9 +36,9 @@ protected: |
EXPECT_EQ(unitType, toCSSPrimitiveValue(value.get())->primitiveType()); |
} |
- static PassOwnPtrWillBeRawPtr<InterpolableList> createInterpolableLength(double a, double b, double c, double d, double e, double f, double g, double h, double i, double j) |
+ static InterpolableList* createInterpolableLength(double a, double b, double c, double d, double e, double f, double g, double h, double i, double j) |
{ |
- OwnPtrWillBeRawPtr<InterpolableList> list = InterpolableList::create(10); |
+ InterpolableList* list = InterpolableList::create(10); |
list->set(0, InterpolableNumber::create(a)); |
list->set(1, InterpolableNumber::create(b)); |
list->set(2, InterpolableNumber::create(c)); |
@@ -50,7 +50,7 @@ protected: |
list->set(8, InterpolableNumber::create(i)); |
list->set(9, InterpolableNumber::create(j)); |
- return list.release(); |
+ return list; |
} |
void initLengthArray(CSSLengthArray& lengthArray) |
@@ -108,11 +108,11 @@ TEST_F(AnimationLengthStyleInterpolationTest, SingleUnit) |
TEST_F(AnimationLengthStyleInterpolationTest, SingleClampedUnit) |
{ |
RefPtrWillBeRawPtr<CSSValue> value1 = CSSPrimitiveValue::create(-10, CSSPrimitiveValue::CSS_PX); |
- value1 = interpolableValueToLength(lengthToInterpolableValue(*value1).get(), RangeNonNegative); |
+ value1 = interpolableValueToLength(lengthToInterpolableValue(*value1), RangeNonNegative); |
testPrimitiveValue(value1, 0, CSSPrimitiveValue::CSS_PX); |
RefPtrWillBeRawPtr<CSSValue> value2 = CSSPrimitiveValue::create(-10, CSSPrimitiveValue::CSS_EMS); |
- value2 = interpolableValueToLength(lengthToInterpolableValue(*value2).get(), RangeNonNegative); |
+ value2 = interpolableValueToLength(lengthToInterpolableValue(*value2), RangeNonNegative); |
testPrimitiveValue(value2, 0, CSSPrimitiveValue::CSS_EMS); |
} |
@@ -120,10 +120,10 @@ TEST_F(AnimationLengthStyleInterpolationTest, MultipleUnits) |
{ |
CSSLengthArray expectation, actual; |
initLengthArray(expectation); |
- OwnPtrWillBeRawPtr<InterpolableList> result = InterpolableList::create(2); |
+ InterpolableList* result = InterpolableList::create(2); |
result->set(0, createInterpolableLength(0, 10, 0, 10, 0, 10, 0, 10, 0, 10)); |
result->set(1, createInterpolableLength(0, 1, 0, 1, 0, 1, 0, 1, 0, 1)); |
- toCSSPrimitiveValue(interpolableValueToLength(result.get(), RangeAll).get())->accumulateLengthArray(expectation); |
+ toCSSPrimitiveValue(interpolableValueToLength(result, RangeAll).get())->accumulateLengthArray(expectation); |
EXPECT_TRUE(lengthArraysEqual(expectation, setLengthArray(actual, "calc(10% + 10ex + 10ch + 10vh + 10vmax)"))); |
} |
@@ -131,10 +131,10 @@ TEST_F(AnimationLengthStyleInterpolationTest, MultipleUnitsWithSingleValues) |
{ |
CSSLengthArray expectation, actual; |
initLengthArray(expectation); |
- OwnPtrWillBeRawPtr<InterpolableList> result = InterpolableList::create(2); |
+ InterpolableList* result = InterpolableList::create(2); |
result->set(0, createInterpolableLength(0, 10, 0, 10, 0, 10, 0, 10, 0, 10)); |
result->set(1, createInterpolableLength(0, 1, 0, 1, 0, 1, 0, 1, 0, 1)); |
- toCSSPrimitiveValue(interpolableValueToLength(result.get(), RangeAll).get())->accumulateLengthArray(expectation); |
+ toCSSPrimitiveValue(interpolableValueToLength(result, RangeAll).get())->accumulateLengthArray(expectation); |
EXPECT_TRUE(lengthArraysEqual(expectation, setLengthArray(actual, "calc(10% + 10ex + 10ch + 10vh + 10vmax)"))); |
} |
@@ -143,10 +143,10 @@ TEST_F(AnimationLengthStyleInterpolationTest, MultipleUnitsWithMultipleValues) |
{ |
CSSLengthArray expectation, actual; |
initLengthArray(expectation); |
- OwnPtrWillBeRawPtr<InterpolableList> result = InterpolableList::create(2); |
+ InterpolableList* result = InterpolableList::create(2); |
result->set(0, createInterpolableLength(0, 20, 0, 30, 0, 8, 0, 10, 0, 7)); |
result->set(1, createInterpolableLength(0, 1, 0, 1, 0, 1, 0, 1, 0, 1)); |
- toCSSPrimitiveValue(interpolableValueToLength(result.get(), RangeAll).get())->accumulateLengthArray(expectation); |
+ toCSSPrimitiveValue(interpolableValueToLength(result, RangeAll).get())->accumulateLengthArray(expectation); |
EXPECT_TRUE(lengthArraysEqual(expectation, setLengthArray(actual, "calc(20% + 30ex + 8ch + 10vh + 7vmax)"))); |
} |
@@ -155,10 +155,10 @@ TEST_F(AnimationLengthStyleInterpolationTest, MultipleUnitsWithZeroValue) |
{ |
CSSLengthArray expectation, actual; |
initLengthArray(expectation); |
- OwnPtrWillBeRawPtr<InterpolableList> result = InterpolableList::create(2); |
+ InterpolableList* result = InterpolableList::create(2); |
result->set(0, createInterpolableLength(0, 10, 0, 10, 0, 10, 0, 10, 0, 10)); |
result->set(1, createInterpolableLength(1, 1, 0, 1, 0, 1, 0, 1, 0, 1)); |
- toCSSPrimitiveValue(interpolableValueToLength(result.get(), RangeAll).get())->accumulateLengthArray(expectation); |
+ toCSSPrimitiveValue(interpolableValueToLength(result, RangeAll).get())->accumulateLengthArray(expectation); |
EXPECT_TRUE(lengthArraysEqual(expectation, setLengthArray(actual, "calc(0px + 10% + 10ex + 10ch + 10vh + 10vmax)"))); |
} |
@@ -166,10 +166,10 @@ TEST_F(AnimationLengthStyleInterpolationTest, MultipleUnitsWithZeroValues) |
{ |
CSSLengthArray expectation, actual; |
initLengthArray(expectation); |
- OwnPtrWillBeRawPtr<InterpolableList> result = InterpolableList::create(2); |
+ InterpolableList* result = InterpolableList::create(2); |
result->set(0, createInterpolableLength(0, 10, 0, 10, 0, 10, 0, 10, 0, 10)); |
result->set(1, createInterpolableLength(1, 1, 1, 1, 0, 1, 0, 1, 1, 1)); |
- toCSSPrimitiveValue(interpolableValueToLength(result.get(), RangeAll).get())->accumulateLengthArray(expectation); |
+ toCSSPrimitiveValue(interpolableValueToLength(result, RangeAll).get())->accumulateLengthArray(expectation); |
EXPECT_TRUE(lengthArraysEqual(expectation, setLengthArray(actual, "calc(0px + 10% + 0em + 10ex + 10ch + 10vh + 0vmin + 10vmax)"))); |
} |