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

Unified Diff: cc/trees/layer_tree_host_impl_unittest.cc

Issue 2290233004: currentlyscrollinglayer cleared in scrollAnimatedBegin. (Closed)
Patch Set: nit fixed. Created 4 years, 4 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') | ui/events/blink/input_handler_proxy.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 49aa90653ff7ea0ade4100c705b0cd741271b04e..ebc220195d4dcd472a446dfc70dd4a1a66724484 100644
--- a/cc/trees/layer_tree_host_impl_unittest.cc
+++ b/cc/trees/layer_tree_host_impl_unittest.cc
@@ -10004,6 +10004,19 @@ TEST_F(LayerTreeHostImplTest, ScrollAnimated) {
host_impl_->DidFinishImplFrame();
}
+TEST_F(LayerTreeHostImplTest, SecondScrollAnimatedBeginNotIgnored) {
+ const gfx::Size content_size(1000, 1000);
+ 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);
+
+ // The second ScrollAnimatedBegin should not get ignored.
+ EXPECT_EQ(InputHandler::SCROLL_ON_IMPL_THREAD,
+ host_impl_->ScrollAnimatedBegin(gfx::Point()).thread);
+}
+
// Verfify that a smooth scroll animation doesn't jump when UpdateTarget gets
// called before the animation is started.
TEST_F(LayerTreeHostImplTest, AnimatedScrollUpdateTargetBeforeStarting) {
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | ui/events/blink/input_handler_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698