Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(167)

Unified Diff: ash/mus/test/wm_test_helper.cc

Issue 2297893002: Merges RootWindowControllerCommon into WmRootWindowController (Closed)
Patch Set: feedback Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/mus/test/wm_test_helper.h ('k') | ash/root_window_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..a650ed7f4b3c288451362f4df3b623378e27c0f9 100644
--- a/ash/mus/test/wm_test_helper.cc
+++ b/ash/mus/test/wm_test_helper.cc
@@ -25,7 +25,9 @@ namespace mus {
WmTestHelper::WmTestHelper() {}
WmTestHelper::~WmTestHelper() {
- window_manager_app_.window_manager_.reset();
+ // Needs to be destroyed before material design.
+ window_manager_app_.reset();
+
ash::test::MaterialDesignControllerTestAPI::Uninitialize();
ui::test::MaterialDesignControllerTestAPI::Uninitialize();
}
@@ -34,10 +36,12 @@ void WmTestHelper::Init() {
ui::MaterialDesignController::Initialize();
ash::MaterialDesignController::Initialize();
+ window_manager_app_ = base::MakeUnique<WindowManagerApplication>();
+
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 +53,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,
« no previous file with comments | « ash/mus/test/wm_test_helper.h ('k') | ash/root_window_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698