diff options
author | tdresser@chromium.org <tdresser@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-02 16:51:59 +0000 |
---|---|---|
committer | tdresser@chromium.org <tdresser@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-02 16:51:59 +0000 |
commit | 9877c37244c4ba3e319986e2b58375dd1d9fd625 (patch) | |
tree | 48c7e8a37196db67a09c3020f56c4d8416da1f6e /ash | |
parent | 01d0ea20ccb6ac0222b1e3bfaf9b9be19e70e5f9 (diff) | |
download | chromium_src-9877c37244c4ba3e319986e2b58375dd1d9fd625.zip chromium_src-9877c37244c4ba3e319986e2b58375dd1d9fd625.tar.gz chromium_src-9877c37244c4ba3e319986e2b58375dd1d9fd625.tar.bz2 |
Gestures are now possible using touch events with any ids
Each gesture point stores a "point_id," which is used for state transitions in the GestureRecognizer.
The point_ids are maintained such that the set of point_ids is always contiguous, from 0 to the number of current touches.
A lower point_id indicates that a touch occurred first.
BUG=113144
TEST=GestureRecognizerTest.*
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=123989
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=124071
Review URL: http://codereview.chromium.org/9452024
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@124668 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash')
-rw-r--r-- | ash/wm/root_window_event_filter_unittest.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/ash/wm/root_window_event_filter_unittest.cc b/ash/wm/root_window_event_filter_unittest.cc index c4e41bd..efc2820 100644 --- a/ash/wm/root_window_event_filter_unittest.cc +++ b/ash/wm/root_window_event_filter_unittest.cc @@ -325,7 +325,7 @@ TEST_F(RootWindowEventFilterTest, ActivateOnTouch) { press_point = w1->bounds().CenterPoint(); aura::Window::ConvertPointToWindow(w1->parent(), root_window, &press_point); d1.set_activate(false); - aura::TouchEvent touchev2(ui::ET_TOUCH_PRESSED, press_point, 0); + aura::TouchEvent touchev2(ui::ET_TOUCH_PRESSED, press_point, 1); root_window->DispatchTouchEvent(&touchev2); // Window2 should still be active and focused. @@ -547,13 +547,15 @@ TEST_F(RootWindowEventFilterTest, UpdateCursorVisibility) { aura::MouseEvent mouse_moved( ui::ET_MOUSE_MOVED, gfx::Point(0, 0), gfx::Point(0, 0), 0x0); - aura::TouchEvent touch_pressed( + aura::TouchEvent touch_pressed1( ui::ET_TOUCH_PRESSED, gfx::Point(0, 0), 0); + aura::TouchEvent touch_pressed2( + ui::ET_TOUCH_PRESSED, gfx::Point(0, 0), 1); root_window_filter->set_update_cursor_visibility(true); root_window->DispatchMouseEvent(&mouse_moved); EXPECT_TRUE(root_window->cursor_shown()); - root_window->DispatchTouchEvent(&touch_pressed); + root_window->DispatchTouchEvent(&touch_pressed1); EXPECT_FALSE(root_window->cursor_shown()); root_window->DispatchMouseEvent(&mouse_moved); EXPECT_TRUE(root_window->cursor_shown()); @@ -563,7 +565,7 @@ TEST_F(RootWindowEventFilterTest, UpdateCursorVisibility) { root_window->DispatchMouseEvent(&mouse_moved); EXPECT_FALSE(root_window->cursor_shown()); root_window->ShowCursor(true); - root_window->DispatchTouchEvent(&touch_pressed); + root_window->DispatchTouchEvent(&touch_pressed2); EXPECT_TRUE(root_window->cursor_shown()); } |