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

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

Issue 19528007: [Autofill] Temporarily drop support for street-address autocomplete type. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update tests that used the street-address autocomplete type Created 7 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "components/autofill/core/browser/autofill_metrics.h" 5 #include "components/autofill/core/browser/autofill_metrics.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 792 matching lines...) Expand 10 before | Expand all | Expand 10 after
803 // three fillable fields to be considered to be autofillable; and if at least 803 // three fillable fields to be considered to be autofillable; and if at least
804 // one field specifies an explicit type hint, we don't apply any of our usual 804 // one field specifies an explicit type hint, we don't apply any of our usual
805 // local heuristics to detect field types in the rest of the form. 805 // local heuristics to detect field types in the rest of the form.
806 test::CreateTestFormField("", "", "", "text", &field); 806 test::CreateTestFormField("", "", "", "text", &field);
807 field.autocomplete_attribute = "given-name"; 807 field.autocomplete_attribute = "given-name";
808 forms.back().fields.push_back(field); 808 forms.back().fields.push_back(field);
809 test::CreateTestFormField("", "", "", "text", &field); 809 test::CreateTestFormField("", "", "", "text", &field);
810 field.autocomplete_attribute = "email"; 810 field.autocomplete_attribute = "email";
811 forms.back().fields.push_back(field); 811 forms.back().fields.push_back(field);
812 test::CreateTestFormField("", "", "", "text", &field); 812 test::CreateTestFormField("", "", "", "text", &field);
813 field.autocomplete_attribute = "street-address"; 813 field.autocomplete_attribute = "address-line1";
814 forms.back().fields.push_back(field); 814 forms.back().fields.push_back(field);
815 815
816 // Expect both the "form parsed" metric and the author-specified field type 816 // Expect both the "form parsed" metric and the author-specified field type
817 // hints metric to be logged. 817 // hints metric to be logged.
818 { 818 {
819 EXPECT_CALL( 819 EXPECT_CALL(
820 *autofill_manager_->metric_logger(), 820 *autofill_manager_->metric_logger(),
821 LogDeveloperEngagementMetric( 821 LogDeveloperEngagementMetric(
822 AutofillMetrics::FILLABLE_FORM_PARSED)).Times(1); 822 AutofillMetrics::FILLABLE_FORM_PARSED)).Times(1);
823 EXPECT_CALL( 823 EXPECT_CALL(
(...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after
1557 TimeTicks::FromInternalValue(5)); 1557 TimeTicks::FromInternalValue(5));
1558 autofill_manager_->OnTextFieldDidChange(form, form.fields.front(), 1558 autofill_manager_->OnTextFieldDidChange(form, form.fields.front(),
1559 TimeTicks::FromInternalValue(3)); 1559 TimeTicks::FromInternalValue(3));
1560 autofill_manager_->FormSubmitted(form, TimeTicks::FromInternalValue(17)); 1560 autofill_manager_->FormSubmitted(form, TimeTicks::FromInternalValue(17));
1561 autofill_manager_->Reset(); 1561 autofill_manager_->Reset();
1562 Mock::VerifyAndClearExpectations(autofill_manager_->metric_logger()); 1562 Mock::VerifyAndClearExpectations(autofill_manager_->metric_logger());
1563 } 1563 }
1564 } 1564 }
1565 1565
1566 } // namespace autofill 1566 } // namespace autofill
OLDNEW
« no previous file with comments | « components/autofill/core/browser/autofill_manager_unittest.cc ('k') | components/autofill/core/browser/form_structure.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698