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

Unified Diff: cc/test/layer_tree_test.h

Issue 2401703002: cc/blimp: Set up the framework for LayerTreeTests in remote mode. (Closed)
Patch Set: Rebase 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
« no previous file with comments | « cc/test/layer_tree_host_remote_for_testing.cc ('k') | cc/test/layer_tree_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..af0fad1c4b76c6ae5a67b10c5c61792f23151231 100644
--- a/cc/test/layer_tree_test.h
+++ b/cc/test/layer_tree_test.h
@@ -134,9 +134,7 @@ 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();
TaskRunnerProvider* task_runner_provider() const;
TaskGraphRunner* task_graph_runner() const {
return task_graph_runner_.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) \
« no previous file with comments | « cc/test/layer_tree_host_remote_for_testing.cc ('k') | cc/test/layer_tree_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698