Index: ash/shelf/shelf_layout_manager_unittest.cc |
diff --git a/ash/shelf/shelf_layout_manager_unittest.cc b/ash/shelf/shelf_layout_manager_unittest.cc |
index 968be66f25f081c33887ecdf39963919bd965039..64f136678d8fcfc3cab62863a13ac89b09e1a74c 100644 |
--- a/ash/shelf/shelf_layout_manager_unittest.cc |
+++ b/ash/shelf/shelf_layout_manager_unittest.cc |
@@ -22,6 +22,7 @@ |
#include "ash/system/tray/system_tray.h" |
#include "ash/system/tray/system_tray_item.h" |
#include "ash/test/ash_test_base.h" |
+#include "ash/test/display_manager_test_api.h" |
#include "ash/test/shelf_test_api.h" |
#include "ash/wm/window_state.h" |
#include "ash/wm/window_util.h" |
@@ -1032,6 +1033,9 @@ TEST_F(ShelfLayoutManagerTest, AutoHideShelfOnScreenBoundary) { |
// Assertions around the lock screen showing. |
TEST_F(ShelfLayoutManagerTest, VisibleWhenLockScreenShowing) { |
+ if (!SupportsHostWindowResize()) |
+ return; |
+ |
// Since ShelfLayoutManager queries for mouse location, move the mouse so |
// it isn't over the shelf. |
ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(), |
@@ -2269,4 +2273,22 @@ TEST_F(ShelfLayoutManagerTest, ShutdownHandlesWindowActivation) { |
delete window1; |
} |
+TEST_F(ShelfLayoutManagerTest, ShelfLayoutInUnifiedDesktop) { |
+ if (!SupportsMultipleDisplays()) |
+ return; |
+ |
+ DisplayManager* display_manager = Shell::GetInstance()->display_manager(); |
+ test::DisplayManagerTestApi test_api(display_manager); |
+ test_api.SetDefaultMultiDisplayMode(DisplayManager::UNIFIED); |
+ display_manager->SetMultiDisplayMode(DisplayManager::UNIFIED); |
+ UpdateDisplay("500x500, 500x500"); |
+ |
+ StatusAreaWidget* status_area_widget = |
+ Shell::GetPrimaryRootWindowController()->shelf()->status_area_widget(); |
+ EXPECT_TRUE(status_area_widget->IsVisible()); |
+ // Shelf should be in the first display's area. |
+ EXPECT_EQ("348,453 152x47", |
+ status_area_widget->GetWindowBoundsInScreen().ToString()); |
+} |
+ |
} // namespace ash |