| 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 ed36d534fa456159b64d44b4f02352767a599d90..c4daaa442a4cd22da7dec0dd48a96032579f5ec5 100644
|
| --- a/components/autofill/core/browser/autofill_metrics_unittest.cc
|
| +++ b/components/autofill/core/browser/autofill_metrics_unittest.cc
|
| @@ -268,17 +268,16 @@ class TestAutofillManager : public AutofillManager {
|
| OnFormSubmitted(form);
|
| }
|
|
|
| - void UploadFormDataAsyncCallback(
|
| - const FormStructure* submitted_form,
|
| - const base::TimeTicks& load_time,
|
| - const base::TimeTicks& interaction_time,
|
| - const base::TimeTicks& submission_time) override {
|
| + void UploadFormDataAsyncCallback(const FormStructure* submitted_form,
|
| + const base::TimeTicks& load_time,
|
| + const base::TimeTicks& interaction_time,
|
| + const base::TimeTicks& submission_time,
|
| + bool observed_submission) override {
|
| run_loop_->Quit();
|
|
|
| - AutofillManager::UploadFormDataAsyncCallback(submitted_form,
|
| - load_time,
|
| - interaction_time,
|
| - submission_time);
|
| + AutofillManager::UploadFormDataAsyncCallback(
|
| + submitted_form, load_time, interaction_time, submission_time,
|
| + observed_submission);
|
| }
|
|
|
| private:
|
| @@ -2854,7 +2853,7 @@ TEST_F(AutofillMetricsTest, UserHappinessFormInteraction) {
|
| // Simulate invoking autofill.
|
| {
|
| base::HistogramTester histogram_tester;
|
| - autofill_manager_->OnDidFillAutofillFormData(TimeTicks());
|
| + autofill_manager_->OnDidFillAutofillFormData(form, TimeTicks());
|
| histogram_tester.ExpectBucketCount("Autofill.UserHappiness",
|
| AutofillMetrics::USER_DID_AUTOFILL, 1);
|
| histogram_tester.ExpectBucketCount(
|
| @@ -2884,7 +2883,7 @@ TEST_F(AutofillMetricsTest, UserHappinessFormInteraction) {
|
| // Simulate invoking autofill again.
|
| {
|
| base::HistogramTester histogram_tester;
|
| - autofill_manager_->OnDidFillAutofillFormData(TimeTicks());
|
| + autofill_manager_->OnDidFillAutofillFormData(form, TimeTicks());
|
| histogram_tester.ExpectUniqueSample("Autofill.UserHappiness",
|
| AutofillMetrics::USER_DID_AUTOFILL, 1);
|
| }
|
| @@ -2980,7 +2979,7 @@ TEST_F(AutofillMetricsTest, FormFillDuration) {
|
| base::HistogramTester histogram_tester;
|
| autofill_manager_->OnFormsSeen(forms, TimeTicks::FromInternalValue(1));
|
| autofill_manager_->OnDidFillAutofillFormData(
|
| - TimeTicks::FromInternalValue(5));
|
| + form, TimeTicks::FromInternalValue(5));
|
| autofill_manager_->SubmitForm(form, TimeTicks::FromInternalValue(17));
|
|
|
| histogram_tester.ExpectUniqueSample(
|
| @@ -3003,7 +3002,7 @@ TEST_F(AutofillMetricsTest, FormFillDuration) {
|
|
|
| autofill_manager_->OnFormsSeen(forms, TimeTicks::FromInternalValue(1));
|
| autofill_manager_->OnDidFillAutofillFormData(
|
| - TimeTicks::FromInternalValue(5));
|
| + form, TimeTicks::FromInternalValue(5));
|
| autofill_manager_->OnTextFieldDidChange(form, form.fields.front(),
|
| TimeTicks::FromInternalValue(3));
|
| autofill_manager_->SubmitForm(form, TimeTicks::FromInternalValue(17));
|
| @@ -3028,7 +3027,7 @@ TEST_F(AutofillMetricsTest, FormFillDuration) {
|
| autofill_manager_->OnFormsSeen(second_forms,
|
| TimeTicks::FromInternalValue(3));
|
| autofill_manager_->OnDidFillAutofillFormData(
|
| - TimeTicks::FromInternalValue(5));
|
| + form, TimeTicks::FromInternalValue(5));
|
| autofill_manager_->OnTextFieldDidChange(form, form.fields.front(),
|
| TimeTicks::FromInternalValue(3));
|
| autofill_manager_->SubmitForm(form, TimeTicks::FromInternalValue(17));
|
|
|