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

Unified Diff: cc/trees/layer_tree_host_impl_unittest.cc

Issue 2718193002: Prevent handle MouseUp when mouse is capture a scrollbar (Closed)
Patch Set: add captured check in mouse up Created 3 years, 10 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/input/scrollbar_animation_controller.cc ('k') | no next file » | 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 9363993b1b235d12e33e6e6a4e73e4fe502fc9df..97d509bd71c21bdcb38a22d93afebcd586ca76d7 100644
--- a/cc/trees/layer_tree_host_impl_unittest.cc
+++ b/cc/trees/layer_tree_host_impl_unittest.cc
@@ -11769,6 +11769,15 @@ void LayerTreeHostImplTest::SetupMouseMoveAtTestScrollbarStates(
EXPECT_FALSE(animation_task_.Equals(base::Closure()));
+ // Near scrollbar_1, then mouse down and up, should not post an event to fade
+ // out scrollbar_1.
+ host_impl_->MouseMoveAt(gfx::Point(40, 150));
+ animation_task_ = base::Closure();
+
+ host_impl_->MouseDown();
+ host_impl_->MouseUp();
+ EXPECT_TRUE(animation_task_.Equals(base::Closure()));
+
// Near scrollbar_1, then mouse down and unregister
// scrollbar_2_animation_controller, then mouse up should not cause crash.
host_impl_->MouseMoveAt(gfx::Point(40, 150));
« no previous file with comments | « cc/input/scrollbar_animation_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698