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

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

Issue 1609923002: Fix remaining incompatibilities between scoped_ptr and unique_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 GetResults()->Add(new TestSearchResult()); 93 GetResults()->Add(new TestSearchResult());
94 } 94 }
95 95
96 void DeleteResultAt(int index) { GetResults()->DeleteAt(index); } 96 void DeleteResultAt(int index) { GetResults()->DeleteAt(index); }
97 97
98 bool KeyPress(ui::KeyboardCode key_code) { 98 bool KeyPress(ui::KeyboardCode key_code) {
99 ui::KeyEvent event(ui::ET_KEY_PRESSED, key_code, ui::EF_NONE); 99 ui::KeyEvent event(ui::ET_KEY_PRESSED, key_code, ui::EF_NONE);
100 return view_->OnKeyPressed(event); 100 return view_->OnKeyPressed(event);
101 } 101 }
102 102
103 bool IsAutoLaunching() { 103 bool IsAutoLaunching() { return !!view_->auto_launch_animation_; }
104 return view_->auto_launch_animation_;
105 }
106 104
107 void ForceAutoLaunch() { 105 void ForceAutoLaunch() {
108 view_->ForceAutoLaunchForTest(); 106 view_->ForceAutoLaunchForTest();
109 } 107 }
110 108
111 void ExpectConsistent() { 109 void ExpectConsistent() {
112 // Adding results will schedule Update(). 110 // Adding results will schedule Update().
113 RunPendingMessages(); 111 RunPendingMessages();
114 112
115 AppListModel::SearchResults* results = GetResults(); 113 AppListModel::SearchResults* results = GetResults();
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 EXPECT_EQ(0.0f, GetProgressBarAt(0)->current_value()); 246 EXPECT_EQ(0.0f, GetProgressBarAt(0)->current_value());
249 GetResults()->GetItemAt(0)->SetPercentDownloaded(10); 247 GetResults()->GetItemAt(0)->SetPercentDownloaded(10);
250 248
251 DeleteResultAt(0); 249 DeleteResultAt(0);
252 RunPendingMessages(); 250 RunPendingMessages();
253 EXPECT_EQ(0.0f, GetProgressBarAt(0)->current_value()); 251 EXPECT_EQ(0.0f, GetProgressBarAt(0)->current_value());
254 } 252 }
255 253
256 } // namespace test 254 } // namespace test
257 } // namespace app_list 255 } // namespace app_list
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698