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

Unified Diff: ash/display/screen_ash_unittest.cc

Issue 2361283002: Add GetDisplayWithDisplayId to display::Screen. (Closed)
Patch Set: test Created 4 years, 3 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
Index: ash/display/screen_ash_unittest.cc
diff --git a/ash/display/screen_ash_unittest.cc b/ash/display/screen_ash_unittest.cc
index 44771b5fde0eb747f75f5681cd894e5460e9a604..a364b98d03915ef67bf9e626e17de83763e5dede 100644
--- a/ash/display/screen_ash_unittest.cc
+++ b/ash/display/screen_ash_unittest.cc
@@ -42,4 +42,17 @@ TEST_F(ScreenAshTest, TestGetWindowAtScreenPoint) {
gfx::Point(250, 260)));
}
+TEST_F(ScreenAshTest, TestGetDisplayById) {
+ if (!SupportsMultipleDisplays())
+ return;
+
+ UpdateDisplay("200x200,400x400");
+ int64_t id = SetFirstDisplayAsInternalDisplay();
+ display::Display display;
+ bool has_display =
+ display::Screen::GetScreen()->GetDisplayWithDisplayId(id, &display);
+ EXPECT_TRUE(has_display);
+ EXPECT_EQ(id, display.id());
+}
+
} // namespace ash

Powered by Google App Engine
This is Rietveld 408576698