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

Side by Side Diff: grit/format/policy_templates/writers/adm_writer_unittest.py

Issue 687073003: Set the MAXLEN/maxLength attribute for strings in ADM[X] templates. (Closed) Base URL: http://grit-i18n.googlecode.com/svn/trunk/
Patch Set: Created 6 years, 1 month 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
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 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 '''Unit tests for grit.format.policy_templates.writers.adm_writer''' 6 '''Unit tests for grit.format.policy_templates.writers.adm_writer'''
7 7
8 8
9 import os 9 import os
10 import sys 10 import sys
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 KEYNAME "Software\\Policies\\Chromium" 279 KEYNAME "Software\\Policies\\Chromium"
280 280
281 POLICY !!StringPolicy_Policy 281 POLICY !!StringPolicy_Policy
282 #if version >= 4 282 #if version >= 4
283 SUPPORTED !!SUPPORTED_WINXPSP2 283 SUPPORTED !!SUPPORTED_WINXPSP2
284 #endif 284 #endif
285 EXPLAIN !!StringPolicy_Explain 285 EXPLAIN !!StringPolicy_Explain
286 286
287 PART !!StringPolicy_Part EDITTEXT 287 PART !!StringPolicy_Part EDITTEXT
288 VALUENAME "StringPolicy" 288 VALUENAME "StringPolicy"
289 MAXLEN 1000000
289 END PART 290 END PART
290 END POLICY 291 END POLICY
291 292
292 END CATEGORY 293 END CATEGORY
293 294
294 CATEGORY !!chromium_recommended 295 CATEGORY !!chromium_recommended
295 KEYNAME "Software\\Policies\\Chromium\\Recommended" 296 KEYNAME "Software\\Policies\\Chromium\\Recommended"
296 297
297 POLICY !!StringPolicy_Policy 298 POLICY !!StringPolicy_Policy
298 #if version >= 4 299 #if version >= 4
299 SUPPORTED !!SUPPORTED_WINXPSP2 300 SUPPORTED !!SUPPORTED_WINXPSP2
300 #endif 301 #endif
301 EXPLAIN !!StringPolicy_Explain 302 EXPLAIN !!StringPolicy_Explain
302 303
303 PART !!StringPolicy_Part EDITTEXT 304 PART !!StringPolicy_Part EDITTEXT
304 VALUENAME "StringPolicy" 305 VALUENAME "StringPolicy"
306 MAXLEN 1000000
305 END PART 307 END PART
306 END POLICY 308 END POLICY
307 309
308 END CATEGORY 310 END CATEGORY
309 311
310 312
311 ''', '''[Strings] 313 ''', '''[Strings]
312 SUPPORTED_WINXPSP2="At least Windows 3.13" 314 SUPPORTED_WINXPSP2="At least Windows 3.13"
313 chromium="Chromium" 315 chromium="Chromium"
314 chromium_recommended="Chromium - Recommended" 316 chromium_recommended="Chromium - Recommended"
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
763 KEYNAME "Software\\Policies\\Chromium" 765 KEYNAME "Software\\Policies\\Chromium"
764 766
765 POLICY !!DictionaryPolicy_Policy 767 POLICY !!DictionaryPolicy_Policy
766 #if version >= 4 768 #if version >= 4
767 SUPPORTED !!SUPPORTED_WINXPSP2 769 SUPPORTED !!SUPPORTED_WINXPSP2
768 #endif 770 #endif
769 EXPLAIN !!DictionaryPolicy_Explain 771 EXPLAIN !!DictionaryPolicy_Explain
770 772
771 PART !!DictionaryPolicy_Part EDITTEXT 773 PART !!DictionaryPolicy_Part EDITTEXT
772 VALUENAME "DictionaryPolicy" 774 VALUENAME "DictionaryPolicy"
775 MAXLEN 1000000
773 END PART 776 END PART
774 END POLICY 777 END POLICY
775 778
776 END CATEGORY 779 END CATEGORY
777 780
778 CATEGORY !!chromium_recommended 781 CATEGORY !!chromium_recommended
779 KEYNAME "Software\\Policies\\Chromium\\Recommended" 782 KEYNAME "Software\\Policies\\Chromium\\Recommended"
780 783
781 POLICY !!DictionaryPolicy_Policy 784 POLICY !!DictionaryPolicy_Policy
782 #if version >= 4 785 #if version >= 4
783 SUPPORTED !!SUPPORTED_WINXPSP2 786 SUPPORTED !!SUPPORTED_WINXPSP2
784 #endif 787 #endif
785 EXPLAIN !!DictionaryPolicy_Explain 788 EXPLAIN !!DictionaryPolicy_Explain
786 789
787 PART !!DictionaryPolicy_Part EDITTEXT 790 PART !!DictionaryPolicy_Part EDITTEXT
788 VALUENAME "DictionaryPolicy" 791 VALUENAME "DictionaryPolicy"
792 MAXLEN 1000000
789 END PART 793 END PART
790 END POLICY 794 END POLICY
791 795
792 END CATEGORY 796 END CATEGORY
793 797
794 798
795 ''', '''[Strings] 799 ''', '''[Strings]
796 SUPPORTED_WINXPSP2="At least Windows 3.13" 800 SUPPORTED_WINXPSP2="At least Windows 3.13"
797 chromium="Chromium" 801 chromium="Chromium"
798 chromium_recommended="Chromium - Recommended" 802 chromium_recommended="Chromium - Recommended"
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
971 END POLICY 975 END POLICY
972 976
973 POLICY !!Policy2_Policy 977 POLICY !!Policy2_Policy
974 #if version >= 4 978 #if version >= 4
975 SUPPORTED !!SUPPORTED_WINXPSP2 979 SUPPORTED !!SUPPORTED_WINXPSP2
976 #endif 980 #endif
977 EXPLAIN !!Policy2_Explain 981 EXPLAIN !!Policy2_Explain
978 982
979 PART !!Policy2_Part EDITTEXT 983 PART !!Policy2_Part EDITTEXT
980 VALUENAME "Policy2" 984 VALUENAME "Policy2"
985 MAXLEN 1000000
981 END PART 986 END PART
982 END POLICY 987 END POLICY
983 988
984 END CATEGORY 989 END CATEGORY
985 990
986 END CATEGORY 991 END CATEGORY
987 992
988 CATEGORY !!chromium_recommended 993 CATEGORY !!chromium_recommended
989 KEYNAME "Software\\Policies\\Chromium\\Recommended" 994 KEYNAME "Software\\Policies\\Chromium\\Recommended"
990 995
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
1113 EnumPolicy_A_Part="Caption of policy A." 1118 EnumPolicy_A_Part="Caption of policy A."
1114 tls1_2_DropDown="tls1.2" 1119 tls1_2_DropDown="tls1.2"
1115 EnumPolicy_B_Policy="Caption of policy B." 1120 EnumPolicy_B_Policy="Caption of policy B."
1116 EnumPolicy_B_Explain="Description of policy B." 1121 EnumPolicy_B_Explain="Description of policy B."
1117 EnumPolicy_B_Part="Caption of policy B." 1122 EnumPolicy_B_Part="Caption of policy B."
1118 ''') 1123 ''')
1119 self.CompareOutputs(output, expected_output) 1124 self.CompareOutputs(output, expected_output)
1120 1125
1121 if __name__ == '__main__': 1126 if __name__ == '__main__':
1122 unittest.main() 1127 unittest.main()
OLDNEW
« no previous file with comments | « grit/format/policy_templates/writers/adm_writer.py ('k') | grit/format/policy_templates/writers/admx_writer.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698