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

Unified Diff: chrome/test/functional/autofill.py

Issue 7067011: Update autofill test to take into account for new valdation change with phone/fax numbers. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/functional/autofill.py
===================================================================
--- chrome/test/functional/autofill.py (revision 86392)
+++ chrome/test/functional/autofill.py (working copy)
@@ -80,20 +80,25 @@
self.assertEqual([], profile['credit_cards'])
def testAutofillInvalid(self):
- """Test filling in invalid values for profiles."""
- # First try profiles with invalid input.
+ """Test filling in invalid values for profiles are saved as-is.
+
+ Phone/Fax information entered into the prefs UI is not validated or rejected
+ except for duplicates.
+ """
+ # First try profiles with invalid ZIP input.
without_invalid = {'NAME_FIRST': u'Will',
'ADDRESS_HOME_CITY': 'Sunnyvale',
'ADDRESS_HOME_STATE': 'CA',
'ADDRESS_HOME_ZIP': 'my_zip',
'ADDRESS_HOME_COUNTRY': 'United States'}
- # Add some invalid fields.
+ # Add invalid data for phone and fax fields.
with_invalid = without_invalid.copy()
with_invalid['PHONE_HOME_WHOLE_NUMBER'] = 'Invalid_Phone_Number'
with_invalid['PHONE_FAX_WHOLE_NUMBER'] = 'Invalid_Fax_Number'
self.FillAutofillProfile(profiles=[with_invalid])
- self.assertEqual([without_invalid],
- self.GetAutofillProfile()['profiles'])
+ self.assertNotEqual([without_invalid],
+ self.GetAutofillProfile()['profiles'],
Nirnimesh 2011/05/24 05:32:41 fix indentation
dyu1 2011/06/07 03:25:44 Done.
+ msg='Phone/Fax data entered into prefs UI is validated.')
def testAutofillPrefsStringSavedAsIs(self):
"""Test invalid credit card numbers typed in prefs should be saved as-is."""
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698