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

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: 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') | ui/app_list/views/contents_view.cc » ('J')
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 5bed463a80981bda52d0e78ef01bc21e4df9c3b3..c9ad1028a7e1b8edae00b79006a1959f83b1642c 100644
--- a/ui/app_list/views/app_list_view_unittest.cc
+++ b/ui/app_list/views/app_list_view_unittest.cc
@@ -444,7 +444,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());
Matt Giuca 2014/07/09 04:42:07 Why did IsViewAtOrigin go away?
calamity 2014/07/11 04:22:17 Wasn't necessary because of ShowContentsViewPageAn
// Show the search results.
@@ -467,19 +466,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') | ui/app_list/views/contents_view.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698