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

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

Issue 1005393003: [Download Notification] Use NotificationUIManager instead of MessageCenter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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_notification_item_unittest.cc
diff --git a/chrome/browser/download/notification/download_notification_item_unittest.cc b/chrome/browser/download/notification/download_notification_item_unittest.cc
index 693ee03dc6064ce0c6d9be0aa566508ed70934d0..867e7989c41dfa0f1953d690540d83b39eb00ecb 100644
--- a/chrome/browser/download/notification/download_notification_item_unittest.cc
+++ b/chrome/browser/download/notification/download_notification_item_unittest.cc
@@ -7,6 +7,9 @@
#include "base/run_loop.h"
#include "base/test/test_simple_task_runner.h"
#include "base/thread_task_runner_handle.h"
+#include "chrome/test/base/testing_browser_process.h"
+#include "chrome/test/base/testing_profile.h"
+#include "chrome/test/base/testing_profile_manager.h"
#include "content/public/test/mock_download_item.h"
#include "content/public/test/mock_download_manager.h"
#include "testing/gmock/include/gmock/gmock.h"
@@ -121,8 +124,12 @@ class DownloadNotificationItemTest : public testing::Test {
}
void CreateDownloadNotificationItem() {
- download_notification_item_.reset(
- new DownloadNotificationItem(download_item_.get(), &delegate_));
+ TestingProfileManager profile_manager(TestingBrowserProcess::GetGlobal());
+ ASSERT_TRUE(profile_manager.SetUp());
asanka 2015/03/24 18:36:15 Move the TestingProfileManager construction and Se
yoshiki 2015/03/25 05:30:25 Done. I moved the construction of Profile as well.
+ Profile* profile = profile_manager.CreateTestingProfile("test-user");
asanka 2015/03/24 18:36:15 Can't we at least test whether two notifications c
yoshiki 2015/03/25 05:30:25 That's good idea. But I think the multi-user test
asanka 2015/03/25 21:04:48 It would be great if such a test was part of this
+
+ download_notification_item_.reset(new DownloadNotificationItem(
+ download_item_.get(), profile, &delegate_));
}
scoped_refptr<base::TestSimpleTaskRunner> runner_;

Powered by Google App Engine
This is Rietveld 408576698