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

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

Issue 2539363005: Converts ash to use aura-mus (Closed)
Patch Set: merge Created 4 years 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
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 e122e5328a79529925a8c7a6597b8648dbd52279..338a20a07625f76e620b6c5d3dd303fc829c72f4 100644
--- a/ash/mus/test/wm_test_helper.cc
+++ b/ash/mus/test/wm_test_helper.cc
@@ -11,6 +11,7 @@
#include "ash/common/test/wm_shell_test_api.h"
#include "ash/common/wm_shell.h"
#include "ash/mus/root_window_controller.h"
+#include "ash/mus/screen_mus.h"
#include "ash/mus/window_manager.h"
#include "ash/mus/window_manager_application.h"
#include "base/memory/ptr_util.h"
@@ -19,8 +20,10 @@
#include "base/strings/string_split.h"
#include "base/test/sequenced_worker_pool_owner.h"
#include "services/ui/public/cpp/property_type_converters.h"
-#include "services/ui/public/cpp/tests/window_tree_client_private.h"
-#include "services/ui/public/cpp/window_tree_client.h"
+#include "ui/aura/mus/window_tree_client.h"
+#include "ui/aura/test/env_test_helper.h"
+#include "ui/aura/test/mus/window_tree_client_private.h"
+#include "ui/aura/window.h"
#include "ui/base/material_design/material_design_controller.h"
#include "ui/base/test/material_design_controller_test_api.h"
#include "ui/display/display.h"
@@ -103,6 +106,8 @@ void WmTestHelper::Init() {
window_tree_client_setup_.InitForWindowManager(
window_manager_app_->window_manager_.get(),
window_manager_app_->window_manager_.get());
+ aura::test::EnvTestHelper().SetWindowTreeClient(
+ window_tree_client_setup_.window_tree_client());
window_manager_app_->InitWindowManager(
window_tree_client_setup_.OwnWindowTreeClient(),
blocking_pool_owner_->pool());
@@ -113,10 +118,10 @@ void WmTestHelper::Init() {
base::MakeUnique<test::TestSystemTrayDelegate>());
WmShellTestApi().SetNewWindowClient(base::MakeUnique<TestNewWindowClient>());
- ui::WindowTreeClient* window_tree_client =
+ aura::WindowTreeClient* window_tree_client =
window_manager_app_->window_manager()->window_tree_client();
window_tree_client_private_ =
- base::MakeUnique<ui::WindowTreeClientPrivate>(window_tree_client);
+ base::MakeUnique<aura::WindowTreeClientPrivate>(window_tree_client);
int next_x = 0;
CreateRootWindowController("800x600", &next_x);
}
@@ -179,8 +184,7 @@ void WmTestHelper::UpdateDisplay(RootWindowController* root_window_controller,
root_window_controller->display_.set_bounds(bounds);
root_window_controller->display_.UpdateWorkAreaFromInsets(work_area_insets);
root_window_controller->root()->SetBounds(gfx::Rect(bounds.size()));
- display::ScreenBase* screen =
- window_manager_app_->window_manager()->screen_.get();
+ ScreenMus* screen = window_manager_app_->window_manager()->screen_.get();
const bool is_primary = screen->display_list().FindDisplayById(
root_window_controller->display().id()) ==
screen->display_list().GetPrimaryDisplayIterator();

Powered by Google App Engine
This is Rietveld 408576698