diff options
author | harrym@chromium.org <harrym@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-09 02:50:58 +0000 |
---|---|---|
committer | harrym@chromium.org <harrym@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-09 02:50:58 +0000 |
commit | 478c6c3aa0165dfd120993c5ec0757d594e70fe6 (patch) | |
tree | 3dd95bfe585e857e3672c9cfa1e705e6cdd19416 /ash/shell_unittest.cc | |
parent | 62ad3097ac2d96a2e8c65769a997702e7f0a755b (diff) | |
download | chromium_src-478c6c3aa0165dfd120993c5ec0757d594e70fe6.zip chromium_src-478c6c3aa0165dfd120993c5ec0757d594e70fe6.tar.gz chromium_src-478c6c3aa0165dfd120993c5ec0757d594e70fe6.tar.bz2 |
Refactor: Shelf Widget
Refactor the classes related with displaying the shelf (background behind the launcher/status area widget) to be a separate class. Removing background delegates from the launcher and status area widget (represented on tray views).
TBR=ben@chromium.org
BUG=163002
Review URL: https://chromiumcodereview.appspot.com/12313118
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@187122 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/shell_unittest.cc')
-rw-r--r-- | ash/shell_unittest.cc | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/ash/shell_unittest.cc b/ash/shell_unittest.cc index a1851ff..25df2bf 100644 --- a/ash/shell_unittest.cc +++ b/ash/shell_unittest.cc @@ -11,11 +11,12 @@ #include "ash/desktop_background/desktop_background_widget_controller.h" #include "ash/launcher/launcher.h" #include "ash/root_window_controller.h" +#include "ash/shelf/shelf_layout_manager.h" +#include "ash/shelf/shelf_widget.h" #include "ash/shell_delegate.h" #include "ash/shell_window_ids.h" #include "ash/test/ash_test_base.h" #include "ash/wm/root_window_layout_manager.h" -#include "ash/wm/shelf_layout_manager.h" #include "ash/wm/window_util.h" #include "base/utf_string_conversions.h" #include "ui/aura/client/aura_constants.h" @@ -55,7 +56,7 @@ void ExpectAllContainers() { EXPECT_TRUE(Shell::GetContainer( root_window, internal::kShellWindowId_PanelContainer)); EXPECT_TRUE(Shell::GetContainer( - root_window, internal::kShellWindowId_LauncherContainer)); + root_window, internal::kShellWindowId_ShelfContainer)); EXPECT_TRUE(Shell::GetContainer( root_window, internal::kShellWindowId_SystemModalContainer)); EXPECT_TRUE(Shell::GetContainer( @@ -282,7 +283,7 @@ TEST_F(ShellTest, MAYBE_ManagedWindowModeBasics) { // We start with the usual window containers. ExpectAllContainers(); // Launcher is visible. - views::Widget* launcher_widget = Launcher::ForPrimaryDisplay()->widget(); + ShelfWidget* launcher_widget = Launcher::ForPrimaryDisplay()->shelf_widget(); EXPECT_TRUE(launcher_widget->IsVisible()); // Launcher is at bottom-left of screen. EXPECT_EQ(0, launcher_widget->GetWindowBoundsInScreen().x()); @@ -323,19 +324,22 @@ TEST_F(ShellTest, FullscreenWindowHidesShelf) { // Shelf defaults to visible. EXPECT_EQ( SHELF_VISIBLE, - Shell::GetPrimaryRootWindowController()->shelf()->visibility_state()); + Shell::GetPrimaryRootWindowController()-> + GetShelfLayoutManager()->visibility_state()); // Fullscreen window hides it. widget->SetFullscreen(true); EXPECT_EQ( SHELF_HIDDEN, - Shell::GetPrimaryRootWindowController()->shelf()->visibility_state()); + Shell::GetPrimaryRootWindowController()-> + GetShelfLayoutManager()->visibility_state()); // Restoring the window restores it. widget->Restore(); EXPECT_EQ( SHELF_VISIBLE, - Shell::GetPrimaryRootWindowController()->shelf()->visibility_state()); + Shell::GetPrimaryRootWindowController()-> + GetShelfLayoutManager()->visibility_state()); // Clean up. widget->Close(); |