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

Unified Diff: ui/aura/root_window_unittest.cc

Issue 160563002: Aura: don't synthesize mouse moves while holding pointer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« ui/aura/root_window.cc ('K') | « ui/aura/root_window.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/root_window_unittest.cc
diff --git a/ui/aura/root_window_unittest.cc b/ui/aura/root_window_unittest.cc
index a5a6283269af1f664d163dd7bf39e56deb298296..7d6cbd104907e0c73c598055e6816825139b5347 100644
--- a/ui/aura/root_window_unittest.cc
+++ b/ui/aura/root_window_unittest.cc
@@ -672,6 +672,18 @@ TEST_F(RootWindowTest, MouseMovesHeld) {
filter->Reset();
RunAllPendingInMessageLoop();
EXPECT_TRUE(filter->events().empty());
+
+ // Check that no events are synthesized while holding, and all held move
+ // events are dropped on window changes.
+ dispatcher()->HoldPointerMoves();
+ DispatchEventUsingWindowDispatcher(&mouse_dragged_event);
+ DispatchEventUsingWindowDispatcher(&mouse_dragged_event2);
+ dispatcher()->OnWindowBoundsChanged(window.get(), true);
+ RunAllPendingInMessageLoop();
+ EXPECT_TRUE(filter->events().empty());
+ dispatcher()->ReleasePointerMoves();
+ RunAllPendingInMessageLoop();
+ EXPECT_TRUE(filter->events().empty());
}
TEST_F(RootWindowTest, TouchMovesHeld) {
« ui/aura/root_window.cc ('K') | « ui/aura/root_window.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698