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

Unified Diff: chrome/browser/notifications/notification_platform_bridge_mac.mm

Issue 2138873002: Add tests for the Display operation of the mac notification bridge. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: revert files Created 4 years, 5 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/notification_platform_bridge_mac.mm
diff --git a/chrome/browser/notifications/notification_platform_bridge_mac.mm b/chrome/browser/notifications/notification_platform_bridge_mac.mm
index e96756be9d07f2003944297157bc9d80f3a2cb7c..de66a065d20416e73f08a8443be41cab890888ec 100644
--- a/chrome/browser/notifications/notification_platform_bridge_mac.mm
+++ b/chrome/browser/notifications/notification_platform_bridge_mac.mm
@@ -92,9 +92,18 @@ NotificationPlatformBridge* NotificationPlatformBridge::Create() {
NotificationPlatformBridgeMac::NotificationPlatformBridgeMac(
NSUserNotificationCenter* notification_center)
+ : NotificationPlatformBridgeMac(notification_center,
+ true /* set_delegate */) {}
Nico 2016/07/12 17:54:38 please use /*set_delegate=*/true (the spelling you
Miguel Garcia 2016/07/13 14:05:16 Done.
+
+NotificationPlatformBridgeMac::NotificationPlatformBridgeMac(
+ NSUserNotificationCenter* notification_center,
+ bool set_delegate)
: delegate_([NotificationCenterDelegate alloc]),
notification_center_(notification_center) {
- [notification_center_ setDelegate:delegate_.get()];
+ // OCMock does not support dynamic properties yet.
+ // TODO(miguelg): remove once cbug.com/622753 is resolved.
+ if (set_delegate)
+ [notification_center_ setDelegate:delegate_.get()];
}
NotificationPlatformBridgeMac::~NotificationPlatformBridgeMac() {

Powered by Google App Engine
This is Rietveld 408576698