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

Unified Diff: chrome/browser/chromeos/accessibility/touch_exploration_controller_browsertest.cc

Issue 296403011: Support double-tap to click in touch accessibility controller. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update browser test for touch exploration too Created 6 years, 6 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 | « no previous file | ui/aura/test/event_generator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/accessibility/touch_exploration_controller_browsertest.cc
diff --git a/chrome/browser/chromeos/accessibility/touch_exploration_controller_browsertest.cc b/chrome/browser/chromeos/accessibility/touch_exploration_controller_browsertest.cc
index 8ede979dbe0449147ecdc7df7ce726eb16431bb0..43ef9138f037c1cfb05a14ddd36db9d836f23ff6 100644
--- a/chrome/browser/chromeos/accessibility/touch_exploration_controller_browsertest.cc
+++ b/chrome/browser/chromeos/accessibility/touch_exploration_controller_browsertest.cc
@@ -55,7 +55,13 @@ IN_PROC_BROWSER_TEST_F(TouchExplorationTest, ToggleOnOff) {
SwitchTouchExplorationMode(true);
aura::test::EventGenerator generator(root_window);
+ generator.set_current_location(gfx::Point(100, 200));
generator.PressTouchId(1);
+ // Since the touch exploration controller doesn't know if the user is
+ // double-tapping or not, touch exploration is only initiated if the
+ // user moves more than 8 pixels away from the initial location (the "slop"),
+ // or after 300 ms has elapsed.
+ generator.MoveTouchId(gfx::Point(109, 209), 1);
// Number of mouse events may be greater than 1 because of ET_MOUSE_ENTERED.
EXPECT_GT(event_handler->num_mouse_events(), 0);
EXPECT_EQ(0, event_handler->num_touch_events());
@@ -68,7 +74,9 @@ IN_PROC_BROWSER_TEST_F(TouchExplorationTest, ToggleOnOff) {
event_handler->Reset();
SwitchTouchExplorationMode(true);
+ generator.set_current_location(gfx::Point(500, 600));
generator.PressTouchId(2);
+ generator.MoveTouchId(gfx::Point(509, 609), 2);
EXPECT_GT(event_handler->num_mouse_events(), 0);
EXPECT_EQ(0, event_handler->num_touch_events());
« no previous file with comments | « no previous file | ui/aura/test/event_generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698