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

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

Issue 2861133003: 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
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]);
}

Powered by Google App Engine
This is Rietveld 408576698