Chromium Code Reviews| 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 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 563 } | 563 } |
| 564 | 564 |
| 565 TEST_F(CredentialManagerImplTest, CredentialManagerGetOverwriteZeroClick) { | 565 TEST_F(CredentialManagerImplTest, CredentialManagerGetOverwriteZeroClick) { |
| 566 // Set the global zero click flag on, and populate the PasswordStore with a | 566 // Set the global zero click flag on, and populate the PasswordStore with a |
| 567 // form that's set to skip zero click and has a primary key that won't match | 567 // form that's set to skip zero click and has a primary key that won't match |
| 568 // credentials initially created via `store()`. | 568 // credentials initially created via `store()`. |
| 569 client_->set_zero_click_enabled(true); | 569 client_->set_zero_click_enabled(true); |
| 570 form_.skip_zero_click = true; | 570 form_.skip_zero_click = true; |
| 571 form_.username_element = base::ASCIIToUTF16("username-element"); | 571 form_.username_element = base::ASCIIToUTF16("username-element"); |
| 572 form_.password_element = base::ASCIIToUTF16("password-element"); | 572 form_.password_element = base::ASCIIToUTF16("password-element"); |
| 573 form_.signon_realm = "this is a realm"; | |
|
vabr (Chromium)
2016/11/23 08:57:56
I'm curious why this needed to be removed. If I re
vasilii
2016/11/23 09:40:54
|form_| has already correct origin and signon_real
| |
| 574 form_.origin = GURL("https://example.com/old_form.html"); | 573 form_.origin = GURL("https://example.com/old_form.html"); |
| 575 store_->AddLogin(form_); | 574 store_->AddLogin(form_); |
| 576 RunAllPendingTasks(); | 575 RunAllPendingTasks(); |
| 577 | 576 |
| 578 std::vector<GURL> federations; | 577 std::vector<GURL> federations; |
| 579 EXPECT_CALL(*client_, PromptUserToChooseCredentialsPtr(_, _, _)) | 578 EXPECT_CALL(*client_, PromptUserToChooseCredentialsPtr(_, _, _)) |
| 580 .Times(testing::Exactly(1)); | 579 .Times(testing::Exactly(1)); |
| 581 EXPECT_CALL(*client_, NotifyUserAutoSigninPtr()).Times(testing::Exactly(0)); | 580 EXPECT_CALL(*client_, NotifyUserAutoSigninPtr()).Times(testing::Exactly(0)); |
| 582 | 581 |
| 583 bool called = false; | 582 bool called = false; |
| (...skipping 840 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1424 _, CredentialSourceType::CREDENTIAL_SOURCE_API)); | 1423 _, CredentialSourceType::CREDENTIAL_SOURCE_API)); |
| 1425 CallStore(info, base::Bind(&RespondCallback, &called)); | 1424 CallStore(info, base::Bind(&RespondCallback, &called)); |
| 1426 // Allow the PasswordFormManager to talk to the password store | 1425 // Allow the PasswordFormManager to talk to the password store |
| 1427 RunAllPendingTasks(); | 1426 RunAllPendingTasks(); |
| 1428 | 1427 |
| 1429 ASSERT_TRUE(client_->pending_manager()); | 1428 ASSERT_TRUE(client_->pending_manager()); |
| 1430 EXPECT_TRUE(client_->pending_manager()->IsBlacklisted()); | 1429 EXPECT_TRUE(client_->pending_manager()->IsBlacklisted()); |
| 1431 } | 1430 } |
| 1432 | 1431 |
| 1433 } // namespace password_manager | 1432 } // namespace password_manager |
| OLD | NEW |