summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autofill/form_structure_unittest.cc
diff options
context:
space:
mode:
authordhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-19 21:56:18 +0000
committerdhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-19 21:56:18 +0000
commitdd1b4959032fd4684534ff07dab83f71391b36aa (patch)
treefe904cf6a90dcb7a1e3795fe3c203b86f2fdca0f /chrome/browser/autofill/form_structure_unittest.cc
parentde49ea10c04eb354ab0187b8f98898c272660037 (diff)
downloadchromium_src-dd1b4959032fd4684534ff07dab83f71391b36aa.zip
chromium_src-dd1b4959032fd4684534ff07dab83f71391b36aa.tar.gz
chromium_src-dd1b4959032fd4684534ff07dab83f71391b36aa.tar.bz2
AutoFill fill billing address when credit card settings specify a billing address.
Fixes address type matching in |AddressField::AddressTypeFromText| method. Also, extends |AutoFillManager::FillAutoFillFormData| method to fill associated billing address when filling a credit card that has billing information set in preferences. Adds new unit test AutoFillManagerTest.FillCreditCardFormWithBilling and fixes others. BUG=44227 TEST=AddressFieldTest.ParseOneLineAddress, \ AddressFieldTest.ParseOneLineAddressBilling, \ AddressFieldTest.ParseOneLineAddressShipping, \ AutoFillManagerTest.FillCreditCardForm, \ AutoFillManagerTest.FillCreditCardFormWithBilling, \ FormStructureTest.HeuristicsSample8, \ and manual test with everything2.html bug file. Review URL: http://codereview.chromium.org/2078016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47731 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autofill/form_structure_unittest.cc')
-rw-r--r--chrome/browser/autofill/form_structure_unittest.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/chrome/browser/autofill/form_structure_unittest.cc b/chrome/browser/autofill/form_structure_unittest.cc
index 3dd8b49c..ed90de3 100644
--- a/chrome/browser/autofill/form_structure_unittest.cc
+++ b/chrome/browser/autofill/form_structure_unittest.cc
@@ -410,17 +410,17 @@ TEST(FormStructureTest, HeuristicsSample8) {
// Last name.
EXPECT_EQ(NAME_LAST, form_structure->field(1)->heuristic_type());
// Address.
- EXPECT_EQ(ADDRESS_HOME_LINE1, form_structure->field(2)->heuristic_type());
+ EXPECT_EQ(ADDRESS_BILLING_LINE1, form_structure->field(2)->heuristic_type());
// Address.
- EXPECT_EQ(ADDRESS_HOME_LINE2, form_structure->field(3)->heuristic_type());
+ EXPECT_EQ(ADDRESS_BILLING_LINE2, form_structure->field(3)->heuristic_type());
// City.
- EXPECT_EQ(ADDRESS_HOME_CITY, form_structure->field(4)->heuristic_type());
+ EXPECT_EQ(ADDRESS_BILLING_CITY, form_structure->field(4)->heuristic_type());
// State.
- EXPECT_EQ(ADDRESS_HOME_STATE, form_structure->field(5)->heuristic_type());
+ EXPECT_EQ(ADDRESS_BILLING_STATE, form_structure->field(5)->heuristic_type());
// Zip.
- EXPECT_EQ(ADDRESS_HOME_ZIP, form_structure->field(6)->heuristic_type());
+ EXPECT_EQ(ADDRESS_BILLING_ZIP, form_structure->field(6)->heuristic_type());
// Country.
- EXPECT_EQ(ADDRESS_HOME_COUNTRY, form_structure->field(7)->heuristic_type());
+ EXPECT_EQ(ADDRESS_BILLING_COUNTRY, form_structure->field(7)->heuristic_type());
// Phone.
EXPECT_EQ(PHONE_HOME_WHOLE_NUMBER,
form_structure->field(8)->heuristic_type());