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

Unified Diff: chrome/browser/browsing_data/downloads_counter_browsertest.cc

Issue 2671743002: Separate state of basic and advanced tab in CBD dialog (Closed)
Patch Set: remove mock code 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/browsing_data/downloads_counter_browsertest.cc
diff --git a/chrome/browser/browsing_data/downloads_counter_browsertest.cc b/chrome/browser/browsing_data/downloads_counter_browsertest.cc
index 7bcab2b73d161e1a856a6f8f8805ae741c4a956c..a2658557cccdcb950dee9009153e9f6169a77df4 100644
--- a/chrome/browser/browsing_data/downloads_counter_browsertest.cc
+++ b/chrome/browser/browsing_data/downloads_counter_browsertest.cc
@@ -46,7 +46,7 @@ class DownloadsCounterTest : public InProcessBrowserTest,
content::BrowserContext::GetDownloadManager(
browser()->profile()->GetOffTheRecordProfile());
SetDownloadsDeletionPref(true);
- SetDeletionPeriodPref(browsing_data::ALL_TIME);
+ SetDeletionPeriodPref(browsing_data::TimePeriod::ALL_TIME);
}
void TearDownOnMainThread() override {
@@ -264,6 +264,7 @@ IN_PROC_BROWSER_TEST_F(DownloadsCounterTest, Count) {
Profile* profile = browser()->profile();
DownloadsCounter counter(profile);
counter.Init(profile->GetPrefs(),
+ browsing_data::ClearBrowsingDataTab::ADVANCED,
base::Bind(&DownloadsCounterTest::ResultCallback,
base::Unretained(this)));
counter.Restart();
@@ -293,6 +294,7 @@ IN_PROC_BROWSER_TEST_F(DownloadsCounterTest, Types) {
Profile* profile = browser()->profile();
DownloadsCounter counter(profile);
counter.Init(profile->GetPrefs(),
+ browsing_data::ClearBrowsingDataTab::ADVANCED,
base::Bind(&DownloadsCounterTest::ResultCallback,
base::Unretained(this)));
@@ -328,6 +330,7 @@ IN_PROC_BROWSER_TEST_F(DownloadsCounterTest, NotPersisted) {
Profile* profile = browser()->profile();
DownloadsCounter counter(profile);
counter.Init(profile->GetPrefs(),
+ browsing_data::ClearBrowsingDataTab::ADVANCED,
base::Bind(&DownloadsCounterTest::ResultCallback,
base::Unretained(this)));
@@ -377,22 +380,23 @@ IN_PROC_BROWSER_TEST_F(DownloadsCounterTest, TimeRanges) {
Profile* profile = browser()->profile();
DownloadsCounter counter(profile);
counter.Init(profile->GetPrefs(),
+ browsing_data::ClearBrowsingDataTab::ADVANCED,
base::Bind(&DownloadsCounterTest::ResultCallback,
base::Unretained(this)));
- SetDeletionPeriodPref(browsing_data::LAST_HOUR);
+ SetDeletionPeriodPref(browsing_data::TimePeriod::LAST_HOUR);
EXPECT_EQ(2u, GetResult());
- SetDeletionPeriodPref(browsing_data::LAST_DAY);
+ SetDeletionPeriodPref(browsing_data::TimePeriod::LAST_DAY);
EXPECT_EQ(5u, GetResult());
- SetDeletionPeriodPref(browsing_data::LAST_WEEK);
+ SetDeletionPeriodPref(browsing_data::TimePeriod::LAST_WEEK);
EXPECT_EQ(7u, GetResult());
- SetDeletionPeriodPref(browsing_data::FOUR_WEEKS);
+ SetDeletionPeriodPref(browsing_data::TimePeriod::FOUR_WEEKS);
EXPECT_EQ(8u, GetResult());
- SetDeletionPeriodPref(browsing_data::ALL_TIME);
+ SetDeletionPeriodPref(browsing_data::TimePeriod::ALL_TIME);
EXPECT_EQ(11u, GetResult());
}

Powered by Google App Engine
This is Rietveld 408576698