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 "core/animation/EffectStack.h" | 5 #include "core/animation/EffectStack.h" |
6 | 6 |
| 7 #include <memory> |
7 #include "core/animation/AnimationClock.h" | 8 #include "core/animation/AnimationClock.h" |
8 #include "core/animation/CompositorPendingAnimations.h" | 9 #include "core/animation/CompositorPendingAnimations.h" |
9 #include "core/animation/DocumentTimeline.h" | 10 #include "core/animation/DocumentTimeline.h" |
10 #include "core/animation/ElementAnimations.h" | 11 #include "core/animation/ElementAnimations.h" |
11 #include "core/animation/KeyframeEffectModel.h" | 12 #include "core/animation/KeyframeEffectModel.h" |
12 #include "core/animation/LegacyStyleInterpolation.h" | 13 #include "core/animation/LegacyStyleInterpolation.h" |
13 #include "core/animation/animatable/AnimatableDouble.h" | 14 #include "core/animation/animatable/AnimatableDouble.h" |
14 #include "core/testing/DummyPageHolder.h" | 15 #include "core/testing/DummyPageHolder.h" |
15 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
16 #include <memory> | |
17 | 17 |
18 namespace blink { | 18 namespace blink { |
19 | 19 |
20 class AnimationEffectStackTest : public ::testing::Test { | 20 class AnimationEffectStackTest : public ::testing::Test { |
21 protected: | 21 protected: |
22 virtual void SetUp() { | 22 virtual void SetUp() { |
23 pageHolder = DummyPageHolder::create(); | 23 pageHolder = DummyPageHolder::create(); |
24 document = &pageHolder->document(); | 24 document = &pageHolder->document(); |
25 document->animationClock().resetTimeForTesting(); | 25 document->animationClock().resetTimeForTesting(); |
26 timeline = DocumentTimeline::create(document.get()); | 26 timeline = DocumentTimeline::create(document.get()); |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 interpolations = EffectStack::activeInterpolations( | 213 interpolations = EffectStack::activeInterpolations( |
214 &element->elementAnimations()->effectStack(), nullptr, nullptr, | 214 &element->elementAnimations()->effectStack(), nullptr, nullptr, |
215 KeyframeEffectReadOnly::DefaultPriority); | 215 KeyframeEffectReadOnly::DefaultPriority); |
216 EXPECT_EQ(1u, interpolations.size()); | 216 EXPECT_EQ(1u, interpolations.size()); |
217 EXPECT_TRUE(interpolationValue(interpolations, CSSPropertyFontSize) | 217 EXPECT_TRUE(interpolationValue(interpolations, CSSPropertyFontSize) |
218 ->equals(AnimatableDouble::create(3).get())); | 218 ->equals(AnimatableDouble::create(3).get())); |
219 EXPECT_EQ(1u, sampledEffectCount()); | 219 EXPECT_EQ(1u, sampledEffectCount()); |
220 } | 220 } |
221 | 221 |
222 } // namespace blink | 222 } // namespace blink |
OLD | NEW |