| Index: Source/core/animation/AnimationTimelineTest.cpp
|
| diff --git a/Source/core/animation/AnimationTimelineTest.cpp b/Source/core/animation/AnimationTimelineTest.cpp
|
| index ecb532e589a6adde0577e0e6947ed096430943c8..ef8498c29e5dc45d23bf91a43699d7a9b5e336f3 100644
|
| --- a/Source/core/animation/AnimationTimelineTest.cpp
|
| +++ b/Source/core/animation/AnimationTimelineTest.cpp
|
| @@ -92,7 +92,7 @@ protected:
|
| document->animationClock().resetTimeForTesting();
|
| element = Element::create(QualifiedName::null() , document.get());
|
| platformTiming = new MockPlatformTiming;
|
| - timeline = AnimationTimeline::create(document.get(), adoptPtrWillBeNoop(platformTiming));
|
| + timeline = AnimationTimeline::create(document.get(), platformTiming);
|
| ASSERT_EQ(0, timeline->currentTimeInternal());
|
| }
|
|
|
| @@ -101,9 +101,7 @@ protected:
|
| document.release();
|
| element.release();
|
| timeline.release();
|
| -#if ENABLE(OILPAN)
|
| Heap::collectAllGarbage();
|
| -#endif
|
| }
|
|
|
| void updateClockAndService(double time)
|
| @@ -116,9 +114,9 @@ protected:
|
|
|
| RefPtrWillBePersistent<Document> document;
|
| RefPtrWillBePersistent<Element> element;
|
| - RefPtrWillBePersistent<AnimationTimeline> timeline;
|
| + Persistent<AnimationTimeline> timeline;
|
| Timing timing;
|
| - MockPlatformTiming* platformTiming;
|
| + Persistent<MockPlatformTiming> platformTiming;
|
|
|
| void wake()
|
| {
|
| @@ -138,10 +136,10 @@ TEST_F(AnimationAnimationTimelineTest, HasStarted)
|
|
|
| TEST_F(AnimationAnimationTimelineTest, EmptyKeyframeAnimation)
|
| {
|
| - RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = AnimatableValueKeyframeEffectModel::create(AnimatableValueKeyframeVector());
|
| - RefPtrWillBeRawPtr<Animation> anim = Animation::create(element.get(), effect, timing);
|
| + AnimatableValueKeyframeEffectModel* effect = AnimatableValueKeyframeEffectModel::create(AnimatableValueKeyframeVector());
|
| + Animation* anim = Animation::create(element.get(), effect, timing);
|
|
|
| - timeline->play(anim.get());
|
| + timeline->play(anim);
|
|
|
| platformTiming->expectNoMoreActions();
|
| updateClockAndService(0);
|
| @@ -155,11 +153,11 @@ TEST_F(AnimationAnimationTimelineTest, EmptyKeyframeAnimation)
|
|
|
| TEST_F(AnimationAnimationTimelineTest, EmptyForwardsKeyframeAnimation)
|
| {
|
| - RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = AnimatableValueKeyframeEffectModel::create(AnimatableValueKeyframeVector());
|
| + AnimatableValueKeyframeEffectModel* effect = AnimatableValueKeyframeEffectModel::create(AnimatableValueKeyframeVector());
|
| timing.fillMode = Timing::FillModeForwards;
|
| - RefPtrWillBeRawPtr<Animation> anim = Animation::create(element.get(), effect, timing);
|
| + Animation* anim = Animation::create(element.get(), effect, timing);
|
|
|
| - timeline->play(anim.get());
|
| + timeline->play(anim);
|
|
|
| platformTiming->expectNoMoreActions();
|
| updateClockAndService(0);
|
| @@ -346,10 +344,10 @@ TEST_F(AnimationAnimationTimelineTest, PauseForTesting)
|
| {
|
| float seekTime = 1;
|
| timing.fillMode = Timing::FillModeForwards;
|
| - RefPtrWillBeRawPtr<Animation> anim1 = Animation::create(element.get(), AnimatableValueKeyframeEffectModel::create(AnimatableValueKeyframeVector()), timing);
|
| - RefPtrWillBeRawPtr<Animation> anim2 = Animation::create(element.get(), AnimatableValueKeyframeEffectModel::create(AnimatableValueKeyframeVector()), timing);
|
| - AnimationPlayer* player1 = timeline->play(anim1.get());
|
| - AnimationPlayer* player2 = timeline->play(anim2.get());
|
| + Animation* anim1 = Animation::create(element.get(), AnimatableValueKeyframeEffectModel::create(AnimatableValueKeyframeVector()), timing);
|
| + Animation* anim2 = Animation::create(element.get(), AnimatableValueKeyframeEffectModel::create(AnimatableValueKeyframeVector()), timing);
|
| + AnimationPlayer* player1 = timeline->play(anim1);
|
| + AnimationPlayer* player2 = timeline->play(anim2);
|
| timeline->pauseAnimationsForTesting(seekTime);
|
|
|
| EXPECT_FLOAT_EQ(seekTime, player1->currentTime() / 1000.0);
|
| @@ -361,9 +359,9 @@ TEST_F(AnimationAnimationTimelineTest, DelayBeforeAnimationStart)
|
| timing.iterationDuration = 2;
|
| timing.startDelay = 5;
|
|
|
| - RefPtrWillBeRawPtr<Animation> anim = Animation::create(element.get(), nullptr, timing);
|
| + Animation* anim = Animation::create(element.get(), nullptr, timing);
|
|
|
| - timeline->play(anim.get());
|
| + timeline->play(anim);
|
|
|
| // TODO: Put the player startTime in the future when we add the capability to change player startTime
|
| platformTiming->expectDelayedAction(timing.startDelay - minimumDelay());
|
| @@ -388,9 +386,9 @@ TEST_F(AnimationAnimationTimelineTest, PlayAfterDocumentDeref)
|
| element = nullptr;
|
| document = nullptr;
|
|
|
| - RefPtrWillBeRawPtr<Animation> anim = Animation::create(0, nullptr, timing);
|
| + Animation* anim = Animation::create(0, nullptr, timing);
|
| // Test passes if this does not crash.
|
| - timeline->play(anim.get());
|
| + timeline->play(anim);
|
| }
|
|
|
| TEST_F(AnimationAnimationTimelineTest, UseAnimationPlayerAfterTimelineDeref)
|
|
|