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

Unified Diff: blimp/engine/app/ui/blimp_screen_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: blimp/engine/app/ui/blimp_screen_unittest.cc
diff --git a/blimp/engine/app/ui/blimp_screen_unittest.cc b/blimp/engine/app/ui/blimp_screen_unittest.cc
index b45420f10924af50ed3c3930176755f46feea0bc..3bca5c989820d98e50fb5b4928e7a4fa4f7c60ab 100644
--- a/blimp/engine/app/ui/blimp_screen_unittest.cc
+++ b/blimp/engine/app/ui/blimp_screen_unittest.cc
@@ -109,6 +109,16 @@ TEST_F(BlimpScreenTest, RemoveObserver) {
EXPECT_EQ(size1, screen_->GetPrimaryDisplay().GetSizeInPixel());
}
+TEST_F(BlimpScreenTest, GetDisplayById) {
+ // display_ in BlimpScreen has id 1
+ display::Display display;
+ bool has_display1 = screen_->GetDisplayWithDisplayId(0, &display);
+ EXPECT_FALSE(has_display1);
+ bool has_display2 = screen_->GetDisplayWithDisplayId(1, &display);
+ EXPECT_FALSE(has_display2);
sadrul 2016/09/23 19:51:12 Should be TRUE?
riajiang 2016/10/05 14:54:11 Yes!
+ EXPECT_EQ(1, display.id());
+}
+
} // namespace
} // namespace engine
} // namespace blimp

Powered by Google App Engine
This is Rietveld 408576698