OLD | NEW |
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 Loading... |
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 |
OLD | NEW |