OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "cc/trees/threaded_channel.h" | 5 #include "cc/trees/threaded_channel.h" |
6 | 6 |
7 #include "base/macros.h" | 7 #include "base/macros.h" |
8 #include "cc/animation/animation_events.h" | 8 #include "cc/animation/animation_events.h" |
9 #include "cc/test/layer_tree_test.h" | 9 #include "cc/test/layer_tree_test.h" |
10 #include "cc/trees/single_thread_proxy.h" | 10 #include "cc/trees/single_thread_proxy.h" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 } | 66 } |
67 | 67 |
68 void FinishGLOnImpl() override { calls_received_++; } | 68 void FinishGLOnImpl() override { calls_received_++; } |
69 | 69 |
70 void AfterTest() override { EXPECT_EQ(6, calls_received_); } | 70 void AfterTest() override { EXPECT_EQ(6, calls_received_); } |
71 }; | 71 }; |
72 | 72 |
73 MULTI_THREAD_DIRECT_RENDERER_TEST_F( | 73 MULTI_THREAD_DIRECT_RENDERER_TEST_F( |
74 ThreadedChannelTestInitializationAndShutdown); | 74 ThreadedChannelTestInitializationAndShutdown); |
75 | 75 |
76 class ThreadedChannelTestThrottleFrameProduction : public ThreadedChannelTest { | |
77 void BeginChannelTest() override { | |
78 proxy()->SetThrottleFrameProduction(true); | |
79 } | |
80 | |
81 void SetThrottleFrameProductionOnImpl(bool throttle) override { | |
82 ASSERT_TRUE(throttle); | |
83 calls_received_++; | |
84 EndTest(); | |
85 } | |
86 | |
87 void AfterTest() override { EXPECT_EQ(1, calls_received_); } | |
88 }; | |
89 | |
90 MULTI_THREAD_DIRECT_RENDERER_TEST_F(ThreadedChannelTestThrottleFrameProduction); | |
91 | |
92 class ThreadedChannelTestTopControlsState : public ThreadedChannelTest { | 76 class ThreadedChannelTestTopControlsState : public ThreadedChannelTest { |
93 void BeginChannelTest() override { | 77 void BeginChannelTest() override { |
94 proxy()->UpdateTopControlsState(TopControlsState::BOTH, | 78 proxy()->UpdateTopControlsState(TopControlsState::BOTH, |
95 TopControlsState::BOTH, true); | 79 TopControlsState::BOTH, true); |
96 } | 80 } |
97 | 81 |
98 void UpdateTopControlsStateOnImpl(TopControlsState constraints, | 82 void UpdateTopControlsStateOnImpl(TopControlsState constraints, |
99 TopControlsState current, | 83 TopControlsState current, |
100 bool animate) override { | 84 bool animate) override { |
101 calls_received_++; | 85 calls_received_++; |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 calls_received_++; | 286 calls_received_++; |
303 EndTest(); | 287 EndTest(); |
304 } | 288 } |
305 | 289 |
306 void AfterTest() override { EXPECT_EQ(1, calls_received_); } | 290 void AfterTest() override { EXPECT_EQ(1, calls_received_); } |
307 }; | 291 }; |
308 | 292 |
309 MULTI_THREAD_DIRECT_RENDERER_TEST_F(ThreadedChannelTestPageScaleAnimation); | 293 MULTI_THREAD_DIRECT_RENDERER_TEST_F(ThreadedChannelTestPageScaleAnimation); |
310 | 294 |
311 } // namespace cc | 295 } // namespace cc |
OLD | NEW |