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

Unified Diff: chrome/browser/notifications/notification_interactive_uitest.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/notification_interactive_uitest.cc
diff --git a/chrome/browser/notifications/notification_interactive_uitest.cc b/chrome/browser/notifications/notification_interactive_uitest.cc
index 611fdd4410c3cd7090ad33d82a0d2430abec898e..483c74ed923b571bc535e31d5607e9d3e0ee51de 100644
--- a/chrome/browser/notifications/notification_interactive_uitest.cc
+++ b/chrome/browser/notifications/notification_interactive_uitest.cc
@@ -759,40 +759,6 @@ IN_PROC_BROWSER_TEST_F(NotificationsTest, TestNotificationReplacement) {
(*notifications.rbegin())->message());
}
-IN_PROC_BROWSER_TEST_F(NotificationsTest, TestLastUsage) {
- ASSERT_TRUE(embedded_test_server()->Start());
-
- HostContentSettingsMap* settings_map =
- HostContentSettingsMapFactory::GetForProfile(browser()->profile());
- base::SimpleTestClock* clock = new base::SimpleTestClock();
- settings_map->SetPrefClockForTesting(std::unique_ptr<base::Clock>(clock));
- clock->SetNow(base::Time::UnixEpoch() + base::TimeDelta::FromSeconds(10));
-
- // Creates a simple notification.
- AllowAllOrigins();
- ui_test_utils::NavigateToURL(browser(), GetTestPageURL());
-
- std::string result = CreateSimpleNotification(browser(), true);
- EXPECT_NE("-1", result);
-
- EXPECT_EQ(settings_map->GetLastUsage(GetTestPageURL().GetOrigin(),
- GetTestPageURL().GetOrigin(),
- CONTENT_SETTINGS_TYPE_NOTIFICATIONS)
- .ToDoubleT(),
- 10);
-
- clock->Advance(base::TimeDelta::FromSeconds(3));
-
- result = CreateSimpleNotification(browser(), true);
- EXPECT_NE("-1", result);
-
- EXPECT_EQ(settings_map->GetLastUsage(GetTestPageURL().GetOrigin(),
- GetTestPageURL().GetOrigin(),
- CONTENT_SETTINGS_TYPE_NOTIFICATIONS)
- .ToDoubleT(),
- 13);
-}
-
IN_PROC_BROWSER_TEST_F(NotificationsTest,
TestNotificationReplacementReappearance) {
ASSERT_TRUE(embedded_test_server()->Start());

Powered by Google App Engine
This is Rietveld 408576698