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

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

Issue 1026853002: Integrate the notification database with the normal code path. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@n-db-ConfirmShow
Patch Set: delete a now invalid test Created 5 years, 8 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_unittest.cc
diff --git a/chrome/browser/notifications/platform_notification_service_unittest.cc b/chrome/browser/notifications/platform_notification_service_unittest.cc
index 2bd06aae249565bb910708c4b3bfe572f88d79a6..0650fda6ec7b36a235fd1431e3854de30d416282 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 int64_t kPersistentNotificationId = 42;
+
class MockDesktopNotificationDelegate
: public content::DesktopNotificationDelegate {
public:
@@ -132,7 +134,7 @@ TEST_F(PlatformNotificationServiceTest, PersistentNotificationDisplay) {
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,8 +146,7 @@ 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());
}

Powered by Google App Engine
This is Rietveld 408576698