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

Side by Side Diff: ui/app_list/views/search_result_list_view_unittest.cc

Issue 922063003: Sort experimental app list search result groups. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix_search_results_not_being_there
Patch Set: force test to be experimental app list Created 5 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/app_list/views/search_result_list_view.h" 5 #include "ui/app_list/views/search_result_list_view.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "ui/app_list/app_list_model.h" 10 #include "ui/app_list/app_list_model.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 } 48 }
49 49
50 base::TimeDelta GetAutoLaunchTimeout() { 50 base::TimeDelta GetAutoLaunchTimeout() {
51 return view_delegate_.GetAutoLaunchTimeout(); 51 return view_delegate_.GetAutoLaunchTimeout();
52 } 52 }
53 53
54 void SetUpSearchResults() { 54 void SetUpSearchResults() {
55 AppListModel::SearchResults* results = GetResults(); 55 AppListModel::SearchResults* results = GetResults();
56 for (int i = 0; i < kDefaultSearchItems; ++i) { 56 for (int i = 0; i < kDefaultSearchItems; ++i) {
57 TestSearchResult* result = new TestSearchResult(); 57 TestSearchResult* result = new TestSearchResult();
58 result->SetDisplayType(SearchResult::DISPLAY_LIST); 58 result->set_display_type(SearchResult::DISPLAY_LIST);
59 results->Add(result); 59 results->Add(result);
60 } 60 }
61 61
62 // Adding results will schedule Update(). 62 // Adding results will schedule Update().
63 RunPendingMessages(); 63 RunPendingMessages();
64 view_->OnContainerSelected(false); 64 view_->OnContainerSelected(false);
65 } 65 }
66 66
67 int GetOpenResultCountAndReset(int ranking) { 67 int GetOpenResultCountAndReset(int ranking) {
68 int result = view_delegate_.open_search_result_counts()[ranking]; 68 int result = view_delegate_.open_search_result_counts()[ranking];
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 EXPECT_EQ(0.0f, GetProgressBarAt(0)->current_value()); 224 EXPECT_EQ(0.0f, GetProgressBarAt(0)->current_value());
225 GetResults()->GetItemAt(0)->SetPercentDownloaded(10); 225 GetResults()->GetItemAt(0)->SetPercentDownloaded(10);
226 226
227 DeleteResultAt(0); 227 DeleteResultAt(0);
228 RunPendingMessages(); 228 RunPendingMessages();
229 EXPECT_EQ(0.0f, GetProgressBarAt(0)->current_value()); 229 EXPECT_EQ(0.0f, GetProgressBarAt(0)->current_value());
230 } 230 }
231 231
232 } // namespace test 232 } // namespace test
233 } // namespace app_list 233 } // namespace app_list
OLDNEW
« no previous file with comments | « ui/app_list/views/search_result_list_view.cc ('k') | ui/app_list/views/search_result_page_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698