| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/ui/passwords/manage_passwords_state.h" | 5 #include "chrome/browser/ui/passwords/manage_passwords_state.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 564 passwords_data().ChooseCredential( | 564 passwords_data().ChooseCredential( |
| 565 test_federated_form(), | 565 test_federated_form(), |
| 566 password_manager::CredentialType::CREDENTIAL_TYPE_EMPTY); | 566 password_manager::CredentialType::CREDENTIAL_TYPE_EMPTY); |
| 567 } | 567 } |
| 568 | 568 |
| 569 TEST_F(ManagePasswordsStateTest, ChooseCredentialLocalWithNonEmptyFederation) { | 569 TEST_F(ManagePasswordsStateTest, ChooseCredentialLocalWithNonEmptyFederation) { |
| 570 passwords_data().OnRequestCredentials(ScopedVector<autofill::PasswordForm>(), | 570 passwords_data().OnRequestCredentials(ScopedVector<autofill::PasswordForm>(), |
| 571 ScopedVector<autofill::PasswordForm>(), | 571 ScopedVector<autofill::PasswordForm>(), |
| 572 test_local_form().origin); | 572 test_local_form().origin); |
| 573 autofill::PasswordForm form(test_federated_form()); | 573 autofill::PasswordForm form(test_federated_form()); |
| 574 form.federation_url = GURL("https://federation.test/"); | 574 form.federation_origin = url::Origin(GURL("https://federation.test/")); |
| 575 passwords_data().set_credentials_callback(base::Bind( | 575 passwords_data().set_credentials_callback(base::Bind( |
| 576 &ManagePasswordsStateTest::CredentialCallback, base::Unretained(this))); | 576 &ManagePasswordsStateTest::CredentialCallback, base::Unretained(this))); |
| 577 password_manager::CredentialInfo credential_info( | 577 password_manager::CredentialInfo credential_info( |
| 578 form, password_manager::CredentialType::CREDENTIAL_TYPE_FEDERATED); | 578 form, password_manager::CredentialType::CREDENTIAL_TYPE_FEDERATED); |
| 579 EXPECT_CALL(*this, CredentialCallback(credential_info)); | 579 EXPECT_CALL(*this, CredentialCallback(credential_info)); |
| 580 passwords_data().ChooseCredential( | 580 passwords_data().ChooseCredential( |
| 581 form, password_manager::CredentialType::CREDENTIAL_TYPE_PASSWORD); | 581 form, password_manager::CredentialType::CREDENTIAL_TYPE_PASSWORD); |
| 582 } | 582 } |
| 583 | 583 |
| 584 } // namespace | 584 } // namespace |
| OLD | NEW |