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

Unified Diff: chrome/browser/notifications/notification_browsertest.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/notification_browsertest.cc
diff --git a/chrome/browser/notifications/notification_browsertest.cc b/chrome/browser/notifications/notification_browsertest.cc
index a0eabf48ceb6f2e07860de3e5592f2d9ad0e96a2..952b730a6c843a05d8aa63658f39c180394ef39f 100644
--- a/chrome/browser/notifications/notification_browsertest.cc
+++ b/chrome/browser/notifications/notification_browsertest.cc
@@ -745,40 +745,6 @@ IN_PROC_BROWSER_TEST_F(NotificationsTest, TestNotificationReplacement) {
(*notifications.rbegin())->message());
}
-IN_PROC_BROWSER_TEST_F(NotificationsTest, TestLastUsage) {
- ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady());
-
- HostContentSettingsMap* settings_map =
- HostContentSettingsMapFactory::GetForProfile(browser()->profile());
- base::SimpleTestClock* clock = new base::SimpleTestClock();
- settings_map->SetPrefClockForTesting(scoped_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()->InitializeAndWaitUntilReady());

Powered by Google App Engine
This is Rietveld 408576698