| Index: Source/core/css/CSSCalculationValueTest.cpp
|
| diff --git a/Source/core/css/CSSCalculationValueTest.cpp b/Source/core/css/CSSCalculationValueTest.cpp
|
| index 76179e5c653253604847d82ddc1ba4ccc38c69e5..6e165c4b3813de6e4cc7dd465fa76e020cc75417 100644
|
| --- a/Source/core/css/CSSCalculationValueTest.cpp
|
| +++ b/Source/core/css/CSSCalculationValueTest.cpp
|
| @@ -62,16 +62,9 @@ void testAccumulatePixelsAndPercent(const CSSToLengthConversionData& conversionD
|
| EXPECT_EQ(expectedPercent, value.percent);
|
| }
|
|
|
| -void initLengthArray(CSSLengthArray& lengthArray)
|
| -{
|
| - lengthArray.resize(CSSPrimitiveValue::LengthUnitTypeCount);
|
| - for (size_t i = 0; i < CSSPrimitiveValue::LengthUnitTypeCount; ++i)
|
| - lengthArray.at(i) = 0;
|
| -}
|
| -
|
| CSSLengthArray& setLengthArray(CSSLengthArray& lengthArray, String text)
|
| {
|
| - initLengthArray(lengthArray);
|
| + CSSPrimitiveValue::zeroLengthArray(lengthArray);
|
| RefPtr<MutableStylePropertySet> propertySet = MutableStylePropertySet::create();
|
| propertySet->setProperty(CSSPropertyLeft, text);
|
| toCSSPrimitiveValue(propertySet->getPropertyCSSValue(CSSPropertyLeft).get())->accumulateLengthArray(lengthArray);
|
| @@ -171,7 +164,7 @@ TEST(CSSCalculationValue, RefCountLeak)
|
| TEST(CSSCalculationValue, AddToLengthUnitValues)
|
| {
|
| CSSLengthArray expectation, actual;
|
| - initLengthArray(expectation);
|
| + CSSPrimitiveValue::zeroLengthArray(expectation);
|
| EXPECT_TRUE(lengthArraysEqual(expectation, setLengthArray(actual, "0")));
|
|
|
| expectation.at(CSSPrimitiveValue::UnitTypePixels) = 10;
|
|
|