| Index: chrome/browser/notifications/notification_browsertest.cc
|
| diff --git a/chrome/browser/notifications/notification_browsertest.cc b/chrome/browser/notifications/notification_browsertest.cc
|
| index f189feac7d352bde2d31999643effd8d72da25b0..d1a2323f877c0b12b0b5bee26565de5307da3d35 100644
|
| --- a/chrome/browser/notifications/notification_browsertest.cc
|
| +++ b/chrome/browser/notifications/notification_browsertest.cc
|
| @@ -839,3 +839,22 @@ IN_PROC_BROWSER_TEST_F(NotificationsTest,
|
|
|
| ASSERT_EQ(1, GetNotificationPopupCount());
|
| }
|
| +
|
| +IN_PROC_BROWSER_TEST_F(NotificationsTest, TestDisplayOriginContextMessage) {
|
| + ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady());
|
| +
|
| + // Creates a simple notification.
|
| + AllowAllOrigins();
|
| + ui_test_utils::NavigateToURL(browser(), GetTestPageURL());
|
| +
|
| + std::string result = CreateSimpleNotification(browser(), true);
|
| +
|
| + ASSERT_EQ(1, GetNotificationCount());
|
| + message_center::NotificationList::Notifications notifications =
|
| + message_center::MessageCenter::Get()->GetVisibleNotifications();
|
| + GURL base_url = embedded_test_server()->base_url();
|
| + std::string expected_display_origin = base::StringPrintf(
|
| + "%s:%s", base_url.host().c_str(), base_url.port().c_str());
|
| + EXPECT_EQ(base::UTF8ToUTF16(expected_display_origin),
|
| + (*notifications.rbegin())->context_message());
|
| +}
|
|
|