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

Side by Side Diff: chrome/browser/ui/passwords/manage_passwords_state_unittest.cc

Issue 1723583004: CREDENTIAL: Convert federations from URLs to origins throughout. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: iOS2 Created 4 years, 9 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 unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698