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 "ash/test/ash_test_base.h" | 5 #include "ash/test/ash_test_base.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "ash/common/ash_switches.h" | 10 #include "ash/common/ash_switches.h" |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 Shell::GetInstance()->cursor_manager()->EnableMouseEvents(); | 142 Shell::GetInstance()->cursor_manager()->EnableMouseEvents(); |
143 | 143 |
144 // Changing GestureConfiguration shouldn't make tests fail. These values | 144 // Changing GestureConfiguration shouldn't make tests fail. These values |
145 // prevent unexpected events from being generated during tests. Such as | 145 // prevent unexpected events from being generated during tests. Such as |
146 // delayed events which create race conditions on slower tests. | 146 // delayed events which create race conditions on slower tests. |
147 ui::GestureConfiguration* gesture_config = | 147 ui::GestureConfiguration* gesture_config = |
148 ui::GestureConfiguration::GetInstance(); | 148 ui::GestureConfiguration::GetInstance(); |
149 gesture_config->set_max_touch_down_duration_for_click_in_ms(800); | 149 gesture_config->set_max_touch_down_duration_for_click_in_ms(800); |
150 gesture_config->set_long_press_time_in_ms(1000); | 150 gesture_config->set_long_press_time_in_ms(1000); |
151 gesture_config->set_max_touch_move_in_pixels_for_click(5); | 151 gesture_config->set_max_touch_move_in_pixels_for_click(5); |
152 | |
153 #if defined(OS_WIN) | |
154 if (!command_line->HasSwitch(switches::kForceAshToDesktop)) | |
155 WindowPositioner::SetMaximizeFirstWindow(true); | |
156 #endif | |
157 } | 152 } |
158 | 153 |
159 void AshTestBase::TearDown() { | 154 void AshTestBase::TearDown() { |
160 teardown_called_ = true; | 155 teardown_called_ = true; |
161 Shell::GetInstance()->OnAppTerminating(); | 156 Shell::GetInstance()->OnAppTerminating(); |
162 // Flush the message loop to finish pending release tasks. | 157 // Flush the message loop to finish pending release tasks. |
163 RunAllPendingInMessageLoop(); | 158 RunAllPendingInMessageLoop(); |
164 | 159 |
165 ash_test_helper_->TearDown(); | 160 ash_test_helper_->TearDown(); |
166 #if defined(OS_WIN) | 161 #if defined(OS_WIN) |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
376 | 371 |
377 void AshTestBase::DisableIME() { | 372 void AshTestBase::DisableIME() { |
378 Shell::GetInstance()->RemovePreTargetHandler( | 373 Shell::GetInstance()->RemovePreTargetHandler( |
379 Shell::GetInstance() | 374 Shell::GetInstance() |
380 ->window_tree_host_manager() | 375 ->window_tree_host_manager() |
381 ->input_method_event_handler()); | 376 ->input_method_event_handler()); |
382 } | 377 } |
383 | 378 |
384 } // namespace test | 379 } // namespace test |
385 } // namespace ash | 380 } // namespace ash |
OLD | NEW |