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

Unified Diff: cc/trees/layer_tree_host_unittest.cc

Issue 290853003: cc: remove flaky LayerTreeHostTestFinishAllRendering (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | « no previous file | 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 d1b518b44c8b1e250437f3be03c9eea062728c81..8340a717f266e512f2eba5e0ec582d1bcd2ae20b 100644
--- a/cc/trees/layer_tree_host_unittest.cc
+++ b/cc/trees/layer_tree_host_unittest.cc
@@ -1528,7 +1528,9 @@ SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F(
class LayerTreeHostTestFinishAllRendering : public LayerTreeHostTest {
public:
- LayerTreeHostTestFinishAllRendering() : once_(false), draw_count_(0) {}
+ LayerTreeHostTestFinishAllRendering()
+ : once_(false),
+ has_called_finish_all_rendering_(false) {}
virtual void BeginTest() OVERRIDE {
layer_tree_host()->SetNeedsRedraw();
@@ -1536,33 +1538,24 @@ class LayerTreeHostTestFinishAllRendering : public LayerTreeHostTest {
}
virtual void DidCommitAndDrawFrame() OVERRIDE {
- if (once_)
- return;
- once_ = true;
- layer_tree_host()->SetNeedsRedraw();
- {
- base::AutoLock lock(lock_);
- draw_count_ = 0;
- }
+ EXPECT_TRUE(once_);
layer_tree_host()->FinishAllRendering();
- {
- base::AutoLock lock(lock_);
- EXPECT_EQ(0, draw_count_);
danakj 2014/05/20 18:40:30 Hm, before this test was verifying that FinishAllR
- }
+ has_called_finish_all_rendering_ = true;
+
EndTest();
}
virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) OVERRIDE {
- base::AutoLock lock(lock_);
- ++draw_count_;
+ once_ = true;
}
- virtual void AfterTest() OVERRIDE {}
+ virtual void AfterTest() OVERRIDE {
+ EXPECT_TRUE(has_called_finish_all_rendering_);
+ }
private:
bool once_;
- base::Lock lock_;
- int draw_count_;
+ bool has_called_finish_all_rendering_;
};
SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestFinishAllRendering);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698