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

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: typo 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
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..3660c884df90d9036b81918bc94a85df2bbc2bca 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());
@@ -618,9 +614,8 @@ TEST_P(DockedWindowResizerTest, AttachOneAutoHideShelf) {
EXPECT_EQ(work_area.bottom(), manager->docked_bounds().bottom());
// set launcher shelf to be aligned on the right
msw 2016/05/27 22:36:41 nit: remove/update incorrect comment?
James Cook 2016/05/27 22:56:26 Updated.
- ash::Shell* shell = ash::Shell::GetInstance();
- shell->SetShelfAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS,
- shell->GetPrimaryRootWindow());
+ Shelf::ForPrimaryDisplay()->SetAutoHideBehavior(
+ SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
work_area = display::Screen::GetScreen()
->GetDisplayNearestWindow(w1.get())
.work_area();

Powered by Google App Engine
This is Rietveld 408576698