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

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: rebase and fix compilation 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 ec0da22d633ae8f7db723cdbd5f860075b868396..fb1e2a1ba54ba75265523533225c56768d1e3221 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 {
@@ -248,6 +248,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();
@@ -277,6 +278,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)));
@@ -312,6 +314,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)));
@@ -361,22 +364,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());
}
« no previous file with comments | « chrome/browser/browsing_data/cache_counter_browsertest.cc ('k') | chrome/browser/browsing_data/history_counter_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698