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

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

Issue 377783006: Make app list return to previous page after search. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 5 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 | « no previous file | ui/app_list/views/contents_view.h » ('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 f507ca9ab8f41c6b7f7bc9fd169225614845f328..c2d3079076e3e721161e576c9b6742ed65e47df0 100644
--- a/ui/app_list/views/app_list_view_unittest.cc
+++ b/ui/app_list/views/app_list_view_unittest.cc
@@ -443,7 +443,6 @@ void AppListViewTestContext::RunSearchResultsTest() {
ContentsView* contents_view = main_view->contents_view();
ShowContentsViewPageAndVerify(
contents_view->GetPageIndexForNamedPage(ContentsView::NAMED_PAGE_APPS));
- EXPECT_TRUE(IsViewAtOrigin(contents_view->apps_container_view()));
EXPECT_TRUE(main_view->search_box_view()->visible());
// Show the search results.
@@ -466,19 +465,16 @@ void AppListViewTestContext::RunSearchResultsTest() {
contents_view->ShowSearchResults(false);
contents_view->Layout();
EXPECT_FALSE(contents_view->IsShowingSearchResults());
- if (test_type_ == EXPERIMENTAL) {
- EXPECT_TRUE(
- contents_view->IsNamedPageActive(ContentsView::NAMED_PAGE_START));
- EXPECT_TRUE(IsViewAtOrigin(contents_view->start_page_view()));
- EXPECT_FALSE(main_view->search_box_view()->visible());
- } else {
- EXPECT_TRUE(
- contents_view->IsNamedPageActive(ContentsView::NAMED_PAGE_APPS));
- EXPECT_TRUE(IsViewAtOrigin(contents_view->apps_container_view()));
- EXPECT_TRUE(main_view->search_box_view()->visible());
- }
+
+ // 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(IsViewAtOrigin(contents_view->apps_container_view()));
+ EXPECT_TRUE(main_view->search_box_view()->visible());
if (test_type_ == EXPERIMENTAL) {
+ ShowContentsViewPageAndVerify(contents_view->GetPageIndexForNamedPage(
+ ContentsView::NAMED_PAGE_START));
+
// Check that typing into the dummy search box triggers the search page.
base::string16 search_text = base::UTF8ToUTF16("test");
SearchBoxView* dummy_search_box =
« no previous file with comments | « no previous file | ui/app_list/views/contents_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698