Chromium Code Reviews| 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.""" |