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

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

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: rebase 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.h
diff --git a/chrome/browser/notifications/notification_platform_bridge_mac.h b/chrome/browser/notifications/notification_platform_bridge_mac.h
index b48f1896242ed15cd148a6a7da6496afe8c9acb1..31bfb1d548927f05af2d1a2daa4c44a240a01017 100644
--- a/chrome/browser/notifications/notification_platform_bridge_mac.h
+++ b/chrome/browser/notifications/notification_platform_bridge_mac.h
@@ -9,6 +9,7 @@
#include <string>
#include "base/compiler_specific.h"
+#include "base/gtest_prod_util.h"
#include "base/mac/scoped_nsobject.h"
#include "base/macros.h"
#include "chrome/browser/notifications/notification_common.h"
@@ -46,6 +47,16 @@ class NotificationPlatformBridgeMac : public NotificationPlatformBridge {
static bool VerifyNotificationData(NSDictionary* response) WARN_UNUSED_RESULT;
private:
+ FRIEND_TEST_ALL_PREFIXES(NotificationPlatformBridgeMacTest,
+ TestDisplayNoButtons);
+ FRIEND_TEST_ALL_PREFIXES(NotificationPlatformBridgeMacTest,
+ TestDisplayOneButton);
+ FRIEND_TEST_ALL_PREFIXES(NotificationPlatformBridgeMacTest, TestClose);
+
+ // Used directly in tests.
+ NotificationPlatformBridgeMac(NSUserNotificationCenter* notification_center,
+ bool set_delegate);
+
// Cocoa class that receives callbacks from the NSUserNotificationCenter.
base::scoped_nsobject<NotificationCenterDelegate> delegate_;

Powered by Google App Engine
This is Rietveld 408576698