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

Unified Diff: ui/display/fake_display_snapshot_unittests.cc

Issue 2437053002: Catch bad display sizes. (Closed)
Patch Set: Created 4 years, 2 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 | « ui/display/fake_display_snapshot.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/display/fake_display_snapshot_unittests.cc
diff --git a/ui/display/fake_display_snapshot_unittests.cc b/ui/display/fake_display_snapshot_unittests.cc
index fa78a4e84620e820267fbfbfe3f0c296a78f24f5..094afccde92b345776b74458bae8258d61024e59 100644
--- a/ui/display/fake_display_snapshot_unittests.cc
+++ b/ui/display/fake_display_snapshot_unittests.cc
@@ -106,6 +106,9 @@ TEST(FakeDisplaySnapshotTest, BadDisplayMode) {
// Need to provide a refresh rate after '%'.
EXPECT_EQ(nullptr, CreateSnapshot("1024,768%"));
EXPECT_EQ(nullptr, CreateSnapshot("1024,768%a"));
+ // Display resolution can't be zero for width or height.
+ EXPECT_EQ(nullptr, CreateSnapshot("000x800"));
+ EXPECT_EQ(nullptr, CreateSnapshot("800x000"));
// Refresh rate should come before DPI.
EXPECT_EQ(nullptr, CreateSnapshot("1000x1000^300%120"));
}
« no previous file with comments | « ui/display/fake_display_snapshot.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698