Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(91)

Side by Side Diff: third_party/WebKit/Source/platform/animation/CompositorAnimationHostTest.cpp

Issue 2940933003: DO NOT SUBMIT results of new clang-format (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/CompositorAnimationHost.h" 5 #include "platform/animation/CompositorAnimationHost.h"
6 6
7 #include <memory>
7 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
8 #include "platform/animation/CompositorAnimationTimeline.h" 9 #include "platform/animation/CompositorAnimationTimeline.h"
9 #include "platform/testing/CompositorTest.h" 10 #include "platform/testing/CompositorTest.h"
10 #include "platform/testing/WebLayerTreeViewImplForTesting.h" 11 #include "platform/testing/WebLayerTreeViewImplForTesting.h"
11 #include <memory>
12 12
13 namespace blink { 13 namespace blink {
14 14
15 class CompositorAnimationHostTest : public CompositorTest {}; 15 class CompositorAnimationHostTest : public CompositorTest {};
16 16
17 TEST_F(CompositorAnimationHostTest, AnimationHostNullWhenTimelineDetached) { 17 TEST_F(CompositorAnimationHostTest, AnimationHostNullWhenTimelineDetached) {
18 std::unique_ptr<CompositorAnimationTimeline> timeline = 18 std::unique_ptr<CompositorAnimationTimeline> timeline =
19 CompositorAnimationTimeline::Create(); 19 CompositorAnimationTimeline::Create();
20 20
21 scoped_refptr<cc::AnimationTimeline> cc_timeline = 21 scoped_refptr<cc::AnimationTimeline> cc_timeline =
22 timeline->GetAnimationTimeline(); 22 timeline->GetAnimationTimeline();
23 EXPECT_FALSE(cc_timeline->animation_host()); 23 EXPECT_FALSE(cc_timeline->animation_host());
24 24
25 WebLayerTreeViewImplForTesting layer_tree_view; 25 WebLayerTreeViewImplForTesting layer_tree_view;
26 CompositorAnimationHost compositor_animation_host( 26 CompositorAnimationHost compositor_animation_host(
27 layer_tree_view.CompositorAnimationHost()); 27 layer_tree_view.CompositorAnimationHost());
28 28
29 compositor_animation_host.AddTimeline(*timeline); 29 compositor_animation_host.AddTimeline(*timeline);
30 EXPECT_TRUE(cc_timeline->animation_host()); 30 EXPECT_TRUE(cc_timeline->animation_host());
31 31
32 compositor_animation_host.RemoveTimeline(*timeline); 32 compositor_animation_host.RemoveTimeline(*timeline);
33 EXPECT_FALSE(cc_timeline->animation_host()); 33 EXPECT_FALSE(cc_timeline->animation_host());
34 } 34 }
35 35
36 } // namespace blink 36 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698