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

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

Issue 2882663002: Only resort to etl+1 when the full domain does not fit. (Closed)
Patch Set: Created 3 years, 7 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 81eb7cdf88861aaf48bab34246d6b8b962f8238d..06c4419e49b560a0fcf8770a40c811a55dcb99ae 100644
--- a/chrome/browser/notifications/notification_platform_bridge_mac_unittest.mm
+++ b/chrome/browser/notifications/notification_platform_bridge_mac_unittest.mm
@@ -434,37 +434,43 @@ 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",
+ "https://somereallylongsubdomainthatactuallyisanaliasfortests.peter.sh/",
+ "Button 1", nullptr);
+ bridge->Display(NotificationCommon::PERSISTENT, "notification_id4",
+ "profile_id", false, *notification);
+
notification = CreateBanner("Title", "Context", "http://localhost:8080",
"Button 1", nullptr);
-
- bridge->Display(NotificationCommon::PERSISTENT, "notification_id4",
+ 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_id5",
+ 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]);
}
« 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