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

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

Issue 1342093003: Decouple the browsing data counters initialization and start. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added Restart() to tests as well. Created 5 years, 3 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/passwords_counter_browsertest.cc
diff --git a/chrome/browser/browsing_data/passwords_counter_browsertest.cc b/chrome/browser/browsing_data/passwords_counter_browsertest.cc
index bcf1c7755523e8c255afd151e312f4a1481c54fd..99f1546032880a095da0392381fd3234f26793f7 100644
--- a/chrome/browser/browsing_data/passwords_counter_browsertest.cc
+++ b/chrome/browser/browsing_data/passwords_counter_browsertest.cc
@@ -130,6 +130,7 @@ IN_PROC_BROWSER_TEST_F(PasswordsCounterTest, SameDomain) {
counter.Init(browser()->profile(),
base::Bind(&PasswordsCounterTest::Callback,
base::Unretained(this)));
+ counter.Restart();
WaitForCounting();
EXPECT_EQ(5u, GetResult());
@@ -145,6 +146,7 @@ IN_PROC_BROWSER_TEST_F(PasswordsCounterTest, Blacklisted) {
counter.Init(browser()->profile(),
base::Bind(&PasswordsCounterTest::Callback,
base::Unretained(this)));
+ counter.Restart();
WaitForCounting();
EXPECT_EQ(1u, GetResult());
@@ -177,6 +179,7 @@ IN_PROC_BROWSER_TEST_F(PasswordsCounterTest, PrefIsFalse) {
counter.Init(browser()->profile(),
base::Bind(&PasswordsCounterTest::Callback,
base::Unretained(this)));
+ counter.Restart();
EXPECT_FALSE(counter.cancelable_task_tracker()->HasTrackedTasks());
}
@@ -190,6 +193,7 @@ IN_PROC_BROWSER_TEST_F(PasswordsCounterTest, StoreChanged) {
counter.Init(browser()->profile(),
base::Bind(&PasswordsCounterTest::Callback,
base::Unretained(this)));
+ counter.Restart();
WaitForCounting();
EXPECT_EQ(1u, GetResult());
« no previous file with comments | « chrome/browser/browsing_data/passwords_counter.cc ('k') | chrome/browser/ui/webui/options/clear_browser_data_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698