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

Unified Diff: ash/test/ash_test_base.cc

Issue 2788463003: Adds ability for ash_unittests to run in mushrome mode (Closed)
Patch Set: feedback Created 3 years, 9 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/BUILD.gn ('k') | ash/test/ash_test_helper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/test/ash_test_base.cc
diff --git a/ash/test/ash_test_base.cc b/ash/test/ash_test_base.cc
index d98b4a66a4d77b3d9c3b8a2edc3c9541c62017b5..e6f62118ce69fd3945b9aee3a716ec7648faf8a0 100644
--- a/ash/test/ash_test_base.cc
+++ b/ash/test/ash_test_base.cc
@@ -18,6 +18,7 @@
#include "ash/display/unified_mouse_warp_controller.h"
#include "ash/display/window_tree_host_manager.h"
#include "ash/ime/input_method_event_handler.h"
+#include "ash/public/cpp/config.h"
#include "ash/root_window_controller.h"
#include "ash/shell.h"
#include "ash/shell/toplevel_window.h"
@@ -135,8 +136,8 @@ void AshTestBase::SetUp() {
// Move the mouse cursor to far away so that native events doesn't
// interfere test expectations.
Shell::GetPrimaryRootWindow()->MoveCursorTo(gfx::Point(-1000, -1000));
- // TODO: mash needs to support CursorManager. http://crbug.com/637853.
- if (!WmShell::Get()->IsRunningInMash())
+ // TODO: mus/mash needs to support CursorManager. http://crbug.com/637853.
+ if (Shell::GetConfig() == Config::CLASSIC)
Shell::GetInstance()->cursor_manager()->EnableMouseEvents();
// Changing GestureConfiguration shouldn't make tests fail. These values
@@ -199,7 +200,7 @@ display::Display::Rotation AshTestBase::GetCurrentInternalDisplayRotation() {
// static
void AshTestBase::UpdateDisplay(const std::string& display_specs) {
- if (WmShell::Get()->IsRunningInMash()) {
+ if (Shell::GetConfig() != Config::CLASSIC) {
ash_test_helper_->UpdateDisplayForMash(display_specs);
} else {
display::test::DisplayManagerTestApi(
« no previous file with comments | « ash/BUILD.gn ('k') | ash/test/ash_test_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698