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

Unified Diff: ash/wm/dock/docked_window_resizer_unittest.cc

Issue 2020623004: ash: Move shelf alignment and auto-hide calls from Shell to Shelf (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 7 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/sysui/shelf_delegate_mus.cc ('k') | ash/wm/panels/panel_window_resizer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/dock/docked_window_resizer_unittest.cc
diff --git a/ash/wm/dock/docked_window_resizer_unittest.cc b/ash/wm/dock/docked_window_resizer_unittest.cc
index d2cd4daea5b4f24b3aee0f1e475b576894bb9b8b..4d6e34a8713f53d60fbeeced10375a9bf2821aa5 100644
--- a/ash/wm/dock/docked_window_resizer_unittest.cc
+++ b/ash/wm/dock/docked_window_resizer_unittest.cc
@@ -380,25 +380,21 @@ TEST_P(DockedWindowResizerTest, AttachRightChangeShelf) {
EXPECT_EQ(kShellWindowId_DockedContainer, window->parent()->id());
// set launcher shelf to be aligned on the right
- ash::Shell* shell = ash::Shell::GetInstance();
- shell->SetShelfAlignment(wm::SHELF_ALIGNMENT_RIGHT,
- shell->GetPrimaryRootWindow());
+ Shelf::ForPrimaryDisplay()->SetAlignment(wm::SHELF_ALIGNMENT_RIGHT);
// The window should have moved and get attached to the left dock.
EXPECT_EQ(window->GetRootWindow()->GetBoundsInScreen().x(),
window->GetBoundsInScreen().x());
EXPECT_EQ(kShellWindowId_DockedContainer, window->parent()->id());
// set launcher shelf to be aligned on the left
- shell->SetShelfAlignment(wm::SHELF_ALIGNMENT_LEFT,
- shell->GetPrimaryRootWindow());
+ Shelf::ForPrimaryDisplay()->SetAlignment(wm::SHELF_ALIGNMENT_LEFT);
// The window should have moved and get attached to the right edge.
EXPECT_EQ(window->GetRootWindow()->GetBoundsInScreen().right(),
window->GetBoundsInScreen().right());
EXPECT_EQ(kShellWindowId_DockedContainer, window->parent()->id());
// set launcher shelf to be aligned at the bottom
- shell->SetShelfAlignment(wm::SHELF_ALIGNMENT_BOTTOM,
- shell->GetPrimaryRootWindow());
+ Shelf::ForPrimaryDisplay()->SetAlignment(wm::SHELF_ALIGNMENT_BOTTOM);
// The window should stay in the right edge.
EXPECT_EQ(window->GetRootWindow()->GetBoundsInScreen().right(),
window->GetBoundsInScreen().right());
@@ -617,10 +613,9 @@ TEST_P(DockedWindowResizerTest, AttachOneAutoHideShelf) {
// Docked background should extend to the bottom of work area.
EXPECT_EQ(work_area.bottom(), manager->docked_bounds().bottom());
- // set launcher shelf to be aligned on the right
- ash::Shell* shell = ash::Shell::GetInstance();
- shell->SetShelfAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS,
- shell->GetPrimaryRootWindow());
+ // Turn on shelf auto-hide.
+ Shelf::ForPrimaryDisplay()->SetAutoHideBehavior(
+ SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
work_area = display::Screen::GetScreen()
->GetDisplayNearestWindow(w1.get())
.work_area();
« no previous file with comments | « ash/sysui/shelf_delegate_mus.cc ('k') | ash/wm/panels/panel_window_resizer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698