| 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 7fa54a84c4ada15f9eed801b6a71c2962f0d20fa..3fc998d326880332e7c4c50bda4698780cd0eaf8 100644
|
| --- a/ui/app_list/views/app_list_view_unittest.cc
|
| +++ b/ui/app_list/views/app_list_view_unittest.cc
|
| @@ -269,9 +269,9 @@ void AppListViewTestContext::RunDisplayTest() {
|
| EXPECT_NO_FATAL_FAILURE(CheckView(main_view));
|
| EXPECT_NO_FATAL_FAILURE(CheckView(main_view->contents_view()));
|
|
|
| - EXPECT_TRUE(main_view->contents_view()->IsNamedPageActive(
|
| - test_type_ == EXPERIMENTAL ? ContentsView::NAMED_PAGE_START
|
| - : ContentsView::NAMED_PAGE_APPS));
|
| + EXPECT_TRUE(main_view->contents_view()->IsShowStateActive(
|
| + test_type_ == EXPERIMENTAL ? AppListModel::SHOW_START
|
| + : AppListModel::SHOW_APPS));
|
|
|
| Close();
|
| }
|
| @@ -339,13 +339,13 @@ void AppListViewTestContext::RunStartPageTest() {
|
|
|
| // Show the start page view.
|
| ContentsView* contents_view = main_view->contents_view();
|
| - ShowContentsViewPageAndVerify(contents_view->GetPageIndexForNamedPage(
|
| - ContentsView::NAMED_PAGE_START));
|
| + ShowContentsViewPageAndVerify(
|
| + contents_view->GetPageIndexForShowState(AppListModel::SHOW_START));
|
| EXPECT_FALSE(main_view->search_box_view()->visible());
|
|
|
| gfx::Size view_size(view_->GetPreferredSize());
|
| ShowContentsViewPageAndVerify(
|
| - contents_view->GetPageIndexForNamedPage(ContentsView::NAMED_PAGE_APPS));
|
| + contents_view->GetPageIndexForShowState(AppListModel::SHOW_APPS));
|
| EXPECT_TRUE(main_view->search_box_view()->visible());
|
|
|
| // Hiding and showing the search box should not affect the app list's
|
| @@ -477,7 +477,7 @@ void AppListViewTestContext::RunSearchResultsTest() {
|
| AppListMainView* main_view = view_->app_list_main_view();
|
| ContentsView* contents_view = main_view->contents_view();
|
| ShowContentsViewPageAndVerify(
|
| - contents_view->GetPageIndexForNamedPage(ContentsView::NAMED_PAGE_APPS));
|
| + contents_view->GetPageIndexForShowState(AppListModel::SHOW_APPS));
|
| EXPECT_TRUE(main_view->search_box_view()->visible());
|
|
|
| // Show the search results.
|
| @@ -489,13 +489,12 @@ void AppListViewTestContext::RunSearchResultsTest() {
|
| const gfx::Rect active_contents_bounds =
|
| contents_view->GetDefaultContentsBounds();
|
| if (test_type_ == EXPERIMENTAL) {
|
| - EXPECT_TRUE(
|
| - contents_view->IsNamedPageActive(ContentsView::NAMED_PAGE_START));
|
| + EXPECT_TRUE(contents_view->IsShowStateActive(AppListModel::SHOW_START));
|
| EXPECT_EQ(active_contents_bounds,
|
| contents_view->start_page_view()->bounds());
|
| } else {
|
| - EXPECT_TRUE(contents_view->IsNamedPageActive(
|
| - ContentsView::NAMED_PAGE_SEARCH_RESULTS));
|
| + EXPECT_TRUE(
|
| + contents_view->IsShowStateActive(AppListModel::SHOW_SEARCH_RESULTS));
|
| EXPECT_EQ(active_contents_bounds,
|
| contents_view->search_results_view()->bounds());
|
| }
|
| @@ -506,14 +505,14 @@ void AppListViewTestContext::RunSearchResultsTest() {
|
| EXPECT_FALSE(contents_view->IsShowingSearchResults());
|
|
|
| // Check that we return to the page that we were on before the search.
|
| - EXPECT_TRUE(contents_view->IsNamedPageActive(ContentsView::NAMED_PAGE_APPS));
|
| + EXPECT_TRUE(contents_view->IsShowStateActive(AppListModel::SHOW_APPS));
|
| EXPECT_EQ(active_contents_bounds,
|
| contents_view->apps_container_view()->bounds());
|
| EXPECT_TRUE(main_view->search_box_view()->visible());
|
|
|
| if (test_type_ == EXPERIMENTAL) {
|
| - ShowContentsViewPageAndVerify(contents_view->GetPageIndexForNamedPage(
|
| - ContentsView::NAMED_PAGE_START));
|
| + ShowContentsViewPageAndVerify(
|
| + contents_view->GetPageIndexForShowState(AppListModel::SHOW_START));
|
|
|
| // Check that typing into the dummy search box triggers the search page.
|
| base::string16 search_text = base::UTF8ToUTF16("test");
|
| @@ -528,14 +527,13 @@ void AppListViewTestContext::RunSearchResultsTest() {
|
| EXPECT_FALSE(dummy_search_box->IsDrawn());
|
| EXPECT_TRUE(main_view->search_box_view()->visible());
|
| EXPECT_EQ(search_text, main_view->search_box_view()->search_box()->text());
|
| - EXPECT_TRUE(
|
| - contents_view->IsNamedPageActive(ContentsView::NAMED_PAGE_START));
|
| + EXPECT_TRUE(contents_view->IsShowStateActive(AppListModel::SHOW_START));
|
| EXPECT_EQ(active_contents_bounds,
|
| contents_view->start_page_view()->bounds());
|
|
|
| // Check that typing into the real search box triggers the search page.
|
| ShowContentsViewPageAndVerify(
|
| - contents_view->GetPageIndexForNamedPage(ContentsView::NAMED_PAGE_APPS));
|
| + contents_view->GetPageIndexForShowState(AppListModel::SHOW_APPS));
|
| EXPECT_EQ(active_contents_bounds,
|
| contents_view->apps_container_view()->bounds());
|
|
|
| @@ -553,9 +551,9 @@ void AppListViewTestContext::RunSearchResultsTest() {
|
|
|
| // Check that the dummy search box is clear when reshowing the start page.
|
| ShowContentsViewPageAndVerify(
|
| - contents_view->GetPageIndexForNamedPage(ContentsView::NAMED_PAGE_APPS));
|
| - ShowContentsViewPageAndVerify(contents_view->GetPageIndexForNamedPage(
|
| - ContentsView::NAMED_PAGE_START));
|
| + contents_view->GetPageIndexForShowState(AppListModel::SHOW_APPS));
|
| + ShowContentsViewPageAndVerify(
|
| + contents_view->GetPageIndexForShowState(AppListModel::SHOW_START));
|
| EXPECT_TRUE(dummy_search_box->IsDrawn());
|
| EXPECT_TRUE(dummy_search_box->search_box()->text().empty());
|
| }
|
|
|