Chromium Code Reviews| Index: ash/mus/test/wm_test_helper.cc |
| diff --git a/ash/mus/test/wm_test_helper.cc b/ash/mus/test/wm_test_helper.cc |
| index cf2142d82859168560769170b9fdc750a846051b..345f9a29b2c9973f631604318cfb835d49a0e629 100644 |
| --- a/ash/mus/test/wm_test_helper.cc |
| +++ b/ash/mus/test/wm_test_helper.cc |
| @@ -25,7 +25,7 @@ namespace mus { |
| WmTestHelper::WmTestHelper() {} |
| WmTestHelper::~WmTestHelper() { |
| - window_manager_app_.window_manager_.reset(); |
| + window_manager_app_.reset(); |
| ash::test::MaterialDesignControllerTestAPI::Uninitialize(); |
| ui::test::MaterialDesignControllerTestAPI::Uninitialize(); |
| } |
| @@ -34,10 +34,12 @@ void WmTestHelper::Init() { |
| ui::MaterialDesignController::Initialize(); |
| ash::MaterialDesignController::Initialize(); |
| + window_manager_app_ = base::MakeUnique<WindowManagerApplication>(); |
|
msw
2016/08/30 21:26:46
nit: maybe cite the reason for changing constructi
sky
2016/08/30 22:02:56
Added comment to destructor.
|
| + |
| message_loop_.reset(new base::MessageLoopForUI()); |
| - window_manager_app_.window_manager_.reset(new WindowManager(nullptr)); |
| + window_manager_app_->window_manager_.reset(new WindowManager(nullptr)); |
| screen_ = new WmTestScreen; |
| - window_manager_app_.window_manager_->screen_.reset(screen_); |
| + window_manager_app_->window_manager_->screen_.reset(screen_); |
| // Need an id other than kInvalidDisplayID so the Display is considered valid. |
| display::Display display(1); |
| @@ -49,10 +51,10 @@ void WmTestHelper::Init() { |
| display_bounds.height() - 20); |
| display.set_work_area(work_area); |
| window_tree_client_setup_.InitForWindowManager( |
| - window_manager_app_.window_manager_.get(), |
| - window_manager_app_.window_manager_.get(), display); |
| + window_manager_app_->window_manager_.get(), |
| + window_manager_app_->window_manager_.get(), display); |
| - window_manager_app_.InitWindowManager( |
| + window_manager_app_->InitWindowManager( |
| window_tree_client_setup_.window_tree_client()); |
| screen_->display_list()->AddDisplay(display, |