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

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

Issue 1059393002: Remove --respect-autocomplete-off-autofill flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix last 3 tests Created 5 years, 8 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 10ca0ac5e09ce9cff90f5c6b055f67281d4f166d..0b1d5bbf2eabad8b89295ae453b06fb22ff87c69 100644
--- a/components/autofill/core/browser/autofill_metrics_unittest.cc
+++ b/components/autofill/core/browser/autofill_metrics_unittest.cc
@@ -1092,8 +1092,7 @@ TEST_F(AutofillMetricsTest, AddressSuggestionsCount) {
{
// Simulate activating the autofill popup for the phone field.
base::HistogramTester histogram_tester;
- autofill_manager_->OnQueryFormFieldAutofill(0, form, field, gfx::Rect(),
- false);
+ autofill_manager_->OnQueryFormFieldAutofill(0, form, field, gfx::Rect());
histogram_tester.ExpectUniqueSample("Autofill.AddressSuggestionsCount", 2,
1);
}
@@ -1103,8 +1102,7 @@ TEST_F(AutofillMetricsTest, AddressSuggestionsCount) {
// No new metric should be logged, since we're still on the same page.
test::CreateTestFormField("Email", "email", "b", "email", &field);
base::HistogramTester histogram_tester;
- autofill_manager_->OnQueryFormFieldAutofill(0, form, field, gfx::Rect(),
- false);
+ autofill_manager_->OnQueryFormFieldAutofill(0, form, field, gfx::Rect());
histogram_tester.ExpectTotalCount("Autofill.AddressSuggestionsCount", 0);
}
@@ -1115,8 +1113,7 @@ TEST_F(AutofillMetricsTest, AddressSuggestionsCount) {
{
// Simulate activating the autofill popup for the email field after typing.
base::HistogramTester histogram_tester;
- autofill_manager_->OnQueryFormFieldAutofill(0, form, field, gfx::Rect(),
- false);
+ autofill_manager_->OnQueryFormFieldAutofill(0, form, field, gfx::Rect());
histogram_tester.ExpectUniqueSample("Autofill.AddressSuggestionsCount", 1,
1);
}
@@ -1129,8 +1126,7 @@ TEST_F(AutofillMetricsTest, AddressSuggestionsCount) {
// Simulate activating the autofill popup for the email field after typing.
form.fields[0].is_autofilled = true;
base::HistogramTester histogram_tester;
- autofill_manager_->OnQueryFormFieldAutofill(0, form, field, gfx::Rect(),
- false);
+ autofill_manager_->OnQueryFormFieldAutofill(0, form, field, gfx::Rect());
histogram_tester.ExpectTotalCount("Autofill.AddressSuggestionsCount", 0);
}
}
@@ -1163,8 +1159,7 @@ TEST_F(AutofillMetricsTest, CreditCardInteractedFormEvents) {
{
// Simulate activating the autofill popup for the credit card field.
base::HistogramTester histogram_tester;
- autofill_manager_->OnQueryFormFieldAutofill(0, form, field, gfx::Rect(),
- false);
+ autofill_manager_->OnQueryFormFieldAutofill(0, form, field, gfx::Rect());
histogram_tester.ExpectUniqueSample(
"Autofill.FormEvents.CreditCard",
AutofillMetrics::FORM_EVENT_INTERACTED_ONCE, 1);
@@ -1177,10 +1172,8 @@ TEST_F(AutofillMetricsTest, CreditCardInteractedFormEvents) {
{
// Simulate activating the autofill popup for the credit card field twice.
base::HistogramTester histogram_tester;
- autofill_manager_->OnQueryFormFieldAutofill(0, form, field, gfx::Rect(),
- false);
- autofill_manager_->OnQueryFormFieldAutofill(1, form, field, gfx::Rect(),
- false);
+ autofill_manager_->OnQueryFormFieldAutofill(0, form, field, gfx::Rect());
+ autofill_manager_->OnQueryFormFieldAutofill(1, form, field, gfx::Rect());
histogram_tester.ExpectUniqueSample(
"Autofill.FormEvents.CreditCard",
AutofillMetrics::FORM_EVENT_INTERACTED_ONCE, 1);
@@ -1569,8 +1562,7 @@ TEST_F(AutofillMetricsTest, CreditCardSubmittedFormEvents) {
{
// Simulating submission with no filled data.
base::HistogramTester histogram_tester;
- autofill_manager_->OnQueryFormFieldAutofill(0, form, field, gfx::Rect(),
- false);
+ autofill_manager_->OnQueryFormFieldAutofill(0, form, field, gfx::Rect());
autofill_manager_->SubmitForm(form, TimeTicks::Now());
histogram_tester.ExpectBucketCount(
"Autofill.FormEvents.CreditCard",
@@ -1587,8 +1579,7 @@ TEST_F(AutofillMetricsTest, CreditCardSubmittedFormEvents) {
{
// Simulating submission with filled local data.
base::HistogramTester histogram_tester;
- autofill_manager_->OnQueryFormFieldAutofill(0, form, field, gfx::Rect(),
- false);
+ autofill_manager_->OnQueryFormFieldAutofill(0, form, field, gfx::Rect());
SuggestionBackendID guid(
"10000000-0000-0000-0000-000000000001", 0); // local card
autofill_manager_->FillOrPreviewForm(
@@ -1611,8 +1602,7 @@ TEST_F(AutofillMetricsTest, CreditCardSubmittedFormEvents) {
{
// Simulating submission with filled server data.
base::HistogramTester histogram_tester;
- autofill_manager_->OnQueryFormFieldAutofill(0, form, field, gfx::Rect(),
- false);
+ autofill_manager_->OnQueryFormFieldAutofill(0, form, field, gfx::Rect());
SuggestionBackendID guid(
"10000000-0000-0000-0000-000000000003", 0); // full server card
autofill_manager_->FillOrPreviewForm(
@@ -1666,8 +1656,7 @@ TEST_F(AutofillMetricsTest, CreditCardSubmittedFormEvents) {
{
// Simulating multiple submissions.
base::HistogramTester histogram_tester;
- autofill_manager_->OnQueryFormFieldAutofill(0, form, field, gfx::Rect(),
- false);
+ autofill_manager_->OnQueryFormFieldAutofill(0, form, field, gfx::Rect());
autofill_manager_->SubmitForm(form, TimeTicks::Now());
autofill_manager_->SubmitForm(form, TimeTicks::Now());
histogram_tester.ExpectBucketCount(
@@ -1765,8 +1754,7 @@ TEST_F(AutofillMetricsTest, CreditCardWillSubmitFormEvents) {
{
// Simulating submission with no filled data.
base::HistogramTester histogram_tester;
- autofill_manager_->OnQueryFormFieldAutofill(0, form, field, gfx::Rect(),
- false);
+ autofill_manager_->OnQueryFormFieldAutofill(0, form, field, gfx::Rect());
autofill_manager_->WillSubmitForm(form, TimeTicks::Now());
histogram_tester.ExpectBucketCount(
"Autofill.FormEvents.CreditCard",
@@ -1783,8 +1771,7 @@ TEST_F(AutofillMetricsTest, CreditCardWillSubmitFormEvents) {
{
// Simulating submission with filled local data.
base::HistogramTester histogram_tester;
- autofill_manager_->OnQueryFormFieldAutofill(0, form, field, gfx::Rect(),
- false);
+ autofill_manager_->OnQueryFormFieldAutofill(0, form, field, gfx::Rect());
SuggestionBackendID guid("10000000-0000-0000-0000-000000000001",
0); // local card
autofill_manager_->FillOrPreviewForm(
@@ -1806,8 +1793,7 @@ TEST_F(AutofillMetricsTest, CreditCardWillSubmitFormEvents) {
{
// Simulating submission with filled server data.
base::HistogramTester histogram_tester;
- autofill_manager_->OnQueryFormFieldAutofill(0, form, field, gfx::Rect(),
- false);
+ autofill_manager_->OnQueryFormFieldAutofill(0, form, field, gfx::Rect());
SuggestionBackendID guid("10000000-0000-0000-0000-000000000003",
0); // full server card
autofill_manager_->FillOrPreviewForm(
@@ -1859,8 +1845,7 @@ TEST_F(AutofillMetricsTest, CreditCardWillSubmitFormEvents) {
{
// Simulating multiple submissions.
base::HistogramTester histogram_tester;
- autofill_manager_->OnQueryFormFieldAutofill(0, form, field, gfx::Rect(),
- false);
+ autofill_manager_->OnQueryFormFieldAutofill(0, form, field, gfx::Rect());
autofill_manager_->WillSubmitForm(form, TimeTicks::Now());
autofill_manager_->WillSubmitForm(form, TimeTicks::Now());
histogram_tester.ExpectBucketCount(
@@ -1950,8 +1935,7 @@ TEST_F(AutofillMetricsTest, AddressInteractedFormEvents) {
{
// Simulate activating the autofill popup for the street field.
base::HistogramTester histogram_tester;
- autofill_manager_->OnQueryFormFieldAutofill(0, form, field, gfx::Rect(),
- false);
+ autofill_manager_->OnQueryFormFieldAutofill(0, form, field, gfx::Rect());
histogram_tester.ExpectUniqueSample(
"Autofill.FormEvents.Address",
AutofillMetrics::FORM_EVENT_INTERACTED_ONCE, 1);
@@ -1964,10 +1948,8 @@ TEST_F(AutofillMetricsTest, AddressInteractedFormEvents) {
{
// Simulate activating the autofill popup for the street field twice.
base::HistogramTester histogram_tester;
- autofill_manager_->OnQueryFormFieldAutofill(0, form, field, gfx::Rect(),
- false);
- autofill_manager_->OnQueryFormFieldAutofill(1, form, field, gfx::Rect(),
- false);
+ autofill_manager_->OnQueryFormFieldAutofill(0, form, field, gfx::Rect());
+ autofill_manager_->OnQueryFormFieldAutofill(1, form, field, gfx::Rect());
histogram_tester.ExpectUniqueSample(
"Autofill.FormEvents.Address",
AutofillMetrics::FORM_EVENT_INTERACTED_ONCE, 1);
@@ -2175,8 +2157,7 @@ TEST_F(AutofillMetricsTest, AddressSubmittedFormEvents) {
{
// Simulating submission with no filled data.
base::HistogramTester histogram_tester;
- autofill_manager_->OnQueryFormFieldAutofill(0, form, field, gfx::Rect(),
- false);
+ autofill_manager_->OnQueryFormFieldAutofill(0, form, field, gfx::Rect());
autofill_manager_->SubmitForm(form, TimeTicks::Now());
histogram_tester.ExpectBucketCount(
"Autofill.FormEvents.Address",
@@ -2193,8 +2174,7 @@ TEST_F(AutofillMetricsTest, AddressSubmittedFormEvents) {
{
// Simulating submission with filled local data.
base::HistogramTester histogram_tester;
- autofill_manager_->OnQueryFormFieldAutofill(0, form, field, gfx::Rect(),
- false);
+ autofill_manager_->OnQueryFormFieldAutofill(0, form, field, gfx::Rect());
SuggestionBackendID guid(
"00000000-0000-0000-0000-000000000001", 0); // local profile
autofill_manager_->FillOrPreviewForm(
@@ -2217,8 +2197,7 @@ TEST_F(AutofillMetricsTest, AddressSubmittedFormEvents) {
{
// Simulating submission with filled server data.
base::HistogramTester histogram_tester;
- autofill_manager_->OnQueryFormFieldAutofill(0, form, field, gfx::Rect(),
- false);
+ autofill_manager_->OnQueryFormFieldAutofill(0, form, field, gfx::Rect());
SuggestionBackendID guid(
"00000000-0000-0000-0000-000000000002", 0); // server profile
autofill_manager_->FillOrPreviewForm(
@@ -2241,8 +2220,7 @@ TEST_F(AutofillMetricsTest, AddressSubmittedFormEvents) {
{
// Simulating multiple submissions.
base::HistogramTester histogram_tester;
- autofill_manager_->OnQueryFormFieldAutofill(0, form, field, gfx::Rect(),
- false);
+ autofill_manager_->OnQueryFormFieldAutofill(0, form, field, gfx::Rect());
autofill_manager_->SubmitForm(form, TimeTicks::Now());
autofill_manager_->SubmitForm(form, TimeTicks::Now());
histogram_tester.ExpectBucketCount(
@@ -2328,8 +2306,7 @@ TEST_F(AutofillMetricsTest, AddressWillSubmitFormEvents) {
{
// Simulating submission with no filled data.
base::HistogramTester histogram_tester;
- autofill_manager_->OnQueryFormFieldAutofill(0, form, field, gfx::Rect(),
- false);
+ autofill_manager_->OnQueryFormFieldAutofill(0, form, field, gfx::Rect());
autofill_manager_->WillSubmitForm(form, TimeTicks::Now());
histogram_tester.ExpectBucketCount(
"Autofill.FormEvents.Address",
@@ -2346,8 +2323,7 @@ TEST_F(AutofillMetricsTest, AddressWillSubmitFormEvents) {
{
// Simulating submission with filled local data.
base::HistogramTester histogram_tester;
- autofill_manager_->OnQueryFormFieldAutofill(0, form, field, gfx::Rect(),
- false);
+ autofill_manager_->OnQueryFormFieldAutofill(0, form, field, gfx::Rect());
SuggestionBackendID guid("00000000-0000-0000-0000-000000000001",
0); // local profile
autofill_manager_->FillOrPreviewForm(
@@ -2369,8 +2345,7 @@ TEST_F(AutofillMetricsTest, AddressWillSubmitFormEvents) {
{
// Simulating submission with filled server data.
base::HistogramTester histogram_tester;
- autofill_manager_->OnQueryFormFieldAutofill(0, form, field, gfx::Rect(),
- false);
+ autofill_manager_->OnQueryFormFieldAutofill(0, form, field, gfx::Rect());
SuggestionBackendID guid("00000000-0000-0000-0000-000000000002",
0); // server profile
autofill_manager_->FillOrPreviewForm(
@@ -2392,8 +2367,7 @@ TEST_F(AutofillMetricsTest, AddressWillSubmitFormEvents) {
{
// Simulating multiple submissions.
base::HistogramTester histogram_tester;
- autofill_manager_->OnQueryFormFieldAutofill(0, form, field, gfx::Rect(),
- false);
+ autofill_manager_->OnQueryFormFieldAutofill(0, form, field, gfx::Rect());
autofill_manager_->WillSubmitForm(form, TimeTicks::Now());
autofill_manager_->WillSubmitForm(form, TimeTicks::Now());
histogram_tester.ExpectBucketCount(
@@ -2473,8 +2447,7 @@ TEST_F(AutofillMetricsTest, CreditCardFormEventsAreSegmented) {
{
// Simulate activating the autofill popup for the credit card field.
base::HistogramTester histogram_tester;
- autofill_manager_->OnQueryFormFieldAutofill(0, form, field, gfx::Rect(),
- false);
+ autofill_manager_->OnQueryFormFieldAutofill(0, form, field, gfx::Rect());
histogram_tester.ExpectUniqueSample(
"Autofill.FormEvents.CreditCard.WithNoData",
AutofillMetrics::FORM_EVENT_INTERACTED_ONCE, 1);
@@ -2491,8 +2464,7 @@ TEST_F(AutofillMetricsTest, CreditCardFormEventsAreSegmented) {
{
// Simulate activating the autofill popup for the credit card field.
base::HistogramTester histogram_tester;
- autofill_manager_->OnQueryFormFieldAutofill(0, form, field, gfx::Rect(),
- false);
+ autofill_manager_->OnQueryFormFieldAutofill(0, form, field, gfx::Rect());
histogram_tester.ExpectUniqueSample(
"Autofill.FormEvents.CreditCard.WithOnlyLocalData",
AutofillMetrics::FORM_EVENT_INTERACTED_ONCE, 1);
@@ -2509,8 +2481,7 @@ TEST_F(AutofillMetricsTest, CreditCardFormEventsAreSegmented) {
{
// Simulate activating the autofill popup for the credit card field.
base::HistogramTester histogram_tester;
- autofill_manager_->OnQueryFormFieldAutofill(0, form, field, gfx::Rect(),
- false);
+ autofill_manager_->OnQueryFormFieldAutofill(0, form, field, gfx::Rect());
histogram_tester.ExpectUniqueSample(
"Autofill.FormEvents.CreditCard.WithOnlyServerData",
AutofillMetrics::FORM_EVENT_INTERACTED_ONCE, 1);
@@ -2527,8 +2498,7 @@ TEST_F(AutofillMetricsTest, CreditCardFormEventsAreSegmented) {
{
// Simulate activating the autofill popup for the credit card field.
base::HistogramTester histogram_tester;
- autofill_manager_->OnQueryFormFieldAutofill(0, form, field, gfx::Rect(),
- false);
+ autofill_manager_->OnQueryFormFieldAutofill(0, form, field, gfx::Rect());
histogram_tester.ExpectUniqueSample(
"Autofill.FormEvents.CreditCard.WithOnlyServerData",
AutofillMetrics::FORM_EVENT_INTERACTED_ONCE, 1);
@@ -2545,8 +2515,7 @@ TEST_F(AutofillMetricsTest, CreditCardFormEventsAreSegmented) {
{
// Simulate activating the autofill popup for the credit card field.
base::HistogramTester histogram_tester;
- autofill_manager_->OnQueryFormFieldAutofill(0, form, field, gfx::Rect(),
- false);
+ autofill_manager_->OnQueryFormFieldAutofill(0, form, field, gfx::Rect());
histogram_tester.ExpectUniqueSample(
"Autofill.FormEvents.CreditCard.WithBothServerAndLocalData",
AutofillMetrics::FORM_EVENT_INTERACTED_ONCE, 1);
@@ -2585,8 +2554,7 @@ TEST_F(AutofillMetricsTest, AddressFormEventsAreSegmented) {
{
// Simulate activating the autofill popup for the street field.
base::HistogramTester histogram_tester;
- autofill_manager_->OnQueryFormFieldAutofill(0, form, field, gfx::Rect(),
- false);
+ autofill_manager_->OnQueryFormFieldAutofill(0, form, field, gfx::Rect());
histogram_tester.ExpectUniqueSample(
"Autofill.FormEvents.Address.WithNoData",
AutofillMetrics::FORM_EVENT_INTERACTED_ONCE, 1);
@@ -2601,8 +2569,7 @@ TEST_F(AutofillMetricsTest, AddressFormEventsAreSegmented) {
{
// Simulate activating the autofill popup for the street field.
base::HistogramTester histogram_tester;
- autofill_manager_->OnQueryFormFieldAutofill(0, form, field, gfx::Rect(),
- false);
+ autofill_manager_->OnQueryFormFieldAutofill(0, form, field, gfx::Rect());
histogram_tester.ExpectUniqueSample(
"Autofill.FormEvents.Address.WithOnlyLocalData",
AutofillMetrics::FORM_EVENT_INTERACTED_ONCE, 1);
@@ -2617,8 +2584,7 @@ TEST_F(AutofillMetricsTest, AddressFormEventsAreSegmented) {
{
// Simulate activating the autofill popup for the street field.
base::HistogramTester histogram_tester;
- autofill_manager_->OnQueryFormFieldAutofill(0, form, field, gfx::Rect(),
- false);
+ autofill_manager_->OnQueryFormFieldAutofill(0, form, field, gfx::Rect());
histogram_tester.ExpectUniqueSample(
"Autofill.FormEvents.Address.WithOnlyServerData",
AutofillMetrics::FORM_EVENT_INTERACTED_ONCE, 1);
@@ -2633,8 +2599,7 @@ TEST_F(AutofillMetricsTest, AddressFormEventsAreSegmented) {
{
// Simulate activating the autofill popup for the street field.
base::HistogramTester histogram_tester;
- autofill_manager_->OnQueryFormFieldAutofill(0, form, field, gfx::Rect(),
- false);
+ autofill_manager_->OnQueryFormFieldAutofill(0, form, field, gfx::Rect());
histogram_tester.ExpectUniqueSample(
"Autofill.FormEvents.Address.WithBothServerAndLocalData",
AutofillMetrics::FORM_EVENT_INTERACTED_ONCE, 1);

Powered by Google App Engine
This is Rietveld 408576698