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

Unified Diff: ash/wm/workspace/workspace_manager_unittest.cc

Issue 12313118: Refactor: Shelf Widget (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: safer shutdown (status_area_widget_) Created 7 years, 9 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/workspace/workspace_manager.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_manager_unittest.cc
diff --git a/ash/wm/workspace/workspace_manager_unittest.cc b/ash/wm/workspace/workspace_manager_unittest.cc
index 1ce1abf1e39b259ad213689642fbaed52291aeaa..d15bde4bed92892cca6ad51c56ba6125e63c783a 100644
--- a/ash/wm/workspace/workspace_manager_unittest.cc
+++ b/ash/wm/workspace/workspace_manager_unittest.cc
@@ -7,6 +7,8 @@
#include "ash/ash_switches.h"
#include "ash/root_window_controller.h"
#include "ash/screen_ash.h"
+#include "ash/shelf/shelf_layout_manager.h"
+#include "ash/shelf/shelf_widget.h"
#include "ash/shell.h"
#include "ash/shell_window_ids.h"
#include "ash/system/status_area_widget.h"
@@ -14,7 +16,6 @@
#include "ash/test/shell_test_api.h"
#include "ash/wm/activation_controller.h"
#include "ash/wm/property_util.h"
-#include "ash/wm/shelf_layout_manager.h"
#include "ash/wm/window_properties.h"
#include "ash/wm/window_util.h"
#include "ash/wm/workspace/workspace.h"
@@ -76,10 +77,14 @@ class WorkspaceManagerTest : public test::AshTestBase {
return manager_->active_workspace_;
}
- ShelfLayoutManager* shelf_layout_manager() {
+ ShelfWidget* shelf_widget() {
return Shell::GetPrimaryRootWindowController()->shelf();
}
+ ShelfLayoutManager* shelf_layout_manager() {
+ return Shell::GetPrimaryRootWindowController()->GetShelfLayoutManager();
+ }
+
bool GetWindowOverlapsShelf() {
return shelf_layout_manager()->window_overlaps_shelf();
}
@@ -815,7 +820,7 @@ TEST_F(WorkspaceManagerTest, MinimizeResetsVisibility) {
w1->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MINIMIZED);
EXPECT_EQ(SHELF_VISIBLE,
shelf_layout_manager()->visibility_state());
- EXPECT_FALSE(Launcher::ForPrimaryDisplay()->paints_background());
+ EXPECT_FALSE(shelf_widget()->paints_background());
}
// Verifies transients are moved when maximizing.
@@ -960,9 +965,10 @@ TEST_F(WorkspaceManagerTest, MoveOnSwitch) {
// Increase the size of the shelf. This would make |w1| fall completely out of
// the display work area.
- gfx::Size size(shelf->status_area_widget()->GetWindowBoundsInScreen().size());
+ gfx::Size size(shelf_widget()->status_area_widget()->
+ GetWindowBoundsInScreen().size());
size.Enlarge(0, 30);
- shelf->status_area_widget()->SetSize(size);
+ shelf_widget()->status_area_widget()->SetSize(size);
// Switch to w1. The window should have moved.
wm::ActivateWindow(w1.get());
« no previous file with comments | « ash/wm/workspace/workspace_manager.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