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

Unified Diff: ash/shelf/shelf_layout_manager_unittest.cc

Issue 2734933004: ash: Use SessionController instead of SessionStateDelegate (Closed)
Patch Set: rebase to get WorkspaceLayoutManagerSoloTest change 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/root_window_controller_unittest.cc ('k') | ash/shell/app_list.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shelf/shelf_layout_manager_unittest.cc
diff --git a/ash/shelf/shelf_layout_manager_unittest.cc b/ash/shelf/shelf_layout_manager_unittest.cc
index 020421963e09a8562ef33d04af1510979e0a6bfd..e227b6db74321bf73e9c569633b20061eb246bae 100644
--- a/ash/shelf/shelf_layout_manager_unittest.cc
+++ b/ash/shelf/shelf_layout_manager_unittest.cc
@@ -1549,7 +1549,13 @@ TEST_F(ShelfLayoutManagerTest, WorkAreaChangeWorkspace) {
}
TEST_F(ShelfLayoutManagerTest, BackgroundTypeWhenLockingScreen) {
- EXPECT_NE(SHELF_BACKGROUND_DEFAULT, GetShelfWidget()->GetBackgroundType());
+ // Creates a maximized window to have a background type other than default.
+ std::unique_ptr<aura::Window> window(CreateTestWindow());
+ window->Show();
+ wm::ActivateWindow(window.get());
+ EXPECT_EQ(SHELF_BACKGROUND_DEFAULT, GetShelfWidget()->GetBackgroundType());
+ window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED);
+ EXPECT_EQ(SHELF_BACKGROUND_MAXIMIZED, GetShelfWidget()->GetBackgroundType());
Shell::GetInstance()
->lock_state_controller()
@@ -1558,12 +1564,6 @@ TEST_F(ShelfLayoutManagerTest, BackgroundTypeWhenLockingScreen) {
}
TEST_F(ShelfLayoutManagerTest, ShelfBackgroundColor) {
- // TODO(bruthig|xiyuan): Move SessionState setup into AshTestBase or
- // AshTestHelper.
- mojom::SessionInfoPtr info = mojom::SessionInfo::New();
- info->state = session_manager::SessionState::ACTIVE;
- ash::WmShell::Get()->session_controller()->SetSessionInfo(std::move(info));
-
EXPECT_EQ(SHELF_BACKGROUND_DEFAULT, GetShelfWidget()->GetBackgroundType());
std::unique_ptr<aura::Window> w1(CreateTestWindow());
@@ -1596,12 +1596,6 @@ TEST_F(ShelfLayoutManagerTest, ShelfBackgroundColor) {
// Verify that the shelf doesn't have the opaque background if it's auto-hide
// status.
TEST_F(ShelfLayoutManagerTest, ShelfBackgroundColorAutoHide) {
- // TODO(bruthig|xiyuan): Move SessionState setup into AshTestBase or
- // AshTestHelper.
- mojom::SessionInfoPtr info = mojom::SessionInfo::New();
- info->state = session_manager::SessionState::ACTIVE;
- ash::WmShell::Get()->session_controller()->SetSessionInfo(std::move(info));
-
EXPECT_EQ(SHELF_BACKGROUND_DEFAULT, GetShelfWidget()->GetBackgroundType());
GetPrimaryShelf()->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
« no previous file with comments | « ash/root_window_controller_unittest.cc ('k') | ash/shell/app_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698