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

Unified Diff: cc/trees/layer_tree_host_impl_unittest.cc

Issue 2907053004: GSB uses delta_hints to calculate scrolling chain. (Closed)
Patch Set: Merge branch 'master' into GSB_checks_delta_hints Created 3 years, 6 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 d5e34a64d12035af08d0a1bb27d1599aa5a10761..ab3e801b5238ecbc5dfb0209298b57a512582b6d 100644
--- a/cc/trees/layer_tree_host_impl_unittest.cc
+++ b/cc/trees/layer_tree_host_impl_unittest.cc
@@ -6260,7 +6260,8 @@ TEST_F(LayerTreeHostImplTest, ScrollNonAxisAlignedRotatedLayer) {
host_impl_->ScrollBy(UpdateState(gfx::Point(), gesture_scroll_delta).get());
host_impl_->ScrollEnd(EndState().get());
- // The child layer shouldn't have scrolled.
+ // The child layer should have scrolled down in its local coordinates an
+ // amount proportional to the angle between it and the input scroll delta.
gfx::Vector2d expected_scroll_delta(
0, -gesture_scroll_delta.x() *
std::sin(MathUtil::Deg2Rad(child_layer_angle)));
@@ -10947,12 +10948,14 @@ TEST_F(LayerTreeHostImplTest, SecondScrollAnimatedBeginNotIgnored) {
const gfx::Size viewport_size(50, 100);
CreateBasicVirtualViewportLayers(viewport_size, content_size);
- EXPECT_EQ(InputHandler::SCROLL_ON_IMPL_THREAD,
- host_impl_->ScrollAnimatedBegin(gfx::Point()).thread);
+ EXPECT_EQ(
+ InputHandler::SCROLL_ON_IMPL_THREAD,
+ host_impl_->ScrollAnimatedBegin(BeginState(gfx::Point()).get()).thread);
// The second ScrollAnimatedBegin should not get ignored.
- EXPECT_EQ(InputHandler::SCROLL_ON_IMPL_THREAD,
- host_impl_->ScrollAnimatedBegin(gfx::Point()).thread);
+ EXPECT_EQ(
+ InputHandler::SCROLL_ON_IMPL_THREAD,
+ host_impl_->ScrollAnimatedBegin(BeginState(gfx::Point()).get()).thread);
}
// Verfify that a smooth scroll animation doesn't jump when UpdateTarget gets
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | content/browser/renderer_host/input/synthetic_smooth_move_gesture.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698