| Index: Source/core/animation/InterpolationEffectTest.cpp
|
| diff --git a/Source/core/animation/InterpolationEffectTest.cpp b/Source/core/animation/InterpolationEffectTest.cpp
|
| index 1d5c5d6daf6e3934277dae189f426cbf4e528ef3..e13ef629e6662f5d751a7489e9800b6e3e6f24d9 100644
|
| --- a/Source/core/animation/InterpolationEffectTest.cpp
|
| +++ b/Source/core/animation/InterpolationEffectTest.cpp
|
| @@ -34,22 +34,23 @@ TEST_F(AnimationInterpolationEffectTest, SingleInterpolation)
|
| interpolationEffect->addInterpolation(Interpolation::create(InterpolableNumber::create(0), InterpolableNumber::create(10)),
|
| RefPtr<TimingFunction>(), 0, 1, -1, 2);
|
|
|
| - OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation> > > activeInterpolations = interpolationEffect->getActiveInterpolations(-2, duration);
|
| + OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation> > > activeInterpolations = nullptr;
|
| + interpolationEffect->getActiveInterpolations(-2, duration, activeInterpolations);
|
| EXPECT_EQ(0ul, activeInterpolations->size());
|
|
|
| - activeInterpolations = interpolationEffect->getActiveInterpolations(-0.5, duration);
|
| + interpolationEffect->getActiveInterpolations(-0.5, duration, activeInterpolations);
|
| EXPECT_EQ(1ul, activeInterpolations->size());
|
| EXPECT_EQ(-5, getInterpolableNumber(activeInterpolations->at(0)));
|
|
|
| - activeInterpolations = interpolationEffect->getActiveInterpolations(0.5, duration);
|
| + interpolationEffect->getActiveInterpolations(0.5, duration, activeInterpolations);
|
| EXPECT_EQ(1ul, activeInterpolations->size());
|
| EXPECT_FLOAT_EQ(5, getInterpolableNumber(activeInterpolations->at(0)));
|
|
|
| - activeInterpolations = interpolationEffect->getActiveInterpolations(1.5, duration);
|
| + interpolationEffect->getActiveInterpolations(1.5, duration, activeInterpolations);
|
| EXPECT_EQ(1ul, activeInterpolations->size());
|
| EXPECT_FLOAT_EQ(15, getInterpolableNumber(activeInterpolations->at(0)));
|
|
|
| - activeInterpolations = interpolationEffect->getActiveInterpolations(3, duration);
|
| + interpolationEffect->getActiveInterpolations(3, duration, activeInterpolations);
|
| EXPECT_EQ(0ul, activeInterpolations->size());
|
| }
|
|
|
| @@ -63,36 +64,36 @@ TEST_F(AnimationInterpolationEffectTest, MultipleInterpolations)
|
| interpolationEffect->addInterpolation(Interpolation::create(InterpolableNumber::create(1), InterpolableNumber::create(6)),
|
| CubicBezierTimingFunction::preset(CubicBezierTimingFunction::Ease), 0.5, 1.5, 0.5, 1.5);
|
|
|
| - OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation> > > activeInterpolations = interpolationEffect->getActiveInterpolations(-0.5, duration);
|
| + OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation> > > activeInterpolations = nullptr;
|
| + interpolationEffect->getActiveInterpolations(-0.5, duration, activeInterpolations);
|
| EXPECT_EQ(0ul, activeInterpolations->size());
|
|
|
| - activeInterpolations = interpolationEffect->getActiveInterpolations(0, duration);
|
| + interpolationEffect->getActiveInterpolations(0, duration, activeInterpolations);
|
| EXPECT_EQ(1ul, activeInterpolations->size());
|
| EXPECT_FLOAT_EQ(0, getInterpolableNumber(activeInterpolations->at(0)));
|
|
|
| - activeInterpolations = interpolationEffect->getActiveInterpolations(0.5, duration);
|
| + interpolationEffect->getActiveInterpolations(0.5, duration, activeInterpolations);
|
| EXPECT_EQ(2ul, activeInterpolations->size());
|
| EXPECT_FLOAT_EQ(0.5f, getInterpolableNumber(activeInterpolations->at(0)));
|
| EXPECT_FLOAT_EQ(1, getInterpolableNumber(activeInterpolations->at(1)));
|
|
|
| - activeInterpolations = interpolationEffect->getActiveInterpolations(1, duration);
|
| + interpolationEffect->getActiveInterpolations(1, duration, activeInterpolations);
|
| EXPECT_EQ(2ul, activeInterpolations->size());
|
| EXPECT_FLOAT_EQ(10, getInterpolableNumber(activeInterpolations->at(0)));
|
| EXPECT_FLOAT_EQ(5.0282884f, getInterpolableNumber(activeInterpolations->at(1)));
|
|
|
| - activeInterpolations = interpolationEffect->getActiveInterpolations(1, duration * 1000);
|
| + interpolationEffect->getActiveInterpolations(1, duration * 1000, activeInterpolations);
|
| EXPECT_EQ(2ul, activeInterpolations->size());
|
| EXPECT_FLOAT_EQ(10, getInterpolableNumber(activeInterpolations->at(0)));
|
| EXPECT_FLOAT_EQ(5.0120168f, getInterpolableNumber(activeInterpolations->at(1)));
|
|
|
| - activeInterpolations = interpolationEffect->getActiveInterpolations(1.5, duration);
|
| + interpolationEffect->getActiveInterpolations(1.5, duration, activeInterpolations);
|
| EXPECT_EQ(1ul, activeInterpolations->size());
|
| EXPECT_FLOAT_EQ(12.5f, getInterpolableNumber(activeInterpolations->at(0)));
|
|
|
| - activeInterpolations = interpolationEffect->getActiveInterpolations(2, duration);
|
| + interpolationEffect->getActiveInterpolations(2, duration, activeInterpolations);
|
| EXPECT_EQ(1ul, activeInterpolations->size());
|
| EXPECT_FLOAT_EQ(15, getInterpolableNumber(activeInterpolations->at(0)));
|
| }
|
|
|
| }
|
| -
|
|
|