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

Unified Diff: ui/aura/window_unittest.cc

Issue 10928066: Add GestureTapCancel gesture type (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sky cr feedback Created 8 years, 3 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 | « ui/aura/gestures/gesture_recognizer_unittest.cc ('k') | ui/base/events/event_constants.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/window_unittest.cc
diff --git a/ui/aura/window_unittest.cc b/ui/aura/window_unittest.cc
index 51598466f1d09b88b58c10dddd678c2c22a380bd..5c938195348773c64a9a6b2a0570efef8870a2e9 100644
--- a/ui/aura/window_unittest.cc
+++ b/ui/aura/window_unittest.cc
@@ -927,9 +927,10 @@ TEST_F(WindowTest, TransferCaptureTouchEvents) {
d1.ResetCounts();
d2.ResetCounts();
- // Set capture on |w2|, this should send a cancel to |w1| but not |w2|.
+ // Set capture on |w2|, this should send a cancel (TAP_CANCEL, END) to |w1|
+ // but not |w2|.
w2->SetCapture();
- EXPECT_EQ(1, d1.gesture_event_count());
+ EXPECT_EQ(2, d1.gesture_event_count());
EXPECT_EQ(0, d2.gesture_event_count());
d1.ResetCounts();
d2.ResetCounts();
@@ -949,8 +950,8 @@ TEST_F(WindowTest, TransferCaptureTouchEvents) {
root_window()->AsRootWindowHostDelegate()->OnHostTouchEvent(&m3);
EXPECT_EQ(0, d1.gesture_event_count());
EXPECT_EQ(0, d2.gesture_event_count());
- // |w3| gets two events, both scroll related.
- EXPECT_EQ(2, d3.gesture_event_count());
+ // |w3| gets a TAP_CANCEL and two scroll related events.
+ EXPECT_EQ(3, d3.gesture_event_count());
}
// Changes capture while capture is already ongoing.
« no previous file with comments | « ui/aura/gestures/gesture_recognizer_unittest.cc ('k') | ui/base/events/event_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698