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

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

Issue 2272793005: ash: Move alignment and autohide behavior from Shelf to WmShelf (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments 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/test/ash_test_base.cc ('k') | ash/wm/immersive_fullscreen_controller_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 4406fd40b7f6fb7098d37d0d78796d5a098ae92d..cbb86b3329700ddd85e0d87c59f38e55843033fb 100644
--- a/ash/wm/dock/docked_window_resizer_unittest.cc
+++ b/ash/wm/dock/docked_window_resizer_unittest.cc
@@ -6,9 +6,9 @@
#include "ash/aura/wm_window_aura.h"
#include "ash/common/ash_switches.h"
-#include "ash/common/shelf/shelf.h"
#include "ash/common/shelf/shelf_types.h"
#include "ash/common/shelf/shelf_widget.h"
+#include "ash/common/shelf/wm_shelf.h"
#include "ash/common/shell_window_ids.h"
#include "ash/common/wm/dock/docked_window_layout_manager.h"
#include "ash/common/wm/panels/panel_layout_manager.h"
@@ -361,21 +361,21 @@ TEST_P(DockedWindowResizerTest, AttachRightChangeShelf) {
EXPECT_EQ(kShellWindowId_DockedContainer, window->parent()->id());
// set launcher shelf to be aligned on the right
- Shelf::ForPrimaryDisplay()->SetAlignment(SHELF_ALIGNMENT_RIGHT);
+ GetPrimaryShelf()->SetAlignment(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
- Shelf::ForPrimaryDisplay()->SetAlignment(SHELF_ALIGNMENT_LEFT);
+ GetPrimaryShelf()->SetAlignment(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
- Shelf::ForPrimaryDisplay()->SetAlignment(SHELF_ALIGNMENT_BOTTOM);
+ GetPrimaryShelf()->SetAlignment(SHELF_ALIGNMENT_BOTTOM);
// The window should stay in the right edge.
EXPECT_EQ(window->GetRootWindow()->GetBoundsInScreen().right(),
window->GetBoundsInScreen().right());
@@ -595,8 +595,7 @@ TEST_P(DockedWindowResizerTest, AttachOneAutoHideShelf) {
EXPECT_EQ(work_area.bottom(), manager->docked_bounds().bottom());
// Turn on shelf auto-hide.
- Shelf::ForPrimaryDisplay()->SetAutoHideBehavior(
- SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
+ GetPrimaryShelf()->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
work_area = display::Screen::GetScreen()
->GetDisplayNearestWindow(w1.get())
.work_area();
@@ -1372,7 +1371,7 @@ TEST_P(DockedWindowResizerTest, DragToShelf) {
EXPECT_EQ(DOCKED_ALIGNMENT_NONE, docked_alignment(manager));
// Drag down almost to shelf. A panel will snap, a regular window won't.
- ShelfWidget* shelf = Shelf::ForPrimaryDisplay()->shelf_widget();
+ ShelfWidget* shelf = GetPrimaryShelf()->GetShelfWidgetForTesting();
const int shelf_y = shelf->GetWindowBoundsInScreen().y();
const int kDistanceFromShelf = 10;
ASSERT_NO_FATAL_FAILURE(DragStart(w1.get()));
« no previous file with comments | « ash/test/ash_test_base.cc ('k') | ash/wm/immersive_fullscreen_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698