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

Unified Diff: ash/mus/workspace/workspace_layout_manager_unittest.cc

Issue 2293183002: ash: Remove ash::Shelf in favor of ash::WmShelf (Closed)
Patch Set: rebase again Created 4 years, 4 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/mus/bridge/wm_shelf_mus.cc ('k') | ash/root_window_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/mus/workspace/workspace_layout_manager_unittest.cc
diff --git a/ash/mus/workspace/workspace_layout_manager_unittest.cc b/ash/mus/workspace/workspace_layout_manager_unittest.cc
index 61a9f60fe21c01285835c60277414fcadebaa2d4..cf28f23de160768ff506a773a960ec8d24ae12e2 100644
--- a/ash/mus/workspace/workspace_layout_manager_unittest.cc
+++ b/ash/mus/workspace/workspace_layout_manager_unittest.cc
@@ -303,7 +303,7 @@ class DontClobberRestoreBoundsWindowObserver : public aura::WindowObserver {
window_ = nullptr;
gfx::Rect shelf_bounds(
- Shelf::ForPrimaryDisplay()->shelf_layout_manager()->GetIdealBounds());
+ GetPrimaryShelf()->shelf_layout_manager()->GetIdealBounds());
const gfx::Rect& window_bounds(w->bounds());
w->SetBounds(gfx::Rect(window_bounds.x(), shelf_bounds.y() - 1,
window_bounds.width(), window_bounds.height()));
@@ -733,9 +733,8 @@ TEST_F(WorkspaceLayoutManagerSoloTest, NotResizeWhenScreenIsLocked) {
window->SetProperty(aura::client::kAlwaysOnTopKey, true);
window->Show();
- ShelfLayoutManager* shelf_layout_manager =
- Shelf::ForWindow(window.get())->shelf_layout_manager();
- shelf_layout_manager->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
+ WmShelf* shelf = GetPrimaryShelf();
+ shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
window->SetBounds(ScreenUtil::GetMaximizedWindowBoundsInParent(window.get()));
gfx::Rect window_bounds = window->bounds();
@@ -745,12 +744,12 @@ TEST_F(WorkspaceLayoutManagerSoloTest, NotResizeWhenScreenIsLocked) {
// The window size should not get touched while we are in lock screen.
WmShell::Get()->GetSessionStateDelegate()->LockScreen();
- shelf_layout_manager->UpdateVisibilityState();
+ shelf->UpdateVisibilityState();
EXPECT_EQ(window_bounds.ToString(), window->bounds().ToString());
// Coming out of the lock screen the window size should still remain.
WmShell::Get()->GetSessionStateDelegate()->UnlockScreen();
- shelf_layout_manager->UpdateVisibilityState();
+ shelf->UpdateVisibilityState();
EXPECT_EQ(
ScreenUtil::GetMaximizedWindowBoundsInParent(window.get()).ToString(),
window_bounds.ToString());
@@ -937,7 +936,7 @@ TEST_F(WorkspaceLayoutManagerBackdropTest, VerifyBackdropAndItsStacking) {
// entire workspace area.
TEST_F(WorkspaceLayoutManagerBackdropTest, ShelfVisibilityChangesBounds) {
ShelfLayoutManager* shelf_layout_manager =
- Shelf::ForPrimaryDisplay()->shelf_layout_manager();
+ GetPrimaryShelf()->shelf_layout_manager();
ShowTopWindowBackdrop(true);
RunAllPendingInMessageLoop();
« no previous file with comments | « ash/mus/bridge/wm_shelf_mus.cc ('k') | ash/root_window_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698