Chromium Code Reviews| 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), |