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

Unified Diff: ash/display/display_manager_unittest.cc

Issue 11801019: Merge 174008 (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1364/src/
Patch Set: Created 7 years, 11 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/display/display_controller.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
===================================================================
--- ash/display/display_manager_unittest.cc (revision 175368)
+++ ash/display/display_manager_unittest.cc (working copy)
@@ -392,6 +392,23 @@
EXPECT_EQ(2U, display_manager()->GetNumDisplays());
}
+TEST_F(DisplayManagerTest, TestNativeDisplaysChangedNoInternal) {
+ EXPECT_EQ(1U, display_manager()->GetNumDisplays());
+
+ // Don't change the display info if all displays are disconnected.
+ std::vector<gfx::Display> displays;
+ display_manager()->OnNativeDisplaysChanged(displays);
+ EXPECT_EQ(1U, display_manager()->GetNumDisplays());
+
+ // Connect another display which will become primary.
+ const gfx::Display external_display(10, gfx::Rect(1, 1, 100, 100));
+ displays.push_back(external_display);
+ display_manager()->OnNativeDisplaysChanged(displays);
+ EXPECT_EQ(1U, display_manager()->GetNumDisplays());
+ EXPECT_EQ("1,1 100x100",
+ FindDisplayForId(10).bounds_in_pixel().ToString());
+}
+
TEST_F(DisplayManagerTest, EnsurePointerInDisplays) {
UpdateDisplay("200x200,300x300");
Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
« no previous file with comments | « ash/display/display_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698