Chromium Code Reviews| 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/ash_switches.h" | 10 #include "ash/ash_switches.h" |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 127 #endif | 127 #endif |
| 128 ash_test_helper_->SetUp(start_session_); | 128 ash_test_helper_->SetUp(start_session_); |
| 129 | 129 |
| 130 Shell::GetPrimaryRootWindow()->Show(); | 130 Shell::GetPrimaryRootWindow()->Show(); |
| 131 Shell::GetPrimaryRootWindow()->GetHost()->Show(); | 131 Shell::GetPrimaryRootWindow()->GetHost()->Show(); |
| 132 // Move the mouse cursor to far away so that native events doesn't | 132 // Move the mouse cursor to far away so that native events doesn't |
| 133 // interfere test expectations. | 133 // interfere test expectations. |
| 134 Shell::GetPrimaryRootWindow()->MoveCursorTo(gfx::Point(-1000, -1000)); | 134 Shell::GetPrimaryRootWindow()->MoveCursorTo(gfx::Point(-1000, -1000)); |
| 135 ash::Shell::GetInstance()->cursor_manager()->EnableMouseEvents(); | 135 ash::Shell::GetInstance()->cursor_manager()->EnableMouseEvents(); |
| 136 | 136 |
| 137 // Changing GestureConfiguration shouldn't make tests fail. | 137 // Changing GestureConfiguration shouldn't make tests fail. |
|
oshima
2015/03/09 22:55:56
nit: explanation why these values are necessary wo
jonross
2015/03/10 15:07:56
Done.
| |
| 138 ui::GestureConfiguration::GetInstance() | 138 ui::GestureConfiguration* gesture_config = |
| 139 ->set_max_touch_move_in_pixels_for_click(5); | 139 ui::GestureConfiguration::GetInstance(); |
| 140 gesture_config->set_max_touch_down_duration_for_click_in_ms(800); | |
| 141 gesture_config->set_long_press_time_in_ms(1000); | |
| 142 gesture_config->set_max_touch_move_in_pixels_for_click(5); | |
| 140 | 143 |
| 141 #if defined(OS_WIN) | 144 #if defined(OS_WIN) |
| 142 if (!command_line->HasSwitch(ash::switches::kForceAshToDesktop)) { | 145 if (!command_line->HasSwitch(ash::switches::kForceAshToDesktop)) { |
| 143 if (base::win::GetVersion() >= base::win::VERSION_WIN8) { | 146 if (base::win::GetVersion() >= base::win::VERSION_WIN8) { |
| 144 ipc_thread_.reset(new base::Thread("test_metro_viewer_ipc_thread")); | 147 ipc_thread_.reset(new base::Thread("test_metro_viewer_ipc_thread")); |
| 145 base::Thread::Options options; | 148 base::Thread::Options options; |
| 146 options.message_loop_type = base::MessageLoop::TYPE_IO; | 149 options.message_loop_type = base::MessageLoop::TYPE_IO; |
| 147 ipc_thread_->StartWithOptions(options); | 150 ipc_thread_->StartWithOptions(options); |
| 148 metro_viewer_host_.reset( | 151 metro_viewer_host_.reset( |
| 149 new TestMetroViewerProcessHost(ipc_thread_->message_loop_proxy())); | 152 new TestMetroViewerProcessHost(ipc_thread_->message_loop_proxy())); |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 341 | 344 |
| 342 void AshTestBase::UnblockUserSession() { | 345 void AshTestBase::UnblockUserSession() { |
| 343 Shell::GetInstance()->session_state_delegate()->UnlockScreen(); | 346 Shell::GetInstance()->session_state_delegate()->UnlockScreen(); |
| 344 SetSessionStarted(true); | 347 SetSessionStarted(true); |
| 345 SetUserAddingScreenRunning(false); | 348 SetUserAddingScreenRunning(false); |
| 346 } | 349 } |
| 347 | 350 |
| 348 | 351 |
| 349 } // namespace test | 352 } // namespace test |
| 350 } // namespace ash | 353 } // namespace ash |
| OLD | NEW |