Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / core / animation / AnimationStackTest.cpp
index 5ebdf83..3bee5fa 100644 (file)
@@ -6,14 +6,14 @@
 #include "core/animation/AnimationStack.h"
 
 #include "core/animation/ActiveAnimations.h"
-#include "core/animation/AnimatableDouble.h"
 #include "core/animation/AnimationClock.h"
 #include "core/animation/AnimationTimeline.h"
 #include "core/animation/KeyframeEffectModel.h"
-#include "core/animation/interpolation/LegacyStyleInterpolation.h"
+#include "core/animation/LegacyStyleInterpolation.h"
+#include "core/animation/animatable/AnimatableDouble.h"
 #include <gtest/gtest.h>
 
-namespace WebCore {
+namespace blink {
 
 class AnimationAnimationStackTest : public ::testing::Test {
 protected:
@@ -88,7 +88,7 @@ TEST_F(AnimationAnimationStackTest, ActiveAnimationsSorted)
     play(makeAnimation(makeAnimationEffect(CSSPropertyFontSize, AnimatableDouble::create(3))).get(), 5);
     WillBeHeapHashMap<CSSPropertyID, RefPtrWillBeMember<Interpolation> > result = AnimationStack::activeInterpolations(&element->activeAnimations()->defaultStack(), 0, 0, Animation::DefaultPriority, 0);
     EXPECT_EQ(1u, result.size());
-    EXPECT_TRUE(interpolationValue(result.get(CSSPropertyFontSize))->equals(AnimatableDouble::create(2).get()));
+    EXPECT_TRUE(interpolationValue(result.get(CSSPropertyFontSize))->equals(AnimatableDouble::create(3).get()));
 }
 
 TEST_F(AnimationAnimationStackTest, NewAnimations)
@@ -102,7 +102,7 @@ TEST_F(AnimationAnimationStackTest, NewAnimations)
     newAnimations.append(inert2.get());
     WillBeHeapHashMap<CSSPropertyID, RefPtrWillBeMember<Interpolation> > result = AnimationStack::activeInterpolations(&element->activeAnimations()->defaultStack(), &newAnimations, 0, Animation::DefaultPriority, 10);
     EXPECT_EQ(2u, result.size());
-    EXPECT_TRUE(interpolationValue(result.get(CSSPropertyFontSize))->equals(AnimatableDouble::create(1).get()));
+    EXPECT_TRUE(interpolationValue(result.get(CSSPropertyFontSize))->equals(AnimatableDouble::create(3).get()));
     EXPECT_TRUE(interpolationValue(result.get(CSSPropertyZIndex))->equals(AnimatableDouble::create(4).get()));
 }
 
@@ -128,36 +128,27 @@ TEST_F(AnimationAnimationStackTest, ForwardsFillDiscarding)
     updateTimeline(11);
     Heap::collectAllGarbage();
     interpolations = AnimationStack::activeInterpolations(&element->activeAnimations()->defaultStack(), 0, 0, Animation::DefaultPriority, 0);
-    EXPECT_TRUE(interpolationValue(interpolations.get(CSSPropertyFontSize))->equals(AnimatableDouble::create(2).get()));
+    EXPECT_TRUE(interpolationValue(interpolations.get(CSSPropertyFontSize))->equals(AnimatableDouble::create(3).get()));
     EXPECT_EQ(3u, effects().size());
     EXPECT_EQ(1u, interpolations.size());
-    EXPECT_EQ(2, effects()[0]->sortInfo().startTime());
-    EXPECT_EQ(4, effects()[1]->sortInfo().startTime());
-    EXPECT_EQ(6, effects()[2]->sortInfo().startTime());
 
     updateTimeline(13);
     Heap::collectAllGarbage();
     interpolations = AnimationStack::activeInterpolations(&element->activeAnimations()->defaultStack(), 0, 0, Animation::DefaultPriority, 0);
-    EXPECT_TRUE(interpolationValue(interpolations.get(CSSPropertyFontSize))->equals(AnimatableDouble::create(2).get()));
+    EXPECT_TRUE(interpolationValue(interpolations.get(CSSPropertyFontSize))->equals(AnimatableDouble::create(3).get()));
     EXPECT_EQ(3u, effects().size());
-    EXPECT_EQ(2, effects()[0]->sortInfo().startTime());
-    EXPECT_EQ(4, effects()[1]->sortInfo().startTime());
-    EXPECT_EQ(6, effects()[2]->sortInfo().startTime());
 
     updateTimeline(15);
     Heap::collectAllGarbage();
     interpolations = AnimationStack::activeInterpolations(&element->activeAnimations()->defaultStack(), 0, 0, Animation::DefaultPriority, 0);
-    EXPECT_TRUE(interpolationValue(interpolations.get(CSSPropertyFontSize))->equals(AnimatableDouble::create(2).get()));
+    EXPECT_TRUE(interpolationValue(interpolations.get(CSSPropertyFontSize))->equals(AnimatableDouble::create(3).get()));
     EXPECT_EQ(2u, effects().size());
-    EXPECT_EQ(4, effects()[0]->sortInfo().startTime());
-    EXPECT_EQ(6, effects()[1]->sortInfo().startTime());
 
     updateTimeline(17);
     Heap::collectAllGarbage();
     interpolations = AnimationStack::activeInterpolations(&element->activeAnimations()->defaultStack(), 0, 0, Animation::DefaultPriority, 0);
-    EXPECT_TRUE(interpolationValue(interpolations.get(CSSPropertyFontSize))->equals(AnimatableDouble::create(2).get()));
+    EXPECT_TRUE(interpolationValue(interpolations.get(CSSPropertyFontSize))->equals(AnimatableDouble::create(3).get()));
     EXPECT_EQ(1u, effects().size());
-    EXPECT_EQ(6, effects()[0]->sortInfo().startTime());
 }
 
 }