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

Unified Diff: ash/display/display_manager_unittest.cc

Issue 657583003: Chrome OS: Ash support for >=3 displays. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase again to resolve conflicts at TOT Created 6 years 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/display/display_manager.cc ('k') | ash/wm/drag_window_resizer.h » ('j') | 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 775f3d5c9fbcb5d7999b643eccacfa8b790c56db..7a0b0a2b2b955edc4c18fb30602c2c9324ea518a 100644
--- a/ash/display/display_manager_unittest.cc
+++ b/ash/display/display_manager_unittest.cc
@@ -268,6 +268,38 @@ TEST_F(DisplayManagerTest, EmulatorTest) {
reset();
}
+// Tests support for 3 displays.
+TEST_F(DisplayManagerTest, UpdateThreeDisplaysTest) {
+ if (!SupportsMultipleDisplays())
+ return;
+
+ EXPECT_EQ(1U, display_manager()->GetNumDisplays());
+
+ // Test with three displays.
+ UpdateDisplay("0+0-640x480,640+0-320x200,960+0-400x300");
+ EXPECT_EQ(3U, display_manager()->GetNumDisplays());
+ EXPECT_EQ("0,0 640x480",
+ display_manager()->GetDisplayAt(0).bounds().ToString());
+ EXPECT_EQ("640,0 320x200",
+ display_manager()->GetDisplayAt(1).bounds().ToString());
+ EXPECT_EQ("960,0 400x300",
+ display_manager()->GetDisplayAt(2).bounds().ToString());
+
+ EXPECT_EQ("1 2 0", GetCountSummary());
+ EXPECT_EQ(display_manager()->GetDisplayAt(0).id(), changed()[0].id());
+ EXPECT_EQ(display_manager()->GetDisplayAt(1).id(), added()[0].id());
+ EXPECT_EQ(display_manager()->GetDisplayAt(2).id(), added()[1].id());
+ EXPECT_EQ("0,0 640x480", changed()[0].bounds().ToString());
+ // Secondary and terniary displays are on right.
+ EXPECT_EQ("640,0 320x200", added()[0].bounds().ToString());
+ EXPECT_EQ("640,0 320x200",
+ GetDisplayInfo(added()[0]).bounds_in_native().ToString());
+ EXPECT_EQ("960,0 400x300", added()[1].bounds().ToString());
+ EXPECT_EQ("960,0 400x300",
+ GetDisplayInfo(added()[1]).bounds_in_native().ToString());
+ reset();
+}
+
TEST_F(DisplayManagerTest, OverscanInsetsTest) {
if (!SupportsMultipleDisplays())
return;
« no previous file with comments | « ash/display/display_manager.cc ('k') | ash/wm/drag_window_resizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698