| Index: chrome/browser/notifications/platform_notification_service_unittest.cc
|
| diff --git a/chrome/browser/notifications/platform_notification_service_unittest.cc b/chrome/browser/notifications/platform_notification_service_unittest.cc
|
| index 282ed6754ba702155c0b1417335fe80722be14c0..6faa923532d19326bc7990d4b75b67759c3f404d 100644
|
| --- a/chrome/browser/notifications/platform_notification_service_unittest.cc
|
| +++ b/chrome/browser/notifications/platform_notification_service_unittest.cc
|
| @@ -7,6 +7,7 @@
|
| #include <utility>
|
|
|
| #include "base/macros.h"
|
| +#include "base/strings/nullable_string16.h"
|
| #include "base/strings/utf_string_conversions.h"
|
| #include "base/threading/platform_thread.h"
|
| #include "base/time/time.h"
|
| @@ -228,8 +229,15 @@ TEST_F(PlatformNotificationServiceTest, DisplayPersistentNotificationMatches) {
|
| notification_data.vibration_pattern = vibration_pattern;
|
| notification_data.silent = true;
|
| notification_data.actions.resize(2);
|
| + notification_data.actions[0].type =
|
| + content::PLATFORM_NOTIFICATION_ACTION_TYPE_BUTTON;
|
| notification_data.actions[0].title = base::ASCIIToUTF16("Button 1");
|
| - notification_data.actions[1].title = base::ASCIIToUTF16("Button 2");
|
| + notification_data.actions[0].placeholder = base::NullableString16();
|
| + notification_data.actions[1].type =
|
| + content::PLATFORM_NOTIFICATION_ACTION_TYPE_TEXT;
|
| + notification_data.actions[1].title = base::ASCIIToUTF16("Howdy?");
|
| + notification_data.actions[1].placeholder = base::NullableString16(
|
| + base::ASCIIToUTF16("I'm FLOWEY the FLOWER."), false);
|
|
|
| NotificationResources notification_resources;
|
| notification_resources.action_icons.resize(notification_data.actions.size());
|
| @@ -252,8 +260,15 @@ TEST_F(PlatformNotificationServiceTest, DisplayPersistentNotificationMatches) {
|
|
|
| const auto& buttons = notification.buttons();
|
| ASSERT_EQ(2u, buttons.size());
|
| + EXPECT_EQ(message_center::BUTTON_INFO_TYPE_BUTTON, buttons[0].type);
|
| EXPECT_EQ("Button 1", base::UTF16ToUTF8(buttons[0].title));
|
| - EXPECT_EQ("Button 2", base::UTF16ToUTF8(buttons[1].title));
|
| + EXPECT_EQ(notification_data.actions[0].placeholder, base::NullableString16());
|
| +
|
| + EXPECT_EQ(message_center::BUTTON_INFO_TYPE_TEXT, buttons[1].type);
|
| + EXPECT_EQ("Howdy?", base::UTF16ToUTF8(buttons[1].title));
|
| + EXPECT_EQ(notification_data.actions[1].placeholder,
|
| + base::NullableString16(base::ASCIIToUTF16("I'm FLOWEY the FLOWER."),
|
| + false));
|
| }
|
|
|
| TEST_F(PlatformNotificationServiceTest, NotificationPermissionLastUsage) {
|
|
|