| Index: Source/core/animation/AnimationTimelineTest.cpp
|
| diff --git a/Source/core/animation/AnimationTimelineTest.cpp b/Source/core/animation/AnimationTimelineTest.cpp
|
| index ecb532e589a6adde0577e0e6947ed096430943c8..79482a1f4cd40c60de9e18cccdb94b0e711fc746 100644
|
| --- a/Source/core/animation/AnimationTimelineTest.cpp
|
| +++ b/Source/core/animation/AnimationTimelineTest.cpp
|
| @@ -31,9 +31,9 @@
|
| #include "config.h"
|
| #include "core/animation/AnimationTimeline.h"
|
|
|
| -#include "core/animation/Animation.h"
|
| #include "core/animation/AnimationClock.h"
|
| -#include "core/animation/AnimationNode.h"
|
| +#include "core/animation/AnimationEffect.h"
|
| +#include "core/animation/KeyframeEffect.h"
|
| #include "core/animation/KeyframeEffectModel.h"
|
| #include "core/dom/Document.h"
|
| #include "core/dom/Element.h"
|
| @@ -139,14 +139,14 @@ TEST_F(AnimationAnimationTimelineTest, HasStarted)
|
| TEST_F(AnimationAnimationTimelineTest, EmptyKeyframeAnimation)
|
| {
|
| RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = AnimatableValueKeyframeEffectModel::create(AnimatableValueKeyframeVector());
|
| - RefPtrWillBeRawPtr<Animation> anim = Animation::create(element.get(), effect, timing);
|
| + RefPtrWillBeRawPtr<KeyframeEffect> keyframeEffect = KeyframeEffect::create(element.get(), effect, timing);
|
|
|
| - timeline->play(anim.get());
|
| + timeline->play(keyframeEffect.get());
|
|
|
| platformTiming->expectNoMoreActions();
|
| updateClockAndService(0);
|
| EXPECT_FLOAT_EQ(0, timeline->currentTimeInternal());
|
| - EXPECT_FALSE(anim->isInEffect());
|
| + EXPECT_FALSE(keyframeEffect->isInEffect());
|
|
|
| platformTiming->expectNoMoreActions();
|
| updateClockAndService(100);
|
| @@ -157,14 +157,14 @@ TEST_F(AnimationAnimationTimelineTest, EmptyForwardsKeyframeAnimation)
|
| {
|
| RefPtrWillBeRawPtr<AnimatableValueKeyframeEffectModel> effect = AnimatableValueKeyframeEffectModel::create(AnimatableValueKeyframeVector());
|
| timing.fillMode = Timing::FillModeForwards;
|
| - RefPtrWillBeRawPtr<Animation> anim = Animation::create(element.get(), effect, timing);
|
| + RefPtrWillBeRawPtr<KeyframeEffect> keyframeEffect = KeyframeEffect::create(element.get(), effect, timing);
|
|
|
| - timeline->play(anim.get());
|
| + timeline->play(keyframeEffect.get());
|
|
|
| platformTiming->expectNoMoreActions();
|
| updateClockAndService(0);
|
| EXPECT_FLOAT_EQ(0, timeline->currentTimeInternal());
|
| - EXPECT_TRUE(anim->isInEffect());
|
| + EXPECT_TRUE(keyframeEffect->isInEffect());
|
|
|
| platformTiming->expectNoMoreActions();
|
| updateClockAndService(100);
|
| @@ -346,14 +346,14 @@ 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());
|
| + RefPtrWillBeRawPtr<KeyframeEffect> anim1 = KeyframeEffect::create(element.get(), AnimatableValueKeyframeEffectModel::create(AnimatableValueKeyframeVector()), timing);
|
| + RefPtrWillBeRawPtr<KeyframeEffect> anim2 = KeyframeEffect::create(element.get(), AnimatableValueKeyframeEffectModel::create(AnimatableValueKeyframeVector()), timing);
|
| + Animation* animation1 = timeline->play(anim1.get());
|
| + Animation* animation2 = timeline->play(anim2.get());
|
| timeline->pauseAnimationsForTesting(seekTime);
|
|
|
| - EXPECT_FLOAT_EQ(seekTime, player1->currentTime() / 1000.0);
|
| - EXPECT_FLOAT_EQ(seekTime, player2->currentTime() / 1000.0);
|
| + EXPECT_FLOAT_EQ(seekTime, animation1->currentTime() / 1000.0);
|
| + EXPECT_FLOAT_EQ(seekTime, animation2->currentTime() / 1000.0);
|
| }
|
|
|
| TEST_F(AnimationAnimationTimelineTest, DelayBeforeAnimationStart)
|
| @@ -361,11 +361,11 @@ TEST_F(AnimationAnimationTimelineTest, DelayBeforeAnimationStart)
|
| timing.iterationDuration = 2;
|
| timing.startDelay = 5;
|
|
|
| - RefPtrWillBeRawPtr<Animation> anim = Animation::create(element.get(), nullptr, timing);
|
| + RefPtrWillBeRawPtr<KeyframeEffect> keyframeEffect = KeyframeEffect::create(element.get(), nullptr, timing);
|
|
|
| - timeline->play(anim.get());
|
| + timeline->play(keyframeEffect.get());
|
|
|
| - // TODO: Put the player startTime in the future when we add the capability to change player startTime
|
| + // TODO: Put the animation startTime in the future when we add the capability to change animation startTime
|
| platformTiming->expectDelayedAction(timing.startDelay - minimumDelay());
|
| updateClockAndService(0);
|
|
|
| @@ -388,17 +388,17 @@ TEST_F(AnimationAnimationTimelineTest, PlayAfterDocumentDeref)
|
| element = nullptr;
|
| document = nullptr;
|
|
|
| - RefPtrWillBeRawPtr<Animation> anim = Animation::create(0, nullptr, timing);
|
| + RefPtrWillBeRawPtr<KeyframeEffect> keyframeEffect = KeyframeEffect::create(0, nullptr, timing);
|
| // Test passes if this does not crash.
|
| - timeline->play(anim.get());
|
| + timeline->play(keyframeEffect.get());
|
| }
|
|
|
| -TEST_F(AnimationAnimationTimelineTest, UseAnimationPlayerAfterTimelineDeref)
|
| +TEST_F(AnimationAnimationTimelineTest, UseAnimationAfterTimelineDeref)
|
| {
|
| - RefPtrWillBeRawPtr<AnimationPlayer> player = timeline->play(0);
|
| + RefPtrWillBeRawPtr<Animation> animation = timeline->play(0);
|
| timeline.clear();
|
| // Test passes if this does not crash.
|
| - player->setStartTime(0);
|
| + animation->setStartTime(0);
|
| }
|
|
|
| }
|
|
|