Index: tools/grit/grit/format/policy_templates/writers/reg_writer_unittest.py |
diff --git a/tools/grit/grit/format/policy_templates/writers/reg_writer_unittest.py b/tools/grit/grit/format/policy_templates/writers/reg_writer_unittest.py |
index 2464efdaac03698553c988e69200387ddf2d082c..5d1851e0c542ccfc0b473d98c97c1daa7e52391d 100644 |
--- a/tools/grit/grit/format/policy_templates/writers/reg_writer_unittest.py |
+++ b/tools/grit/grit/format/policy_templates/writers/reg_writer_unittest.py |
@@ -72,7 +72,7 @@ class RegWriterUnittest(writer_unittest_common.WriterUnittestCommon): |
'Windows Registry Editor Version 5.00', |
'', |
'[HKEY_LOCAL_MACHINE\\Software\\Policies\\Google\\Chrome]', |
- '"MainPolicy"=dword:1']) |
+ '"MainPolicy"=dword:00000001']) |
self.CompareOutputs(output, expected_output) |
def testStringPolicy(self): |
@@ -103,6 +103,34 @@ class RegWriterUnittest(writer_unittest_common.WriterUnittestCommon): |
'"StringPolicy"="hello, world! \\\" \\\\"']) |
self.CompareOutputs(output, expected_output) |
+ def testIntPolicy(self): |
+ # Tests a policy group with a single policy of type 'int'. |
+ grd = self.PrepareTest( |
+ '{' |
+ ' "policy_definitions": [' |
+ ' {' |
+ ' "name": "IntPolicy",' |
+ ' "type": "int",' |
+ ' "supported_on": ["chrome.win:8-"],' |
+ ' "annotations": {' |
+ ' "example_value": 26' |
+ ' }' |
+ ' },' |
+ ' ],' |
+ ' "placeholders": [],' |
+ '}', |
+ '<messages>' |
+ ' <message name="IDS_POLICY_INTPOLICY_CAPTION"></message>' |
+ ' <message name="IDS_POLICY_INTPOLICY_DESC"></message>' |
+ '</messages>') |
+ output = self.GetOutput(grd, 'fr', {'_chromium' : '1'}, 'reg', 'en') |
+ expected_output = self.NEWLINE.join([ |
+ 'Windows Registry Editor Version 5.00', |
+ '', |
+ '[HKEY_LOCAL_MACHINE\\Software\\Policies\\Chromium]', |
+ '"IntPolicy"=dword:0000001a']) |
+ self.CompareOutputs(output, expected_output) |
+ |
def testIntEnumPolicy(self): |
# Tests a policy group with a single policy of type 'int-enum'. |
grd = self.PrepareTest( |
@@ -136,7 +164,7 @@ class RegWriterUnittest(writer_unittest_common.WriterUnittestCommon): |
'Windows Registry Editor Version 5.00', |
'', |
'[HKEY_LOCAL_MACHINE\\Software\\Policies\\Google\\Chrome]', |
- '"EnumPolicy"=dword:1']) |
+ '"EnumPolicy"=dword:00000001']) |
self.CompareOutputs(output, expected_output) |
def testStringEnumPolicy(self): |