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 9c4e58b941eaaf8512b53af43f01eea1cdd75ddf..7c284f8736e973bff0c0f668e4de64ce6a438546 100644 |
--- a/chrome/browser/notifications/platform_notification_service_unittest.cc |
+++ b/chrome/browser/notifications/platform_notification_service_unittest.cc |
@@ -187,6 +187,9 @@ TEST_F(PlatformNotificationServiceTest, DisplayPageNotificationMatches) { |
notification_data.body = base::ASCIIToUTF16("Hello, world!"); |
notification_data.vibration_pattern = vibration_pattern; |
notification_data.silent = true; |
+ notification_data.actions.resize(2); |
+ notification_data.actions[0].title = "Button 1"; |
+ notification_data.actions[1].title = "Button 2"; |
MockDesktopNotificationDelegate* delegate |
= new MockDesktopNotificationDelegate(); |
@@ -210,6 +213,10 @@ TEST_F(PlatformNotificationServiceTest, DisplayPageNotificationMatches) { |
testing::ElementsAreArray(kNotificationVibrationPattern)); |
EXPECT_TRUE(notification.silent()); |
+ |
+ ASSERT_EQ(2, notification.buttons().size()); |
+ EXPECT_EQ("Button 1", base::UTF16ToUTF8(notification.buttons()[0].title)); |
Peter Beverloo
2015/07/30 17:02:05
Could we cache a reference to notification.buttons
johnme
2015/07/31 18:21:31
Done (const auto& buttons)
|
+ EXPECT_EQ("Button 2", base::UTF16ToUTF8(notification.buttons()[1].title)); |
} |
TEST_F(PlatformNotificationServiceTest, DisplayNameForOrigin) { |