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

Unified Diff: cc/trees/layer_tree_host_unittest.cc

Issue 1126973002: cc: Make HasImplThread() function work in AfterTest(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebasing for landing. Created 5 years, 7 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') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_unittest.cc
diff --git a/cc/trees/layer_tree_host_unittest.cc b/cc/trees/layer_tree_host_unittest.cc
index b9d8bc9d12c7ddeb1ee1d385fcad194d2b88ca59..f2ed38e5fa409c2e0841a8d43d7eea03190732a4 100644
--- a/cc/trees/layer_tree_host_unittest.cc
+++ b/cc/trees/layer_tree_host_unittest.cc
@@ -86,6 +86,31 @@ class LayerTreeHostTest : public LayerTreeTest {
PrioritizedResourceManager* contents_texture_manager_;
};
+class LayerTreeHostTestHasImplThreadTest : public LayerTreeHostTest {
+ public:
+ LayerTreeHostTestHasImplThreadTest() : threaded_(false) {}
+
+ void RunTest(bool threaded,
+ bool delegating_renderer,
+ bool impl_side_painting) override {
+ threaded_ = threaded;
+ LayerTreeHostTest::RunTest(threaded, delegating_renderer,
+ impl_side_painting);
+ }
+
+ void BeginTest() override {
+ EXPECT_EQ(threaded_, HasImplThread());
+ EndTest();
+ }
+
+ void AfterTest() override { EXPECT_EQ(threaded_, HasImplThread()); }
+
+ private:
+ bool threaded_;
+};
+
+SINGLE_AND_MULTI_THREAD_IMPL_TEST_F(LayerTreeHostTestHasImplThreadTest);
+
class LayerTreeHostTestSetNeedsCommitInsideLayout : public LayerTreeHostTest {
protected:
void BeginTest() override { PostSetNeedsCommitToMainThread(); }
« no previous file with comments | « cc/test/layer_tree_test.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698