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

Unified Diff: chrome/browser/password_manager/password_store_win_unittest.cc

Issue 152683002: Passwords: Remove references to BrowserThread from PasswordStore. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 6 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/password_manager/password_store_win_unittest.cc
diff --git a/chrome/browser/password_manager/password_store_win_unittest.cc b/chrome/browser/password_manager/password_store_win_unittest.cc
index 83179d7ebd298a421984617193bf1b5bcc773164..135ec746f2713d30b3ba59da6ead17c40aaee66e 100644
--- a/chrome/browser/password_manager/password_store_win_unittest.cc
+++ b/chrome/browser/password_manager/password_store_win_unittest.cc
@@ -142,6 +142,15 @@ class PasswordStoreWinTest : public testing::Test {
db_thread_.Stop();
}
+ PasswordStoreWin* CreatePasswordStore() {
+ return new PasswordStoreWin(
+ base::MessageLoopProxy::current(),
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB),
+ login_db_.release(),
+ profile_.get(),
+ wds_.get());
+ }
+
base::MessageLoopForUI message_loop_;
content::TestBrowserThread ui_thread_;
// PasswordStore, WDS schedule work on this thread.
@@ -189,8 +198,7 @@ TEST_F(PasswordStoreWinTest, DISABLED_ConvertIE7Login) {
base::Bind(&WaitableEvent::Signal, base::Unretained(&done)));
done.Wait();
- store_ = new PasswordStoreWin(login_db_.release(), profile_.get(),
- wds_.get());
+ store_ = CreatePasswordStore();
EXPECT_TRUE(store_->Init());
MockPasswordStoreConsumer consumer;
@@ -241,8 +249,7 @@ TEST_F(PasswordStoreWinTest, DISABLED_ConvertIE7Login) {
// Crashy. http://crbug.com/86558
TEST_F(PasswordStoreWinTest, DISABLED_OutstandingWDSQueries) {
- store_ = new PasswordStoreWin(login_db_.release(), profile_.get(),
- wds_.get());
+ store_ = CreatePasswordStore();
EXPECT_TRUE(store_->Init());
PasswordFormData form_data = {
@@ -285,8 +292,7 @@ TEST_F(PasswordStoreWinTest, DISABLED_MultipleWDSQueriesOnDifferentThreads) {
base::Bind(&WaitableEvent::Signal, base::Unretained(&done)));
done.Wait();
- store_ = new PasswordStoreWin(login_db_.release(), profile_.get(),
- wds_.get());
+ store_ = CreatePasswordStore();
EXPECT_TRUE(store_->Init());
MockPasswordStoreConsumer password_consumer;
@@ -348,8 +354,7 @@ TEST_F(PasswordStoreWinTest, DISABLED_MultipleWDSQueriesOnDifferentThreads) {
}
TEST_F(PasswordStoreWinTest, EmptyLogins) {
- store_ = new PasswordStoreWin(login_db_.release(), profile_.get(),
- wds_.get());
+ store_ = CreatePasswordStore();
store_->Init();
PasswordFormData form_data = {
@@ -383,8 +388,7 @@ TEST_F(PasswordStoreWinTest, EmptyLogins) {
}
TEST_F(PasswordStoreWinTest, EmptyBlacklistLogins) {
- store_ = new PasswordStoreWin(login_db_.release(), profile_.get(),
- wds_.get());
+ store_ = CreatePasswordStore();
store_->Init();
MockPasswordStoreConsumer consumer;
@@ -405,8 +409,7 @@ TEST_F(PasswordStoreWinTest, EmptyBlacklistLogins) {
}
TEST_F(PasswordStoreWinTest, EmptyAutofillableLogins) {
- store_ = new PasswordStoreWin(login_db_.release(), profile_.get(),
- wds_.get());
+ store_ = CreatePasswordStore();
store_->Init();
MockPasswordStoreConsumer consumer;
« no previous file with comments | « chrome/browser/password_manager/password_store_win.cc ('k') | chrome/browser/password_manager/password_store_x.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698