summaryrefslogtreecommitdiffstats
path: root/ash/shell_unittest.cc
diff options
context:
space:
mode:
authorbartfab@google.com <bartfab@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-17 15:58:49 +0000
committerbartfab@google.com <bartfab@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-17 15:58:49 +0000
commitfcb123d44af34a938e26b9821849af60c69a39be (patch)
treeaab13850b4a5baaa884a95697ca860aef6feab67 /ash/shell_unittest.cc
parent6f9c92afe8310daca92f34b609ebaa37c3c7e2da (diff)
downloadchromium_src-fcb123d44af34a938e26b9821849af60c69a39be.zip
chromium_src-fcb123d44af34a938e26b9821849af60c69a39be.tar.gz
chromium_src-fcb123d44af34a938e26b9821849af60c69a39be.tar.bz2
Revert 194589 "Revert 194578 "Add ash SessionStateDelegate""
The CL turned out to be innocent, the bots turned green without the revert. > Revert 194578 "Add ash SessionStateDelegate" > > > Add ash SessionStateDelegate > > > > This CL refactors the ShellDelegate by adding a SessionStateDelegate to > > which methods dealing with the session state can be moved. This cleans up > > the huge ShellDelegate interface and paves the way for further Chrome OS > > multiprofile work which will need to add several new methods related to > > the session state. > > > > This CL is only the first step. Several other methods should also move to > > SessionStateDelegate but I do not want to overburden a single CL. > > > > BUG=None > > TEST=Manual and browser/unit tests > > > > TBR=sky (for c/b/idle_chromeos.cc and c/chrome_browser_ui.gypi) > > > > Review URL: https://codereview.chromium.org/14295008 > > TBR=bartfab@google.com > > Review URL: https://codereview.chromium.org/14200034 TBR=gavinp@chromium.org Review URL: https://codereview.chromium.org/14200038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@194602 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/shell_unittest.cc')
-rw-r--r--ash/shell_unittest.cc14
1 files changed, 8 insertions, 6 deletions
diff --git a/ash/shell_unittest.cc b/ash/shell_unittest.cc
index 039354f..70ca5c2 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