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

Unified Diff: cc/trees/layer_tree_host_impl_unittest.cc

Issue 1689293002: cc: Move TryScroll from LayerImpl to LayerTreeHostImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge with master and fix unit test failures. Created 4 years, 10 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/trees/layer_tree_host_impl.cc ('k') | cc/trees/layer_tree_host_unittest_scroll.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_impl_unittest.cc
diff --git a/cc/trees/layer_tree_host_impl_unittest.cc b/cc/trees/layer_tree_host_impl_unittest.cc
index f2da25e849acc6394cd7011ae8f8b22378155c11..bb65c02a8d2ce989e3896b2c60fe047d7a9a96ca 100644
--- a/cc/trees/layer_tree_host_impl_unittest.cc
+++ b/cc/trees/layer_tree_host_impl_unittest.cc
@@ -860,12 +860,14 @@ TEST_F(LayerTreeHostImplTest, FlingOnlyWhenScrollingTouchpad) {
TEST_F(LayerTreeHostImplTest, NoFlingWhenScrollingOnMain) {
SetupScrollAndContentsLayers(gfx::Size(100, 100));
host_impl_->SetViewportSize(gfx::Size(50, 50));
- DrawFrame();
LayerImpl* root = host_impl_->active_tree()->root_layer();
root->set_main_thread_scrolling_reasons(
MainThreadScrollingReason::kHasBackgroundAttachmentFixedObjects);
+ SetNeedsRebuildPropertyTrees();
+ DrawFrame();
+
// Start scrolling a layer
InputHandler::ScrollStatus status = host_impl_->ScrollBegin(
BeginState(gfx::Point()).get(), InputHandler::GESTURE);
@@ -883,11 +885,12 @@ TEST_F(LayerTreeHostImplTest, NoFlingWhenScrollingOnMain) {
TEST_F(LayerTreeHostImplTest, ShouldScrollOnMainThread) {
SetupScrollAndContentsLayers(gfx::Size(100, 100));
host_impl_->SetViewportSize(gfx::Size(50, 50));
- DrawFrame();
LayerImpl* root = host_impl_->active_tree()->root_layer();
root->set_main_thread_scrolling_reasons(
MainThreadScrollingReason::kHasBackgroundAttachmentFixedObjects);
+ SetNeedsRebuildPropertyTrees();
+ DrawFrame();
InputHandler::ScrollStatus status = host_impl_->ScrollBegin(
BeginState(gfx::Point()).get(), InputHandler::WHEEL);
@@ -909,6 +912,7 @@ TEST_F(LayerTreeHostImplTest, NonFastScrollableRegionBasic) {
LayerImpl* root = host_impl_->active_tree()->root_layer();
root->SetNonFastScrollableRegion(gfx::Rect(0, 0, 50, 50));
+ SetNeedsRebuildPropertyTrees();
DrawFrame();
// All scroll types inside the non-fast scrollable region should fail.
@@ -966,6 +970,7 @@ TEST_F(LayerTreeHostImplTest, NonFastScrollableRegionWithOffset) {
root->SetPosition(gfx::PointF(-25.f, 0.f));
root->SetDrawsContent(true);
+ SetNeedsRebuildPropertyTrees();
DrawFrame();
// This point would fall into the non-fast scrollable region except that we've
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | cc/trees/layer_tree_host_unittest_scroll.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698