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

Unified Diff: cc/trees/layer_tree_host_impl_unittest.cc

Issue 1418493003: Let LayerTreeHostImpl::ScrollAnimated scroll the outer viewport. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 6f69b5f6d9f25cf524962efa3ee9b792f8206f0b..cff0c3da8cd69d304435b190f7c15f1e7c32b45d 100644
--- a/cc/trees/layer_tree_host_impl_unittest.cc
+++ b/cc/trees/layer_tree_host_impl_unittest.cc
@@ -8179,6 +8179,11 @@ TEST_F(LayerTreeHostImplTest, ExternalTransformReflectedInNextDraw) {
TEST_F(LayerTreeHostImplTest, ScrollAnimated) {
SetupScrollAndContentsLayers(gfx::Size(100, 200));
+
+ // Shrink the outer viewport clip layer so that the outer viewport can scroll.
+ host_impl_->OuterViewportScrollLayer()->parent()->SetBounds(
+ gfx::Size(50, 100));
+
DrawFrame();
base::TimeTicks start_time =
@@ -8191,6 +8196,7 @@ TEST_F(LayerTreeHostImplTest, ScrollAnimated) {
host_impl_->ScrollAnimated(gfx::Point(), gfx::Vector2d(0, 50)));
LayerImpl* scrolling_layer = host_impl_->CurrentlyScrollingLayer();
+ EXPECT_EQ(host_impl_->OuterViewportScrollLayer(), scrolling_layer);
begin_frame_args.frame_time = start_time;
host_impl_->WillBeginImplFrame(begin_frame_args);

Powered by Google App Engine
This is Rietveld 408576698