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

Unified Diff: ash/root_window_controller_unittest.cc

Issue 2058173002: mash: Move SystemTrayDelegate ownership to WmShell (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review feedback Created 4 years, 6 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/root_window_controller_unittest.cc
diff --git a/ash/root_window_controller_unittest.cc b/ash/root_window_controller_unittest.cc
index 6f974ddd1c063253f1a5bd995ee71de708a921fb..ee0828502447f94d51d7a7b0eade867d80f099d5 100644
--- a/ash/root_window_controller_unittest.cc
+++ b/ash/root_window_controller_unittest.cc
@@ -10,6 +10,7 @@
#include "ash/common/shell_window_ids.h"
#include "ash/common/system/tray/system_tray_delegate.h"
#include "ash/common/wm/window_state.h"
+#include "ash/common/wm_shell.h"
#include "ash/display/display_manager.h"
#include "ash/shell.h"
#include "ash/test/ash_test_base.h"
@@ -370,9 +371,10 @@ TEST_F(RootWindowControllerTest, MoveWindows_LockWindowsInUnified) {
TEST_F(RootWindowControllerTest, ModalContainer) {
UpdateDisplay("600x600");
Shell* shell = Shell::GetInstance();
+ WmShell* wm_shell = WmShell::Get();
RootWindowController* controller = shell->GetPrimaryRootWindowController();
EXPECT_EQ(LoginStatus::USER,
- shell->system_tray_delegate()->GetUserLoginStatus());
+ wm_shell->system_tray_delegate()->GetUserLoginStatus());
EXPECT_EQ(controller->GetContainer(kShellWindowId_SystemModalContainer)
->layout_manager(),
controller->GetSystemModalLayoutManager(NULL));
@@ -386,7 +388,7 @@ TEST_F(RootWindowControllerTest, ModalContainer) {
shell->session_state_delegate()->LockScreen();
EXPECT_EQ(LoginStatus::LOCKED,
- shell->system_tray_delegate()->GetUserLoginStatus());
+ wm_shell->system_tray_delegate()->GetUserLoginStatus());
EXPECT_EQ(controller->GetContainer(kShellWindowId_LockSystemModalContainer)
->layout_manager(),
controller->GetSystemModalLayoutManager(NULL));
@@ -410,11 +412,12 @@ TEST_F(RootWindowControllerTest, ModalContainer) {
TEST_F(RootWindowControllerTest, ModalContainerNotLoggedInLoggedIn) {
UpdateDisplay("600x600");
Shell* shell = Shell::GetInstance();
+ WmShell* wm_shell = WmShell::Get();
// Configure login screen environment.
SetUserLoggedIn(false);
EXPECT_EQ(LoginStatus::NOT_LOGGED_IN,
- shell->system_tray_delegate()->GetUserLoginStatus());
+ wm_shell->system_tray_delegate()->GetUserLoginStatus());
EXPECT_EQ(0, shell->session_state_delegate()->NumberOfLoggedInUsers());
EXPECT_FALSE(shell->session_state_delegate()->IsActiveUserSessionStarted());
@@ -437,7 +440,7 @@ TEST_F(RootWindowControllerTest, ModalContainerNotLoggedInLoggedIn) {
SetUserLoggedIn(true);
SetSessionStarted(true);
EXPECT_EQ(LoginStatus::USER,
- shell->system_tray_delegate()->GetUserLoginStatus());
+ wm_shell->system_tray_delegate()->GetUserLoginStatus());
EXPECT_EQ(1, shell->session_state_delegate()->NumberOfLoggedInUsers());
EXPECT_TRUE(shell->session_state_delegate()->IsActiveUserSessionStarted());
EXPECT_EQ(controller->GetContainer(kShellWindowId_SystemModalContainer)

Powered by Google App Engine
This is Rietveld 408576698