Commit 18da770d authored by Maajid's avatar Maajid Committed by Commit Bot

Fix app list test that assumed that a nonempty searchbox should be

inactive. Even if there is only whitespace in the searchbox, it
should still be active. In addition, clearing the searchbox from
the app list view creates easy opportunities for infinite loops.

Bug: 740662
Change-Id: I9806242ac448dfb7a2a0d2af34388aa3fa3c47d8
Reviewed-on: https://chromium-review.googlesource.com/581567
Commit-Queue: Maajid <maajid@chromium.org>
Reviewed-by: default avatarScott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#488778}
parent 093e4778
...@@ -808,10 +808,10 @@ TEST_F(FullscreenAppListPresenterDelegateTest, WhitespaceQuery) { ...@@ -808,10 +808,10 @@ TEST_F(FullscreenAppListPresenterDelegateTest, WhitespaceQuery) {
EXPECT_TRUE(view->search_box_view()->is_search_box_active()); EXPECT_TRUE(view->search_box_view()->is_search_box_active());
EXPECT_EQ(view->app_list_state(), app_list::AppListView::HALF); EXPECT_EQ(view->app_list_state(), app_list::AppListView::HALF);
// Delete the non whitespace character, the Searchbox should deactivate and go // Delete the non whitespace character, the Searchbox should not deactivate
// to PEEKING // but go to PEEKING
generator.PressKey(ui::VKEY_BACK, 0); generator.PressKey(ui::VKEY_BACK, 0);
EXPECT_FALSE(view->search_box_view()->is_search_box_active()); EXPECT_TRUE(view->search_box_view()->is_search_box_active());
EXPECT_EQ(view->app_list_state(), app_list::AppListView::PEEKING); EXPECT_EQ(view->app_list_state(), app_list::AppListView::PEEKING);
} }
......
...@@ -904,7 +904,6 @@ void AppListView::SetState(AppListState new_state) { ...@@ -904,7 +904,6 @@ void AppListView::SetState(AppListState new_state) {
new_widget_bounds.set_y(peeking_app_list_y); new_widget_bounds.set_y(peeking_app_list_y);
app_list_main_view_->contents_view()->SetActiveState( app_list_main_view_->contents_view()->SetActiveState(
AppListModel::STATE_START); AppListModel::STATE_START);
search_box_view()->ClearSearch();
break; break;
} }
case FULLSCREEN_SEARCH: case FULLSCREEN_SEARCH:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment