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

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

Issue 1868363002: Replace scoped_ptr with std::unique_ptr in //ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scopedptrcc
Patch Set: scopedptrui: rebase-make_scoped_ptr Created 4 years, 8 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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <map> 9 #include <map>
10 10
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 } 117 }
118 118
119 ProgressBarView* GetProgressBarAt(size_t index) { 119 ProgressBarView* GetProgressBarAt(size_t index) {
120 return GetResultViewAt(index)->progress_bar_; 120 return GetResultViewAt(index)->progress_bar_;
121 } 121 }
122 122
123 private: 123 private:
124 void OnResultInstalled(SearchResult* result) override {} 124 void OnResultInstalled(SearchResult* result) override {}
125 125
126 AppListTestViewDelegate view_delegate_; 126 AppListTestViewDelegate view_delegate_;
127 scoped_ptr<SearchResultListView> view_; 127 std::unique_ptr<SearchResultListView> view_;
128 128
129 DISALLOW_COPY_AND_ASSIGN(SearchResultListViewTest); 129 DISALLOW_COPY_AND_ASSIGN(SearchResultListViewTest);
130 }; 130 };
131 131
132 TEST_F(SearchResultListViewTest, Basic) { 132 TEST_F(SearchResultListViewTest, Basic) {
133 SetUpSearchResults(); 133 SetUpSearchResults();
134 134
135 const int results = GetResultCount(); 135 const int results = GetResultCount();
136 EXPECT_EQ(kDefaultSearchItems, results); 136 EXPECT_EQ(kDefaultSearchItems, results);
137 EXPECT_EQ(0, GetSelectedIndex()); 137 EXPECT_EQ(0, GetSelectedIndex());
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 EXPECT_EQ(0.0f, GetProgressBarAt(0)->current_value()); 246 EXPECT_EQ(0.0f, GetProgressBarAt(0)->current_value());
247 GetResults()->GetItemAt(0)->SetPercentDownloaded(10); 247 GetResults()->GetItemAt(0)->SetPercentDownloaded(10);
248 248
249 DeleteResultAt(0); 249 DeleteResultAt(0);
250 RunPendingMessages(); 250 RunPendingMessages();
251 EXPECT_EQ(0.0f, GetProgressBarAt(0)->current_value()); 251 EXPECT_EQ(0.0f, GetProgressBarAt(0)->current_value());
252 } 252 }
253 253
254 } // namespace test 254 } // namespace test
255 } // namespace app_list 255 } // namespace app_list
OLDNEW
« no previous file with comments | « ui/app_list/views/search_result_list_view.h ('k') | ui/app_list/views/search_result_page_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698