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

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 branch 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
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 2ec30fabb6d658c25ed08d57a7eee796408751d1..1a2a386c2bae0b4a124afb933ffd02cd304eb55d 100644
--- a/cc/trees/layer_tree_host_impl_unittest.cc
+++ b/cc/trees/layer_tree_host_impl_unittest.cc
@@ -851,12 +851,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);
@@ -874,11 +876,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);
@@ -900,6 +903,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.
@@ -957,6 +961,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

Powered by Google App Engine
This is Rietveld 408576698