summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autofill/phone_field.cc
diff options
context:
space:
mode:
authordhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-11 22:49:04 +0000
committerdhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-11 22:49:04 +0000
commit9913ab8cc18beafd08427e3fd9d4786836e69949 (patch)
tree218e40aae0b1c721639fc864c67c530a47783a44 /chrome/browser/autofill/phone_field.cc
parent9b0df87239c63ac3facc5a7937903b4eddcb31e4 (diff)
downloadchromium_src-9913ab8cc18beafd08427e3fd9d4786836e69949.zip
chromium_src-9913ab8cc18beafd08427e3fd9d4786836e69949.tar.gz
chromium_src-9913ab8cc18beafd08427e3fd9d4786836e69949.tar.bz2
AutoFill field parser fixes.
This fixes a number of form field parsing issues. Ecml field name matching. Adds country field parsing. Adds state field parsing. Multi-line address parsing. Fixes issue with empty field names confusing the parser. Fixes issue with phone field parsing. Adds unit tests in form_structure_unittest.cc to verify parsing order issues. Adds new unit tests address_field_unittest.cc that cover parsing of each address component as well as Ecml variants. BUG=37776 TEST=FormStructureTest.Heuristics:AddressFieldTest.*, as well as manual steps described in bug report. Review URL: http://codereview.chromium.org/867003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41331 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autofill/phone_field.cc')
-rw-r--r--chrome/browser/autofill/phone_field.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/chrome/browser/autofill/phone_field.cc b/chrome/browser/autofill/phone_field.cc
index 00ff7ba..ea9ec71c 100644
--- a/chrome/browser/autofill/phone_field.cc
+++ b/chrome/browser/autofill/phone_field.cc
@@ -42,11 +42,11 @@ PhoneField* PhoneField::Parse(std::vector<AutoFillField*>::const_iterator* iter,
// uk/Furniture123-1.html) have several phone numbers in succession and we
// don't want those to be parsed as components of a single phone number.
if (phone2 == NULL)
- ParseText(&q, ASCIIToUTF16("^-|\\)|"), &phone2);
+ ParseText(&q, ASCIIToUTF16("^-$|\\)$"), &phone2);
// Look for a third text box.
if (phone2)
- ParseText(&q, ASCIIToUTF16("^-|"), &phone3);
+ ParseText(&q, ASCIIToUTF16("^-$"), &phone3);
// Now we have one, two, or three phone number text fields. Package them
// up into a PhoneField object.