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

Side by Side Diff: components/password_manager/content/browser/credential_manager_dispatcher_unittest.cc

Issue 1776673003: Fix the password bubble titles for android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix the tests 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 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 "components/password_manager/content/browser/credential_manager_dispatc her.h" 5 #include "components/password_manager/content/browser/credential_manager_dispatc her.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <string> 9 #include <string>
10 #include <tuple> 10 #include <tuple>
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 local_forms.empty() ? *federated_forms[0] : *local_forms[0], 102 local_forms.empty() ? *federated_forms[0] : *local_forms[0],
103 local_forms.empty() ? CredentialType::CREDENTIAL_TYPE_FEDERATED 103 local_forms.empty() ? CredentialType::CREDENTIAL_TYPE_FEDERATED
104 : CredentialType::CREDENTIAL_TYPE_PASSWORD); 104 : CredentialType::CREDENTIAL_TYPE_PASSWORD);
105 base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, 105 base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE,
106 base::Bind(callback, info)); 106 base::Bind(callback, info));
107 PromptUserToChooseCredentialsPtr(local_forms.get(), federated_forms.get(), 107 PromptUserToChooseCredentialsPtr(local_forms.get(), federated_forms.get(),
108 origin, callback); 108 origin, callback);
109 return true; 109 return true;
110 } 110 }
111 111
112 void NotifyUserAutoSignin( 112 void NotifyUserAutoSignin(ScopedVector<autofill::PasswordForm> local_forms,
113 ScopedVector<autofill::PasswordForm> local_forms) override { 113 const GURL& origin) override {
114 EXPECT_FALSE(local_forms.empty()); 114 EXPECT_FALSE(local_forms.empty());
115 NotifyUserAutoSigninPtr(local_forms.get()); 115 NotifyUserAutoSigninPtr(local_forms.get());
116 } 116 }
117 117
118 PasswordFormManager* pending_manager() const { return manager_.get(); } 118 PasswordFormManager* pending_manager() const { return manager_.get(); }
119 119
120 void set_zero_click_enabled(bool zero_click_enabled) { 120 void set_zero_click_enabled(bool zero_click_enabled) {
121 prefs_.SetBoolean(prefs::kCredentialsEnableAutosignin, zero_click_enabled); 121 prefs_.SetBoolean(prefs::kCredentialsEnableAutosignin, zero_click_enabled);
122 } 122 }
123 123
(...skipping 997 matching lines...) Expand 10 before | Expand all | Expand 10 after
1121 TEST_F(CredentialManagerDispatcherTest, GetSynthesizedFormForOrigin) { 1121 TEST_F(CredentialManagerDispatcherTest, GetSynthesizedFormForOrigin) {
1122 autofill::PasswordForm synthesized = 1122 autofill::PasswordForm synthesized =
1123 dispatcher_->GetSynthesizedFormForOrigin(); 1123 dispatcher_->GetSynthesizedFormForOrigin();
1124 EXPECT_EQ(kTestWebOrigin, synthesized.origin.spec()); 1124 EXPECT_EQ(kTestWebOrigin, synthesized.origin.spec());
1125 EXPECT_EQ(kTestWebOrigin, synthesized.signon_realm); 1125 EXPECT_EQ(kTestWebOrigin, synthesized.signon_realm);
1126 EXPECT_EQ(autofill::PasswordForm::SCHEME_HTML, synthesized.scheme); 1126 EXPECT_EQ(autofill::PasswordForm::SCHEME_HTML, synthesized.scheme);
1127 EXPECT_TRUE(synthesized.ssl_valid); 1127 EXPECT_TRUE(synthesized.ssl_valid);
1128 } 1128 }
1129 1129
1130 } // namespace password_manager 1130 } // namespace password_manager
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698