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

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

Issue 2858563002: Revert of chromeos: Makes mushrome use simplified display management (Closed)
Patch Set: Created 3 years, 8 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_base.cc ('k') | ash/mus/window_manager.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 26bb271f6dd9908e337f648543f65fde2e0eeb57..1fd4685c7d37355c285b4574e8ba616c7a0a7497 100644
--- a/ash/mus/test/wm_test_helper.cc
+++ b/ash/mus/test/wm_test_helper.cc
@@ -8,7 +8,6 @@
#include "ash/mus/window_manager.h"
#include "ash/mus/window_manager_application.h"
#include "ash/public/cpp/config.h"
-#include "ash/shell.h"
#include "ash/test/test_shell_delegate.h"
#include "ash/wm_window.h"
#include "base/memory/ptr_util.h"
@@ -27,7 +26,6 @@
#include "ui/display/display.h"
#include "ui/display/display_list.h"
#include "ui/display/screen_base.h"
-#include "ui/display/test/display_manager_test_api.h"
#include "ui/views/test/test_views_delegate.h"
namespace ash {
@@ -75,11 +73,6 @@
WmTestHelper::WmTestHelper() {}
WmTestHelper::~WmTestHelper() {
- // Flush the message loop so that any pending tasks are run. This ensures
- // any delayed tasks, such as deleting RootWindowControllers, are processed
- // before continuing.
- base::RunLoop().RunUntilIdle();
-
// Needs to be destroyed before material design.
window_manager_app_.reset();
@@ -106,9 +99,7 @@
views_delegate_ = base::MakeUnique<views::TestViewsDelegate>();
- const bool show_primary_host_on_connect = false;
- window_manager_app_ = base::MakeUnique<WindowManagerApplication>(
- show_primary_host_on_connect, config);
+ window_manager_app_ = base::MakeUnique<WindowManagerApplication>();
message_loop_.reset(new base::MessageLoopForUI());
@@ -117,8 +108,8 @@
blocking_pool_owner_ = base::MakeUnique<base::SequencedWorkerPoolOwner>(
kMaxNumberThreads, kThreadNamePrefix);
- window_manager_app_->window_manager_ = base::MakeUnique<WindowManager>(
- nullptr, config, show_primary_host_on_connect);
+ window_manager_app_->window_manager_ =
+ base::MakeUnique<WindowManager>(nullptr, config);
window_manager_app_->window_manager()->shell_delegate_ =
base::MakeUnique<test::TestShellDelegate>();
@@ -138,12 +129,8 @@
window_manager_app_->window_manager()->window_tree_client();
window_tree_client_private_ =
base::MakeUnique<aura::WindowTreeClientPrivate>(window_tree_client);
- if (config == Config::MUS) {
- window_tree_client_private_->CallOnConnect();
- } else {
- int next_x = 0;
- CreateRootWindowController("800x600", &next_x);
- }
+ int next_x = 0;
+ CreateRootWindowController("800x600", &next_x);
}
std::vector<RootWindowController*> WmTestHelper::GetRootsOrderedByDisplayId() {
@@ -156,11 +143,6 @@
}
void WmTestHelper::UpdateDisplay(const std::string& display_spec) {
- if (Shell::GetAshConfig() == Config::MUS) {
- display::test::DisplayManagerTestApi(Shell::Get()->display_manager())
- .UpdateDisplay(display_spec);
- return;
- }
const std::vector<std::string> parts = base::SplitString(
display_spec, ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
std::vector<RootWindowController*> root_window_controllers =
« no previous file with comments | « ash/mus/test/wm_test_base.cc ('k') | ash/mus/window_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698