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 "cc/trees/threaded_channel.h" | 5 #include "cc/trees/threaded_channel.h" |
6 | 6 |
7 #include "cc/test/layer_tree_test.h" | 7 #include "cc/test/layer_tree_test.h" |
8 #include "cc/trees/single_thread_proxy.h" | 8 #include "cc/trees/single_thread_proxy.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
10 | 10 |
(...skipping 12 matching lines...) Expand all Loading... |
23 BeginChannelTest(); | 23 BeginChannelTest(); |
24 }; | 24 }; |
25 virtual void BeginChannelTest() {} | 25 virtual void BeginChannelTest() {} |
26 | 26 |
27 void PostOnImplThread() { | 27 void PostOnImplThread() { |
28 ImplThreadTaskRunner()->PostTask( | 28 ImplThreadTaskRunner()->PostTask( |
29 FROM_HERE, base::Bind(&ThreadedChannelTest::StartTestOnImplThread, | 29 FROM_HERE, base::Bind(&ThreadedChannelTest::StartTestOnImplThread, |
30 base::Unretained(this))); | 30 base::Unretained(this))); |
31 } | 31 } |
32 | 32 |
33 virtual void StartTestOnImplThread() { DCHECK(proxy()->IsImplThread()); } | 33 virtual void StartTestOnImplThread() { |
| 34 DCHECK(task_runner_provider()->IsImplThread()); |
| 35 } |
34 | 36 |
35 void AfterTest() override {} | 37 void AfterTest() override {} |
36 | 38 |
37 // TODO(khushalsagar): Remove this once ProxyImpl is added to the | 39 // TODO(khushalsagar): Remove this once ProxyImpl is added to the |
38 // LayerTreeTest. | 40 // LayerTreeTest. |
39 ThreadProxy* thread_proxy_; | 41 ThreadProxy* thread_proxy_; |
40 int calls_received_; | 42 int calls_received_; |
41 | 43 |
42 private: | 44 private: |
43 DISALLOW_COPY_AND_ASSIGN(ThreadedChannelTest); | 45 DISALLOW_COPY_AND_ASSIGN(ThreadedChannelTest); |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 calls_received_++; | 307 calls_received_++; |
306 EndTest(); | 308 EndTest(); |
307 } | 309 } |
308 | 310 |
309 void AfterTest() override { EXPECT_EQ(1, calls_received_); } | 311 void AfterTest() override { EXPECT_EQ(1, calls_received_); } |
310 }; | 312 }; |
311 | 313 |
312 MULTI_THREAD_DIRECT_RENDERER_TEST_F(ThreadedChannelTestPageScaleAnimation); | 314 MULTI_THREAD_DIRECT_RENDERER_TEST_F(ThreadedChannelTestPageScaleAnimation); |
313 | 315 |
314 } // namespace cc | 316 } // namespace cc |
OLD | NEW |