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

Unified Diff: cc/trees/layer_tree_host_impl_unittest.cc

Issue 910373002: [Android] Disable pull-to-refresh with overflow:hidden (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 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') | content/browser/android/overscroll_controller_android.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 23e90e11134d4e6fc405418ddd0e1a7b463c2306..4deb8e430a2c9c51ba6a1536a6f51052d6a8eb79 100644
--- a/cc/trees/layer_tree_host_impl_unittest.cc
+++ b/cc/trees/layer_tree_host_impl_unittest.cc
@@ -1844,6 +1844,8 @@ TEST_F(LayerTreeHostImplTest, CompositorFrameMetadata) {
EXPECT_EQ(gfx::SizeF(100.f, 100.f), metadata.root_layer_size);
EXPECT_EQ(0.5f, metadata.min_page_scale_factor);
EXPECT_EQ(4.f, metadata.max_page_scale_factor);
+ EXPECT_FALSE(metadata.root_overflow_x_hidden);
+ EXPECT_FALSE(metadata.root_overflow_y_hidden);
}
// Scrolling should update metadata immediately.
@@ -1862,6 +1864,24 @@ TEST_F(LayerTreeHostImplTest, CompositorFrameMetadata) {
EXPECT_EQ(gfx::Vector2dF(0.f, 10.f), metadata.root_scroll_offset);
}
+ // Root "overflow: hidden" properties should be reflected.
+ {
+ host_impl_->active_tree()
+ ->InnerViewportScrollLayer()
+ ->set_user_scrollable_horizontal(false);
+ CompositorFrameMetadata metadata =
+ host_impl_->MakeCompositorFrameMetadata();
+ EXPECT_TRUE(metadata.root_overflow_x_hidden);
+ EXPECT_FALSE(metadata.root_overflow_y_hidden);
+
+ host_impl_->active_tree()
+ ->InnerViewportScrollLayer()
+ ->set_user_scrollable_vertical(false);
+ metadata = host_impl_->MakeCompositorFrameMetadata();
+ EXPECT_TRUE(metadata.root_overflow_x_hidden);
+ EXPECT_TRUE(metadata.root_overflow_y_hidden);
+ }
+
// Page scale should update metadata correctly (shrinking only the viewport).
host_impl_->ScrollBegin(gfx::Point(), InputHandler::Gesture);
host_impl_->PinchGestureBegin();
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | content/browser/android/overscroll_controller_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698