| 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. These values | 
|  138   ui::GestureConfiguration::GetInstance() |  138   // prevent unexpected events from being generated during tests. Such as | 
|  139       ->set_max_touch_move_in_pixels_for_click(5); |  139   // delayed events which create race conditions on slower tests. | 
 |  140   ui::GestureConfiguration* gesture_config = | 
 |  141       ui::GestureConfiguration::GetInstance(); | 
 |  142   gesture_config->set_max_touch_down_duration_for_click_in_ms(800); | 
 |  143   gesture_config->set_long_press_time_in_ms(1000); | 
 |  144   gesture_config->set_max_touch_move_in_pixels_for_click(5); | 
|  140  |  145  | 
|  141 #if defined(OS_WIN) |  146 #if defined(OS_WIN) | 
|  142   if (!command_line->HasSwitch(ash::switches::kForceAshToDesktop)) { |  147   if (!command_line->HasSwitch(ash::switches::kForceAshToDesktop)) { | 
|  143     if (base::win::GetVersion() >= base::win::VERSION_WIN8) { |  148     if (base::win::GetVersion() >= base::win::VERSION_WIN8) { | 
|  144       ipc_thread_.reset(new base::Thread("test_metro_viewer_ipc_thread")); |  149       ipc_thread_.reset(new base::Thread("test_metro_viewer_ipc_thread")); | 
|  145       base::Thread::Options options; |  150       base::Thread::Options options; | 
|  146       options.message_loop_type = base::MessageLoop::TYPE_IO; |  151       options.message_loop_type = base::MessageLoop::TYPE_IO; | 
|  147       ipc_thread_->StartWithOptions(options); |  152       ipc_thread_->StartWithOptions(options); | 
|  148       metro_viewer_host_.reset( |  153       metro_viewer_host_.reset( | 
|  149           new TestMetroViewerProcessHost(ipc_thread_->message_loop_proxy())); |  154           new TestMetroViewerProcessHost(ipc_thread_->message_loop_proxy())); | 
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  341  |  346  | 
|  342 void AshTestBase::UnblockUserSession() { |  347 void AshTestBase::UnblockUserSession() { | 
|  343   Shell::GetInstance()->session_state_delegate()->UnlockScreen(); |  348   Shell::GetInstance()->session_state_delegate()->UnlockScreen(); | 
|  344   SetSessionStarted(true); |  349   SetSessionStarted(true); | 
|  345   SetUserAddingScreenRunning(false); |  350   SetUserAddingScreenRunning(false); | 
|  346 } |  351 } | 
|  347  |  352  | 
|  348  |  353  | 
|  349 }  // namespace test |  354 }  // namespace test | 
|  350 }  // namespace ash |  355 }  // namespace ash | 
| OLD | NEW |