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 81eb7cdf88861aaf48bab34246d6b8b962f8238d..825e711dd855f123d76e23e65c8f602f94e2fb95 100644 |
| --- a/chrome/browser/notifications/notification_platform_bridge_mac_unittest.mm |
| +++ b/chrome/browser/notifications/notification_platform_bridge_mac_unittest.mm |
| @@ -434,37 +434,42 @@ TEST_F(NotificationPlatformBridgeMacTest, TestDisplayETLDPlusOne) { |
| notification = CreateBanner("Title", "Context", "https://mail.appspot.com", |
| "Button 1", nullptr); |
| - |
| bridge->Display(NotificationCommon::PERSISTENT, "notification_id2", |
| "profile_id", false, *notification); |
| + |
| notification = CreateBanner("Title", "Context", "https://tests.peter.sh", |
| "Button 1", nullptr); |
| - |
| bridge->Display(NotificationCommon::PERSISTENT, "notification_id3", |
| "profile_id", false, *notification); |
| - notification = CreateBanner("Title", "Context", "http://localhost:8080", |
| + notification = CreateBanner("Title", "Context", |
| + "https://superduperlongdomaintests.peter.sh", |
|
Peter Beverloo
2017/05/05 14:55:51
https://somereallylongsubdomainthatactuallyisanali
Miguel Garcia
2017/05/08 10:20:11
Done.
|
| "Button 1", nullptr); |
| - |
| bridge->Display(NotificationCommon::PERSISTENT, "notification_id4", |
| "profile_id", false, *notification); |
| - notification = CreateBanner("Title", "Context", "https://93.186.186.172", |
| + notification = CreateBanner("Title", "Context", "http://localhost:8080", |
| "Button 1", nullptr); |
| - |
| bridge->Display(NotificationCommon::PERSISTENT, "notification_id5", |
| "profile_id", false, *notification); |
| + notification = CreateBanner("Title", "Context", "https://93.186.186.172", |
| + "Button 1", nullptr); |
| + bridge->Display(NotificationCommon::PERSISTENT, "notification_id6", |
| + "profile_id", false, *notification); |
| + |
| NSArray* notifications = [notification_center() deliveredNotifications]; |
| - EXPECT_EQ(5u, [notifications count]); |
| + EXPECT_EQ(6u, [notifications count]); |
| NSUserNotification* delivered_notification = [notifications objectAtIndex:0]; |
| EXPECT_NSEQ(@"test.co.uk", [delivered_notification subtitle]); |
| delivered_notification = [notifications objectAtIndex:1]; |
| EXPECT_NSEQ(@"mail.appspot.com", [delivered_notification subtitle]); |
| delivered_notification = [notifications objectAtIndex:2]; |
| - EXPECT_NSEQ(@"peter.sh", [delivered_notification subtitle]); |
| + EXPECT_NSEQ(@"tests.peter.sh", [delivered_notification subtitle]); |
| delivered_notification = [notifications objectAtIndex:3]; |
| - EXPECT_NSEQ(@"localhost:8080", [delivered_notification subtitle]); |
| + EXPECT_NSEQ(@"peter.sh", [delivered_notification subtitle]); |
| delivered_notification = [notifications objectAtIndex:4]; |
| + EXPECT_NSEQ(@"localhost:8080", [delivered_notification subtitle]); |
| + delivered_notification = [notifications objectAtIndex:5]; |
| EXPECT_NSEQ(@"93.186.186.172", [delivered_notification subtitle]); |
| } |