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

Unified Diff: ui/app_list/views/app_list_view_unittest.cc

Issue 581923002: Experimental launcher: Switcher buttons are larger and centered. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ares-switcher-button-cropping
Patch Set: Rebase. Created 6 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
« no previous file with comments | « ui/app_list/views/app_list_background.cc ('k') | ui/app_list/views/contents_switcher_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/views/app_list_view_unittest.cc
diff --git a/ui/app_list/views/app_list_view_unittest.cc b/ui/app_list/views/app_list_view_unittest.cc
index f59156b6500ae05455004ab8fd5cfc5c9c57d251..602edcfe51d9d61d1eae036781cd303b6da610ec 100644
--- a/ui/app_list/views/app_list_view_unittest.cc
+++ b/ui/app_list/views/app_list_view_unittest.cc
@@ -239,11 +239,26 @@ void AppListViewTestContext::RunDisplayTest() {
Show();
- // The landscape app launcher needs to be short enough to accomodate the
- // virtual keyboard because it is enabled by default when the virtual keyboard
- // is enabled.
- if (test_type_ == LANDSCAPE)
- EXPECT_GE(403, view_->bounds().height());
+ // Explicitly enforce the exact dimensions of the app list. Feel free to
+ // change these if you need to (they are just here to prevent against
+ // accidental changes to the window size).
+ switch (test_type_) {
+ case NORMAL:
+ EXPECT_EQ("400x500", view_->bounds().size().ToString());
+ break;
+ case LANDSCAPE:
+ // NOTE: Height should not exceed 402, because otherwise there might not
+ // be enough space to accomodate the virtual keyboard. (LANDSCAPE mode is
+ // enabled by default when the virtual keyboard is enabled.)
+ EXPECT_EQ("576x402", view_->bounds().size().ToString());
+ break;
+ case EXPERIMENTAL:
+ EXPECT_EQ("768x560", view_->bounds().size().ToString());
+ break;
+ default:
+ NOTREACHED();
+ break;
+ }
if (is_landscape())
EXPECT_EQ(2, GetPaginationModel()->total_pages());
« no previous file with comments | « ui/app_list/views/app_list_background.cc ('k') | ui/app_list/views/contents_switcher_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698