| 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 "components/password_manager/content/browser/credential_manager_impl.h" | 5 #include "components/password_manager/content/browser/credential_manager_impl.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 1198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1209 std::vector<std::string> affiliated_realms; | 1209 std::vector<std::string> affiliated_realms; |
| 1210 static_cast<MockAffiliatedMatchHelper*>(store_->affiliated_match_helper()) | 1210 static_cast<MockAffiliatedMatchHelper*>(store_->affiliated_match_helper()) |
| 1211 ->ExpectCallToGetAffiliatedAndroidRealms( | 1211 ->ExpectCallToGetAffiliatedAndroidRealms( |
| 1212 cm_service_impl_->GetSynthesizedFormForOrigin(), affiliated_realms); | 1212 cm_service_impl_->GetSynthesizedFormForOrigin(), affiliated_realms); |
| 1213 | 1213 |
| 1214 ExpectZeroClickSignInSuccess(true, true, federations, | 1214 ExpectZeroClickSignInSuccess(true, true, federations, |
| 1215 mojom::CredentialType::PASSWORD); | 1215 mojom::CredentialType::PASSWORD); |
| 1216 } | 1216 } |
| 1217 | 1217 |
| 1218 TEST_F(CredentialManagerImplTest, GetSynthesizedFormForOrigin) { | 1218 TEST_F(CredentialManagerImplTest, GetSynthesizedFormForOrigin) { |
| 1219 autofill::PasswordForm synthesized = | 1219 PasswordStore::FormDigest synthesized = |
| 1220 cm_service_impl_->GetSynthesizedFormForOrigin(); | 1220 cm_service_impl_->GetSynthesizedFormForOrigin(); |
| 1221 EXPECT_EQ(kTestWebOrigin, synthesized.origin.spec()); | 1221 EXPECT_EQ(kTestWebOrigin, synthesized.origin.spec()); |
| 1222 EXPECT_EQ(kTestWebOrigin, synthesized.signon_realm); | 1222 EXPECT_EQ(kTestWebOrigin, synthesized.signon_realm); |
| 1223 EXPECT_EQ(autofill::PasswordForm::SCHEME_HTML, synthesized.scheme); | 1223 EXPECT_EQ(autofill::PasswordForm::SCHEME_HTML, synthesized.scheme); |
| 1224 } | 1224 } |
| 1225 | 1225 |
| 1226 TEST_F(CredentialManagerImplTest, BlacklistPasswordCredential) { | 1226 TEST_F(CredentialManagerImplTest, BlacklistPasswordCredential) { |
| 1227 EXPECT_CALL(*client_, PromptUserToSavePasswordPtr( | 1227 EXPECT_CALL(*client_, PromptUserToSavePasswordPtr( |
| 1228 _, CredentialSourceType::CREDENTIAL_SOURCE_API)); | 1228 _, CredentialSourceType::CREDENTIAL_SOURCE_API)); |
| 1229 | 1229 |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1316 _, CredentialSourceType::CREDENTIAL_SOURCE_API)); | 1316 _, CredentialSourceType::CREDENTIAL_SOURCE_API)); |
| 1317 CallStore(info, base::Bind(&RespondCallback, &called)); | 1317 CallStore(info, base::Bind(&RespondCallback, &called)); |
| 1318 // Allow the PasswordFormManager to talk to the password store | 1318 // Allow the PasswordFormManager to talk to the password store |
| 1319 RunAllPendingTasks(); | 1319 RunAllPendingTasks(); |
| 1320 | 1320 |
| 1321 ASSERT_TRUE(client_->pending_manager()); | 1321 ASSERT_TRUE(client_->pending_manager()); |
| 1322 EXPECT_TRUE(client_->pending_manager()->IsBlacklisted()); | 1322 EXPECT_TRUE(client_->pending_manager()->IsBlacklisted()); |
| 1323 } | 1323 } |
| 1324 | 1324 |
| 1325 } // namespace password_manager | 1325 } // namespace password_manager |
| OLD | NEW |