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

Unified Diff: chrome/browser/download/notification/download_item_notification_unittest.cc

Issue 1403003004: Revert of Update first download notification correctly if there are multiple notifications (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/download/notification/download_item_notification_unittest.cc
diff --git a/chrome/browser/download/notification/download_item_notification_unittest.cc b/chrome/browser/download/notification/download_item_notification_unittest.cc
index 30a497b0e52eaeafa06f51ac066e66b3c85ece9e..52c885a2f79cf125015d45e8a322af5e2707e1ef 100644
--- a/chrome/browser/download/notification/download_item_notification_unittest.cc
+++ b/chrome/browser/download/notification/download_item_notification_unittest.cc
@@ -35,26 +35,6 @@
namespace test {
-class MockMessageCenter : public message_center::FakeMessageCenter {
- public:
- MockMessageCenter() {}
- ~MockMessageCenter() override {}
-
- void AddVisibleNotification(message_center::Notification* notification) {
- visible_notifications_.insert(notification);
- }
-
- const message_center::NotificationList::Notifications&
- GetVisibleNotifications() override {
- return visible_notifications_;
- }
-
- private:
- message_center::NotificationList::Notifications visible_notifications_;
-
- DISALLOW_COPY_AND_ASSIGN(MockMessageCenter);
-};
-
class DownloadItemNotificationTest : public testing::Test {
public:
DownloadItemNotificationTest()
@@ -76,10 +56,6 @@
download_notification_manager_.reset(
new DownloadNotificationManagerForProfile(profile_, nullptr));
-
- message_center_.reset(new MockMessageCenter());
- download_notification_manager_->OverrideMessageCenterForTest(
- message_center_.get());
base::FilePath download_item_target_path(kDownloadItemTargetPathString);
download_item_.reset(new NiceMock<content::MockDownloadItem>());
@@ -159,8 +135,6 @@
download_notification_manager_->OnNewDownloadReady(download_item_.get());
download_item_notification_ =
download_notification_manager_->items_[download_item_.get()];
- message_center_->AddVisibleNotification(
- download_item_notification_->notification_.get());
}
base::MessageLoopForUI message_loop_;
@@ -172,7 +146,6 @@
scoped_ptr<NiceMock<content::MockDownloadItem>> download_item_;
scoped_ptr<DownloadNotificationManagerForProfile>
download_notification_manager_;
- scoped_ptr<MockMessageCenter> message_center_;
DownloadItemNotification* download_item_notification_;
};

Powered by Google App Engine
This is Rietveld 408576698