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

Unified Diff: ash/shelf/shelf_layout_manager_unittest.cc

Issue 1116313002: Layout login/lock screen, shelf and app list inside the first display in Unified Desktop mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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/shelf/shelf_layout_manager.cc ('k') | ash/shell_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « ash/shelf/shelf_layout_manager.cc ('k') | ash/shell_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698