diff options
author | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-04 04:15:26 +0000 |
---|---|---|
committer | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-04 04:15:26 +0000 |
commit | ede4e4f9bc6336248414ad265e295b9ed29398fa (patch) | |
tree | a1177f368cdbad7015f06bf169ed4028ac8e9116 /chrome/browser/autofill/autofill_download_unittest.cc | |
parent | f9fcba6a7f0d504dbb3f296c56c7970e2f81f24c (diff) | |
download | chromium_src-ede4e4f9bc6336248414ad265e295b9ed29398fa.zip chromium_src-ede4e4f9bc6336248414ad265e295b9ed29398fa.tar.gz chromium_src-ede4e4f9bc6336248414ad265e295b9ed29398fa.tar.bz2 |
AutoFill: Fix IsAutoFillable to only count fields that are heuristically
matched. Move heuristic matching into the constructor of FormStructure and
update the tests accordingly.
BUG=41255
TEST=FormStructureTest.*
Review URL: http://codereview.chromium.org/1906001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46329 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autofill/autofill_download_unittest.cc')
-rw-r--r-- | chrome/browser/autofill/autofill_download_unittest.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/chrome/browser/autofill/autofill_download_unittest.cc b/chrome/browser/autofill/autofill_download_unittest.cc index fe09261a..3738213 100644 --- a/chrome/browser/autofill/autofill_download_unittest.cc +++ b/chrome/browser/autofill/autofill_download_unittest.cc @@ -106,6 +106,14 @@ TEST(AutoFillDownloadTest, QueryAndUploadTest) { ASCIIToUTF16("username"), string16(), ASCIIToUTF16("text"))); + form.fields.push_back(webkit_glue::FormField(ASCIIToUTF16("First Name"), + ASCIIToUTF16("firstname"), + string16(), + ASCIIToUTF16("text"))); + form.fields.push_back(webkit_glue::FormField(ASCIIToUTF16("Last Name"), + ASCIIToUTF16("lastname"), + string16(), + ASCIIToUTF16("text"))); form.fields.push_back(webkit_glue::FormField(ASCIIToUTF16("email"), ASCIIToUTF16("email"), string16(), @@ -162,6 +170,8 @@ TEST(AutoFillDownloadTest, QueryAndUploadTest) { const char *responses[] = { "<autofillqueryresponse>" "<field autofilltype=\"0\" />" + "<field autofilltype=\"3\" />" + "<field autofilltype=\"5\" />" "<field autofilltype=\"9\" />" "<field autofilltype=\"0\" />" "<field autofilltype=\"30\" />" |