| 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 2bd06aae249565bb910708c4b3bfe572f88d79a6..40a8eec1f28bd88a040c72e566404bb9522caf33 100644
|
| --- a/chrome/browser/notifications/platform_notification_service_unittest.cc
|
| +++ b/chrome/browser/notifications/platform_notification_service_unittest.cc
|
| @@ -17,6 +17,10 @@
|
|
|
| namespace {
|
|
|
| +#if !defined(OS_ANDROID)
|
| +const int64_t kPersistentNotificationId = 42;
|
| +#endif
|
| +
|
| class MockDesktopNotificationDelegate
|
| : public content::DesktopNotificationDelegate {
|
| public:
|
| @@ -126,13 +130,16 @@ TEST_F(PlatformNotificationServiceTest, DisplayPageCloseClosure) {
|
| // delegate given that it'd result in a use-after-free.
|
| }
|
|
|
| +// TODO(peter): Re-enable this test when //content is responsible for creating
|
| +// the notification delegate ids.
|
| +#if !defined(OS_ANDROID)
|
| TEST_F(PlatformNotificationServiceTest, PersistentNotificationDisplay) {
|
| content::PlatformNotificationData notification_data;
|
| notification_data.title = base::ASCIIToUTF16("My notification's title");
|
| notification_data.body = base::ASCIIToUTF16("Hello, world!");
|
|
|
| service()->DisplayPersistentNotification(
|
| - profile(), 42 /* sw_registration_id */, GURL("https://chrome.com/"),
|
| + profile(), kPersistentNotificationId, GURL("https://chrome.com/"),
|
| SkBitmap(), notification_data);
|
|
|
| ASSERT_EQ(1u, ui_manager()->GetNotificationCount());
|
| @@ -144,10 +151,10 @@ TEST_F(PlatformNotificationServiceTest, PersistentNotificationDisplay) {
|
| EXPECT_EQ("Hello, world!",
|
| base::UTF16ToUTF8(notification.message()));
|
|
|
| - service()->ClosePersistentNotification(profile(),
|
| - notification.delegate_id());
|
| + service()->ClosePersistentNotification(profile(), kPersistentNotificationId);
|
| EXPECT_EQ(0u, ui_manager()->GetNotificationCount());
|
| }
|
| +#endif // !defined(OS_ANDROID)
|
|
|
| TEST_F(PlatformNotificationServiceTest, DisplayPageNotificationMatches) {
|
| content::PlatformNotificationData notification_data;
|
|
|