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

Unified Diff: cc/layer_tree_host_impl_unittest.cc

Issue 12077046: Plumb an overscroll callback form the compositor to the Android UI thread. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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/layer_tree_host_impl_unittest.cc
diff --git a/cc/layer_tree_host_impl_unittest.cc b/cc/layer_tree_host_impl_unittest.cc
index d707b46f90622c4c4f88256542e232c218e1e386..2b0f74ac549ea496e79856aea0411c2ed0b9b54f 100644
--- a/cc/layer_tree_host_impl_unittest.cc
+++ b/cc/layer_tree_host_impl_unittest.cc
@@ -911,7 +911,16 @@ TEST_P(LayerTreeHostImplTest, compositorFrameMetadata)
{
CompositorFrameMetadata metadata = m_hostImpl->makeCompositorFrameMetadata();
EXPECT_EQ(gfx::Vector2dF(0.0f, 10.0f), metadata.root_scroll_offset);
+ EXPECT_EQ(gfx::Vector2dF(0.0f, 0.0f), metadata.unused_scroll_delta);
}
+ // Overscroll should update metadata immediately.
+ m_hostImpl->scrollBy(gfx::Point(), gfx::Vector2d(0, 50));
+ {
+ CompositorFrameMetadata metadata = m_hostImpl->makeCompositorFrameMetadata();
+ EXPECT_EQ(gfx::Vector2dF(0.0f, 50.0f), metadata.root_scroll_offset);
+ EXPECT_EQ(gfx::Vector2dF(0.0f, 10.0f), metadata.unused_scroll_delta);
+ }
+ m_hostImpl->scrollBy(gfx::Point(), gfx::Vector2d(0, -40));
m_hostImpl->scrollEnd();
{

Powered by Google App Engine
This is Rietveld 408576698