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

Unified Diff: Source/core/animation/KeyframeEffectModelTest.cpp

Issue 210783002: Oilpan: Move Interpolation's hierarchy to oilpan's heap (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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/KeyframeEffectModel.cpp ('k') | Source/core/animation/css/CSSAnimations.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/KeyframeEffectModelTest.cpp
diff --git a/Source/core/animation/KeyframeEffectModelTest.cpp b/Source/core/animation/KeyframeEffectModelTest.cpp
index 779da432757951a05b263d9b2ceef3d588729959..892dae38e634bf47d738de534fad648713bfb957 100644
--- a/Source/core/animation/KeyframeEffectModelTest.cpp
+++ b/Source/core/animation/KeyframeEffectModelTest.cpp
@@ -66,13 +66,13 @@ KeyframeEffectModel::KeyframeVector keyframesAtZeroAndOne(PassRefPtrWillBeRawPtr
return keyframes;
}
-void expectProperty(CSSPropertyID property, PassRefPtr<Interpolation> interpolationValue)
+void expectProperty(CSSPropertyID property, PassRefPtrWillBeRawPtr<Interpolation> interpolationValue)
{
LegacyStyleInterpolation* interpolation = toLegacyStyleInterpolation(interpolationValue.get());
ASSERT_EQ(property, interpolation->id());
}
-void expectDoubleValue(double expectedValue, PassRefPtr<Interpolation> interpolationValue)
+void expectDoubleValue(double expectedValue, PassRefPtrWillBeRawPtr<Interpolation> interpolationValue)
{
LegacyStyleInterpolation* interpolation = toLegacyStyleInterpolation(interpolationValue.get());
RefPtrWillBeRawPtr<AnimatableValue> value = interpolation->currentValue();
@@ -88,7 +88,7 @@ void expectDoubleValue(double expectedValue, PassRefPtr<Interpolation> interpola
EXPECT_FLOAT_EQ(static_cast<float>(expectedValue), actualValue);
}
-Interpolation* findValue(Vector<RefPtr<Interpolation> >& values, CSSPropertyID id)
+Interpolation* findValue(WillBeHeapVector<RefPtrWillBeMember<Interpolation> >& values, CSSPropertyID id)
{
for (size_t i = 0; i < values.size(); ++i) {
LegacyStyleInterpolation* value = toLegacyStyleInterpolation(values.at(i).get());
@@ -103,7 +103,7 @@ TEST(AnimationKeyframeEffectModel, BasicOperation)
{
KeyframeEffectModel::KeyframeVector keyframes = keyframesAtZeroAndOne(unknownAnimatableValue(3.0), unknownAnimatableValue(5.0));
RefPtrWillBeRawPtr<KeyframeEffectModel> effect = KeyframeEffectModel::create(keyframes);
- OwnPtr<Vector<RefPtr<Interpolation> > > values = effect->sample(0, 0.6, duration);
+ OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation> > > values = effect->sample(0, 0.6, duration);
ASSERT_EQ(1UL, values->size());
expectProperty(CSSPropertyLeft, values->at(0));
expectDoubleValue(5.0, values->at(0));
@@ -343,7 +343,7 @@ TEST(AnimationKeyframeEffectModel, MultipleProperties)
keyframes[1]->setPropertyValue(CSSPropertyRight, unknownAnimatableValue(6.0).get());
RefPtrWillBeRawPtr<KeyframeEffectModel> effect = KeyframeEffectModel::create(keyframes);
- OwnPtr<Vector<RefPtr<Interpolation> > > values = effect->sample(0, 0.6, duration);
+ OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation> > > values = effect->sample(0, 0.6, duration);
EXPECT_EQ(2UL, values->size());
Interpolation* leftValue = findValue(*values.get(), CSSPropertyLeft);
ASSERT_TRUE(leftValue);
@@ -360,7 +360,7 @@ TEST(AnimationKeyframeEffectModel, DISABLED_RecompositeCompositableValue)
keyframes[0]->setComposite(AnimationEffect::CompositeAdd);
keyframes[1]->setComposite(AnimationEffect::CompositeAdd);
RefPtrWillBeRawPtr<KeyframeEffectModel> effect = KeyframeEffectModel::create(keyframes);
- OwnPtr<Vector<RefPtr<Interpolation> > > values = effect->sample(0, 0.6, duration);
+ OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation> > > values = effect->sample(0, 0.6, duration);
expectDoubleValue((7.0 + 3.0) * 0.4 + (7.0 + 5.0) * 0.6, values->at(0));
expectDoubleValue((9.0 + 3.0) * 0.4 + (9.0 + 5.0) * 0.6, values->at(0));
}
« no previous file with comments | « Source/core/animation/KeyframeEffectModel.cpp ('k') | Source/core/animation/css/CSSAnimations.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698