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

Unified Diff: components/autofill/core/browser/autofill_metrics_unittest.cc

Issue 133893004: Allow deleting autofill password suggestions on Shift+Delete (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments addressed Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: components/autofill/core/browser/autofill_metrics_unittest.cc
diff --git a/components/autofill/core/browser/autofill_metrics_unittest.cc b/components/autofill/core/browser/autofill_metrics_unittest.cc
index 8eb952bd1206ca7d6d146bdc30bb7f6d6199e150..41658a02b52f83245de98099451b9e6a9a5a2201 100644
--- a/components/autofill/core/browser/autofill_metrics_unittest.cc
+++ b/components/autofill/core/browser/autofill_metrics_unittest.cc
@@ -26,6 +26,7 @@
#include "components/autofill/core/common/form_data.h"
#include "components/autofill/core/common/form_field_data.h"
#include "components/autofill/core/common/forms_seen_state.h"
+#include "components/autofill/core/common/password_form.h"
#include "components/webdata/common/web_data_results.h"
#include "content/public/test/test_utils.h"
#include "testing/gmock/include/gmock/gmock.h"
@@ -1055,15 +1056,16 @@ TEST_F(AutofillMetricsTest, AddressSuggestionsCount) {
EXPECT_CALL(*autofill_manager_->metric_logger(),
LogAddressSuggestionsCount(2)).Times(1);
+ PasswordForm password_form;
// Simulate activating the autofill popup for the phone field.
autofill_manager_->OnQueryFormFieldAutofill(
- 0, form, field, gfx::Rect(), false);
+ 0, form, field, password_form, gfx::Rect(), false);
// Simulate activating the autofill popup for the email field after typing.
// No new metric should be logged, since we're still on the same page.
test::CreateTestFormField("Email", "email", "b", "email", &field);
autofill_manager_->OnQueryFormFieldAutofill(
- 0, form, field, gfx::Rect(), false);
+ 0, form, field, password_form, gfx::Rect(), false);
// Reset the autofill manager state.
autofill_manager_->Reset();
@@ -1076,7 +1078,7 @@ TEST_F(AutofillMetricsTest, AddressSuggestionsCount) {
// Simulate activating the autofill popup for the email field after typing.
autofill_manager_->OnQueryFormFieldAutofill(
- 0, form, field, gfx::Rect(), false);
+ 0, form, field, password_form, gfx::Rect(), false);
// Reset the autofill manager state again.
autofill_manager_->Reset();
@@ -1090,7 +1092,7 @@ TEST_F(AutofillMetricsTest, AddressSuggestionsCount) {
// Simulate activating the autofill popup for the email field after typing.
form.fields[0].is_autofilled = true;
autofill_manager_->OnQueryFormFieldAutofill(
- 0, form, field, gfx::Rect(), false);
+ 0, form, field, password_form, gfx::Rect(), false);
}
// Test that we log whether Autofill is enabled when filling a form.

Powered by Google App Engine
This is Rietveld 408576698