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

Unified Diff: cc/test/layer_tree_test.h

Issue 2401703002: cc/blimp: Set up the framework for LayerTreeTests in remote mode. (Closed)
Patch Set: Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: cc/test/layer_tree_test.h
diff --git a/cc/test/layer_tree_test.h b/cc/test/layer_tree_test.h
index 4acc90f05f85f299032e494aab97cb8775863473..bf0f92a5a9d2b34c6837716b64eb600b20ea9b3e 100644
--- a/cc/test/layer_tree_test.h
+++ b/cc/test/layer_tree_test.h
@@ -134,17 +134,15 @@ class LayerTreeTest : public testing::Test, public TestHooks {
base::SingleThreadTaskRunner* MainThreadTaskRunner() {
return main_task_runner_.get();
}
- Proxy* proxy() const {
- return layer_tree_host_ ? layer_tree_host_->proxy() : NULL;
- }
+ Proxy* proxy() const;
TaskRunnerProvider* task_runner_provider() const;
TaskGraphRunner* task_graph_runner() const {
return task_graph_runner_.get();
}
bool TestEnded() const { return ended_; }
- LayerTreeHost* layer_tree_host();
- LayerTreeHostInProcess* layer_tree_host_in_process();
+ LayerTreeHost* layer_tree_host() const;
enne (OOO) 2016/10/06 20:19:55 style nit: functions that return non-const pointer
Khushal 2016/10/06 21:09:42 Removed. Added it because the proxy accessor was y
+ LayerTreeHostInProcess* layer_tree_host_in_process() const;
LayerTree* layer_tree() { return layer_tree_host()->GetLayerTree(); }
SharedBitmapManager* shared_bitmap_manager() const {
return shared_bitmap_manager_.get();
@@ -181,7 +179,8 @@ class LayerTreeTest : public testing::Test, public TestHooks {
CompositorMode mode_;
std::unique_ptr<LayerTreeHostClientForTesting> client_;
- std::unique_ptr<LayerTreeHostInProcess> layer_tree_host_;
+ std::unique_ptr<LayerTreeHost> layer_tree_host_;
+ LayerTreeHostInProcess* layer_tree_host_in_process_;
bool beginning_ = false;
bool end_when_begin_returns_ = false;
@@ -220,10 +219,20 @@ class LayerTreeTest : public testing::Test, public TestHooks {
} \
class MultiThreadDelegatingImplNeedsSemicolon##TEST_FIXTURE_NAME {}
+#define REMOTE_TEST_F(TEST_FIXTURE_NAME) \
+ TEST_F(TEST_FIXTURE_NAME, RunRemote_DelegatingRenderer) { \
+ RunTest(CompositorMode::REMOTE); \
+ } \
+ class RemoteDelegatingImplNeedsSemicolon##TEST_FIXTURE_NAME {}
+
#define SINGLE_AND_MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) \
SINGLE_THREAD_TEST_F(TEST_FIXTURE_NAME); \
MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME)
+#define SINGLE_MULTI_AND_REMOTE_TEST_F(TEST_FIXTURE_NAME) \
+ SINGLE_AND_MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME); \
+ REMOTE_TEST_F(TEST_FIXTURE_NAME)
+
// Some tests want to control when notify ready for activation occurs,
// but this is not supported in the single-threaded case.
#define MULTI_THREAD_BLOCKNOTIFY_TEST_F(TEST_FIXTURE_NAME) \

Powered by Google App Engine
This is Rietveld 408576698