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

Unified Diff: ash/display/display_manager_unittest.cc

Issue 1849683003: Do not register invalid layout (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2661
Patch Set: Created 4 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
« ash/display/display_layout_store.cc ('K') | « ash/display/display_layout_store.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/display/display_manager_unittest.cc
diff --git a/ash/display/display_manager_unittest.cc b/ash/display/display_manager_unittest.cc
index 3424058c4a2715012f518b9003b8034f3b93f789..f98050602a613cd7f87a202844f84289c34a08ab 100644
--- a/ash/display/display_manager_unittest.cc
+++ b/ash/display/display_manager_unittest.cc
@@ -330,6 +330,23 @@ TEST_F(DisplayManagerTest, UpdateThreeDisplaysWithDefaultLayout) {
display_manager()->GetDisplayAt(2).bounds().ToString());
}
+TEST_F(DisplayManagerTest, LayoutMorethanThreeDisplaysCrashTest) {
+ if (!SupportsMultipleDisplays())
+ return;
+
+ int64_t primary_id = gfx::Screen::GetScreen()->GetPrimaryDisplay().id();
+ DisplayIdList list =
+ ash::test::CreateDisplayIdList2(primary_id, primary_id + 1);
+
+ DisplayLayoutBuilder builder(primary_id);
+ builder.AddDisplayPlacement(list[1], primary_id, DisplayPlacement::LEFT, 10);
+ builder.AddDisplayPlacement(primary_id + 2, list[1], DisplayPlacement::TOP,
+ 10);
+ display_manager()->layout_store()->RegisterLayoutForDisplayIdList(
+ list, builder.Build());
+ UpdateDisplay("640x480, 500x500");
+}
+
TEST_F(DisplayManagerTest, LayoutMorethanThreeDisplaysTest) {
if (!SupportsMultipleDisplays())
return;
« ash/display/display_layout_store.cc ('K') | « ash/display/display_layout_store.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698