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

Unified Diff: Source/core/css/CSSCalculationValueTest.cpp

Issue 273683005: Web Animations API: Deferred computation of interpolated values (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add missing test file Created 6 years, 7 months 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
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/css/CSSPrimitiveValue.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/css/CSSPrimitiveValue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698