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

Side by Side Diff: cc/test/layer_tree_test.cc

Issue 462803002: Fix failing (flaky) LayerTreeHostTestLCDNotification test. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: flakylcd: reordertests 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/test/fake_proxy.cc ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/test/layer_tree_test.h" 5 #include "cc/test/layer_tree_test.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "cc/animation/animation.h" 8 #include "cc/animation/animation.h"
9 #include "cc/animation/animation_registrar.h" 9 #include "cc/animation/animation_registrar.h"
10 #include "cc/animation/layer_animation_controller.h" 10 #include "cc/animation/layer_animation_controller.h"
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 gfx::ScaleSize(root_bounds, layer_tree_host_->device_scale_factor())); 543 gfx::ScaleSize(root_bounds, layer_tree_host_->device_scale_factor()));
544 layer_tree_host_->SetViewportSize(device_root_bounds); 544 layer_tree_host_->SetViewportSize(device_root_bounds);
545 } 545 }
546 546
547 void LayerTreeTest::Timeout() { 547 void LayerTreeTest::Timeout() {
548 timed_out_ = true; 548 timed_out_ = true;
549 EndTest(); 549 EndTest();
550 } 550 }
551 551
552 void LayerTreeTest::RealEndTest() { 552 void LayerTreeTest::RealEndTest() {
553 if (layer_tree_host_ && proxy()->CommitPendingForTesting()) { 553 if (layer_tree_host_ && !timed_out_ &&
554 proxy()->MainFrameWillHappenForTesting()) {
554 main_task_runner_->PostTask( 555 main_task_runner_->PostTask(
555 FROM_HERE, 556 FROM_HERE,
556 base::Bind(&LayerTreeTest::RealEndTest, main_thread_weak_ptr_)); 557 base::Bind(&LayerTreeTest::RealEndTest, main_thread_weak_ptr_));
557 return; 558 return;
558 } 559 }
559 560
560 base::MessageLoop::current()->Quit(); 561 base::MessageLoop::current()->Quit();
561 } 562 }
562 563
563 void LayerTreeTest::DispatchAddAnimation(Layer* layer_to_receive_animation, 564 void LayerTreeTest::DispatchAddAnimation(Layer* layer_to_receive_animation,
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
697 return -1; 698 return -1;
698 } 699 }
699 700
700 void LayerTreeTest::DestroyLayerTreeHost() { 701 void LayerTreeTest::DestroyLayerTreeHost() {
701 if (layer_tree_host_ && layer_tree_host_->root_layer()) 702 if (layer_tree_host_ && layer_tree_host_->root_layer())
702 layer_tree_host_->root_layer()->SetLayerTreeHost(NULL); 703 layer_tree_host_->root_layer()->SetLayerTreeHost(NULL);
703 layer_tree_host_.reset(); 704 layer_tree_host_.reset();
704 } 705 }
705 706
706 } // namespace cc 707 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/fake_proxy.cc ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698