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

Unified Diff: Source/core/animation/InterpolationTest.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/animation/Interpolation.cpp ('k') | Source/core/animation/KeyframeEffectModelTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/InterpolationTest.cpp
diff --git a/Source/core/animation/InterpolationTest.cpp b/Source/core/animation/InterpolationTest.cpp
index 9e01093b232f799b326ffb0d8ab54e8dca5fe9bd..26c23d92a66b97b917a8a6fef8a51deedc9944f7 100644
--- a/Source/core/animation/InterpolationTest.cpp
+++ b/Source/core/animation/InterpolationTest.cpp
@@ -53,16 +53,9 @@ protected:
return list.release();
}
- 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);
@@ -100,7 +93,7 @@ TEST_F(AnimationInterpolationTest, SingleUnit)
TEST_F(AnimationInterpolationTest, MultipleUnits)
{
CSSLengthArray actual, expectation;
- initLengthArray(expectation);
+ CSSPrimitiveValue::zeroLengthArray(expectation);
OwnPtrWillBeRawPtr<InterpolableList> list = createInterpolableLength(0, 10, 0, 10, 0, 10, 0, 10, 0, 10);
toCSSPrimitiveValue(interpolableValueToLength(list.get()).get())->accumulateLengthArray(expectation);
EXPECT_TRUE(lengthArraysEqual(expectation, setLengthArray(actual, "calc(10%% + 10ex + 10ch + 10vh + 10vmax)")));
« no previous file with comments | « Source/core/animation/Interpolation.cpp ('k') | Source/core/animation/KeyframeEffectModelTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698