OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ui/app_list/views/app_list_view.h" | 5 #include "ui/app_list/views/app_list_view.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
231 PaginationModel* AppListViewTestContext::GetPaginationModel() { | 231 PaginationModel* AppListViewTestContext::GetPaginationModel() { |
232 return view_->GetAppsPaginationModel(); | 232 return view_->GetAppsPaginationModel(); |
233 } | 233 } |
234 | 234 |
235 void AppListViewTestContext::RunDisplayTest() { | 235 void AppListViewTestContext::RunDisplayTest() { |
236 EXPECT_FALSE(view_->GetWidget()->IsVisible()); | 236 EXPECT_FALSE(view_->GetWidget()->IsVisible()); |
237 EXPECT_EQ(-1, GetPaginationModel()->total_pages()); | 237 EXPECT_EQ(-1, GetPaginationModel()->total_pages()); |
238 delegate_->GetTestModel()->PopulateApps(kInitialItems); | 238 delegate_->GetTestModel()->PopulateApps(kInitialItems); |
239 | 239 |
240 Show(); | 240 Show(); |
241 | |
242 // The landscape app launcher needs to be short enough to accomodate the | |
243 // virtual keyboard. | |
Matt Giuca
2014/09/16 06:39:39
"... because it is enabled by default when the vir
calamity
2014/09/16 06:55:12
Done.
| |
244 if (test_type_ == LANDSCAPE) | |
245 EXPECT_GE(403, view_->bounds().height()); | |
246 | |
241 if (is_landscape()) | 247 if (is_landscape()) |
242 EXPECT_EQ(2, GetPaginationModel()->total_pages()); | 248 EXPECT_EQ(2, GetPaginationModel()->total_pages()); |
243 else | 249 else |
244 EXPECT_EQ(3, GetPaginationModel()->total_pages()); | 250 EXPECT_EQ(3, GetPaginationModel()->total_pages()); |
245 EXPECT_EQ(0, GetPaginationModel()->selected_page()); | 251 EXPECT_EQ(0, GetPaginationModel()->selected_page()); |
246 | 252 |
247 // Checks on the main view. | 253 // Checks on the main view. |
248 AppListMainView* main_view = view_->app_list_main_view(); | 254 AppListMainView* main_view = view_->app_list_main_view(); |
249 EXPECT_NO_FATAL_FAILURE(CheckView(main_view)); | 255 EXPECT_NO_FATAL_FAILURE(CheckView(main_view)); |
250 EXPECT_NO_FATAL_FAILURE(CheckView(main_view->contents_view())); | 256 EXPECT_NO_FATAL_FAILURE(CheckView(main_view->contents_view())); |
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
686 INSTANTIATE_TEST_CASE_P(AppListViewTestAuraInstance, | 692 INSTANTIATE_TEST_CASE_P(AppListViewTestAuraInstance, |
687 AppListViewTestAura, | 693 AppListViewTestAura, |
688 ::testing::Range<int>(TEST_TYPE_START, TEST_TYPE_END)); | 694 ::testing::Range<int>(TEST_TYPE_START, TEST_TYPE_END)); |
689 | 695 |
690 INSTANTIATE_TEST_CASE_P(AppListViewTestDesktopInstance, | 696 INSTANTIATE_TEST_CASE_P(AppListViewTestDesktopInstance, |
691 AppListViewTestDesktop, | 697 AppListViewTestDesktop, |
692 ::testing::Range<int>(TEST_TYPE_START, TEST_TYPE_END)); | 698 ::testing::Range<int>(TEST_TYPE_START, TEST_TYPE_END)); |
693 | 699 |
694 } // namespace test | 700 } // namespace test |
695 } // namespace app_list | 701 } // namespace app_list |
OLD | NEW |