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

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

Issue 1411653004: Remove last usage functions from HostContentSettingsMap Base URL: https://chromium.googlesource.com/chromium/src.git@simplify-host-content-settings
Patch Set: Created 5 years, 1 month 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 1429d6de61fbc7b76b2bc09cbd1f0927a6289dd9..b60c2f35f78e77272f38629005f85f6424720c29 100644
--- a/chrome/browser/notifications/platform_notification_service_unittest.cc
+++ b/chrome/browser/notifications/platform_notification_service_unittest.cc
@@ -250,32 +250,6 @@ TEST_F(PlatformNotificationServiceTest, DisplayPersistentNotificationMatches) {
EXPECT_EQ("Button 2", base::UTF16ToUTF8(buttons[1].title));
}
-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(), 42 /* sw_registration_id */, origin, SkBitmap(),
- content::PlatformNotificationData());
-
- base::Time after_persistent_notification =
- HostContentSettingsMapFactory::GetForProfile(profile())->GetLastUsage(
- origin, origin, CONTENT_SETTINGS_TYPE_NOTIFICATIONS);
- EXPECT_GT(after_persistent_notification, after_page_notification);
-}
-
#if defined(ENABLE_EXTENSIONS)
TEST_F(PlatformNotificationServiceTest, DisplayNameForContextMessage) {

Powered by Google App Engine
This is Rietveld 408576698