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

Unified Diff: components/password_manager/content/browser/content_credential_manager_dispatcher_unittest.cc

Issue 802303002: Credential Manager: Switch 'request()' to GetAutofillableLogins(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 side-by-side diff with in-line comments
Download patch
Index: components/password_manager/content/browser/content_credential_manager_dispatcher_unittest.cc
diff --git a/components/password_manager/content/browser/content_credential_manager_dispatcher_unittest.cc b/components/password_manager/content/browser/content_credential_manager_dispatcher_unittest.cc
index 1800c322175987280c8c8a3f17fb13af1349ac29..7f9482e9cf3dd9816e6bdb1438a313cd26ca3144 100644
--- a/components/password_manager/content/browser/content_credential_manager_dispatcher_unittest.cc
+++ b/components/password_manager/content/browser/content_credential_manager_dispatcher_unittest.cc
@@ -138,6 +138,13 @@ class ContentCredentialManagerDispatcherTest
form_.signon_realm = form_.origin.spec();
form_.scheme = autofill::PasswordForm::SCHEME_HTML;
+ cross_origin_form_.username_value = base::ASCIIToUTF16("Username");
+ cross_origin_form_.display_name = base::ASCIIToUTF16("Display Name");
+ cross_origin_form_.password_value = base::ASCIIToUTF16("Password");
+ cross_origin_form_.origin = GURL("https://example.net/");
+ cross_origin_form_.signon_realm = cross_origin_form_.origin.spec();
+ cross_origin_form_.scheme = autofill::PasswordForm::SCHEME_HTML;
+
store_->Clear();
EXPECT_TRUE(store_->IsEmpty());
}
@@ -151,6 +158,7 @@ class ContentCredentialManagerDispatcherTest
protected:
autofill::PasswordForm form_;
+ autofill::PasswordForm cross_origin_form_;
scoped_refptr<TestPasswordStore> store_;
scoped_ptr<ContentCredentialManagerDispatcher> dispatcher_;
scoped_ptr<TestPasswordManagerClient> client_;
@@ -230,6 +238,7 @@ TEST_F(ContentCredentialManagerDispatcherTest,
TEST_F(ContentCredentialManagerDispatcherTest,
CredentialManagerOnRequestCredentialWithFullPasswordStore) {
store_->AddLogin(form_);
+ store_->AddLogin(cross_origin_form_);
vabr (Chromium) 2014/12/15 10:47:22 I'm not sure what are you testing here. That the S
Mike West 2014/12/15 12:59:24 We're now requesting all the data, not just all th
vabr (Chromium) 2014/12/15 13:27:25 Acknowledged, the new test makes good sense to me.
std::vector<GURL> federations;
dispatcher()->OnRequestCredential(kRequestId, false, federations);

Powered by Google App Engine
This is Rietveld 408576698