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

Side by Side Diff: chrome/browser/download/notification/download_item_notification_unittest.cc

Issue 2287783002: Remove stl_util's STLValueDeleter. (Closed)
Patch Set: rebase Created 4 years, 3 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
« no previous file with comments | « base/stl_util.h ('k') | chrome/browser/download/notification/download_notification_manager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "chrome/browser/download/notification/download_item_notification.h" 5 #include "chrome/browser/download/notification/download_item_notification.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 return download_item_notification_->OnNotificationButtonClick(index); 156 return download_item_notification_->OnNotificationButtonClick(index);
157 } 157 }
158 158
159 bool ShownAsPopUp() { 159 bool ShownAsPopUp() {
160 return !notification()->shown_as_popup(); 160 return !notification()->shown_as_popup();
161 } 161 }
162 162
163 void CreateDownloadItemNotification() { 163 void CreateDownloadItemNotification() {
164 download_notification_manager_->OnNewDownloadReady(download_item_.get()); 164 download_notification_manager_->OnNewDownloadReady(download_item_.get());
165 download_item_notification_ = 165 download_item_notification_ =
166 download_notification_manager_->items_[download_item_.get()]; 166 download_notification_manager_->items_[download_item_.get()].get();
167 message_center_->AddVisibleNotification( 167 message_center_->AddVisibleNotification(
168 download_item_notification_->notification_.get()); 168 download_item_notification_->notification_.get());
169 } 169 }
170 170
171 base::MessageLoopForUI message_loop_; 171 base::MessageLoopForUI message_loop_;
172 content::TestBrowserThread ui_thread_; 172 content::TestBrowserThread ui_thread_;
173 173
174 std::unique_ptr<TestingProfileManager> profile_manager_; 174 std::unique_ptr<TestingProfileManager> profile_manager_;
175 Profile* profile_; 175 Profile* profile_;
176 176
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 EXPECT_CALL(*download_item_, GetState()) 296 EXPECT_CALL(*download_item_, GetState())
297 .WillRepeatedly(Return(content::DownloadItem::COMPLETE)); 297 .WillRepeatedly(Return(content::DownloadItem::COMPLETE));
298 EXPECT_CALL(*download_item_, IsDone()).WillRepeatedly(Return(true)); 298 EXPECT_CALL(*download_item_, IsDone()).WillRepeatedly(Return(true));
299 download_item_->NotifyObserversDownloadUpdated(); 299 download_item_->NotifyObserversDownloadUpdated();
300 300
301 // Priority is updated back to normal. 301 // Priority is updated back to normal.
302 EXPECT_EQ(message_center::DEFAULT_PRIORITY, notification()->priority()); 302 EXPECT_EQ(message_center::DEFAULT_PRIORITY, notification()->priority());
303 } 303 }
304 304
305 } // namespace test 305 } // namespace test
OLDNEW
« no previous file with comments | « base/stl_util.h ('k') | chrome/browser/download/notification/download_notification_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698