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

Unified Diff: ash/wm/panels/panel_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/panels/panel_window_resizer_unittest.cc
diff --git a/ash/wm/panels/panel_window_resizer_unittest.cc b/ash/wm/panels/panel_window_resizer_unittest.cc
index 605628afbad38f74bc83b822ce4ea58a908384fb..1329dd73eb4cb7d9fecfe8a60adc8558aa9b3b22 100644
--- a/ash/wm/panels/panel_window_resizer_unittest.cc
+++ b/ash/wm/panels/panel_window_resizer_unittest.cc
@@ -239,20 +239,16 @@ TEST_F(PanelWindowResizerTest, PanelDetachReattachLeft) {
if (!SupportsHostWindowResize())
return;
- ash::Shell* shell = ash::Shell::GetInstance();
- shell->SetShelfAlignment(wm::SHELF_ALIGNMENT_LEFT,
- shell->GetPrimaryRootWindow());
- std::unique_ptr<aura::Window> window(CreatePanelWindow(gfx::Point(0, 0)));
- DetachReattachTest(window.get(), 1, 0);
+ Shelf::ForPrimaryDisplay()->SetAlignment(wm::SHELF_ALIGNMENT_LEFT);
+ std::unique_ptr<aura::Window> window(CreatePanelWindow(gfx::Point(0, 0)));
+ DetachReattachTest(window.get(), 1, 0);
}
TEST_F(PanelWindowResizerTest, PanelDetachReattachRight) {
if (!SupportsHostWindowResize())
return;
- ash::Shell* shell = ash::Shell::GetInstance();
- shell->SetShelfAlignment(wm::SHELF_ALIGNMENT_RIGHT,
- shell->GetPrimaryRootWindow());
+ Shelf::ForPrimaryDisplay()->SetAlignment(wm::SHELF_ALIGNMENT_RIGHT);
std::unique_ptr<aura::Window> window(CreatePanelWindow(gfx::Point(0, 0)));
DetachReattachTest(window.get(), -1, 0);
}
@@ -495,9 +491,7 @@ TEST_F(PanelWindowResizerTest, DragReordersPanelsVertical) {
if (!SupportsHostWindowResize())
return;
- ash::Shell* shell = ash::Shell::GetInstance();
- shell->SetShelfAlignment(wm::SHELF_ALIGNMENT_LEFT,
- shell->GetPrimaryRootWindow());
+ Shelf::ForPrimaryDisplay()->SetAlignment(wm::SHELF_ALIGNMENT_LEFT);
DragAlongShelfReorder(0, -1);
}

Powered by Google App Engine
This is Rietveld 408576698