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

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

Issue 796793002: Make app list recommendations into their own DisplayType. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mathp_suggestions_search
Patch Set: fix_test Created 6 years 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/search_result.cc ('k') | ui/app_list/views/start_page_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 d4d664e612341bd122e4b9922df2c95bde13b1d6..9f33be0a2df2857083828d6b9b46a7e95c82d6b6 100644
--- a/ui/app_list/views/app_list_view_unittest.cc
+++ b/ui/app_list/views/app_list_view_unittest.cc
@@ -72,13 +72,13 @@ void SimulateClick(views::View* view) {
// Choose a set that is 3 regular app list pages and 2 landscape app list pages.
const int kInitialItems = 34;
-class TestTileSearchResult : public TestSearchResult {
+class TestStartPageSearchResult : public TestSearchResult {
public:
- TestTileSearchResult() { set_display_type(DISPLAY_TILE); }
- ~TestTileSearchResult() override {}
+ TestStartPageSearchResult() { set_display_type(DISPLAY_RECOMMENDATION); }
+ ~TestStartPageSearchResult() override {}
private:
- DISALLOW_COPY_AND_ASSIGN(TestTileSearchResult);
+ DISALLOW_COPY_AND_ASSIGN(TestStartPageSearchResult);
};
// Allows the same tests to run with different contexts: either an Ash-style
@@ -463,7 +463,7 @@ void AppListViewTestContext::RunStartPageTest() {
EXPECT_EQ(view_size.ToString(), view_->GetPreferredSize().ToString());
// Check tiles hide and show on deletion and addition.
- model->results()->Add(new TestTileSearchResult());
+ model->results()->Add(new TestStartPageSearchResult());
start_page_view->UpdateForTesting();
EXPECT_EQ(1u, GetVisibleViews(start_page_view->tile_views()));
model->results()->DeleteAll();
@@ -552,15 +552,15 @@ void AppListViewTestContext::RunProfileChangeTest() {
EXPECT_EQ(NULL, start_page_view);
// New model updates should be processed by the start page view.
- delegate_->GetTestModel()->results()->Add(new TestTileSearchResult());
+ delegate_->GetTestModel()->results()->Add(new TestStartPageSearchResult());
if (test_type_ == EXPERIMENTAL) {
start_page_view->UpdateForTesting();
EXPECT_EQ(1u, GetVisibleViews(start_page_view->tile_views()));
}
// Old model updates should be ignored.
- original_test_model->results()->Add(new TestTileSearchResult());
- original_test_model->results()->Add(new TestTileSearchResult());
+ original_test_model->results()->Add(new TestStartPageSearchResult());
+ original_test_model->results()->Add(new TestStartPageSearchResult());
if (test_type_ == EXPERIMENTAL) {
start_page_view->UpdateForTesting();
EXPECT_EQ(1u, GetVisibleViews(start_page_view->tile_views()));
« no previous file with comments | « ui/app_list/search_result.cc ('k') | ui/app_list/views/start_page_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698