| Index: components/password_manager/core/browser/password_form_manager_unittest.cc
|
| diff --git a/components/password_manager/core/browser/password_form_manager_unittest.cc b/components/password_manager/core/browser/password_form_manager_unittest.cc
|
| index 54a021a87ffd905c78a88be18172a6e163d742ff..a250707d2b0f8c2fc9924598c2abf8e86a56da92 100644
|
| --- a/components/password_manager/core/browser/password_form_manager_unittest.cc
|
| +++ b/components/password_manager/core/browser/password_form_manager_unittest.cc
|
| @@ -15,6 +15,7 @@
|
| #include "base/strings/utf_string_conversions.h"
|
| #include "base/test/histogram_tester.h"
|
| #include "base/test/scoped_feature_list.h"
|
| +#include "base/test/user_action_tester.h"
|
| #include "build/build_config.h"
|
| #include "components/autofill/core/browser/autofill_manager.h"
|
| #include "components/autofill/core/browser/proto/server.pb.h"
|
| @@ -3022,4 +3023,23 @@ TEST_F(PasswordFormManagerFillOnAccountSelectTest, ProcessFrame) {
|
| SimulateMatchingPhase(form_manager(), RESULT_SAVED_MATCH);
|
| }
|
|
|
| +// Check that PasswordFormManager records
|
| +// PasswordManager_LoginFollowingAutofill as part of processing a credential
|
| +// update.
|
| +TEST_F(PasswordFormManagerTest, ReportProcessingUpdate) {
|
| + SimulateMatchingPhase(form_manager(), RESULT_SAVED_MATCH);
|
| + PasswordForm pending = *observed_form();
|
| + pending.username_value = saved_match()->username_value;
|
| + pending.password_value = saved_match()->password_value;
|
| + form_manager()->ProvisionallySave(
|
| + pending, PasswordFormManager::IGNORE_OTHER_POSSIBLE_USERNAMES);
|
| +
|
| + EXPECT_FALSE(form_manager()->IsNewLogin());
|
| +
|
| + base::UserActionTester tester;
|
| + EXPECT_EQ(0, tester.GetActionCount("PasswordManager_LoginFollowingAutofill"));
|
| + form_manager()->Update(*saved_match());
|
| + EXPECT_EQ(1, tester.GetActionCount("PasswordManager_LoginFollowingAutofill"));
|
| +}
|
| +
|
| } // namespace password_manager
|
|
|