Chromium Code Reviews| Index: Source/core/css/parser/SizesCalcParserTest.cpp |
| diff --git a/Source/core/css/parser/SizesCalcParserTest.cpp b/Source/core/css/parser/SizesCalcParserTest.cpp |
| index cefcc31a9fffa64d2d5685e69ec83ff2a477f4fd..a83c7bf457bb75edcd4fcbadcfca0356574a3127 100644 |
| --- a/Source/core/css/parser/SizesCalcParserTest.cpp |
| +++ b/Source/core/css/parser/SizesCalcParserTest.cpp |
| @@ -29,14 +29,23 @@ static void initLengthArray(CSSLengthArray& lengthArray) |
| lengthArray.at(i) = 0; |
| } |
| +static void initLengthTypeArray(CSSLengthTypeArray& lengthTypeArray) |
| +{ |
| + lengthTypeArray.resize(CSSPrimitiveValue::LengthUnitTypeCount); |
| + for (size_t i = 0; i < CSSPrimitiveValue::LengthUnitTypeCount; ++i) |
| + lengthTypeArray.clear(i); |
| +} |
| + |
| static void verifyCSSCalc(String text, double value, bool valid, unsigned fontSize, unsigned viewportWidth, unsigned viewportHeight) |
| { |
| CSSLengthArray lengthArray; |
| initLengthArray(lengthArray); |
| + CSSLengthTypeArray lengthTypeArray; |
| + initLengthTypeArray(lengthTypeArray); |
| RefPtrWillBeRawPtr<CSSValue> cssValue = CSSParser::parseSingleValue(CSSPropertyLeft, text); |
| CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(cssValue.get()); |
| if (primitiveValue) |
| - primitiveValue->accumulateLengthArray(lengthArray); |
| + primitiveValue->accumulateLengthArray(lengthArray, lengthTypeArray); |
|
samli
2014/12/22 03:38:05
Not actually used here, so we can remove it if we
evemj (not active)
2014/12/22 06:09:06
Done.
|
| else |
| ASSERT_EQ(valid, false); |
| float length = lengthArray.at(CSSPrimitiveValue::UnitTypePixels); |