| 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 40a8eec1f28bd88a040c72e566404bb9522caf33..67032b058ae4471f4e372f253608eb8a08d6766d 100644
|
| --- a/chrome/browser/notifications/platform_notification_service_unittest.cc
|
| +++ b/chrome/browser/notifications/platform_notification_service_unittest.cc
|
| @@ -17,6 +17,8 @@
|
|
|
| namespace {
|
|
|
| +const int kNotificationVibratePattern[] = { 100, 200, 300 };
|
| +
|
| #if !defined(OS_ANDROID)
|
| const int64_t kPersistentNotificationId = 42;
|
| #endif
|
| @@ -157,9 +159,14 @@ TEST_F(PlatformNotificationServiceTest, PersistentNotificationDisplay) {
|
| #endif // !defined(OS_ANDROID)
|
|
|
| TEST_F(PlatformNotificationServiceTest, DisplayPageNotificationMatches) {
|
| + std::vector<int> vibrate_pattern(
|
| + kNotificationVibratePattern,
|
| + kNotificationVibratePattern + arraysize(kNotificationVibratePattern));
|
| +
|
| content::PlatformNotificationData notification_data;
|
| notification_data.title = base::ASCIIToUTF16("My notification's title");
|
| notification_data.body = base::ASCIIToUTF16("Hello, world!");
|
| + notification_data.vibrate_pattern = vibrate_pattern;
|
| notification_data.silent = true;
|
|
|
| MockDesktopNotificationDelegate* delegate
|
| @@ -179,6 +186,11 @@ TEST_F(PlatformNotificationServiceTest, DisplayPageNotificationMatches) {
|
| base::UTF16ToUTF8(notification.title()));
|
| EXPECT_EQ("Hello, world!",
|
| base::UTF16ToUTF8(notification.message()));
|
| +
|
| + ASSERT_EQ(vibrate_pattern.size(), notification.vibrate_pattern().size());
|
| + for (size_t i = 0; i < vibrate_pattern.size(); ++i)
|
| + EXPECT_EQ(vibrate_pattern[i], notification.vibrate_pattern()[i]);
|
| +
|
| EXPECT_TRUE(notification.silent());
|
| }
|
|
|
|
|