OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |