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

Unified Diff: chrome/browser/notifications/platform_notification_service_interactive_uitest.cc

Issue 2392343002: Plumbing in notification replies: PlatformNotificationService -> SW (Closed)
Patch Set: include base/logging.h for NOTIMPLEMENTED Created 4 years, 2 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/platform_notification_service_interactive_uitest.cc
diff --git a/chrome/browser/notifications/platform_notification_service_interactive_uitest.cc b/chrome/browser/notifications/platform_notification_service_interactive_uitest.cc
index b967394c3d548afa9b0028f6d230a0ad192ed04b..f88f16f6eca074644fc0dbb07eac31c768d0ce49 100644
--- a/chrome/browser/notifications/platform_notification_service_interactive_uitest.cc
+++ b/chrome/browser/notifications/platform_notification_service_interactive_uitest.cc
@@ -557,6 +557,25 @@ IN_PROC_BROWSER_TEST_F(PlatformNotificationServiceBrowserTest,
}
IN_PROC_BROWSER_TEST_F(PlatformNotificationServiceBrowserTest,
+ DisplayPersistentNotificationWithReplyButton) {
+ ASSERT_NO_FATAL_FAILURE(GrantNotificationPermissionForTest());
+
+ std::string script_result;
+ ASSERT_TRUE(RunScript("DisplayPersistentNotificationWithReplyButton()",
+ &script_result));
+ EXPECT_EQ("ok", script_result);
+ ASSERT_EQ(1u, ui_manager()->GetNotificationCount());
+
+ const Notification& notification = ui_manager()->GetNotificationAt(0);
+ ASSERT_EQ(1u, notification.buttons().size());
+ EXPECT_EQ("actionTitle1", base::UTF16ToUTF8(notification.buttons()[0].title));
+
+ notification.delegate()->ButtonClickWithReply(0, base::ASCIIToUTF16("hello"));
+ ASSERT_TRUE(RunScript("GetMessageFromWorker()", &script_result));
+ EXPECT_EQ("action_button_click actionId1 hello", script_result);
+}
+
+IN_PROC_BROWSER_TEST_F(PlatformNotificationServiceBrowserTest,
TestShouldDisplayNormal) {
ASSERT_NO_FATAL_FAILURE(GrantNotificationPermissionForTest());
EnableFullscreenNotifications();

Powered by Google App Engine
This is Rietveld 408576698