| Index: Source/core/animation/LengthStyleInterpolationTest.cpp
|
| diff --git a/Source/core/animation/LengthStyleInterpolationTest.cpp b/Source/core/animation/LengthStyleInterpolationTest.cpp
|
| index 9117139cb1b97f7bf480f14467738dc2b8fb94de..e9041e9908502081d18d52556f269216f9e48e94 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,12 +26,12 @@ protected:
|
|
|
| static PassRefPtrWillBeRawPtr<CSSValue> roundTrip(PassRefPtrWillBeRawPtr<CSSValue> value)
|
| {
|
| - return interpolableValueToLength(lengthToInterpolableValue(*value).get(), RangeAll);
|
| + return interpolableValueToLength(lengthToInterpolableValue(*value), RangeAll);
|
| }
|
|
|
| - 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));
|
| @@ -43,7 +43,7 @@ protected:
|
| list->set(8, InterpolableNumber::create(i));
|
| list->set(9, InterpolableNumber::create(j));
|
|
|
| - return list.release();
|
| + return list;
|
| }
|
|
|
| void initLengthArray(CSSLengthArray& lengthArray)
|
| @@ -101,11 +101,11 @@ TEST_F(AnimationLengthStyleInterpolationTest, SingleUnit)
|
| TEST_F(AnimationLengthStyleInterpolationTest, SingleClampedUnit)
|
| {
|
| RefPtrWillBeRawPtr<CSSValue> value1 = CSSPrimitiveValue::create(-10, CSSPrimitiveValue::UnitType::Pixels);
|
| - value1 = interpolableValueToLength(lengthToInterpolableValue(*value1).get(), RangeNonNegative);
|
| + value1 = interpolableValueToLength(lengthToInterpolableValue(*value1), RangeNonNegative);
|
| TEST_PRIMITIVE_VALUE(value1, 0, CSSPrimitiveValue::UnitType::Pixels);
|
|
|
| RefPtrWillBeRawPtr<CSSValue> value2 = CSSPrimitiveValue::create(-10, CSSPrimitiveValue::UnitType::Ems);
|
| - value2 = interpolableValueToLength(lengthToInterpolableValue(*value2).get(), RangeNonNegative);
|
| + value2 = interpolableValueToLength(lengthToInterpolableValue(*value2), RangeNonNegative);
|
| TEST_PRIMITIVE_VALUE(value2, 0, CSSPrimitiveValue::UnitType::Ems);
|
| }
|
|
|
| @@ -113,10 +113,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);
|
| setLengthArray(actual, "calc(10% + 10ex + 10ch + 10vh + 10vmax)");
|
| EXPECT_CSS_LENGTH_ARRAY_ELEMENTS_EQUAL(expectation, actual);
|
| }
|
| @@ -125,10 +125,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);
|
| setLengthArray(actual, "calc(10% + 10ex + 10ch + 10vh + 10vmax)");
|
| EXPECT_CSS_LENGTH_ARRAY_ELEMENTS_EQUAL(expectation, actual);
|
| }
|
| @@ -137,10 +137,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);
|
| setLengthArray(actual, "calc(20% + 30ex + 8ch + 10vh + 7vmax)");
|
| EXPECT_CSS_LENGTH_ARRAY_ELEMENTS_EQUAL(expectation, actual);
|
| }
|
| @@ -149,10 +149,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);
|
| setLengthArray(actual, "calc(0px + 10% + 10ex + 10ch + 10vh + 10vmax)");
|
| EXPECT_CSS_LENGTH_ARRAY_ELEMENTS_EQUAL(expectation, actual);
|
| }
|
| @@ -161,10 +161,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);
|
| setLengthArray(actual, "calc(0px + 10% + 0em + 10ex + 10ch + 10vh + 0vmin + 10vmax)");
|
| EXPECT_CSS_LENGTH_ARRAY_ELEMENTS_EQUAL(expectation, actual);
|
| }
|
|
|