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

Unified Diff: cc/test/layer_tree_test.cc

Issue 1020803002: Don't let unittests access LTH from the impl thread. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added a comment. Created 5 years, 9 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_test.h ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/layer_tree_test.cc
diff --git a/cc/test/layer_tree_test.cc b/cc/test/layer_tree_test.cc
index 3c6ff57baeaebe5bf0f899ffd2557d842c06d77a..56ef2c1a2197df72998b8d460e7b16c14f7bf698 100644
--- a/cc/test/layer_tree_test.cc
+++ b/cc/test/layer_tree_test.cc
@@ -878,4 +878,13 @@ void LayerTreeTest::DestroyLayerTreeHost() {
layer_tree_host_ = nullptr;
}
+LayerTreeHost* LayerTreeTest::layer_tree_host() {
+ // We check for a null proxy here as we sometimes ask for the layer tree host
+ // when the proxy does not exist, often for checking settings after a test has
+ // completed. For example, LTHPixelResourceTest::RunPixelResourceTest. See
+ // elsewhere in this file for other examples.
+ DCHECK(!proxy() || proxy()->IsMainThread() || proxy()->IsMainThreadBlocked());
+ return layer_tree_host_.get();
+}
+
} // namespace cc
« no previous file with comments | « cc/test/layer_tree_test.h ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698