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

Side by Side Diff: cc/trees/threaded_channel_unittest.cc

Issue 1419283002: cc: Split Proxy and TaskRunnerProvider for the LayerTreeHost (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. Created 5 years, 1 month 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
« no previous file with comments | « cc/trees/threaded_channel.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « cc/trees/threaded_channel.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698