| Index: components/password_manager/core/browser/password_autofill_manager_unittest.cc
|
| diff --git a/components/password_manager/core/browser/password_autofill_manager_unittest.cc b/components/password_manager/core/browser/password_autofill_manager_unittest.cc
|
| index 713b83cd24bf89bc48060ee0d689bb016e0a4777..297c8b14b1b20a4df38c923a7c55f90e39c840e4 100644
|
| --- a/components/password_manager/core/browser/password_autofill_manager_unittest.cc
|
| +++ b/components/password_manager/core/browser/password_autofill_manager_unittest.cc
|
| @@ -10,6 +10,7 @@
|
| #include "base/message_loop/message_loop.h"
|
| #include "base/strings/utf_string_conversions.h"
|
| #include "base/test/scoped_feature_list.h"
|
| +#include "base/test/user_action_tester.h"
|
| #include "components/autofill/core/browser/popup_item_ids.h"
|
| #include "components/autofill/core/browser/suggestion_test_helpers.h"
|
| #include "components/autofill/core/browser/test_autofill_client.h"
|
| @@ -788,4 +789,19 @@ TEST_F(PasswordAutofillManagerTest, SecurePasswordFieldHttpWarningMessage) {
|
| autofill::IS_PASSWORD_FIELD, element_bounds);
|
| }
|
|
|
| +// Test that a user action is logged when the user selects the Form-Not-Secure
|
| +// warning to receive more information about the warning.
|
| +TEST_F(PasswordAutofillManagerTest, FormNotSecureUserAction) {
|
| + std::unique_ptr<TestPasswordManagerClient> client(
|
| + new TestPasswordManagerClient);
|
| + std::unique_ptr<MockAutofillClient> autofill_client(new MockAutofillClient);
|
| + InitializePasswordAutofillManager(client.get(), autofill_client.get());
|
| + base::UserActionTester user_action_tester;
|
| + password_autofill_manager_->DidAcceptSuggestion(
|
| + test_username_, autofill::POPUP_ITEM_ID_HTTP_NOT_SECURE_WARNING_MESSAGE,
|
| + 0);
|
| + EXPECT_EQ(1, user_action_tester.GetActionCount(
|
| + "PasswordManager_ShowedHttpNotSecureExplanation"));
|
| +}
|
| +
|
| } // namespace password_manager
|
|
|