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

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

Issue 692033002: Set the MAXLEN/maxLength attribute for strings in ADM[X] templates. (Closed) Base URL: https://chromium.googlesource.com/external/grit-i18n.git@master
Patch Set: fixed upload 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
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 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 KEYNAME "Software\\Policies\\Chromium" 243 KEYNAME "Software\\Policies\\Chromium"
244 244
245 POLICY !!StringPolicy_Policy 245 POLICY !!StringPolicy_Policy
246 #if version >= 4 246 #if version >= 4
247 SUPPORTED !!SUPPORTED_WINXPSP2 247 SUPPORTED !!SUPPORTED_WINXPSP2
248 #endif 248 #endif
249 EXPLAIN !!StringPolicy_Explain 249 EXPLAIN !!StringPolicy_Explain
250 250
251 PART !!StringPolicy_Part EDITTEXT 251 PART !!StringPolicy_Part EDITTEXT
252 VALUENAME "StringPolicy" 252 VALUENAME "StringPolicy"
253 MAXLEN 1000000
253 END PART 254 END PART
254 END POLICY 255 END POLICY
255 256
256 END CATEGORY 257 END CATEGORY
257 258
258 CATEGORY !!chromium_recommended 259 CATEGORY !!chromium_recommended
259 KEYNAME "Software\\Policies\\Chromium\\Recommended" 260 KEYNAME "Software\\Policies\\Chromium\\Recommended"
260 261
261 POLICY !!StringPolicy_Policy 262 POLICY !!StringPolicy_Policy
262 #if version >= 4 263 #if version >= 4
263 SUPPORTED !!SUPPORTED_WINXPSP2 264 SUPPORTED !!SUPPORTED_WINXPSP2
264 #endif 265 #endif
265 EXPLAIN !!StringPolicy_Explain 266 EXPLAIN !!StringPolicy_Explain
266 267
267 PART !!StringPolicy_Part EDITTEXT 268 PART !!StringPolicy_Part EDITTEXT
268 VALUENAME "StringPolicy" 269 VALUENAME "StringPolicy"
270 MAXLEN 1000000
269 END PART 271 END PART
270 END POLICY 272 END POLICY
271 273
272 END CATEGORY 274 END CATEGORY
273 275
274 276
275 ''', '''[Strings] 277 ''', '''[Strings]
276 SUPPORTED_WINXPSP2="At least Windows 3.13" 278 SUPPORTED_WINXPSP2="At least Windows 3.13"
277 chromium="Chromium" 279 chromium="Chromium"
278 chromium_recommended="Chromium - Recommended" 280 chromium_recommended="Chromium - Recommended"
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
727 KEYNAME "Software\\Policies\\Chromium" 729 KEYNAME "Software\\Policies\\Chromium"
728 730
729 POLICY !!DictionaryPolicy_Policy 731 POLICY !!DictionaryPolicy_Policy
730 #if version >= 4 732 #if version >= 4
731 SUPPORTED !!SUPPORTED_WINXPSP2 733 SUPPORTED !!SUPPORTED_WINXPSP2
732 #endif 734 #endif
733 EXPLAIN !!DictionaryPolicy_Explain 735 EXPLAIN !!DictionaryPolicy_Explain
734 736
735 PART !!DictionaryPolicy_Part EDITTEXT 737 PART !!DictionaryPolicy_Part EDITTEXT
736 VALUENAME "DictionaryPolicy" 738 VALUENAME "DictionaryPolicy"
739 MAXLEN 1000000
737 END PART 740 END PART
738 END POLICY 741 END POLICY
739 742
740 END CATEGORY 743 END CATEGORY
741 744
742 CATEGORY !!chromium_recommended 745 CATEGORY !!chromium_recommended
743 KEYNAME "Software\\Policies\\Chromium\\Recommended" 746 KEYNAME "Software\\Policies\\Chromium\\Recommended"
744 747
745 POLICY !!DictionaryPolicy_Policy 748 POLICY !!DictionaryPolicy_Policy
746 #if version >= 4 749 #if version >= 4
747 SUPPORTED !!SUPPORTED_WINXPSP2 750 SUPPORTED !!SUPPORTED_WINXPSP2
748 #endif 751 #endif
749 EXPLAIN !!DictionaryPolicy_Explain 752 EXPLAIN !!DictionaryPolicy_Explain
750 753
751 PART !!DictionaryPolicy_Part EDITTEXT 754 PART !!DictionaryPolicy_Part EDITTEXT
752 VALUENAME "DictionaryPolicy" 755 VALUENAME "DictionaryPolicy"
756 MAXLEN 1000000
753 END PART 757 END PART
754 END POLICY 758 END POLICY
755 759
756 END CATEGORY 760 END CATEGORY
757 761
758 762
759 ''', '''[Strings] 763 ''', '''[Strings]
760 SUPPORTED_WINXPSP2="At least Windows 3.13" 764 SUPPORTED_WINXPSP2="At least Windows 3.13"
761 chromium="Chromium" 765 chromium="Chromium"
762 chromium_recommended="Chromium - Recommended" 766 chromium_recommended="Chromium - Recommended"
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
935 END POLICY 939 END POLICY
936 940
937 POLICY !!Policy2_Policy 941 POLICY !!Policy2_Policy
938 #if version >= 4 942 #if version >= 4
939 SUPPORTED !!SUPPORTED_WINXPSP2 943 SUPPORTED !!SUPPORTED_WINXPSP2
940 #endif 944 #endif
941 EXPLAIN !!Policy2_Explain 945 EXPLAIN !!Policy2_Explain
942 946
943 PART !!Policy2_Part EDITTEXT 947 PART !!Policy2_Part EDITTEXT
944 VALUENAME "Policy2" 948 VALUENAME "Policy2"
949 MAXLEN 1000000
945 END PART 950 END PART
946 END POLICY 951 END POLICY
947 952
948 END CATEGORY 953 END CATEGORY
949 954
950 END CATEGORY 955 END CATEGORY
951 956
952 CATEGORY !!chromium_recommended 957 CATEGORY !!chromium_recommended
953 KEYNAME "Software\\Policies\\Chromium\\Recommended" 958 KEYNAME "Software\\Policies\\Chromium\\Recommended"
954 959
(...skipping 24 matching lines...) Expand all
979 Policy1_Explain="Description of policy1.\\nWith a newline." 984 Policy1_Explain="Description of policy1.\\nWith a newline."
980 Policy1_Part="Caption of policy1." 985 Policy1_Part="Caption of policy1."
981 Policy2_Policy="Caption of policy2." 986 Policy2_Policy="Caption of policy2."
982 Policy2_Explain="Description of policy2.\\nWith a newline." 987 Policy2_Explain="Description of policy2.\\nWith a newline."
983 Policy2_Part="Caption of policy2." 988 Policy2_Part="Caption of policy2."
984 ''') 989 ''')
985 self.CompareOutputs(output, expected_output) 990 self.CompareOutputs(output, expected_output)
986 991
987 if __name__ == '__main__': 992 if __name__ == '__main__':
988 unittest.main() 993 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