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

Unified Diff: cc/trees/layer_tree_host_impl_unittest.cc

Issue 2907053004: GSB uses delta_hints to calculate scrolling chain. (Closed)
Patch Set: Merged with master. 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 5a3f510b15522c8a75a9693b8c7c8f4ee5b8a924..a4bc86fa8b7f2ecdb8058b1e2a0cd7321c6c5d76 100644
--- a/cc/trees/layer_tree_host_impl_unittest.cc
+++ b/cc/trees/layer_tree_host_impl_unittest.cc
@@ -6245,13 +6245,9 @@ TEST_F(LayerTreeHostImplTest, ScrollNonAxisAlignedRotatedLayer) {
host_impl_->ScrollEnd(EndState().get());
// The child layer shouldn't have scrolled.
- gfx::Vector2d expected_scroll_delta(
- 0, -gesture_scroll_delta.x() *
- std::sin(MathUtil::Deg2Rad(child_layer_angle)));
std::unique_ptr<ScrollAndScaleSet> scroll_info =
host_impl_->ProcessScrollDeltas();
- EXPECT_TRUE(ScrollInfoContains(*scroll_info.get(), child_scroll_id,
- expected_scroll_delta));
+ ExpectNone(*scroll_info.get(), child_scroll_id);
bokan 2017/06/19 21:43:17 What's this change about? The comment above says t
sahel 2017/06/22 16:34:17 As we discussed the comment is incorrect, I confir
bokan 2017/06/22 21:44:37 Acknowledged.
// The root scroll layer shouldn't have scrolled.
ExpectNone(*scroll_info.get(), scroll_layer->element_id());
@@ -10923,12 +10919,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

Powered by Google App Engine
This is Rietveld 408576698