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

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

Issue 2392343002: Plumbing in notification replies: PlatformNotificationService -> SW (Closed)
Patch Set: Remove todo as it doesn't seem necessary after all 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 cf40376927440b3ad6b1249c18fee4a4f2b3905c..4f71f478b0504831c5161c3a9d88217fcdf96f67 100644
--- a/chrome/browser/notifications/platform_notification_service_interactive_uitest.cc
+++ b/chrome/browser/notifications/platform_notification_service_interactive_uitest.cc
@@ -538,6 +538,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());

Powered by Google App Engine
This is Rietveld 408576698