| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <windows.h> | 5 #include <windows.h> |
| 6 #include <wincrypt.h> | 6 #include <wincrypt.h> |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 base::MessageLoop::QuitClosure()); | 143 base::MessageLoop::QuitClosure()); |
| 144 base::MessageLoop::current()->Run(); | 144 base::MessageLoop::current()->Run(); |
| 145 db_thread_.Stop(); | 145 db_thread_.Stop(); |
| 146 } | 146 } |
| 147 | 147 |
| 148 base::MessageLoopForUI message_loop_; | 148 base::MessageLoopForUI message_loop_; |
| 149 content::TestBrowserThread ui_thread_; | 149 content::TestBrowserThread ui_thread_; |
| 150 // PasswordStore, WDS schedule work on this thread. | 150 // PasswordStore, WDS schedule work on this thread. |
| 151 content::TestBrowserThread db_thread_; | 151 content::TestBrowserThread db_thread_; |
| 152 | 152 |
| 153 base::ScopedTempDir temp_dir_; |
| 154 scoped_ptr<TestingProfile> profile_; |
| 153 scoped_ptr<LoginDatabase> login_db_; | 155 scoped_ptr<LoginDatabase> login_db_; |
| 154 scoped_ptr<TestingProfile> profile_; | |
| 155 scoped_refptr<WebDataService> wds_; | 156 scoped_refptr<WebDataService> wds_; |
| 156 scoped_refptr<WebDatabaseService> wdbs_; | 157 scoped_refptr<WebDatabaseService> wdbs_; |
| 157 scoped_refptr<PasswordStore> store_; | 158 scoped_refptr<PasswordStore> store_; |
| 158 base::ScopedTempDir temp_dir_; | |
| 159 }; | 159 }; |
| 160 | 160 |
| 161 ACTION(STLDeleteElements0) { | 161 ACTION(STLDeleteElements0) { |
| 162 STLDeleteContainerPointers(arg0.begin(), arg0.end()); | 162 STLDeleteContainerPointers(arg0.begin(), arg0.end()); |
| 163 } | 163 } |
| 164 | 164 |
| 165 ACTION(QuitUIMessageLoop) { | 165 ACTION(QuitUIMessageLoop) { |
| 166 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 166 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 167 base::MessageLoop::current()->Quit(); | 167 base::MessageLoop::current()->Quit(); |
| 168 } | 168 } |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 421 VectorOfForms expect_none; | 421 VectorOfForms expect_none; |
| 422 // expect that we get no results; | 422 // expect that we get no results; |
| 423 EXPECT_CALL( | 423 EXPECT_CALL( |
| 424 consumer, | 424 consumer, |
| 425 OnPasswordStoreRequestDone(_, ContainsAllPasswordForms(expect_none))) | 425 OnPasswordStoreRequestDone(_, ContainsAllPasswordForms(expect_none))) |
| 426 .WillOnce(DoAll(WithArg<1>(STLDeleteElements0()), QuitUIMessageLoop())); | 426 .WillOnce(DoAll(WithArg<1>(STLDeleteElements0()), QuitUIMessageLoop())); |
| 427 | 427 |
| 428 store_->GetAutofillableLogins(&consumer); | 428 store_->GetAutofillableLogins(&consumer); |
| 429 base::MessageLoop::current()->Run(); | 429 base::MessageLoop::current()->Run(); |
| 430 } | 430 } |
| OLD | NEW |