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

Side by Side Diff: ui/aura/test/aura_test_base.cc

Issue 10532212: Gesture Recognizer: Make short long press time configurable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/common/pref_names.cc ('k') | ui/base/gestures/gesture_configuration.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/aura/test/aura_test_base.h" 5 #include "ui/aura/test/aura_test_base.h"
6 6
7 #include "ui/aura/test/aura_test_helper.h" 7 #include "ui/aura/test/aura_test_helper.h"
8 #include "ui/base/gestures/gesture_configuration.h" 8 #include "ui/base/gestures/gesture_configuration.h"
9 #include "ui/base/ime/text_input_test_support.h" 9 #include "ui/base/ime/text_input_test_support.h"
10 10
11 namespace aura { 11 namespace aura {
12 namespace test { 12 namespace test {
13 13
14 AuraTestBase::AuraTestBase() { 14 AuraTestBase::AuraTestBase() {
15 } 15 }
16 16
17 AuraTestBase::~AuraTestBase() { 17 AuraTestBase::~AuraTestBase() {
18 } 18 }
19 19
20 void AuraTestBase::SetUp() { 20 void AuraTestBase::SetUp() {
21 testing::Test::SetUp(); 21 testing::Test::SetUp();
22 ui::TextInputTestSupport::Initilaize(); 22 ui::TextInputTestSupport::Initilaize();
23 23
24 // Changing the parameters for gesture recognition shouldn't cause 24 // Changing the parameters for gesture recognition shouldn't cause
25 // tests to fail, so we use a separate set of parameters for unit 25 // tests to fail, so we use a separate set of parameters for unit
26 // testing. 26 // testing.
27 ui::GestureConfiguration::set_long_press_time_in_seconds(1.0); 27 ui::GestureConfiguration::set_long_press_time_in_seconds(1.0);
28 ui::GestureConfiguration::set_semi_long_press_time_in_seconds(0.5);
28 ui::GestureConfiguration::set_max_distance_for_two_finger_tap_in_pixels(300); 29 ui::GestureConfiguration::set_max_distance_for_two_finger_tap_in_pixels(300);
29 ui::GestureConfiguration::set_max_seconds_between_double_click(0.7); 30 ui::GestureConfiguration::set_max_seconds_between_double_click(0.7);
30 ui::GestureConfiguration:: 31 ui::GestureConfiguration::
31 set_max_separation_for_gesture_touches_in_pixels(150); 32 set_max_separation_for_gesture_touches_in_pixels(150);
32 ui::GestureConfiguration:: 33 ui::GestureConfiguration::
33 set_max_touch_down_duration_in_seconds_for_click(0.8); 34 set_max_touch_down_duration_in_seconds_for_click(0.8);
34 ui::GestureConfiguration::set_max_touch_move_in_pixels_for_click(20); 35 ui::GestureConfiguration::set_max_touch_move_in_pixels_for_click(20);
35 ui::GestureConfiguration::set_min_distance_for_pinch_scroll_in_pixels(20); 36 ui::GestureConfiguration::set_min_distance_for_pinch_scroll_in_pixels(20);
36 ui::GestureConfiguration::set_min_flick_speed_squared(550.f * 550.f); 37 ui::GestureConfiguration::set_min_flick_speed_squared(550.f * 550.f);
37 ui::GestureConfiguration::set_min_pinch_update_distance_in_pixels(5); 38 ui::GestureConfiguration::set_min_pinch_update_distance_in_pixels(5);
(...skipping 17 matching lines...) Expand all
55 ui::TextInputTestSupport::Shutdown(); 56 ui::TextInputTestSupport::Shutdown();
56 testing::Test::TearDown(); 57 testing::Test::TearDown();
57 } 58 }
58 59
59 void AuraTestBase::RunAllPendingInMessageLoop() { 60 void AuraTestBase::RunAllPendingInMessageLoop() {
60 helper_->RunAllPendingInMessageLoop(); 61 helper_->RunAllPendingInMessageLoop();
61 } 62 }
62 63
63 } // namespace test 64 } // namespace test
64 } // namespace aura 65 } // namespace aura
OLDNEW
« no previous file with comments | « chrome/common/pref_names.cc ('k') | ui/base/gestures/gesture_configuration.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698