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

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

Issue 1318543009: Oilpan: Partially ship Oilpan for core/animations (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 3 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
« no previous file with comments | « Source/core/animation/AnimationStack.cpp ('k') | Source/core/animation/AnimationTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/AnimationStackTest.cpp
diff --git a/Source/core/animation/AnimationStackTest.cpp b/Source/core/animation/AnimationStackTest.cpp
index 3054b783aea3d1964a88c5ef55ccd24145bdfaa0..e153ad4b18d9008b5b1b781db094c2103a46759e 100644
--- a/Source/core/animation/AnimationStackTest.cpp
+++ b/Source/core/animation/AnimationStackTest.cpp
@@ -39,12 +39,12 @@ protected:
timeline->serviceAnimations(TimingUpdateForAnimationFrame);
}
- const WillBeHeapVector<OwnPtrWillBeMember<SampledEffect>>& effects()
+ const HeapVector<Member<SampledEffect>>& effects()
{
return element->ensureElementAnimations().defaultStack().m_effects;
}
- PassRefPtrWillBeRawPtr<EffectModel> makeEffectModel(CSSPropertyID id, PassRefPtrWillBeRawPtr<AnimatableValue> value)
+ EffectModel* makeEffectModel(CSSPropertyID id, PassRefPtrWillBeRawPtr<AnimatableValue> value)
{
AnimatableValueKeyframeVector keyframes(2);
keyframes[0] = AnimatableValueKeyframe::create();
@@ -56,14 +56,14 @@ protected:
return AnimatableValueKeyframeEffectModel::create(keyframes);
}
- PassRefPtrWillBeRawPtr<InertEffect> makeInertEffect(PassRefPtrWillBeRawPtr<EffectModel> effect)
+ InertEffect* makeInertEffect(EffectModel* effect)
{
Timing timing;
timing.fillMode = Timing::FillModeBoth;
return InertEffect::create(effect, timing, false, 0);
}
- PassRefPtrWillBeRawPtr<KeyframeEffect> makeKeyframeEffect(PassRefPtrWillBeRawPtr<EffectModel> effect, double duration = 10)
+ KeyframeEffect* makeKeyframeEffect(EffectModel* effect, double duration = 10)
{
Timing timing;
timing.fillMode = Timing::FillModeBoth;
@@ -78,15 +78,15 @@ protected:
}
RefPtrWillBePersistent<Document> document;
- RefPtrWillBePersistent<AnimationTimeline> timeline;
+ Persistent<AnimationTimeline> timeline;
RefPtrWillBePersistent<Element> element;
};
TEST_F(AnimationAnimationStackTest, ElementAnimationsSorted)
{
- play(makeKeyframeEffect(makeEffectModel(CSSPropertyFontSize, AnimatableDouble::create(1))).get(), 10);
- play(makeKeyframeEffect(makeEffectModel(CSSPropertyFontSize, AnimatableDouble::create(2))).get(), 15);
- play(makeKeyframeEffect(makeEffectModel(CSSPropertyFontSize, AnimatableDouble::create(3))).get(), 5);
+ play(makeKeyframeEffect(makeEffectModel(CSSPropertyFontSize, AnimatableDouble::create(1))), 10);
+ play(makeKeyframeEffect(makeEffectModel(CSSPropertyFontSize, AnimatableDouble::create(2))), 15);
+ play(makeKeyframeEffect(makeEffectModel(CSSPropertyFontSize, AnimatableDouble::create(3))), 5);
ActiveInterpolationMap result = AnimationStack::activeInterpolations(&element->elementAnimations()->defaultStack(), 0, 0, KeyframeEffect::DefaultPriority, 0);
EXPECT_EQ(1u, result.size());
EXPECT_TRUE(interpolationValue(result, CSSPropertyFontSize)->equals(AnimatableDouble::create(3).get()));
@@ -94,13 +94,13 @@ TEST_F(AnimationAnimationStackTest, ElementAnimationsSorted)
TEST_F(AnimationAnimationStackTest, NewAnimations)
{
- play(makeKeyframeEffect(makeEffectModel(CSSPropertyFontSize, AnimatableDouble::create(1))).get(), 15);
- play(makeKeyframeEffect(makeEffectModel(CSSPropertyZIndex, AnimatableDouble::create(2))).get(), 10);
- WillBeHeapVector<RawPtrWillBeMember<InertEffect>> newAnimations;
- RefPtrWillBeRawPtr<InertEffect> inert1 = makeInertEffect(makeEffectModel(CSSPropertyFontSize, AnimatableDouble::create(3)));
- RefPtrWillBeRawPtr<InertEffect> inert2 = makeInertEffect(makeEffectModel(CSSPropertyZIndex, AnimatableDouble::create(4)));
- newAnimations.append(inert1.get());
- newAnimations.append(inert2.get());
+ play(makeKeyframeEffect(makeEffectModel(CSSPropertyFontSize, AnimatableDouble::create(1))), 15);
+ play(makeKeyframeEffect(makeEffectModel(CSSPropertyZIndex, AnimatableDouble::create(2))), 10);
+ HeapVector<Member<InertEffect>> newAnimations;
+ InertEffect* inert1 = makeInertEffect(makeEffectModel(CSSPropertyFontSize, AnimatableDouble::create(3)));
+ InertEffect* inert2 = makeInertEffect(makeEffectModel(CSSPropertyZIndex, AnimatableDouble::create(4)));
+ newAnimations.append(inert1);
+ newAnimations.append(inert2);
ActiveInterpolationMap result = AnimationStack::activeInterpolations(&element->elementAnimations()->defaultStack(), &newAnimations, 0, KeyframeEffect::DefaultPriority, 10);
EXPECT_EQ(2u, result.size());
EXPECT_TRUE(interpolationValue(result, CSSPropertyFontSize)->equals(AnimatableDouble::create(3).get()));
@@ -109,10 +109,10 @@ TEST_F(AnimationAnimationStackTest, NewAnimations)
TEST_F(AnimationAnimationStackTest, CancelledAnimations)
{
- WillBeHeapHashSet<RawPtrWillBeMember<const Animation>> cancelledAnimations;
- RefPtrWillBeRawPtr<Animation> animation = play(makeKeyframeEffect(makeEffectModel(CSSPropertyFontSize, AnimatableDouble::create(1))).get(), 0);
- cancelledAnimations.add(animation.get());
- play(makeKeyframeEffect(makeEffectModel(CSSPropertyZIndex, AnimatableDouble::create(2))).get(), 0);
+ HeapHashSet<Member<const Animation>> cancelledAnimations;
+ Animation* animation = play(makeKeyframeEffect(makeEffectModel(CSSPropertyFontSize, AnimatableDouble::create(1))), 0);
+ cancelledAnimations.add(animation);
+ play(makeKeyframeEffect(makeEffectModel(CSSPropertyZIndex, AnimatableDouble::create(2))), 0);
ActiveInterpolationMap result = AnimationStack::activeInterpolations(&element->elementAnimations()->defaultStack(), 0, &cancelledAnimations, KeyframeEffect::DefaultPriority, 0);
EXPECT_EQ(1u, result.size());
EXPECT_TRUE(interpolationValue(result, CSSPropertyZIndex)->equals(AnimatableDouble::create(2).get()));
@@ -120,7 +120,7 @@ TEST_F(AnimationAnimationStackTest, CancelledAnimations)
TEST_F(AnimationAnimationStackTest, ClearedEffectsRemoved)
{
- RefPtrWillBeRawPtr<Animation> animation = play(makeKeyframeEffect(makeEffectModel(CSSPropertyFontSize, AnimatableDouble::create(1))).get(), 10);
+ Animation* animation = play(makeKeyframeEffect(makeEffectModel(CSSPropertyFontSize, AnimatableDouble::create(1))), 10);
ActiveInterpolationMap result = AnimationStack::activeInterpolations(&element->elementAnimations()->defaultStack(), 0, 0, KeyframeEffect::DefaultPriority, 0);
EXPECT_EQ(1u, result.size());
EXPECT_TRUE(interpolationValue(result, CSSPropertyFontSize)->equals(AnimatableDouble::create(1).get()));
« no previous file with comments | « Source/core/animation/AnimationStack.cpp ('k') | Source/core/animation/AnimationTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698