Index: Source/core/animation/AnimationTest.cpp |
diff --git a/Source/core/animation/AnimationTest.cpp b/Source/core/animation/AnimationTest.cpp |
index f1b47466ea05d0a8ae1590f5992df2614b0d6200..e19aa23cbf43e7115d7035d6988ce37dfccfa0eb 100644 |
--- a/Source/core/animation/AnimationTest.cpp |
+++ b/Source/core/animation/AnimationTest.cpp |
@@ -60,7 +60,7 @@ protected: |
timeline = AnimationTimeline::create(document.get()); |
animation = timeline->play(0); |
animation->setStartTime(0); |
- animation->setSource(makeAnimation().get()); |
+ animation->setSource(makeAnimation()); |
} |
void startTimeline() |
@@ -68,7 +68,7 @@ protected: |
simulateFrame(0); |
} |
- PassRefPtrWillBeRawPtr<KeyframeEffect> makeAnimation(double duration = 30, double playbackRate = 1) |
+ KeyframeEffect* makeAnimation(double duration = 30, double playbackRate = 1) |
{ |
Timing timing; |
timing.iterationDuration = duration; |
@@ -85,8 +85,8 @@ protected: |
} |
RefPtrWillBePersistent<Document> document; |
- RefPtrWillBePersistent<AnimationTimeline> timeline; |
- RefPtrWillBePersistent<Animation> animation; |
+ Persistent<AnimationTimeline> timeline; |
+ Persistent<Animation> animation; |
TrackExceptionState exceptionState; |
}; |
@@ -506,7 +506,7 @@ TEST_F(AnimationAnimationTest, FinishRaisesException) |
Timing timing; |
timing.iterationDuration = 1; |
timing.iterationCount = std::numeric_limits<double>::infinity(); |
- animation->setSource(KeyframeEffect::create(0, nullptr, timing).get()); |
+ animation->setSource(KeyframeEffect::create(0, nullptr, timing)); |
animation->setCurrentTimeInternal(10); |
animation->finish(exceptionState); |
@@ -623,13 +623,13 @@ TEST_F(AnimationAnimationTest, SetSource) |
{ |
animation = timeline->play(0); |
animation->setStartTime(0); |
- RefPtrWillBeRawPtr<AnimationEffect> source1 = makeAnimation(); |
- RefPtrWillBeRawPtr<AnimationEffect> source2 = makeAnimation(); |
- animation->setSource(source1.get()); |
+ AnimationEffect* source1 = makeAnimation(); |
+ AnimationEffect* source2 = makeAnimation(); |
+ animation->setSource(source1); |
EXPECT_EQ(source1, animation->source()); |
EXPECT_EQ(0, animation->currentTimeInternal()); |
animation->setCurrentTimeInternal(15); |
- animation->setSource(source2.get()); |
+ animation->setSource(source2); |
EXPECT_EQ(15, animation->currentTimeInternal()); |
EXPECT_EQ(0, source1->animation()); |
EXPECT_EQ(animation.get(), source2->animation()); |
@@ -639,7 +639,7 @@ TEST_F(AnimationAnimationTest, SetSource) |
TEST_F(AnimationAnimationTest, SetSourceLimitsAnimation) |
{ |
animation->setCurrentTimeInternal(20); |
- animation->setSource(makeAnimation(10).get()); |
+ animation->setSource(makeAnimation(10)); |
EXPECT_EQ(20, animation->currentTimeInternal()); |
EXPECT_TRUE(animation->limited()); |
simulateFrame(10); |
@@ -649,7 +649,7 @@ TEST_F(AnimationAnimationTest, SetSourceLimitsAnimation) |
TEST_F(AnimationAnimationTest, SetSourceUnlimitsAnimation) |
{ |
animation->setCurrentTimeInternal(40); |
- animation->setSource(makeAnimation(60).get()); |
+ animation->setSource(makeAnimation(60)); |
EXPECT_FALSE(animation->limited()); |
EXPECT_EQ(40, animation->currentTimeInternal()); |
simulateFrame(10); |
@@ -682,8 +682,8 @@ TEST_F(AnimationAnimationTest, AnimationsReturnTimeToNextEffect) |
timing.startDelay = 1; |
timing.iterationDuration = 1; |
timing.endDelay = 1; |
- RefPtrWillBeRawPtr<KeyframeEffect> keyframeEffect = KeyframeEffect::create(0, nullptr, timing); |
- animation = timeline->play(keyframeEffect.get()); |
+ KeyframeEffect* keyframeEffect = KeyframeEffect::create(0, nullptr, timing); |
+ animation = timeline->play(keyframeEffect); |
animation->setStartTime(0); |
simulateFrame(0); |
@@ -783,22 +783,21 @@ TEST_F(AnimationAnimationTest, AttachedAnimations) |
RefPtrWillBePersistent<Element> element = document->createElement("foo", ASSERT_NO_EXCEPTION); |
Timing timing; |
- RefPtrWillBeRawPtr<KeyframeEffect> keyframeEffect = KeyframeEffect::create(element.get(), nullptr, timing); |
- RefPtrWillBeRawPtr<Animation> animation = timeline->play(keyframeEffect.get()); |
+ KeyframeEffect* keyframeEffect = KeyframeEffect::create(element.get(), nullptr, timing); |
+ Animation* anim = timeline->play(keyframeEffect); |
simulateFrame(0); |
timeline->serviceAnimations(TimingUpdateForAnimationFrame); |
- EXPECT_EQ(1U, element->elementAnimations()->animations().find(animation.get())->value); |
+ EXPECT_EQ(1U, element->elementAnimations()->animations().find(anim)->value); |
- animation.release(); |
Heap::collectAllGarbage(); |
EXPECT_TRUE(element->elementAnimations()->animations().isEmpty()); |
} |
TEST_F(AnimationAnimationTest, HasLowerPriority) |
{ |
- RefPtrWillBeRawPtr<Animation> animation1 = timeline->play(0); |
- RefPtrWillBeRawPtr<Animation> animation2 = timeline->play(0); |
- EXPECT_TRUE(Animation::hasLowerPriority(animation1.get(), animation2.get())); |
+ Animation* animation1 = timeline->play(nullptr); |
+ Animation* animation2 = timeline->play(nullptr); |
+ EXPECT_TRUE(Animation::hasLowerPriority(animation1, animation2)); |
} |
TEST_F(AnimationAnimationTest, PlayAfterCancel) |
@@ -875,5 +874,4 @@ TEST_F(AnimationAnimationTest, PauseAfterCancel) |
EXPECT_TRUE(std::isnan(animation->currentTime())); |
EXPECT_TRUE(std::isnan(animation->startTime())); |
} |
- |
} |