| Index: chrome/browser/notifications/platform_notification_service_browsertest.cc
|
| diff --git a/chrome/browser/notifications/platform_notification_service_browsertest.cc b/chrome/browser/notifications/platform_notification_service_browsertest.cc
|
| index b7a173c8498932753b330129570b7df3130d369a..f30b3d002b2dcbbfd30afc6d4d5e39a3512af336 100644
|
| --- a/chrome/browser/notifications/platform_notification_service_browsertest.cc
|
| +++ b/chrome/browser/notifications/platform_notification_service_browsertest.cc
|
| @@ -334,6 +334,23 @@ IN_PROC_BROWSER_TEST_F(PlatformNotificationServiceBrowserTest,
|
| }
|
|
|
| IN_PROC_BROWSER_TEST_F(PlatformNotificationServiceBrowserTest,
|
| + UserClosesPersistentNotification) {
|
| + ASSERT_NO_FATAL_FAILURE(GrantNotificationPermissionForTest());
|
| +
|
| + std::string script_result;
|
| + ASSERT_TRUE(
|
| + RunScript("DisplayPersistentNotification('close_test')", &script_result));
|
| + EXPECT_EQ("ok", script_result);
|
| +
|
| + ASSERT_EQ(1u, ui_manager()->GetNotificationCount());
|
| + const Notification& notification = ui_manager()->GetNotificationAt(0);
|
| + notification.delegate()->Close(true /* by_user */);
|
| +
|
| + ASSERT_TRUE(RunScript("GetMessageFromWorker()", &script_result));
|
| + EXPECT_EQ("closing notification: close_test", script_result);
|
| +}
|
| +
|
| +IN_PROC_BROWSER_TEST_F(PlatformNotificationServiceBrowserTest,
|
| TestDisplayOriginContextMessage) {
|
| RequestAndAcceptPermission();
|
|
|
|
|