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

Unified Diff: cc/trees/layer_tree_host_unittest_animation.cc

Issue 462803002: Fix failing (flaky) LayerTreeHostTestLCDNotification test. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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
Index: cc/trees/layer_tree_host_unittest_animation.cc
diff --git a/cc/trees/layer_tree_host_unittest_animation.cc b/cc/trees/layer_tree_host_unittest_animation.cc
index f717c2af9cf61ad23e0b38491a6b59b4a9993fe8..4706dad07ff37d73a8f2656d1c5fec20177f72fd 100644
--- a/cc/trees/layer_tree_host_unittest_animation.cc
+++ b/cc/trees/layer_tree_host_unittest_animation.cc
@@ -722,62 +722,6 @@ class LayerTreeHostAnimationTestLayerAddedWithAnimation
SINGLE_AND_MULTI_THREAD_TEST_F(
LayerTreeHostAnimationTestLayerAddedWithAnimation);
-class LayerTreeHostAnimationTestContinuousAnimate
- : public LayerTreeHostAnimationTest {
- public:
- LayerTreeHostAnimationTestContinuousAnimate()
- : num_commit_complete_(0),
- num_draw_layers_(0) {
- }
-
- virtual void SetupTree() OVERRIDE {
- LayerTreeHostAnimationTest::SetupTree();
- // Create a fake content layer so we actually produce new content for every
- // animation frame.
- content_ = FakeContentLayer::Create(&client_);
- content_->set_always_update_resources(true);
- layer_tree_host()->root_layer()->AddChild(content_);
- }
-
- virtual void BeginTest() OVERRIDE {
- PostSetNeedsCommitToMainThread();
- }
-
- virtual void Animate(base::TimeTicks) OVERRIDE {
- if (num_draw_layers_ == 2)
- return;
- layer_tree_host()->SetNeedsAnimate();
- }
-
- virtual void Layout() OVERRIDE {
- layer_tree_host()->root_layer()->SetNeedsDisplay();
- }
-
- virtual void CommitCompleteOnThread(LayerTreeHostImpl* tree_impl) OVERRIDE {
- if (num_draw_layers_ == 1)
- num_commit_complete_++;
- }
-
- virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) OVERRIDE {
- num_draw_layers_++;
- if (num_draw_layers_ == 2)
- EndTest();
- }
-
- virtual void AfterTest() OVERRIDE {
- // Check that we didn't commit twice between first and second draw.
- EXPECT_EQ(1, num_commit_complete_);
- }
-
- private:
- int num_commit_complete_;
- int num_draw_layers_;
- FakeContentLayerClient client_;
- scoped_refptr<FakeContentLayer> content_;
-};
-
-MULTI_THREAD_TEST_F(LayerTreeHostAnimationTestContinuousAnimate);
-
class LayerTreeHostAnimationTestCancelAnimateCommit
: public LayerTreeHostAnimationTest {
public:

Powered by Google App Engine
This is Rietveld 408576698