| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 | 10 |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 result->set_details(base::ASCIIToUTF16("Detail")); | 71 result->set_details(base::ASCIIToUTF16("Detail")); |
| 72 results->Add(std::move(result)); | 72 results->Add(std::move(result)); |
| 73 } | 73 } |
| 74 | 74 |
| 75 // Adding results will schedule Update(). | 75 // Adding results will schedule Update(). |
| 76 RunPendingMessages(); | 76 RunPendingMessages(); |
| 77 view_->OnContainerSelected(false, false); | 77 view_->OnContainerSelected(false, false); |
| 78 } | 78 } |
| 79 | 79 |
| 80 int GetOpenResultCountAndReset(int ranking) { | 80 int GetOpenResultCountAndReset(int ranking) { |
| 81 EXPECT_GT(view_delegate_.open_search_result_counts().count(ranking), 0u); |
| 81 int result = view_delegate_.open_search_result_counts()[ranking]; | 82 int result = view_delegate_.open_search_result_counts()[ranking]; |
| 82 view_delegate_.open_search_result_counts().clear(); | 83 view_delegate_.open_search_result_counts().clear(); |
| 83 return result; | 84 return result; |
| 84 } | 85 } |
| 85 | 86 |
| 86 int GetResultCount() { return view_->num_results(); } | 87 int GetResultCount() { return view_->num_results(); } |
| 87 | 88 |
| 88 int GetSelectedIndex() { return view_->selected_index(); } | 89 int GetSelectedIndex() { return view_->selected_index(); } |
| 89 | 90 |
| 90 void ResetSelectedIndex() { | 91 void ResetSelectedIndex() { |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 EXPECT_EQ(0.0f, GetProgressBarAt(0)->current_value()); | 249 EXPECT_EQ(0.0f, GetProgressBarAt(0)->current_value()); |
| 249 GetResults()->GetItemAt(0)->SetPercentDownloaded(10); | 250 GetResults()->GetItemAt(0)->SetPercentDownloaded(10); |
| 250 | 251 |
| 251 DeleteResultAt(0); | 252 DeleteResultAt(0); |
| 252 RunPendingMessages(); | 253 RunPendingMessages(); |
| 253 EXPECT_EQ(0.0f, GetProgressBarAt(0)->current_value()); | 254 EXPECT_EQ(0.0f, GetProgressBarAt(0)->current_value()); |
| 254 } | 255 } |
| 255 | 256 |
| 256 } // namespace test | 257 } // namespace test |
| 257 } // namespace app_list | 258 } // namespace app_list |
| OLD | NEW |