diff options
author | dyu@chromium.org <dyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-27 21:38:56 +0000 |
---|---|---|
committer | dyu@chromium.org <dyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-27 21:38:56 +0000 |
commit | 80ff93b4ce76198e6085dcde7241ba4fc5015d66 (patch) | |
tree | 575ef0500d7bcb4b3edd1e28ab9ba0ea1eb9cc74 | |
parent | f8146166a066a7bbd5370795ab6951a7947ded0b (diff) | |
download | chromium_src-80ff93b4ce76198e6085dcde7241ba4fc5015d66.zip chromium_src-80ff93b4ce76198e6085dcde7241ba4fc5015d66.tar.gz chromium_src-80ff93b4ce76198e6085dcde7241ba4fc5015d66.tar.bz2 |
Fixed testAppendCountryCodeForAggregatedPhones to take into account for new standardized phone format.
TEST=none
BUG=90256
Review URL: http://codereview.chromium.org/7514001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94361 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/test/functional/PYAUTO_TESTS | 4 | ||||
-rw-r--r-- | chrome/test/functional/autofill.py | 32 |
2 files changed, 23 insertions, 13 deletions
diff --git a/chrome/test/functional/PYAUTO_TESTS b/chrome/test/functional/PYAUTO_TESTS index 98f6ed5..26883c4 100644 --- a/chrome/test/functional/PYAUTO_TESTS +++ b/chrome/test/functional/PYAUTO_TESTS @@ -219,8 +219,6 @@ # ================================================== # Disabled tests that need to be investigated/fixed. # ================================================== - # crbug.com/90256 - '-autofill.AutofillTest.testAppendCountryCodeForAggregatedPhones', # crbug.com/85310 '-instant', # Gnome / kwallet popups on linux break sync tests. crbug.com/80329 @@ -253,8 +251,6 @@ # ================================================== # Disabled tests that need to be investigated/fixed. # ================================================== - # crbug.com/90256 - '-autofill.AutofillTest.testAppendCountryCodeForAggregatedPhones', # Flaky: crosbug.com/14394 '-browsing_data.BrowsingDataTest.testClearHistoryAndDownloads', # Downloads panel stays even after declining a download. diff --git a/chrome/test/functional/autofill.py b/chrome/test/functional/autofill.py index 5bc4fd4..2d91a11 100644 --- a/chrome/test/functional/autofill.py +++ b/chrome/test/functional/autofill.py @@ -12,6 +12,7 @@ import autofill_dataset_converter import autofill_dataset_generator import pyauto_functional # Must be imported before pyauto import pyauto +import test_utils class AutofillTest(pyauto.PyUITest): @@ -378,17 +379,19 @@ class AutofillTest(pyauto.PyUITest): msg='Profile with invalid country phone number saved.') def testCharsStrippedForAggregatedPhoneNumbers(self): - """Test aggregated phone numbers are cleaned (not saved "as-is").""" + """Test aggregated phone numbers are standardized (not saved "as-is").""" self._FillPhoneFormAndSubmit( 'phonecharacters.txt', 'autofill_test_form.html', tab_index=0, windex=0) + us_phone = self.GetAutofillProfile()[ + 'profiles'][0]['PHONE_HOME_WHOLE_NUMBER'] + de_phone = self.GetAutofillProfile()[ + 'profiles'][1]['PHONE_HOME_WHOLE_NUMBER'] self.assertEqual( - ['14088714567',], - self.GetAutofillProfile()['profiles'][0]['PHONE_HOME_WHOLE_NUMBER'], - msg='Aggregated US phone number not cleaned.') + ['+1 408-871-4567',], us_phone, + msg='Aggregated US phone number %s not standardized.' % us_phone) self.assertEqual( - ['4940808179000',], - self.GetAutofillProfile()['profiles'][1]['PHONE_HOME_WHOLE_NUMBER'], - msg='Aggregated Germany phone number not cleaned.') + ['+49 40/808179000',], de_phone, + msg='Aggregated Germany phone number %s not standardized.' % de_phone) def testAppendCountryCodeForAggregatedPhones(self): """Test Autofill appends country codes to aggregated phone numbers. @@ -410,8 +413,9 @@ class AutofillTest(pyauto.PyUITest): profile, 'autofill_test_form.html', tab_index=0, windex=0) de_phone = self.GetAutofillProfile()[ 'profiles'][0]['PHONE_HOME_WHOLE_NUMBER'] - self.assertEqual('+49', de_phone[0][:3], - msg='Country code missing from phone number.') + self.assertEqual( + '+49', de_phone[0][:3], + msg='Country code missing from phone number %s.' % de_phone) def testCCInfoNotStoredWhenAutocompleteOff(self): """Test CC info not offered to be saved when autocomplete=off for CC field. @@ -737,6 +741,16 @@ class AutofillTest(pyauto.PyUITest): 0, 0) return len(list_of_dict) + def testMultiValuesInProfileSync(self): + """Test thet the multi-values in Autofill profiles sync correctly.""" + creds = self.GetPrivateInfo()[test_utils.GetCredsKey(self)] + username = creds['username'] + password = creds['password'] + #login_creds = test_utils.PrepSyncLogin(self) + self.assertTrue(self.SignIntoSync(login_creds)) + self.assertTrue(self.GetSyncInfo()['summary'] == 'READY') + self.assertTrue(self.GetSyncInfo()['last synced'] == 'Just now') + if __name__ == '__main__': pyauto_functional.Main() |