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

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

Issue 2817813006: Make progress notifications an alert. (Closed)
Patch Set: 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
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 e7bbd4dd0f3d1f674d691b2f08b5811f1d801b9b..17687057c10d9e8657edceb833ce56dc62736e31 100644
--- a/chrome/browser/notifications/notification_platform_bridge_mac_unittest.mm
+++ b/chrome/browser/notifications/notification_platform_bridge_mac_unittest.mm
@@ -255,11 +255,14 @@ TEST_F(NotificationPlatformBridgeMacTest, TestDisplayProgress) {
alert_dispatcher()));
bridge->Display(NotificationCommon::PERSISTENT, "notification_id",
"profile_id", false, *notification);
- NSArray* notifications = [notification_center() deliveredNotifications];
- EXPECT_EQ(1u, [notifications count]);
+ // Progress notifications are considered alerts
+ EXPECT_EQ(0u, [[notification_center() deliveredNotifications] count]);
+ NSArray* displayedAlerts = [alert_dispatcher() alerts];
+ EXPECT_EQ(1u, [displayedAlerts count]);
Peter Beverloo 2017/04/13 14:14:14 micro nit: ASSERT_EQ
Miguel Garcia 2017/04/13 16:36:19 Done.
- NSUserNotification* delivered_notification = [notifications objectAtIndex:0];
+ NSUserNotification* delivered_notification =
+ [displayedAlerts objectAtIndex:0];
base::string16 expected =
base::FormatPercent(kSamplePercent) + base::UTF8ToUTF16(" - Title");
EXPECT_NSEQ(base::SysUTF16ToNSString(expected),

Powered by Google App Engine
This is Rietveld 408576698