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 page_holder = DummyPageHolder::Create(); | 23 page_holder = DummyPageHolder::Create(); |
24 document = &page_holder->GetDocument(); | 24 document = &page_holder->GetDocument(); |
25 document->GetAnimationClock().ResetTimeForTesting(); | 25 document->GetAnimationClock().ResetTimeForTesting(); |
26 timeline = DocumentTimeline::Create(document.Get()); | 26 timeline = DocumentTimeline::Create(document.Get()); |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 ThreadState::Current()->CollectAllGarbage(); | 206 ThreadState::Current()->CollectAllGarbage(); |
207 interpolations = EffectStack::ActiveInterpolations( | 207 interpolations = EffectStack::ActiveInterpolations( |
208 &element->GetElementAnimations()->GetEffectStack(), nullptr, nullptr, | 208 &element->GetElementAnimations()->GetEffectStack(), nullptr, nullptr, |
209 KeyframeEffectReadOnly::kDefaultPriority); | 209 KeyframeEffectReadOnly::kDefaultPriority); |
210 EXPECT_EQ(1u, interpolations.size()); | 210 EXPECT_EQ(1u, interpolations.size()); |
211 EXPECT_EQ(GetDoubleValue(interpolations, CSSPropertyFontSize), 3); | 211 EXPECT_EQ(GetDoubleValue(interpolations, CSSPropertyFontSize), 3); |
212 EXPECT_EQ(1u, SampledEffectCount()); | 212 EXPECT_EQ(1u, SampledEffectCount()); |
213 } | 213 } |
214 | 214 |
215 } // namespace blink | 215 } // namespace blink |
OLD | NEW |