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

Side by Side Diff: components/autofill/browser/autofill_metrics_unittest.cc

Issue 13264002: Requery the autofill server when forms and input fields are dynamically added. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <vector> 5 #include <vector>
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/string16.h" 8 #include "base/string16.h"
9 #include "base/time.h" 9 #include "base/time.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 769 matching lines...) Expand 10 before | Expand all | Expand 10 after
780 form.fields.push_back(field); 780 form.fields.push_back(field);
781 autofill_test::CreateTestFormField("Email", "email", "", "text", &field); 781 autofill_test::CreateTestFormField("Email", "email", "", "text", &field);
782 form.fields.push_back(field); 782 form.fields.push_back(field);
783 783
784 std::vector<FormData> forms(1, form); 784 std::vector<FormData> forms(1, form);
785 785
786 // Ensure no metrics are logged when loading a non-fillable form. 786 // Ensure no metrics are logged when loading a non-fillable form.
787 { 787 {
788 EXPECT_CALL(*autofill_manager_->metric_logger(), 788 EXPECT_CALL(*autofill_manager_->metric_logger(),
789 LogDeveloperEngagementMetric(_)).Times(0); 789 LogDeveloperEngagementMetric(_)).Times(0);
790 autofill_manager_->OnFormsSeen(forms, TimeTicks(), false); 790 autofill_manager_->OnFormsSeen(forms, TimeTicks(), false, false);
ahutter 2013/03/29 19:48:31 Might want to add a TODO somewhere to collect metr
Dane Wallinga 2013/03/29 21:41:12 Is it just that the current code path doesn't dist
ahutter 2013/03/29 21:53:08 Just no UMA metrics for these new kinds of forms w
Dane Wallinga 2013/04/02 19:50:53 will do
791 autofill_manager_->Reset(); 791 autofill_manager_->Reset();
792 Mock::VerifyAndClearExpectations(autofill_manager_->metric_logger()); 792 Mock::VerifyAndClearExpectations(autofill_manager_->metric_logger());
793 } 793 }
794 794
795 // Add another field to the form, so that it becomes fillable. 795 // Add another field to the form, so that it becomes fillable.
796 autofill_test::CreateTestFormField("Phone", "phone", "", "text", &field); 796 autofill_test::CreateTestFormField("Phone", "phone", "", "text", &field);
797 forms.back().fields.push_back(field); 797 forms.back().fields.push_back(field);
798 798
799 // Expect only the "form parsed" metric to be logged; no metrics about 799 // Expect only the "form parsed" metric to be logged; no metrics about
800 // author-specified field type hints. 800 // author-specified field type hints.
801 { 801 {
802 EXPECT_CALL( 802 EXPECT_CALL(
803 *autofill_manager_->metric_logger(), 803 *autofill_manager_->metric_logger(),
804 LogDeveloperEngagementMetric( 804 LogDeveloperEngagementMetric(
805 AutofillMetrics::FILLABLE_FORM_PARSED)).Times(1); 805 AutofillMetrics::FILLABLE_FORM_PARSED)).Times(1);
806 EXPECT_CALL( 806 EXPECT_CALL(
807 *autofill_manager_->metric_logger(), 807 *autofill_manager_->metric_logger(),
808 LogDeveloperEngagementMetric( 808 LogDeveloperEngagementMetric(
809 AutofillMetrics::FILLABLE_FORM_CONTAINS_TYPE_HINTS)).Times(0); 809 AutofillMetrics::FILLABLE_FORM_CONTAINS_TYPE_HINTS)).Times(0);
810 autofill_manager_->OnFormsSeen(forms, TimeTicks(), false); 810 autofill_manager_->OnFormsSeen(forms, TimeTicks(), false, false);
811 autofill_manager_->Reset(); 811 autofill_manager_->Reset();
812 Mock::VerifyAndClearExpectations(autofill_manager_->metric_logger()); 812 Mock::VerifyAndClearExpectations(autofill_manager_->metric_logger());
813 } 813 }
814 814
815 // Add some fields with an author-specified field type to the form. 815 // Add some fields with an author-specified field type to the form.
816 // We need to add at least three fields, because a form must have at least 816 // We need to add at least three fields, because a form must have at least
817 // three fillable fields to be considered to be autofillable; and if at least 817 // three fillable fields to be considered to be autofillable; and if at least
818 // one field specifies an explicit type hint, we don't apply any of our usual 818 // one field specifies an explicit type hint, we don't apply any of our usual
819 // local heuristics to detect field types in the rest of the form. 819 // local heuristics to detect field types in the rest of the form.
820 autofill_test::CreateTestFormField("", "", "", "text", &field); 820 autofill_test::CreateTestFormField("", "", "", "text", &field);
(...skipping 10 matching lines...) Expand all
831 // hints metric to be logged. 831 // hints metric to be logged.
832 { 832 {
833 EXPECT_CALL( 833 EXPECT_CALL(
834 *autofill_manager_->metric_logger(), 834 *autofill_manager_->metric_logger(),
835 LogDeveloperEngagementMetric( 835 LogDeveloperEngagementMetric(
836 AutofillMetrics::FILLABLE_FORM_PARSED)).Times(1); 836 AutofillMetrics::FILLABLE_FORM_PARSED)).Times(1);
837 EXPECT_CALL( 837 EXPECT_CALL(
838 *autofill_manager_->metric_logger(), 838 *autofill_manager_->metric_logger(),
839 LogDeveloperEngagementMetric( 839 LogDeveloperEngagementMetric(
840 AutofillMetrics::FILLABLE_FORM_CONTAINS_TYPE_HINTS)).Times(1); 840 AutofillMetrics::FILLABLE_FORM_CONTAINS_TYPE_HINTS)).Times(1);
841 autofill_manager_->OnFormsSeen(forms, TimeTicks(), false); 841 autofill_manager_->OnFormsSeen(forms, TimeTicks(), false, false);
842 autofill_manager_->Reset(); 842 autofill_manager_->Reset();
843 Mock::VerifyAndClearExpectations(autofill_manager_->metric_logger()); 843 Mock::VerifyAndClearExpectations(autofill_manager_->metric_logger());
844 } 844 }
845 } 845 }
846 846
847 // Test that we don't log quality metrics for non-autofillable forms. 847 // Test that we don't log quality metrics for non-autofillable forms.
848 TEST_F(AutofillMetricsTest, NoQualityMetricsForNonAutofillableForms) { 848 TEST_F(AutofillMetricsTest, NoQualityMetricsForNonAutofillableForms) {
849 // Forms must include at least three fields to be auto-fillable. 849 // Forms must include at least three fields to be auto-fillable.
850 FormData form; 850 FormData form;
851 form.name = ASCIIToUTF16("TestForm"); 851 form.name = ASCIIToUTF16("TestForm");
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
1110 } 1110 }
1111 1111
1112 // Test that we log whether Autofill is enabled when filling a form. 1112 // Test that we log whether Autofill is enabled when filling a form.
1113 TEST_F(AutofillMetricsTest, AutofillIsEnabledAtPageLoad) { 1113 TEST_F(AutofillMetricsTest, AutofillIsEnabledAtPageLoad) {
1114 // Establish our expectations. 1114 // Establish our expectations.
1115 ::testing::InSequence dummy; 1115 ::testing::InSequence dummy;
1116 EXPECT_CALL(*autofill_manager_->metric_logger(), 1116 EXPECT_CALL(*autofill_manager_->metric_logger(),
1117 LogIsAutofillEnabledAtPageLoad(true)).Times(1); 1117 LogIsAutofillEnabledAtPageLoad(true)).Times(1);
1118 1118
1119 autofill_manager_->set_autofill_enabled(true); 1119 autofill_manager_->set_autofill_enabled(true);
1120 autofill_manager_->OnFormsSeen(std::vector<FormData>(), TimeTicks(), false); 1120 autofill_manager_->OnFormsSeen(std::vector<FormData>(), TimeTicks(), false, fa lse);
1121 1121
1122 // Reset the autofill manager state. 1122 // Reset the autofill manager state.
1123 autofill_manager_->Reset(); 1123 autofill_manager_->Reset();
1124 1124
1125 // Establish our expectations. 1125 // Establish our expectations.
1126 EXPECT_CALL(*autofill_manager_->metric_logger(), 1126 EXPECT_CALL(*autofill_manager_->metric_logger(),
1127 LogIsAutofillEnabledAtPageLoad(false)).Times(1); 1127 LogIsAutofillEnabledAtPageLoad(false)).Times(1);
1128 1128
1129 autofill_manager_->set_autofill_enabled(false); 1129 autofill_manager_->set_autofill_enabled(false);
1130 autofill_manager_->OnFormsSeen(std::vector<FormData>(), TimeTicks(), false); 1130 autofill_manager_->OnFormsSeen(std::vector<FormData>(), TimeTicks(), false, fa lse);
1131 } 1131 }
1132 1132
1133 // Test that credit card infobar metrics are logged correctly. 1133 // Test that credit card infobar metrics are logged correctly.
1134 TEST_F(AutofillMetricsTest, CreditCardInfoBar) { 1134 TEST_F(AutofillMetricsTest, CreditCardInfoBar) {
1135 testing::NiceMock<MockAutofillMetrics> metric_logger; 1135 testing::NiceMock<MockAutofillMetrics> metric_logger;
1136 ::testing::InSequence dummy; 1136 ::testing::InSequence dummy;
1137 1137
1138 // Accept the infobar. 1138 // Accept the infobar.
1139 { 1139 {
1140 scoped_ptr<ConfirmInfoBarDelegate> infobar(CreateDelegate(&metric_logger)); 1140 scoped_ptr<ConfirmInfoBarDelegate> infobar(CreateDelegate(&metric_logger));
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
1233 form.fields.push_back(field); 1233 form.fields.push_back(field);
1234 autofill_test::CreateTestFormField("Email", "email", "", "text", &field); 1234 autofill_test::CreateTestFormField("Email", "email", "", "text", &field);
1235 form.fields.push_back(field); 1235 form.fields.push_back(field);
1236 1236
1237 std::vector<FormData> forms(1, form); 1237 std::vector<FormData> forms(1, form);
1238 1238
1239 // Expect no notifications when the form is first seen. 1239 // Expect no notifications when the form is first seen.
1240 { 1240 {
1241 EXPECT_CALL(*autofill_manager_->metric_logger(), 1241 EXPECT_CALL(*autofill_manager_->metric_logger(),
1242 LogUserHappinessMetric(AutofillMetrics::FORMS_LOADED)).Times(0); 1242 LogUserHappinessMetric(AutofillMetrics::FORMS_LOADED)).Times(0);
1243 autofill_manager_->OnFormsSeen(forms, TimeTicks(), false); 1243 autofill_manager_->OnFormsSeen(forms, TimeTicks(), false, false);
1244 } 1244 }
1245 1245
1246 1246
1247 // Expect no notifications when the form is submitted. 1247 // Expect no notifications when the form is submitted.
1248 { 1248 {
1249 EXPECT_CALL( 1249 EXPECT_CALL(
1250 *autofill_manager_->metric_logger(), 1250 *autofill_manager_->metric_logger(),
1251 LogUserHappinessMetric( 1251 LogUserHappinessMetric(
1252 AutofillMetrics::SUBMITTED_FILLABLE_FORM_AUTOFILLED_ALL)).Times(0); 1252 AutofillMetrics::SUBMITTED_FILLABLE_FORM_AUTOFILLED_ALL)).Times(0);
1253 EXPECT_CALL( 1253 EXPECT_CALL(
(...skipping 15 matching lines...) Expand all
1269 autofill_test::CreateTestFormField("Phone", "phone", "", "text", &field); 1269 autofill_test::CreateTestFormField("Phone", "phone", "", "text", &field);
1270 form.fields.push_back(field); 1270 form.fields.push_back(field);
1271 autofill_test::CreateTestFormField("Unknown", "unknown", "", "text", &field); 1271 autofill_test::CreateTestFormField("Unknown", "unknown", "", "text", &field);
1272 form.fields.push_back(field); 1272 form.fields.push_back(field);
1273 forms.front() = form; 1273 forms.front() = form;
1274 1274
1275 // Expect a notification when the form is first seen. 1275 // Expect a notification when the form is first seen.
1276 { 1276 {
1277 EXPECT_CALL(*autofill_manager_->metric_logger(), 1277 EXPECT_CALL(*autofill_manager_->metric_logger(),
1278 LogUserHappinessMetric(AutofillMetrics::FORMS_LOADED)); 1278 LogUserHappinessMetric(AutofillMetrics::FORMS_LOADED));
1279 autofill_manager_->OnFormsSeen(forms, TimeTicks(), false); 1279 autofill_manager_->OnFormsSeen(forms, TimeTicks(), false, false);
1280 } 1280 }
1281 1281
1282 // Expect a notification when the form is submitted. 1282 // Expect a notification when the form is submitted.
1283 { 1283 {
1284 EXPECT_CALL(*autofill_manager_->metric_logger(), 1284 EXPECT_CALL(*autofill_manager_->metric_logger(),
1285 LogUserHappinessMetric( 1285 LogUserHappinessMetric(
1286 AutofillMetrics::SUBMITTED_NON_FILLABLE_FORM)); 1286 AutofillMetrics::SUBMITTED_NON_FILLABLE_FORM));
1287 autofill_manager_->FormSubmitted(form, TimeTicks::Now()); 1287 autofill_manager_->FormSubmitted(form, TimeTicks::Now());
1288 } 1288 }
1289 1289
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
1369 form.fields.push_back(field); 1369 form.fields.push_back(field);
1370 autofill_test::CreateTestFormField("Phone", "phone", "", "text", &field); 1370 autofill_test::CreateTestFormField("Phone", "phone", "", "text", &field);
1371 form.fields.push_back(field); 1371 form.fields.push_back(field);
1372 1372
1373 std::vector<FormData> forms(1, form); 1373 std::vector<FormData> forms(1, form);
1374 1374
1375 // Expect a notification when the form is first seen. 1375 // Expect a notification when the form is first seen.
1376 { 1376 {
1377 EXPECT_CALL(*autofill_manager_->metric_logger(), 1377 EXPECT_CALL(*autofill_manager_->metric_logger(),
1378 LogUserHappinessMetric(AutofillMetrics::FORMS_LOADED)); 1378 LogUserHappinessMetric(AutofillMetrics::FORMS_LOADED));
1379 autofill_manager_->OnFormsSeen(forms, TimeTicks(), false); 1379 autofill_manager_->OnFormsSeen(forms, TimeTicks(), false, false);
1380 } 1380 }
1381 1381
1382 // Simulate typing. 1382 // Simulate typing.
1383 { 1383 {
1384 EXPECT_CALL(*autofill_manager_->metric_logger(), 1384 EXPECT_CALL(*autofill_manager_->metric_logger(),
1385 LogUserHappinessMetric(AutofillMetrics::USER_DID_TYPE)); 1385 LogUserHappinessMetric(AutofillMetrics::USER_DID_TYPE));
1386 autofill_manager_->OnTextFieldDidChange(form, form.fields.front(), 1386 autofill_manager_->OnTextFieldDidChange(form, form.fields.front(),
1387 TimeTicks()); 1387 TimeTicks());
1388 } 1388 }
1389 1389
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
1489 EXPECT_CALL(*autofill_manager_->metric_logger(), 1489 EXPECT_CALL(*autofill_manager_->metric_logger(),
1490 LogFormFillDurationFromLoadWithAutofill(_)).Times(0); 1490 LogFormFillDurationFromLoadWithAutofill(_)).Times(0);
1491 EXPECT_CALL(*autofill_manager_->metric_logger(), 1491 EXPECT_CALL(*autofill_manager_->metric_logger(),
1492 LogFormFillDurationFromLoadWithoutAutofill( 1492 LogFormFillDurationFromLoadWithoutAutofill(
1493 TimeDelta::FromInternalValue(16))); 1493 TimeDelta::FromInternalValue(16)));
1494 EXPECT_CALL(*autofill_manager_->metric_logger(), 1494 EXPECT_CALL(*autofill_manager_->metric_logger(),
1495 LogFormFillDurationFromInteractionWithAutofill(_)).Times(0); 1495 LogFormFillDurationFromInteractionWithAutofill(_)).Times(0);
1496 EXPECT_CALL(*autofill_manager_->metric_logger(), 1496 EXPECT_CALL(*autofill_manager_->metric_logger(),
1497 LogFormFillDurationFromInteractionWithoutAutofill(_)).Times(0); 1497 LogFormFillDurationFromInteractionWithoutAutofill(_)).Times(0);
1498 autofill_manager_->OnFormsSeen( 1498 autofill_manager_->OnFormsSeen(
1499 forms, TimeTicks::FromInternalValue(1), false); 1499 forms, TimeTicks::FromInternalValue(1), false, false);
1500 autofill_manager_->FormSubmitted(form, TimeTicks::FromInternalValue(17)); 1500 autofill_manager_->FormSubmitted(form, TimeTicks::FromInternalValue(17));
1501 autofill_manager_->Reset(); 1501 autofill_manager_->Reset();
1502 Mock::VerifyAndClearExpectations(autofill_manager_->metric_logger()); 1502 Mock::VerifyAndClearExpectations(autofill_manager_->metric_logger());
1503 } 1503 }
1504 1504
1505 // Expect metric to be logged if the user manually edited a form field. 1505 // Expect metric to be logged if the user manually edited a form field.
1506 { 1506 {
1507 EXPECT_CALL(*autofill_manager_->metric_logger(), 1507 EXPECT_CALL(*autofill_manager_->metric_logger(),
1508 LogFormFillDurationFromLoadWithAutofill(_)).Times(0); 1508 LogFormFillDurationFromLoadWithAutofill(_)).Times(0);
1509 EXPECT_CALL(*autofill_manager_->metric_logger(), 1509 EXPECT_CALL(*autofill_manager_->metric_logger(),
1510 LogFormFillDurationFromLoadWithoutAutofill( 1510 LogFormFillDurationFromLoadWithoutAutofill(
1511 TimeDelta::FromInternalValue(16))); 1511 TimeDelta::FromInternalValue(16)));
1512 EXPECT_CALL(*autofill_manager_->metric_logger(), 1512 EXPECT_CALL(*autofill_manager_->metric_logger(),
1513 LogFormFillDurationFromInteractionWithAutofill(_)).Times(0); 1513 LogFormFillDurationFromInteractionWithAutofill(_)).Times(0);
1514 EXPECT_CALL(*autofill_manager_->metric_logger(), 1514 EXPECT_CALL(*autofill_manager_->metric_logger(),
1515 LogFormFillDurationFromInteractionWithoutAutofill( 1515 LogFormFillDurationFromInteractionWithoutAutofill(
1516 TimeDelta::FromInternalValue(14))); 1516 TimeDelta::FromInternalValue(14)));
1517 autofill_manager_->OnFormsSeen( 1517 autofill_manager_->OnFormsSeen(
1518 forms, TimeTicks::FromInternalValue(1), false); 1518 forms, TimeTicks::FromInternalValue(1), false, false);
1519 autofill_manager_->OnTextFieldDidChange(form, form.fields.front(), 1519 autofill_manager_->OnTextFieldDidChange(form, form.fields.front(),
1520 TimeTicks::FromInternalValue(3)); 1520 TimeTicks::FromInternalValue(3));
1521 autofill_manager_->FormSubmitted(form, TimeTicks::FromInternalValue(17)); 1521 autofill_manager_->FormSubmitted(form, TimeTicks::FromInternalValue(17));
1522 autofill_manager_->Reset(); 1522 autofill_manager_->Reset();
1523 Mock::VerifyAndClearExpectations(autofill_manager_->metric_logger()); 1523 Mock::VerifyAndClearExpectations(autofill_manager_->metric_logger());
1524 } 1524 }
1525 1525
1526 // Expect metric to be logged if the user autofilled the form. 1526 // Expect metric to be logged if the user autofilled the form.
1527 form.fields[0].is_autofilled = true; 1527 form.fields[0].is_autofilled = true;
1528 { 1528 {
1529 EXPECT_CALL(*autofill_manager_->metric_logger(), 1529 EXPECT_CALL(*autofill_manager_->metric_logger(),
1530 LogFormFillDurationFromLoadWithAutofill( 1530 LogFormFillDurationFromLoadWithAutofill(
1531 TimeDelta::FromInternalValue(16))); 1531 TimeDelta::FromInternalValue(16)));
1532 EXPECT_CALL(*autofill_manager_->metric_logger(), 1532 EXPECT_CALL(*autofill_manager_->metric_logger(),
1533 LogFormFillDurationFromLoadWithoutAutofill(_)).Times(0); 1533 LogFormFillDurationFromLoadWithoutAutofill(_)).Times(0);
1534 EXPECT_CALL(*autofill_manager_->metric_logger(), 1534 EXPECT_CALL(*autofill_manager_->metric_logger(),
1535 LogFormFillDurationFromInteractionWithAutofill( 1535 LogFormFillDurationFromInteractionWithAutofill(
1536 TimeDelta::FromInternalValue(12))); 1536 TimeDelta::FromInternalValue(12)));
1537 EXPECT_CALL(*autofill_manager_->metric_logger(), 1537 EXPECT_CALL(*autofill_manager_->metric_logger(),
1538 LogFormFillDurationFromInteractionWithoutAutofill(_)).Times(0); 1538 LogFormFillDurationFromInteractionWithoutAutofill(_)).Times(0);
1539 autofill_manager_->OnFormsSeen( 1539 autofill_manager_->OnFormsSeen(
1540 forms, TimeTicks::FromInternalValue(1), false); 1540 forms, TimeTicks::FromInternalValue(1), false, false);
1541 autofill_manager_->OnDidFillAutofillFormData( 1541 autofill_manager_->OnDidFillAutofillFormData(
1542 TimeTicks::FromInternalValue(5)); 1542 TimeTicks::FromInternalValue(5));
1543 autofill_manager_->FormSubmitted(form, TimeTicks::FromInternalValue(17)); 1543 autofill_manager_->FormSubmitted(form, TimeTicks::FromInternalValue(17));
1544 autofill_manager_->Reset(); 1544 autofill_manager_->Reset();
1545 Mock::VerifyAndClearExpectations(autofill_manager_->metric_logger()); 1545 Mock::VerifyAndClearExpectations(autofill_manager_->metric_logger());
1546 } 1546 }
1547 1547
1548 // Expect metric to be logged if the user both manually filled some fields 1548 // Expect metric to be logged if the user both manually filled some fields
1549 // and autofilled others. Messages can arrive out of order, so make sure they 1549 // and autofilled others. Messages can arrive out of order, so make sure they
1550 // take precedence appropriately. 1550 // take precedence appropriately.
1551 { 1551 {
1552 EXPECT_CALL(*autofill_manager_->metric_logger(), 1552 EXPECT_CALL(*autofill_manager_->metric_logger(),
1553 LogFormFillDurationFromLoadWithAutofill( 1553 LogFormFillDurationFromLoadWithAutofill(
1554 TimeDelta::FromInternalValue(16))); 1554 TimeDelta::FromInternalValue(16)));
1555 EXPECT_CALL(*autofill_manager_->metric_logger(), 1555 EXPECT_CALL(*autofill_manager_->metric_logger(),
1556 LogFormFillDurationFromLoadWithoutAutofill(_)).Times(0); 1556 LogFormFillDurationFromLoadWithoutAutofill(_)).Times(0);
1557 EXPECT_CALL(*autofill_manager_->metric_logger(), 1557 EXPECT_CALL(*autofill_manager_->metric_logger(),
1558 LogFormFillDurationFromInteractionWithAutofill( 1558 LogFormFillDurationFromInteractionWithAutofill(
1559 TimeDelta::FromInternalValue(14))); 1559 TimeDelta::FromInternalValue(14)));
1560 EXPECT_CALL(*autofill_manager_->metric_logger(), 1560 EXPECT_CALL(*autofill_manager_->metric_logger(),
1561 LogFormFillDurationFromInteractionWithoutAutofill(_)).Times(0); 1561 LogFormFillDurationFromInteractionWithoutAutofill(_)).Times(0);
1562 autofill_manager_->OnFormsSeen( 1562 autofill_manager_->OnFormsSeen(
1563 forms, TimeTicks::FromInternalValue(1), false); 1563 forms, TimeTicks::FromInternalValue(1), false, false);
1564 autofill_manager_->OnDidFillAutofillFormData( 1564 autofill_manager_->OnDidFillAutofillFormData(
1565 TimeTicks::FromInternalValue(5)); 1565 TimeTicks::FromInternalValue(5));
1566 autofill_manager_->OnTextFieldDidChange(form, form.fields.front(), 1566 autofill_manager_->OnTextFieldDidChange(form, form.fields.front(),
1567 TimeTicks::FromInternalValue(3)); 1567 TimeTicks::FromInternalValue(3));
1568 autofill_manager_->FormSubmitted(form, TimeTicks::FromInternalValue(17)); 1568 autofill_manager_->FormSubmitted(form, TimeTicks::FromInternalValue(17));
1569 autofill_manager_->Reset(); 1569 autofill_manager_->Reset();
1570 Mock::VerifyAndClearExpectations(autofill_manager_->metric_logger()); 1570 Mock::VerifyAndClearExpectations(autofill_manager_->metric_logger());
1571 } 1571 }
1572 } 1572 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698