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

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

Issue 317723005: Refactor app list ContentsView to use page indices, not show states. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Renamed again, and rewrote comments for AddLauncherPage. Created 6 years, 6 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_main_view.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 0356ad670187cc99547665562b1c0e233d1230b2..ef39edd41ce21996e0054222cdf212ea04e73273 100644
--- a/ui/app_list/views/app_list_view_unittest.cc
+++ b/ui/app_list/views/app_list_view_unittest.cc
@@ -283,20 +283,21 @@ void AppListViewTestContext::RunStartPageTest() {
if (test_type_ == EXPERIMENTAL) {
EXPECT_NO_FATAL_FAILURE(CheckView(start_page_view));
- main_view->contents_view()->SetShowState(ContentsView::SHOW_START_PAGE);
- main_view->contents_view()->Layout();
+ ContentsView* contents_view = main_view->contents_view();
+ contents_view->SetActivePage(contents_view->GetPageIndexForNamedPage(
+ ContentsView::NAMED_PAGE_START));
+ contents_view->Layout();
EXPECT_FALSE(main_view->search_box_view()->visible());
EXPECT_TRUE(IsViewAtOrigin(start_page_view));
- EXPECT_FALSE(
- IsViewAtOrigin(main_view->contents_view()->apps_container_view()));
+ EXPECT_FALSE(IsViewAtOrigin(contents_view->apps_container_view()));
EXPECT_EQ(3u, GetVisibleTileItemViews(start_page_view->tile_views()));
- main_view->contents_view()->SetShowState(ContentsView::SHOW_APPS);
- main_view->contents_view()->Layout();
+ contents_view->SetActivePage(
+ contents_view->GetPageIndexForNamedPage(ContentsView::NAMED_PAGE_APPS));
+ contents_view->Layout();
EXPECT_TRUE(main_view->search_box_view()->visible());
EXPECT_FALSE(IsViewAtOrigin(start_page_view));
- EXPECT_TRUE(
- IsViewAtOrigin(main_view->contents_view()->apps_container_view()));
+ EXPECT_TRUE(IsViewAtOrigin(contents_view->apps_container_view()));
// Check tiles hide and show on deletion and addition.
model->CreateAndAddItem("Test app");
« no previous file with comments | « ui/app_list/views/app_list_main_view.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