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

Unified Diff: ash/wm/workspace/workspace_layout_manager_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/wm/window_animations.cc ('k') | ash/wm/workspace/workspace_window_resizer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/workspace/workspace_layout_manager_unittest.cc
diff --git a/ash/wm/workspace/workspace_layout_manager_unittest.cc b/ash/wm/workspace/workspace_layout_manager_unittest.cc
index 7ce5f7b78dcecbd27f3dff1a8dada8dafe5f421d..e4692c8f6abaa741d14aa4bc94ba2e6ee32321a6 100644
--- a/ash/wm/workspace/workspace_layout_manager_unittest.cc
+++ b/ash/wm/workspace/workspace_layout_manager_unittest.cc
@@ -9,9 +9,9 @@
#include "ash/aura/wm_window_aura.h"
#include "ash/common/session/session_state_delegate.h"
-#include "ash/common/shelf/shelf.h"
#include "ash/common/shelf/shelf_constants.h"
#include "ash/common/shelf/shelf_layout_manager.h"
+#include "ash/common/shelf/wm_shelf.h"
#include "ash/common/shell_observer.h"
#include "ash/common/shell_window_ids.h"
#include "ash/common/wm/maximize_mode/workspace_backdrop_delegate.h"
@@ -313,6 +313,7 @@ class DontClobberRestoreBoundsWindowObserver : public aura::WindowObserver {
void set_window(aura::Window* window) { window_ = window; }
+ // aura::WindowObserver:
void OnWindowPropertyChanged(aura::Window* window,
const void* key,
intptr_t old) override {
@@ -324,7 +325,7 @@ class DontClobberRestoreBoundsWindowObserver : public aura::WindowObserver {
window_ = nullptr;
gfx::Rect shelf_bounds(
- Shelf::ForPrimaryDisplay()->shelf_layout_manager()->GetIdealBounds());
+ test::AshTestBase::GetPrimaryShelf()->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()));
@@ -841,7 +842,7 @@ TEST_F(WorkspaceLayoutManagerSoloTest, NotResizeWhenScreenIsLocked) {
window->SetProperty(aura::client::kAlwaysOnTopKey, true);
window->Show();
- Shelf* shelf = Shelf::ForWindow(WmWindowAura::Get(window.get()));
+ WmShelf* shelf = GetPrimaryShelf();
shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
window->SetBounds(ScreenUtil::GetMaximizedWindowBoundsInParent(window.get()));
@@ -1036,7 +1037,7 @@ TEST_F(WorkspaceLayoutManagerBackdropTest, VerifyBackdropAndItsStacking) {
// Tests that when hidding the shelf, that the backdrop resizes to fill the
// entire workspace area.
TEST_F(WorkspaceLayoutManagerBackdropTest, ShelfVisibilityChangesBounds) {
- Shelf* shelf = Shelf::ForPrimaryDisplay();
+ WmShelf* shelf = GetPrimaryShelf();
ShelfLayoutManager* shelf_layout_manager = shelf->shelf_layout_manager();
ShowTopWindowBackdrop(true);
RunAllPendingInMessageLoop();
« no previous file with comments | « ash/wm/window_animations.cc ('k') | ash/wm/workspace/workspace_window_resizer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698