| 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 "chrome/browser/password_manager/password_store_win.h" | 5 #include "chrome/browser/password_manager/password_store_win.h" |
| 6 | 6 |
| 7 #include <windows.h> | 7 #include <windows.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 content::TestBrowserThread db_thread_; | 181 content::TestBrowserThread db_thread_; |
| 182 | 182 |
| 183 base::ScopedTempDir temp_dir_; | 183 base::ScopedTempDir temp_dir_; |
| 184 std::unique_ptr<TestingProfile> profile_; | 184 std::unique_ptr<TestingProfile> profile_; |
| 185 scoped_refptr<PasswordWebDataService> wds_; | 185 scoped_refptr<PasswordWebDataService> wds_; |
| 186 scoped_refptr<WebDatabaseService> wdbs_; | 186 scoped_refptr<WebDatabaseService> wdbs_; |
| 187 scoped_refptr<PasswordStore> store_; | 187 scoped_refptr<PasswordStore> store_; |
| 188 }; | 188 }; |
| 189 | 189 |
| 190 ACTION(STLDeleteElements0) { | 190 ACTION(STLDeleteElements0) { |
| 191 STLDeleteContainerPointers(arg0.begin(), arg0.end()); | 191 base::STLDeleteContainerPointers(arg0.begin(), arg0.end()); |
| 192 } | 192 } |
| 193 | 193 |
| 194 ACTION(QuitUIMessageLoop) { | 194 ACTION(QuitUIMessageLoop) { |
| 195 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 195 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 196 base::MessageLoop::current()->QuitWhenIdle(); | 196 base::MessageLoop::current()->QuitWhenIdle(); |
| 197 } | 197 } |
| 198 | 198 |
| 199 MATCHER(EmptyWDResult, "") { | 199 MATCHER(EmptyWDResult, "") { |
| 200 return static_cast<const WDResult<std::vector<PasswordForm*>>*>(arg) | 200 return static_cast<const WDResult<std::vector<PasswordForm*>>*>(arg) |
| 201 ->GetValue() | 201 ->GetValue() |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 446 | 446 |
| 447 // Make sure we quit the MessageLoop even if the test fails. | 447 // Make sure we quit the MessageLoop even if the test fails. |
| 448 ON_CALL(consumer, OnGetPasswordStoreResultsConstRef(_)) | 448 ON_CALL(consumer, OnGetPasswordStoreResultsConstRef(_)) |
| 449 .WillByDefault(QuitUIMessageLoop()); | 449 .WillByDefault(QuitUIMessageLoop()); |
| 450 | 450 |
| 451 EXPECT_CALL(consumer, OnGetPasswordStoreResultsConstRef(IsEmpty())); | 451 EXPECT_CALL(consumer, OnGetPasswordStoreResultsConstRef(IsEmpty())); |
| 452 | 452 |
| 453 store_->GetAutofillableLogins(&consumer); | 453 store_->GetAutofillableLogins(&consumer); |
| 454 base::MessageLoop::current()->Run(); | 454 base::MessageLoop::current()->Run(); |
| 455 } | 455 } |
| OLD | NEW |