summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autofill/autofill_profile_unittest.cc
Commit message (Collapse)AuthorAgeFilesLines
* Autofill extend profiles to include multi-valued fields, part 3.dhollowa@chromium.org2011-03-281-0/+176
| | | | | | | | | | | Adds new GetMultiInfo/SetMultiInfo methods to the AutofillProfile class and propagates the multi-valued data down through to the WebDatabase layer. Single-valued mechanisms are still in place. Some of these will be removed once Sync is updated. BUG=65625 TEST=WebDatabaseTest.*:AutofillProfileTest.* Review URL: http://codereview.chromium.org/6726042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79629 0039d316-1c4b-4281-b951-d872f2087c98
* Move some files from base to base/memory.levin@chromium.org2011-03-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | raw_scoped_refptr_mismatch_checker.h ref_counted.cc ref_counted.h ref_counted_memory.cc ref_counted_memory.h ref_counted_unittest.cc scoped_callback_factory.h scoped_comptr_win.h scoped_handle.h scoped_native_library.cc scoped_native_library.h scoped_native_library_unittest.cc scoped_nsobject.h scoped_open_process.h scoped_ptr.h scoped_ptr_unittest.cc scoped_temp_dir.cc scoped_temp_dir.h scoped_temp_dir_unittest.cc scoped_vector.h singleton.h singleton_objc.h singleton_unittest.cc linked_ptr.h linked_ptr_unittest.cc weak_ptr.cc weak_ptr.h weak_ptr_unittest.cc BUG=None TEST=Compile Review URL: http://codereview.chromium.org/6714032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79524 0039d316-1c4b-4281-b951-d872f2087c98
* Reduce boxing and unboxing of AutofillFieldTypeisherman@chromium.org2011-03-171-1/+1
| | | | | | | | | BUG=none TEST=compiles Review URL: http://codereview.chromium.org/6673079 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78518 0039d316-1c4b-4281-b951-d872f2087c98
* autofill: Rename AutoFillProfile to AutofillProfile.tfarina@chromium.org2011-03-101-90/+90
| | | | | | | | | BUG=72758 TEST=existing unit_tests Review URL: http://codereview.chromium.org/6658030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77630 0039d316-1c4b-4281-b951-d872f2087c98
* Autofill extend profiles to include multi-valued fields, part 2.dhollowa@chromium.org2011-03-091-3/+3
| | | | | | | | | | | No functional change. This partitions the |ContactInfo| class into separate name, email, and company parts. AutoFillProfile is changed to store its component members directly instead of in a map (in preparation for multiple values). And the |Clone| operation is deprecated from the |FormGroup| class on down through the inheritance tree. BUG=65625 TEST=All existing unit tests. Review URL: http://codereview.chromium.org/6650014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77425 0039d316-1c4b-4281-b951-d872f2087c98
* autofill: Rename AutoFillType to AutofillType.tfarina@chromium.org2011-03-071-1/+1
| | | | | | | | | BUG=72758 TEST=existing unit_tests Review URL: http://codereview.chromium.org/6626042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77140 0039d316-1c4b-4281-b951-d872f2087c98
* autofill: Rename AutoFillFieldType to AutofillFieldType.tfarina@chromium.org2011-03-011-3/+3
| | | | | | | | | BUG=72758 TEST=compiled locally and trybots Review URL: http://codereview.chromium.org/6592067 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76442 0039d316-1c4b-4281-b951-d872f2087c98
* Autofill i18n: Set postal code and state field labels based on the selected ↵isherman@chromium.org2011-02-251-1/+9
| | | | | | | | | | | | | | | | country. * Changes the country field to a <select> field. * Restricts the possible values for the "country" field to a set of known values * Moves the country field to the top of the Autofill dialog * Changes the field labels according to the selected country BUG=56599,56602,56604 TEST= Review URL: http://codereview.chromium.org/6484022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76117 0039d316-1c4b-4281-b951-d872f2087c98
* Autofill cleanup of labelsdhollowa@chromium.org2011-02-151-42/+34
| | | | | | | | | | | This removes remaining vestiges of profile and credit card labels as a means for identification. Labels do remain in the profile and credit card classes but are private, not persisted to the database, and created upon demand. This also cleans up the web_data_service and web_database methods that used labels as identifiers. BUG=72929 TEST=WebDataServiceAutofillTest.*:WebDatabaseTest.* and miscellaneous others. Review URL: http://codereview.chromium.org/6480073 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75028 0039d316-1c4b-4281-b951-d872f2087c98
* Don't treat empty fields as distinguishing fields for autofillisherman@chromium.org2010-12-221-0/+12
| | | | | | | | | BUG=66953, 67277 TEST=unit_tests --gtest_filter=AutoFillProfileTest.CreateInferredLabelsSkipsEmptyFields Review URL: http://codereview.chromium.org/5965002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69905 0039d316-1c4b-4281-b951-d872f2087c98
* Decompose and clean up code for determining which fields to draw from for ↵isherman@chromium.org2010-12-161-21/+89
| | | | | | | | | | | Autofill labels. BUG=66953,66810,66805 TEST=unit_tests --gtest_filter=AutoFillProfileTest.CreateInferredLabels* Review URL: http://codereview.chromium.org/5851002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69480 0039d316-1c4b-4281-b951-d872f2087c98
* Don't use empty fields as distinguishing fields for autofill.isherman@chromium.org2010-12-161-0/+26
| | | | | | | | | BUG=66953 TEST=unit_tests --gtest_filter=AutoFillProfileTest.CreateInferredLabelsSkipsEmptyFields Review URL: http://codereview.chromium.org/5848002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69381 0039d316-1c4b-4281-b951-d872f2087c98
* Move GUID utils to src/chrome/common.sergeyu@chromium.org2010-12-151-1/+1
| | | | | | | | | BUG=None TEST=compiles,unittests Review URL: http://codereview.chromium.org/5849001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69347 0039d316-1c4b-4281-b951-d872f2087c98
* Don't wrap string16() around ASCIIToUTF16()isherman@chromium.org2010-12-151-62/+54
| | | | | | | | | BUG=none TEST=it compiles Review URL: http://codereview.chromium.org/5766004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69231 0039d316-1c4b-4281-b951-d872f2087c98
* AutoFillProfile: don't replicate logic in Clone()isherman@chromium.org2010-12-131-0/+12
| | | | | | | | | BUG=none TEST=unit_tests --gtest_filter=AutoFillProfileTest.Clone Review URL: http://codereview.chromium.org/5608004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69047 0039d316-1c4b-4281-b951-d872f2087c98
* AutoFillProfile: Don't clobber data on self-assignmentisherman@chromium.org2010-12-071-0/+16
| | | | | | | | | BUG=none TEST=unit_test --gtest_filter=AutoFillProfileTest.AssignmentOperator:CreditCardTest.AssignmentOperator Review URL: http://codereview.chromium.org/5521005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68449 0039d316-1c4b-4281-b951-d872f2087c98
* Fix for Autofill popup labels should reflect the contents of the HTML formgeorgey@chromium.org2010-11-051-0/+95
| | | | | | | | BUG=58887 TEST=unit-test and in the bug Review URL: http://codereview.chromium.org/4448004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65180 0039d316-1c4b-4281-b951-d872f2087c98
* Autofill deprecate unique_ids in favor of guids for PersonalDataManagerdhollowa@chromium.org2010-11-041-2/+2
| | | | | | | | | | | Final round of unique_id deprecation. These changes migrated web_database schemas for profiles and credit cards, clean up the web_dataservice interface, bring the personal_data_manager interface inline with the GUID interfaces for web_dataservice, convert remaining unit tests to be GUID-based, and some changes to platform UI code that used unique IDs for edits. BUG=58813 TEST=WebDataServiceTest.*, WebDatabaseTest.*, WebDatabaseMigrationTest.*, PersonalDataManagerTest.*, AutoFillTest.*, AutoFillDialogControllerTest.AddNewProfile, AutoFillDialogControllerTest.AddNewCreditCard, AutoFillProfileTest.MergeWith, ProfileSyncServiceAutofillTest.*, TwoClientLiveAutofillSyncTest.* Review URL: http://codereview.chromium.org/4388001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65100 0039d316-1c4b-4281-b951-d872f2087c98
* Autofill deprecate unique_ids in favor of guids for profile and credit card ↵dhollowa@chromium.org2010-10-271-16/+16
| | | | | | | | | | | | | unit tests. Removes use of labels and unique_ids in the profile and credit card unit tests. BUG=58813 TEST=AutoFillManagerTest.*:AutoFillProfileTest.*:CreditCardTest.* Review URL: http://codereview.chromium.org/4163002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64154 0039d316-1c4b-4281-b951-d872f2087c98
* Never allow empty preview entries. As some data is always present (we drop ↵georgey@chromium.org2010-10-251-18/+55
| | | | | | | | | | | completely empty profiles), display this data in preview if name and first line of address is not available. TEST=in the bug + unit-test BUG=50320 Review URL: http://codereview.chromium.org/3806008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63806 0039d316-1c4b-4281-b951-d872f2087c98
* This is stage 1 of transition to GUIDs as primary identifier for AutoFill ↵dhollowa@chromium.org2010-10-201-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | profiles and credit cards. The transition will look like this in terms of table migration: Current: CREATE TABLE autofill_profiles ( label VARCHAR, unique_id INTEGER PRIMARY KEY, first_name VARCHAR, middle_name VARCHAR, last_name VARCHAR, email VARCHAR, company_name VARCHAR, address_line_1 VARCHAR, address_line_2 VARCHAR, city VARCHAR, state VARCHAR, zipcode VARCHAR, country VARCHAR, phone VARCHAR, fax VARCHAR); Transitional (adds guid column): CREATE TABLE autofill_profiles ( label VARCHAR, unique_id INTEGER PRIMARY KEY, first_name VARCHAR, middle_name VARCHAR, last_name VARCHAR, email VARCHAR, company_name VARCHAR, address_line_1 VARCHAR, address_line_2 VARCHAR, city VARCHAR, state VARCHAR, zipcode VARCHAR, country VARCHAR, phone VARCHAR, fax VARCHAR, guid VARCHAR NOT NULL); // <- add guid End goal (in follow up CL): CREATE TABLE autofill_profiles ( // remove label // remove unique_id guid VARCHAR NOT NULL PRIMARY KEY // <- reorder guid, make primary first_name VARCHAR, middle_name VARCHAR, last_name VARCHAR, email VARCHAR, company_name VARCHAR, address_line_1 VARCHAR, address_line_2 VARCHAR, city VARCHAR, state VARCHAR, zipcode VARCHAR, country VARCHAR, phone VARCHAR, fax VARCHAR); And similarly for the credit_cards table. BUG=58813 TEST=AutoFillProfileTest.Compare, GUIDTest.GUIDCorrectlyFormatted, WebDataServiceAutofillTest.ProfileRemoveGUID, WebDataServiceAutofillTest.CreditCardRemoveGUID, WebDatabaseTest.AutoFillProfile, WebDatabaseTest.CreditCard, WebDatabaseMigrationTest.MigrateVersion30ToCurrent Review URL: http://codereview.chromium.org/3760009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63173 0039d316-1c4b-4281-b951-d872f2087c98
* Autofill browsertestisherman@chromium.org2010-10-041-60/+55
| | | | | | | | | BUG=none TEST=interactive_ui_tests --gtest_filter=AutofillTest.* Review URL: http://codereview.chromium.org/3492009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61407 0039d316-1c4b-4281-b951-d872f2087c98
* Add #include utf_string_conversions.h to all files that use ASCIIToWide andbrettw@chromium.org2010-08-031-0/+1
| | | | | | | | | | | | | | | ASCIIToUTF16. I removed string_util includes from a few places where it obviously wasn't needed. In a separate pass, I'm going to remove ASCIITo* from string_util, then I'm going to do an even later pass to find the unnecessary string_util.h includes and remove them. TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/3058027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54746 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup: Remove unneeded headers from app/thestig@chromium.org2010-07-291-2/+0
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/2819063 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54102 0039d316-1c4b-4281-b951-d872f2087c98
* Added inferred labels implementation. Label inferred from the person name + ↵georgey@chromium.org2010-07-171-0/+183
| | | | | | | | | | | | differences in other fields to distinguish entries. Also added it to generated previews. TODO: adjust indices in the Credit Cards. TEST=unit tested. BUG=none Review URL: http://codereview.chromium.org/2835026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52786 0039d316-1c4b-4281-b951-d872f2087c98
* AutoFill: Aggregate profile data. Remove the AutoFill InfoBar. Remove more ↵jhawkins@chromium.org2010-07-011-120/+125
| | | | | | | | | | | remnants of shipping address and CVV. BUG=47426,47423 TEST=PersonalDataManager.* Review URL: http://codereview.chromium.org/2818033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51322 0039d316-1c4b-4281-b951-d872f2087c98
* AutoFill unit test cleanup for AutoFillProfileTest.dhollowa@chromium.org2010-04-121-9/+9
| | | | | | | | | | | Swap expected verus actual value in unit test. A small cleanup item. BUG=none TEST=AutoFillProfileTest Review URL: http://codereview.chromium.org/1651001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44300 0039d316-1c4b-4281-b951-d872f2087c98
* Don't use the empty string to try to match against an empty text field. Add ↵jhawkins@chromium.org2010-03-161-2/+3
| | | | | | | | | | FormField::ParseEmptyText which encapsulates matching an empty text field. BUG=38264 TEST=FormStructureTest.HeuristicsSample6 Review URL: http://codereview.chromium.org/994002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41732 0039d316-1c4b-4281-b951-d872f2087c98
* Add tests for BillingAddress::GetPossibleFieldTypes. Fix a few issues that ↵jhawkins@chromium.org2010-02-221-10/+1
| | | | | | | | | | popped up as a result of writing the tests. Remove an unnecessary test fixture from the AutoFillProfile unit test. BUG=none TEST=BillingAddress.GetPossibleFieldTypes Review URL: http://codereview.chromium.org/652057 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39646 0039d316-1c4b-4281-b951-d872f2087c98
* Adding summary string generation for the AutoFill feature.dhollowa@chromium.org2010-02-131-0/+191
Includes a small modification to the generated resources, needed additional whitespace in credit card summary. Added summary generation to autofill_profile.* and modified summary generation in credit_card.* to match. credit_card.* modifications were largely to use string16 instead of std::wstring. Factored out common unit testing utilities into autofill_common_unittest.*, and added unit tests for summary string generation for credit_card.* and autofill_profile.*. BUG=35551 TEST=unit_tests --gtest_filter=AutoFillProfileTest.*:CreditCardTest.* Review URL: http://codereview.chromium.org/606031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39002 0039d316-1c4b-4281-b951-d872f2087c98