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

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

Issue 2697473002: Remove last usage functions from HostContentSettingsMap and clean up prefs (Closed)
Patch Set: fix up unit test Created 3 years, 10 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 8ca62641ad7d84271c4596ecd3745cda9258a478..f26cae46a79145e3165d0a2cefcc3cb3afb25ba0 100644
--- a/chrome/browser/notifications/platform_notification_service_unittest.cc
+++ b/chrome/browser/notifications/platform_notification_service_unittest.cc
@@ -291,32 +291,6 @@ TEST_F(PlatformNotificationServiceTest, DisplayPersistentNotificationMatches) {
EXPECT_EQ(message_center::ButtonType::TEXT, buttons[1].type);
}
-TEST_F(PlatformNotificationServiceTest, NotificationPermissionLastUsage) {
- // Both page and persistent notifications should update the last usage
- // time of the notification permission for the origin.
- GURL origin("https://chrome.com/");
- base::Time begin_time;
-
- CreateSimplePageNotification();
-
- base::Time after_page_notification =
- HostContentSettingsMapFactory::GetForProfile(profile())->GetLastUsage(
- origin, origin, CONTENT_SETTINGS_TYPE_NOTIFICATIONS);
- EXPECT_GT(after_page_notification, begin_time);
-
- // Ensure that there is at least some time between the two calls.
- base::PlatformThread::Sleep(base::TimeDelta::FromMilliseconds(1));
-
- service()->DisplayPersistentNotification(
- profile(), kNotificationId, GURL() /* service_worker_scope */, origin,
- PlatformNotificationData(), NotificationResources());
-
- base::Time after_persistent_notification =
- HostContentSettingsMapFactory::GetForProfile(profile())->GetLastUsage(
- origin, origin, CONTENT_SETTINGS_TYPE_NOTIFICATIONS);
- EXPECT_GT(after_persistent_notification, after_page_notification);
-}
-
#if BUILDFLAG(ENABLE_EXTENSIONS)
TEST_F(PlatformNotificationServiceTest, DisplayNameForContextMessage) {

Powered by Google App Engine
This is Rietveld 408576698