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

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: 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 b984b35bdef20e5a431833cac01654cf0cf9470e..005b153e952386796127e0c673abde9149a4281b 100644
--- a/cc/trees/layer_tree_host_unittest.cc
+++ b/cc/trees/layer_tree_host_unittest.cc
@@ -86,6 +86,30 @@ class LayerTreeHostTest : public LayerTreeTest {
PrioritizedResourceManager* contents_texture_manager_;
};
+class LayerTreeHostTestHasImplThreadTest : public LayerTreeHostTest {
danakj 2015/05/06 22:39:08 while i like tests that test themselves, i don't k
+ 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);
danakj 2015/05/06 22:39:08 whitespace after class defn
mithro-old 2015/05/06 23:24:43 Done.
+
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