Index: third_party/WebKit/Source/core/animation/AnimationStackTest.cpp |
diff --git a/third_party/WebKit/Source/core/animation/AnimationStackTest.cpp b/third_party/WebKit/Source/core/animation/AnimationStackTest.cpp |
index 58cd4cb461bd9ccfda72e9708851fb2200f85704..e9ed686046f042ef187058b5998dc61db72405e4 100644 |
--- a/third_party/WebKit/Source/core/animation/AnimationStackTest.cpp |
+++ b/third_party/WebKit/Source/core/animation/AnimationStackTest.cpp |
@@ -8,7 +8,9 @@ |
#include "core/animation/CompositorPendingAnimations.h" |
#include "core/animation/DocumentTimeline.h" |
#include "core/animation/ElementAnimations.h" |
+#include "core/animation/KeyframeEffect.h" |
#include "core/animation/KeyframeEffectModel.h" |
+#include "core/animation/KeyframeEffectReadOnly.h" |
#include "core/animation/LegacyStyleInterpolation.h" |
#include "core/animation/animatable/AnimatableDouble.h" |
#include "core/testing/DummyPageHolder.h" |
@@ -91,7 +93,7 @@ TEST_F(AnimationAnimationStackTest, ElementAnimationsSorted) |
play(makeKeyframeEffect(makeEffectModel(CSSPropertyFontSize, AnimatableDouble::create(1))), 10); |
play(makeKeyframeEffect(makeEffectModel(CSSPropertyFontSize, AnimatableDouble::create(2))), 15); |
play(makeKeyframeEffect(makeEffectModel(CSSPropertyFontSize, AnimatableDouble::create(3))), 5); |
- ActiveInterpolationsMap result = AnimationStack::activeInterpolations(&element->elementAnimations()->animationStack(), 0, 0, KeyframeEffect::DefaultPriority); |
+ ActiveInterpolationsMap result = AnimationStack::activeInterpolations(&element->elementAnimations()->animationStack(), 0, 0, KeyframeEffectReadOnly::DefaultPriority); |
EXPECT_EQ(1u, result.size()); |
EXPECT_TRUE(interpolationValue(result, CSSPropertyFontSize)->equals(AnimatableDouble::create(3).get())); |
} |
@@ -105,7 +107,7 @@ TEST_F(AnimationAnimationStackTest, NewAnimations) |
InertEffect* inert2 = makeInertEffect(makeEffectModel(CSSPropertyZIndex, AnimatableDouble::create(4))); |
newAnimations.append(inert1); |
newAnimations.append(inert2); |
- ActiveInterpolationsMap result = AnimationStack::activeInterpolations(&element->elementAnimations()->animationStack(), &newAnimations, 0, KeyframeEffect::DefaultPriority); |
+ ActiveInterpolationsMap result = AnimationStack::activeInterpolations(&element->elementAnimations()->animationStack(), &newAnimations, 0, KeyframeEffectReadOnly::DefaultPriority); |
EXPECT_EQ(2u, result.size()); |
EXPECT_TRUE(interpolationValue(result, CSSPropertyFontSize)->equals(AnimatableDouble::create(3).get())); |
EXPECT_TRUE(interpolationValue(result, CSSPropertyZIndex)->equals(AnimatableDouble::create(4).get())); |
@@ -117,7 +119,7 @@ TEST_F(AnimationAnimationStackTest, CancelledAnimations) |
Animation* animation = play(makeKeyframeEffect(makeEffectModel(CSSPropertyFontSize, AnimatableDouble::create(1))), 0); |
cancelledAnimations.add(animation); |
play(makeKeyframeEffect(makeEffectModel(CSSPropertyZIndex, AnimatableDouble::create(2))), 0); |
- ActiveInterpolationsMap result = AnimationStack::activeInterpolations(&element->elementAnimations()->animationStack(), 0, &cancelledAnimations, KeyframeEffect::DefaultPriority); |
+ ActiveInterpolationsMap result = AnimationStack::activeInterpolations(&element->elementAnimations()->animationStack(), 0, &cancelledAnimations, KeyframeEffectReadOnly::DefaultPriority); |
EXPECT_EQ(1u, result.size()); |
EXPECT_TRUE(interpolationValue(result, CSSPropertyZIndex)->equals(AnimatableDouble::create(2).get())); |
} |
@@ -125,12 +127,12 @@ TEST_F(AnimationAnimationStackTest, CancelledAnimations) |
TEST_F(AnimationAnimationStackTest, ClearedEffectsRemoved) |
{ |
Animation* animation = play(makeKeyframeEffect(makeEffectModel(CSSPropertyFontSize, AnimatableDouble::create(1))), 10); |
- ActiveInterpolationsMap result = AnimationStack::activeInterpolations(&element->elementAnimations()->animationStack(), 0, 0, KeyframeEffect::DefaultPriority); |
+ ActiveInterpolationsMap result = AnimationStack::activeInterpolations(&element->elementAnimations()->animationStack(), 0, 0, KeyframeEffectReadOnly::DefaultPriority); |
EXPECT_EQ(1u, result.size()); |
EXPECT_TRUE(interpolationValue(result, CSSPropertyFontSize)->equals(AnimatableDouble::create(1).get())); |
animation->setEffect(0); |
- result = AnimationStack::activeInterpolations(&element->elementAnimations()->animationStack(), 0, 0, KeyframeEffect::DefaultPriority); |
+ result = AnimationStack::activeInterpolations(&element->elementAnimations()->animationStack(), 0, 0, KeyframeEffectReadOnly::DefaultPriority); |
EXPECT_EQ(0u, result.size()); |
} |
@@ -144,28 +146,28 @@ TEST_F(AnimationAnimationStackTest, ForwardsFillDiscarding) |
updateTimeline(11); |
ThreadState::current()-> collectAllGarbage(); |
- interpolations = AnimationStack::activeInterpolations(&element->elementAnimations()->animationStack(), nullptr, nullptr, KeyframeEffect::DefaultPriority); |
+ interpolations = AnimationStack::activeInterpolations(&element->elementAnimations()->animationStack(), nullptr, nullptr, KeyframeEffectReadOnly::DefaultPriority); |
EXPECT_EQ(1u, interpolations.size()); |
EXPECT_TRUE(interpolationValue(interpolations, CSSPropertyFontSize)->equals(AnimatableDouble::create(3).get())); |
EXPECT_EQ(3u, sampledEffectCount()); |
updateTimeline(13); |
ThreadState::current()-> collectAllGarbage(); |
- interpolations = AnimationStack::activeInterpolations(&element->elementAnimations()->animationStack(), nullptr, nullptr, KeyframeEffect::DefaultPriority); |
+ interpolations = AnimationStack::activeInterpolations(&element->elementAnimations()->animationStack(), nullptr, nullptr, KeyframeEffectReadOnly::DefaultPriority); |
EXPECT_EQ(1u, interpolations.size()); |
EXPECT_TRUE(interpolationValue(interpolations, CSSPropertyFontSize)->equals(AnimatableDouble::create(3).get())); |
EXPECT_EQ(3u, sampledEffectCount()); |
updateTimeline(15); |
ThreadState::current()-> collectAllGarbage(); |
- interpolations = AnimationStack::activeInterpolations(&element->elementAnimations()->animationStack(), nullptr, nullptr, KeyframeEffect::DefaultPriority); |
+ interpolations = AnimationStack::activeInterpolations(&element->elementAnimations()->animationStack(), nullptr, nullptr, KeyframeEffectReadOnly::DefaultPriority); |
EXPECT_EQ(1u, interpolations.size()); |
EXPECT_TRUE(interpolationValue(interpolations, CSSPropertyFontSize)->equals(AnimatableDouble::create(3).get())); |
EXPECT_EQ(2u, sampledEffectCount()); |
updateTimeline(17); |
ThreadState::current()-> collectAllGarbage(); |
- interpolations = AnimationStack::activeInterpolations(&element->elementAnimations()->animationStack(), nullptr, nullptr, KeyframeEffect::DefaultPriority); |
+ interpolations = AnimationStack::activeInterpolations(&element->elementAnimations()->animationStack(), nullptr, nullptr, KeyframeEffectReadOnly::DefaultPriority); |
EXPECT_EQ(1u, interpolations.size()); |
EXPECT_TRUE(interpolationValue(interpolations, CSSPropertyFontSize)->equals(AnimatableDouble::create(3).get())); |
EXPECT_EQ(1u, sampledEffectCount()); |