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

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

Issue 2817813006: Make progress notifications an alert. (Closed)
Patch Set: review 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') | no next file » | 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 e7bbd4dd0f3d1f674d691b2f08b5811f1d801b9b..41effda35e38e5e866ce287217703903eb99a22c 100644
--- a/chrome/browser/notifications/notification_platform_bridge_mac_unittest.mm
+++ b/chrome/browser/notifications/notification_platform_bridge_mac_unittest.mm
@@ -255,15 +255,17 @@ 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];
+ ASSERT_EQ(1u, [displayedAlerts count]);
- NSUserNotification* delivered_notification = [notifications objectAtIndex:0];
+ NSDictionary* deliveredNotification = [displayedAlerts objectAtIndex:0];
base::string16 expected =
base::FormatPercent(kSamplePercent) + base::UTF8ToUTF16(" - Title");
EXPECT_NSEQ(base::SysUTF16ToNSString(expected),
- [delivered_notification title]);
+ [deliveredNotification objectForKey:@"title"]);
}
TEST_F(NotificationPlatformBridgeMacTest, TestCloseNotification) {
« no previous file with comments | « chrome/browser/notifications/notification_platform_bridge_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698