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

Unified Diff: chrome/browser/notifications/message_center_notifications_unittest_win.cc

Issue 20066003: Update notification settings to allow for multiprofile situations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: And remove unneeded include. Created 7 years, 4 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/notifications/message_center_notifications_unittest_win.cc
diff --git a/chrome/browser/notifications/message_center_notifications_unittest_win.cc b/chrome/browser/notifications/message_center_notifications_unittest_win.cc
index 130fd9f3a34115d31552c8d9bd647f1b9f578a90..cd2d6f7afe6ed91c0dd140e8681184fdd653831a 100644
--- a/chrome/browser/notifications/message_center_notifications_unittest_win.cc
+++ b/chrome/browser/notifications/message_center_notifications_unittest_win.cc
@@ -17,9 +17,11 @@
#include "chrome/test/base/testing_profile.h"
#include "content/public/test/test_browser_thread_bundle.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "ui/message_center/fake_notifier_settings_provider.h"
#include "ui/message_center/message_center_impl.h"
#include "ui/message_center/message_center_tray.h"
#include "ui/message_center/message_center_tray_delegate.h"
+#include "ui/message_center/notifier_settings.h"
namespace message_center {
class FakeMessageCenterTrayDelegate : public MessageCenterTrayDelegate {
@@ -69,8 +71,10 @@ class MessageCenterNotificationManagerTest : public testing::Test {
// Initialize message center infrastructure with mock tray delegate.
MessageCenter::Initialize();
message_center_ = MessageCenter::Get();
- notification_manager_.reset(
- new MessageCenterNotificationManager(message_center_, &local_state_));
+ scoped_ptr<NotifierSettingsProvider> settings_provider(
+ new FakeNotifierSettingsProvider(notifiers_));
+ notification_manager_.reset(new MessageCenterNotificationManager(
+ message_center_, &local_state_, settings_provider.Pass()));
delegate_ = new FakeMessageCenterTrayDelegate(message_center_,
run_loop_->QuitClosure());
notification_manager_->SetMessageCenterTrayDelegateForTest(delegate_);
@@ -108,6 +112,7 @@ class MessageCenterNotificationManagerTest : public testing::Test {
scoped_ptr<base::RunLoop> run_loop_;
TestingPrefServiceSimple local_state_;
MessageCenter* message_center_;
+ std::vector<Notifier*> notifiers_;
scoped_ptr<MessageCenterNotificationManager> notification_manager_;
FakeMessageCenterTrayDelegate* delegate_;
content::TestBrowserThreadBundle thread_bundle_;

Powered by Google App Engine
This is Rietveld 408576698