OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "config.h" | 5 #include "config.h" |
6 #include "core/animation/AnimationStack.h" | 6 #include "core/animation/AnimationStack.h" |
7 | 7 |
8 #include "core/animation/ActiveAnimations.h" | 8 #include "core/animation/ActiveAnimations.h" |
9 #include "core/animation/AnimatableDouble.h" | 9 #include "core/animation/AnimatableDouble.h" |
10 #include "core/animation/AnimationClock.h" | 10 #include "core/animation/AnimationClock.h" |
11 #include "core/animation/DocumentTimeline.h" | 11 #include "core/animation/DocumentTimeline.h" |
12 #include "core/animation/KeyframeEffectModel.h" | 12 #include "core/animation/KeyframeEffectModel.h" |
| 13 #include "core/animation/LegacyStyleInterpolation.h" |
13 #include <gtest/gtest.h> | 14 #include <gtest/gtest.h> |
14 | 15 |
15 namespace WebCore { | 16 namespace WebCore { |
16 | 17 |
17 class AnimationAnimationStackTest : public ::testing::Test { | 18 class AnimationAnimationStackTest : public ::testing::Test { |
18 protected: | 19 protected: |
19 virtual void SetUp() | 20 virtual void SetUp() |
20 { | 21 { |
21 document = Document::create(); | 22 document = Document::create(); |
22 document->animationClock().resetTimeForTesting(); | 23 document->animationClock().resetTimeForTesting(); |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 EXPECT_EQ(6, effects()[1]->sortInfo().startTime()); | 151 EXPECT_EQ(6, effects()[1]->sortInfo().startTime()); |
151 | 152 |
152 updateTimeline(17); | 153 updateTimeline(17); |
153 interpolations = AnimationStack::activeInterpolations(&element->activeAnimat
ions()->defaultStack(), 0, 0, Animation::DefaultPriority, 0); | 154 interpolations = AnimationStack::activeInterpolations(&element->activeAnimat
ions()->defaultStack(), 0, 0, Animation::DefaultPriority, 0); |
154 EXPECT_TRUE(interpolationValue(interpolations.get(CSSPropertyFontSize))->equ
als(AnimatableDouble::create(2).get())); | 155 EXPECT_TRUE(interpolationValue(interpolations.get(CSSPropertyFontSize))->equ
als(AnimatableDouble::create(2).get())); |
155 EXPECT_EQ(1u, effects().size()); | 156 EXPECT_EQ(1u, effects().size()); |
156 EXPECT_EQ(6, effects()[0]->sortInfo().startTime()); | 157 EXPECT_EQ(6, effects()[0]->sortInfo().startTime()); |
157 } | 158 } |
158 | 159 |
159 } | 160 } |
OLD | NEW |