| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <memory> | 5 #include <memory> |
| 6 #include <utility> | 6 #include <utility> |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 EXPECT_EQ(state, controller()->GetState()); | 229 EXPECT_EQ(state, controller()->GetState()); |
| 230 } | 230 } |
| 231 | 231 |
| 232 std::unique_ptr<password_manager::PasswordFormManager> | 232 std::unique_ptr<password_manager::PasswordFormManager> |
| 233 ManagePasswordsUIControllerTest::CreateFormManagerWithBestMatches( | 233 ManagePasswordsUIControllerTest::CreateFormManagerWithBestMatches( |
| 234 const autofill::PasswordForm& observed_form, | 234 const autofill::PasswordForm& observed_form, |
| 235 ScopedVector<autofill::PasswordForm> best_matches) { | 235 ScopedVector<autofill::PasswordForm> best_matches) { |
| 236 std::unique_ptr<password_manager::PasswordFormManager> test_form_manager( | 236 std::unique_ptr<password_manager::PasswordFormManager> test_form_manager( |
| 237 new password_manager::PasswordFormManager( | 237 new password_manager::PasswordFormManager( |
| 238 &password_manager_, &client_, driver_.AsWeakPtr(), observed_form, | 238 &password_manager_, &client_, driver_.AsWeakPtr(), observed_form, |
| 239 true, base::WrapUnique(new password_manager::StubFormSaver))); | 239 base::WrapUnique(new password_manager::StubFormSaver))); |
| 240 test_form_manager->SimulateFetchMatchingLoginsFromPasswordStore(); | 240 test_form_manager->SimulateFetchMatchingLoginsFromPasswordStore(); |
| 241 test_form_manager->OnGetPasswordStoreResults(std::move(best_matches)); | 241 test_form_manager->OnGetPasswordStoreResults(std::move(best_matches)); |
| 242 return test_form_manager; | 242 return test_form_manager; |
| 243 } | 243 } |
| 244 | 244 |
| 245 std::unique_ptr<password_manager::PasswordFormManager> | 245 std::unique_ptr<password_manager::PasswordFormManager> |
| 246 ManagePasswordsUIControllerTest::CreateFormManager() { | 246 ManagePasswordsUIControllerTest::CreateFormManager() { |
| 247 ScopedVector<autofill::PasswordForm> stored_forms; | 247 ScopedVector<autofill::PasswordForm> stored_forms; |
| 248 stored_forms.push_back(new autofill::PasswordForm(test_local_form())); | 248 stored_forms.push_back(new autofill::PasswordForm(test_local_form())); |
| 249 return CreateFormManagerWithBestMatches(test_local_form(), | 249 return CreateFormManagerWithBestMatches(test_local_form(), |
| (...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 736 } | 736 } |
| 737 | 737 |
| 738 TEST_F(ManagePasswordsUIControllerTest, UpdatePendingStatePasswordAutofilled) { | 738 TEST_F(ManagePasswordsUIControllerTest, UpdatePendingStatePasswordAutofilled) { |
| 739 TestNotChangingStateOnAutofill( | 739 TestNotChangingStateOnAutofill( |
| 740 password_manager::ui::PENDING_PASSWORD_UPDATE_STATE); | 740 password_manager::ui::PENDING_PASSWORD_UPDATE_STATE); |
| 741 } | 741 } |
| 742 | 742 |
| 743 TEST_F(ManagePasswordsUIControllerTest, ConfirmationStatePasswordAutofilled) { | 743 TEST_F(ManagePasswordsUIControllerTest, ConfirmationStatePasswordAutofilled) { |
| 744 TestNotChangingStateOnAutofill(password_manager::ui::CONFIRMATION_STATE); | 744 TestNotChangingStateOnAutofill(password_manager::ui::CONFIRMATION_STATE); |
| 745 } | 745 } |
| OLD | NEW |