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

Unified Diff: ash/wm/lock_state_controller_unittest.cc

Issue 2815043002: Removes ShellPort::IsRunningInMash() (Closed)
Patch Set: dont set instance_ in constructor 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
Index: ash/wm/lock_state_controller_unittest.cc
diff --git a/ash/wm/lock_state_controller_unittest.cc b/ash/wm/lock_state_controller_unittest.cc
index 9e16491757da58b861d39c91c83391a0fdabd682..cff7f3399188555b89a165b6d14f57e7027d32f2 100644
--- a/ash/wm/lock_state_controller_unittest.cc
+++ b/ash/wm/lock_state_controller_unittest.cc
@@ -7,9 +7,9 @@
#include <memory>
#include <utility>
+#include "ash/public/cpp/config.h"
#include "ash/session/session_controller.h"
#include "ash/shell.h"
-#include "ash/shell_port.h"
#include "ash/shutdown_controller.h"
#include "ash/test/ash_test_base.h"
#include "ash/test/lock_state_controller_test_api.h"
@@ -93,7 +93,7 @@ class LockStateControllerTest : public AshTestBase {
}
void TearDown() override {
- const bool is_mash = ShellPort::Get()->IsRunningInMash();
+ const bool is_mash = Shell::GetAshConfig() == Config::MASH;
AshTestBase::TearDown();
// Mash shuts down DBus during normal destruction.
if (!is_mash)
@@ -401,7 +401,7 @@ TEST_F(LockStateControllerTest, LegacyLockAndShutDown) {
// Make sure a mouse move event won't show the cursor.
GenerateMouseMoveEvent();
// TODO: CursorManager not created in mash. http://crbug.com/631103.
- if (!ShellPort::Get()->IsRunningInMash())
+ if (Shell::GetAshConfig() != Config::MASH)
EXPECT_FALSE(cursor_visible());
EXPECT_TRUE(test_api_->real_shutdown_timer_is_running());
@@ -812,7 +812,7 @@ TEST_F(LockStateControllerTest, ShutdownWithoutButton) {
SessionStateAnimator::ANIMATION_HIDE_IMMEDIATELY));
GenerateMouseMoveEvent();
// TODO: CursorManager not created in mash. http://crbug.com/631103.
- if (!ShellPort::Get()->IsRunningInMash())
+ if (Shell::GetAshConfig() != Config::MASH)
EXPECT_FALSE(cursor_visible());
}
@@ -828,7 +828,7 @@ TEST_F(LockStateControllerTest, RequestShutdownFromLoginScreen) {
GenerateMouseMoveEvent();
// TODO: CursorManager not created in mash. http://crbug.com/631103.
- if (!ShellPort::Get()->IsRunningInMash())
+ if (Shell::GetAshConfig() != Config::MASH)
EXPECT_FALSE(cursor_visible());
EXPECT_EQ(0, NumShutdownRequests());
@@ -852,7 +852,7 @@ TEST_F(LockStateControllerTest, RequestShutdownFromLockScreen) {
GenerateMouseMoveEvent();
// TODO: CursorManager not created in mash. http://crbug.com/631103.
- if (!ShellPort::Get()->IsRunningInMash())
+ if (Shell::GetAshConfig() != Config::MASH)
EXPECT_FALSE(cursor_visible());
EXPECT_EQ(0, NumShutdownRequests());
@@ -1031,7 +1031,7 @@ TEST_F(LockStateControllerTest, TestHiddenWallpaperLockUnlock) {
TEST_F(LockStateControllerTest, Screenshot) {
// TODO: fails because of no screenshot in mash. http://crbug.com/698033.
- if (ShellPort::Get()->IsRunningInMash())
+ if (Shell::GetAshConfig() == Config::MASH)
return;
test::TestScreenshotDelegate* delegate = GetScreenshotDelegate();
« no previous file with comments | « ash/wm/immersive_fullscreen_controller_unittest.cc ('k') | ash/wm/maximize_mode/maximize_mode_window_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698