| Index: ash/test/ash_test_helper.cc | 
| diff --git a/ash/test/ash_test_helper.cc b/ash/test/ash_test_helper.cc | 
| index 3a48ae33f8f2ba546f02f080ca780615f6804bbd..28d129ed0d133b2634747d8e3994ad41ee08dfef 100644 | 
| --- a/ash/test/ash_test_helper.cc | 
| +++ b/ash/test/ash_test_helper.cc | 
| @@ -5,6 +5,7 @@ | 
| #include "ash/test/ash_test_helper.h" | 
|  | 
| #include "ash/accelerators/accelerator_controller_delegate_aura.h" | 
| +#include "ash/ash_switches.h" | 
| #include "ash/aura/shell_port_classic.h" | 
| #include "ash/mus/bridge/shell_port_mash.h" | 
| #include "ash/mus/screen_mus.h" | 
| @@ -45,6 +46,7 @@ | 
| #include "ui/base/test/material_design_controller_test_api.h" | 
| #include "ui/compositor/scoped_animation_duration_scale_mode.h" | 
| #include "ui/compositor/test/context_factories_for_test.h" | 
| +#include "ui/display/display_switches.h" | 
| #include "ui/display/manager/display_manager.h" | 
| #include "ui/display/manager/managed_display_info.h" | 
| #include "ui/display/test/display_manager_test_api.h" | 
| @@ -83,6 +85,28 @@ AshTestHelper::AshTestHelper(AshTestEnvironment* ash_test_environment) | 
| AshTestHelper::~AshTestHelper() {} | 
|  | 
| void AshTestHelper::SetUp(bool start_session) { | 
| +  command_line_ = base::MakeUnique<base::test::ScopedCommandLine>(); | 
| +  // TODO(jamescook): Can we do this without changing command line? | 
| +  // Use the origin (1,1) so that it doesn't over | 
| +  // lap with the native mouse cursor. | 
| +  if (!command_line_->GetProcessCommandLine()->HasSwitch( | 
| +          ::switches::kHostWindowBounds)) { | 
| +    command_line_->GetProcessCommandLine()->AppendSwitchASCII( | 
| +        ::switches::kHostWindowBounds, "1+1-800x600"); | 
| +  } | 
| + | 
| +  // TODO(wutao): We enabled a smooth screen rotation animation, which is using | 
| +  // an asynchronous method. However for some tests require to evaluate the | 
| +  // screen rotation immediately after the operation of setting display | 
| +  // rotation, we need to append a slow screen rotation animation flag to pass | 
| +  // the tests. When we remove the flag "ash-disable-smooth-screen-rotation", we | 
| +  // need to disable the screen rotation animation in the test. | 
| +  if (!command_line_->GetProcessCommandLine()->HasSwitch( | 
| +          switches::kAshDisableSmoothScreenRotation)) { | 
| +    command_line_->GetProcessCommandLine()->AppendSwitch( | 
| +        switches::kAshDisableSmoothScreenRotation); | 
| +  } | 
| + | 
| if (config_ == Config::MUS) | 
| input_device_client_ = base::MakeUnique<ui::InputDeviceClient>(); | 
|  | 
| @@ -226,6 +250,8 @@ void AshTestHelper::TearDown() { | 
|  | 
| input_device_client_.reset(); | 
|  | 
| +  command_line_.reset(); | 
| + | 
| // WindowManager owns the CaptureController for mus/mash. | 
| CHECK(config_ != Config::CLASSIC || !::wm::CaptureController::Get()); | 
| } | 
|  |