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

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

Issue 225073004: Oilpan: Completely move core/animations/ to oilpan's heap (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 8 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
Index: Source/core/animation/AnimationPlayerTest.cpp
diff --git a/Source/core/animation/AnimationPlayerTest.cpp b/Source/core/animation/AnimationPlayerTest.cpp
index d334474fbb1a950fae23c3c2b7bcddcf9e761e4b..2128889cd146757d6d8cad169688b7f2d7841da2 100644
--- a/Source/core/animation/AnimationPlayerTest.cpp
+++ b/Source/core/animation/AnimationPlayerTest.cpp
@@ -68,7 +68,7 @@ protected:
updateTimeline(0);
}
- PassRefPtr<Animation> makeAnimation(double duration = 30, double playbackRate = 1)
+ PassRefPtrWillBeRawPtr<Animation> makeAnimation(double duration = 30, double playbackRate = 1)
{
Timing timing;
timing.iterationDuration = duration;
@@ -84,8 +84,8 @@ protected:
}
RefPtr<Document> document;
- RefPtr<DocumentTimeline> timeline;
- RefPtr<AnimationPlayer> player;
+ RefPtrWillBePersistent<DocumentTimeline> timeline;
+ RefPtrWillBePersistent<AnimationPlayer> player;
TrackExceptionState exceptionState;
};
@@ -576,8 +576,8 @@ TEST_F(AnimationAnimationPlayerTest, SetSource)
{
player = timeline->createAnimationPlayer(0);
player->setStartTime(0);
- RefPtr<TimedItem> source1 = makeAnimation();
- RefPtr<TimedItem> source2 = makeAnimation();
+ RefPtrWillBeRawPtr<TimedItem> source1 = makeAnimation();
+ RefPtrWillBeRawPtr<TimedItem> source2 = makeAnimation();
player->setSource(source1.get());
EXPECT_EQ(source1, player->source());
EXPECT_EQ(0, player->currentTime());
@@ -634,7 +634,7 @@ TEST_F(AnimationAnimationPlayerTest, AnimationPlayersReturnTimeToNextEffect)
timing.startDelay = 1;
timing.iterationDuration = 1;
timing.endDelay = 1;
- RefPtr<Animation> animation = Animation::create(nullptr, nullptr, timing);
+ RefPtrWillBeRawPtr<Animation> animation = Animation::create(nullptr, nullptr, timing);
player = timeline->createAnimationPlayer(animation.get());
player->setStartTime(0);
@@ -711,12 +711,12 @@ TEST_F(AnimationAnimationPlayerTest, AttachedAnimationPlayers)
RefPtr<Element> element = document->createElement("foo", ASSERT_NO_EXCEPTION);
Timing timing;
- RefPtr<Animation> animation = Animation::create(element, nullptr, timing);
- RefPtr<AnimationPlayer> player = timeline->createAnimationPlayer(animation.get());
+ RefPtrWillBeRawPtr<Animation> animation = Animation::create(element, nullptr, timing);
+ RefPtrWillBeRawPtr<AnimationPlayer> player = timeline->createAnimationPlayer(animation.get());
timeline->serviceAnimations(AnimationPlayer::UpdateForAnimationFrame);
- EXPECT_EQ(1U, element->activeAnimations()->players().find(player.get())->value);
-
+ EXPECT_EQ(element->activeAnimations()->players().get(player.get()));
player.release();
+ Heap::collectAllGarbage();
EXPECT_TRUE(element->activeAnimations()->players().isEmpty());
}
@@ -724,17 +724,17 @@ TEST_F(AnimationAnimationPlayerTest, HasLowerPriority)
{
// Sort time defaults to timeline current time
updateTimeline(15);
- RefPtr<AnimationPlayer> player1 = timeline->createAnimationPlayer(0);
- RefPtr<AnimationPlayer> player2 = timeline->createAnimationPlayer(0);
+ RefPtrWillBeRawPtr<AnimationPlayer> player1 = timeline->createAnimationPlayer(0);
+ RefPtrWillBeRawPtr<AnimationPlayer> player2 = timeline->createAnimationPlayer(0);
player2->setStartTime(10);
- RefPtr<AnimationPlayer> player3 = timeline->createAnimationPlayer(0);
- RefPtr<AnimationPlayer> player4 = timeline->createAnimationPlayer(0);
+ RefPtrWillBeRawPtr<AnimationPlayer> player3 = timeline->createAnimationPlayer(0);
+ RefPtrWillBeRawPtr<AnimationPlayer> player4 = timeline->createAnimationPlayer(0);
player4->setStartTime(20);
- RefPtr<AnimationPlayer> player5 = timeline->createAnimationPlayer(0);
+ RefPtrWillBeRawPtr<AnimationPlayer> player5 = timeline->createAnimationPlayer(0);
player5->setStartTime(10);
- RefPtr<AnimationPlayer> player6 = timeline->createAnimationPlayer(0);
+ RefPtrWillBeRawPtr<AnimationPlayer> player6 = timeline->createAnimationPlayer(0);
player6->setStartTime(-10);
- Vector<RefPtr<AnimationPlayer> > players;
+ WillBeHeapVector<RefPtrWillBeMember<AnimationPlayer> > players;
players.append(player6);
players.append(player2);
players.append(player5);

Powered by Google App Engine
This is Rietveld 408576698