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

Side by Side Diff: chrome/test/functional/autofill_dataset_generator.py

Issue 7892048: Autofill: Remove fax number completely. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comment fix. Created 9 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/test/functional/autofill_dataset_converter.py ('k') | chrome/test/pyautolib/pyauto.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2011 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Generates profile dictionaries for Autofill. 6 """Generates profile dictionaries for Autofill.
7 7
8 Used to test autofill.AutofillTest.FormFillLatencyAfterSubmit. 8 Used to test autofill.AutofillTest.FormFillLatencyAfterSubmit.
9 Can be used as a stand alone script with -h to print out help text by running: 9 Can be used as a stand alone script with -h to print out help text by running:
10 python autofill_dataset_generator.py -h 10 python autofill_dataset_generator.py -h
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 [u'NAME_LAST', None], 97 [u'NAME_LAST', None],
98 [u'EMAIL_ADDRESS', self.GenerateEmail], 98 [u'EMAIL_ADDRESS', self.GenerateEmail],
99 [u'COMPANY_NAME', None], 99 [u'COMPANY_NAME', None],
100 [u'ADDRESS_HOME_LINE1', self.GenerateAddress], 100 [u'ADDRESS_HOME_LINE1', self.GenerateAddress],
101 [u'ADDRESS_HOME_LINE2', None], 101 [u'ADDRESS_HOME_LINE2', None],
102 [u'ADDRESS_HOME_CITY', self.GenerateCity], 102 [u'ADDRESS_HOME_CITY', self.GenerateCity],
103 [u'ADDRESS_HOME_STATE', self.GenerateState], 103 [u'ADDRESS_HOME_STATE', self.GenerateState],
104 [u'ADDRESS_HOME_ZIP', self.GenerateZip], 104 [u'ADDRESS_HOME_ZIP', self.GenerateZip],
105 [u'ADDRESS_HOME_COUNTRY', u'United States'], 105 [u'ADDRESS_HOME_COUNTRY', u'United States'],
106 [u'PHONE_HOME_WHOLE_NUMBER', None], 106 [u'PHONE_HOME_WHOLE_NUMBER', None],
107 [u'PHONE_FAX_WHOLE_NUMBER', u'6501234555'],
108 ] 107 ]
109 108
110 self.next_dict = {} 109 self.next_dict = {}
111 # Using implicit line joining does not work well in this case as each line 110 # Using implicit line joining does not work well in this case as each line
112 # has to be strings and not function calls that may return strings. 111 # has to be strings and not function calls that may return strings.
113 self.output_pattern = u'{\'' + \ 112 self.output_pattern = u'{\'' + \
114 u', '.join([u'u"%s" : u"%%s"' % key for key, method in self.fields]) + \ 113 u', '.join([u'u"%s" : u"%%s"' % key for key, method in self.fields]) + \
115 u',}' 114 u',}'
116 115
117 def _GenerateField(self, field_construct): 116 def _GenerateField(self, field_construct):
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 options.log_level = logging.WARNING 298 options.log_level = logging.WARNING
300 elif options.log_level == 'error': 299 elif options.log_level == 'error':
301 options.log_level = logging.ERROR 300 options.log_level = logging.ERROR
302 301
303 gen = DatasetGenerator(options.output_filename, options.log_level) 302 gen = DatasetGenerator(options.output_filename, options.log_level)
304 gen.GenerateDataset(options.dict_no) 303 gen.GenerateDataset(options.dict_no)
305 304
306 305
307 if __name__ == '__main__': 306 if __name__ == '__main__':
308 main() 307 main()
OLDNEW
« no previous file with comments | « chrome/test/functional/autofill_dataset_converter.py ('k') | chrome/test/pyautolib/pyauto.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698