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

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

Issue 2774453002: Remove enbale_xpc_notifications compile flag (Closed)
Patch Set: rebase Created 3 years, 8 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
« no previous file with comments | « chrome/browser/notifications/notification_platform_bridge_mac.mm ('k') | chrome/common/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/notifications/notification_platform_bridge_mac_unittest.mm
diff --git a/chrome/browser/notifications/notification_platform_bridge_mac_unittest.mm b/chrome/browser/notifications/notification_platform_bridge_mac_unittest.mm
index dda2975c7334ef71bee1e33737d64a0e2218fdc8..e633c45779759b1bdb5763b31014c44e7c0b5fb3 100644
--- a/chrome/browser/notifications/notification_platform_bridge_mac_unittest.mm
+++ b/chrome/browser/notifications/notification_platform_bridge_mac_unittest.mm
@@ -204,7 +204,8 @@ TEST_F(NotificationPlatformBridgeMacTest, TestDisplayNoButtons) {
CreateBanner("Title", "Context", "https://gmail.com", nullptr, nullptr);
std::unique_ptr<NotificationPlatformBridgeMac> bridge(
- new NotificationPlatformBridgeMac(notification_center(), nil));
+ new NotificationPlatformBridgeMac(notification_center(),
+ alert_dispatcher()));
bridge->Display(NotificationCommon::PERSISTENT, "notification_id",
"profile_id", false, *notification);
NSArray* notifications = [notification_center() deliveredNotifications];
@@ -224,7 +225,8 @@ TEST_F(NotificationPlatformBridgeMacTest, TestDisplayOneButton) {
"Title", "Context", "https://gmail.com", "Button 1", nullptr);
std::unique_ptr<NotificationPlatformBridgeMac> bridge(
- new NotificationPlatformBridgeMac(notification_center(), nil));
+ new NotificationPlatformBridgeMac(notification_center(),
+ alert_dispatcher()));
bridge->Display(NotificationCommon::PERSISTENT, "notification_id",
"profile_id", false, *notification);
@@ -243,7 +245,8 @@ TEST_F(NotificationPlatformBridgeMacTest, TestCloseNotification) {
"Title", "Context", "https://gmail.com", "Button 1", nullptr);
std::unique_ptr<NotificationPlatformBridgeMac> bridge(
- new NotificationPlatformBridgeMac(notification_center(), nil));
+ new NotificationPlatformBridgeMac(notification_center(),
+ alert_dispatcher()));
EXPECT_EQ(0u, [[notification_center() deliveredNotifications] count]);
bridge->Display(NotificationCommon::PERSISTENT, "notification_id",
"profile_id", false, *notification);
@@ -258,7 +261,8 @@ TEST_F(NotificationPlatformBridgeMacTest, TestCloseNonExistingNotification) {
"Title", "Context", "https://gmail.com", "Button 1", nullptr);
std::unique_ptr<NotificationPlatformBridgeMac> bridge(
- new NotificationPlatformBridgeMac(notification_center(), nil));
+ new NotificationPlatformBridgeMac(notification_center(),
+ alert_dispatcher()));
EXPECT_EQ(0u, [[notification_center() deliveredNotifications] count]);
bridge->Display(NotificationCommon::PERSISTENT, "notification_id",
"profile_id", false, *notification);
@@ -310,7 +314,8 @@ TEST_F(NotificationPlatformBridgeMacTest, TestQuitRemovesNotifications) {
"Title", "Context", "https://gmail.com", "Button 1", nullptr);
{
std::unique_ptr<NotificationPlatformBridgeMac> bridge(
- new NotificationPlatformBridgeMac(notification_center(), nil));
+ new NotificationPlatformBridgeMac(notification_center(),
+ alert_dispatcher()));
EXPECT_EQ(0u, [[notification_center() deliveredNotifications] count]);
bridge->Display(NotificationCommon::PERSISTENT, "notification_id",
"profile_id", false, *notification);
@@ -321,9 +326,6 @@ TEST_F(NotificationPlatformBridgeMacTest, TestQuitRemovesNotifications) {
EXPECT_EQ(0u, [[notification_center() deliveredNotifications] count]);
}
-// TODO(miguelg) There is some duplication between these tests and the ones
-// Above. Once the flag is removed most tests can be merged.
-#if BUILDFLAG(ENABLE_XPC_NOTIFICATIONS)
TEST_F(NotificationPlatformBridgeMacTest, TestDisplayAlert) {
std::unique_ptr<Notification> alert =
CreateAlert("Title", "Context", "https://gmail.com", "Button 1", nullptr);
@@ -390,5 +392,3 @@ TEST_F(NotificationPlatformBridgeMacTest, TestQuitRemovesBannersAndAlerts) {
EXPECT_EQ(0u, [[notification_center() deliveredNotifications] count]);
EXPECT_EQ(0u, [[alert_dispatcher() alerts] count]);
}
-
-#endif
« no previous file with comments | « chrome/browser/notifications/notification_platform_bridge_mac.mm ('k') | chrome/common/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698