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

Unified Diff: ash/shell_unittest.cc

Issue 14295008: Add ash SessionStateDelegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Ready for review. Created 7 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/shell_unittest.cc
diff --git a/ash/shell_unittest.cc b/ash/shell_unittest.cc
index 039354f1edd1e2efbc361b384649d40866c8b187..70ca5c2eeda785c1e4381d6c02840e25b3109903 100644
--- a/ash/shell_unittest.cc
+++ b/ash/shell_unittest.cc
@@ -11,9 +11,9 @@
#include "ash/desktop_background/desktop_background_widget_controller.h"
#include "ash/launcher/launcher.h"
#include "ash/root_window_controller.h"
+#include "ash/session_state_delegate.h"
#include "ash/shelf/shelf_layout_manager.h"
#include "ash/shelf/shelf_widget.h"
-#include "ash/shell_delegate.h"
#include "ash/shell_window_ids.h"
#include "ash/test/ash_test_base.h"
#include "ash/wm/root_window_layout_manager.h"
@@ -219,7 +219,7 @@ TEST_F(ShellTest, CreateLockScreenModalWindow) {
EXPECT_TRUE(GetDefaultContainer()->Contains(
widget->GetNativeWindow()->parent()));
- Shell::GetInstance()->delegate()->LockScreen();
+ Shell::GetInstance()->session_state_delegate()->LockScreen();
// Create a LockScreen window.
views::Widget* lock_widget = CreateTestWindow(widget_params);
ash::Shell::GetContainer(
@@ -264,10 +264,12 @@ TEST_F(ShellTest, CreateLockScreenModalWindow) {
}
TEST_F(ShellTest, IsScreenLocked) {
- ash::Shell::GetInstance()->delegate()->LockScreen();
- EXPECT_TRUE(Shell::GetInstance()->IsScreenLocked());
- ash::Shell::GetInstance()->delegate()->UnlockScreen();
- EXPECT_FALSE(Shell::GetInstance()->IsScreenLocked());
+ SessionStateDelegate* delegate =
+ Shell::GetInstance()->session_state_delegate();
+ delegate->LockScreen();
+ EXPECT_TRUE(delegate->IsScreenLocked());
+ delegate->UnlockScreen();
+ EXPECT_FALSE(delegate->IsScreenLocked());
}
// Fails on Mac, see http://crbug.com/115662

Powered by Google App Engine
This is Rietveld 408576698