OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "platform/animation/CompositorAnimationTimeline.h" | 5 #include "platform/animation/CompositorAnimationTimeline.h" |
6 | 6 |
| 7 #include <memory> |
7 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
8 #include "cc/animation/animation_host.h" | 9 #include "cc/animation/animation_host.h" |
9 #include "platform/animation/CompositorAnimationHost.h" | 10 #include "platform/animation/CompositorAnimationHost.h" |
10 #include "platform/animation/CompositorAnimationPlayer.h" | 11 #include "platform/animation/CompositorAnimationPlayer.h" |
11 #include "platform/testing/CompositorTest.h" | 12 #include "platform/testing/CompositorTest.h" |
12 #include "platform/testing/WebLayerTreeViewImplForTesting.h" | 13 #include "platform/testing/WebLayerTreeViewImplForTesting.h" |
13 #include <memory> | |
14 | 14 |
15 namespace blink { | 15 namespace blink { |
16 | 16 |
17 class CompositorAnimationTimelineTest : public CompositorTest {}; | 17 class CompositorAnimationTimelineTest : public CompositorTest {}; |
18 | 18 |
19 TEST_F(CompositorAnimationTimelineTest, | 19 TEST_F(CompositorAnimationTimelineTest, |
20 CompositorTimelineDeletionDetachesFromAnimationHost) { | 20 CompositorTimelineDeletionDetachesFromAnimationHost) { |
21 std::unique_ptr<CompositorAnimationTimeline> timeline = | 21 std::unique_ptr<CompositorAnimationTimeline> timeline = |
22 CompositorAnimationTimeline::create(); | 22 CompositorAnimationTimeline::create(); |
23 | 23 |
(...skipping 11 matching lines...) Expand all Loading... |
35 EXPECT_TRUE(animationHost->GetTimelineById(ccTimeline->id())); | 35 EXPECT_TRUE(animationHost->GetTimelineById(ccTimeline->id())); |
36 | 36 |
37 // Delete CompositorAnimationTimeline while attached to host. | 37 // Delete CompositorAnimationTimeline while attached to host. |
38 timeline = nullptr; | 38 timeline = nullptr; |
39 | 39 |
40 EXPECT_FALSE(ccTimeline->animation_host()); | 40 EXPECT_FALSE(ccTimeline->animation_host()); |
41 EXPECT_FALSE(animationHost->GetTimelineById(ccTimeline->id())); | 41 EXPECT_FALSE(animationHost->GetTimelineById(ccTimeline->id())); |
42 } | 42 } |
43 | 43 |
44 } // namespace blink | 44 } // namespace blink |
OLD | NEW |