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 5d1851e0c542ccfc0b473d98c97c1daa7e52391d..62d1ac7e3e1db18c3de54f08eaadeab5d05c75b2 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 |
@@ -42,8 +42,9 @@ class RegWriterUnittest(writer_unittest_common.WriterUnittestCommon): |
'{' |
' "policy_definitions": [],' |
' "placeholders": [],' |
- '}', '<messages></messages>') |
- output = self.GetOutput(grd, 'fr', {'_chromium': '1', }, 'reg', 'en') |
+ ' "messages": {}' |
+ '}') |
+ output = self.GetOutput(grd, 'fr', {'_chromium': '1',}, 'reg', 'en') |
expected_output = 'Windows Registry Editor Version 5.00' |
self.CompareOutputs(output, expected_output) |
@@ -55,6 +56,8 @@ class RegWriterUnittest(writer_unittest_common.WriterUnittestCommon): |
' {' |
' "name": "MainPolicy",' |
' "type": "main",' |
+ ' "caption": "",' |
+ ' "desc": "",' |
' "supported_on": ["chrome.win:8-"],' |
' "annotations": {' |
' "example_value": True' |
@@ -62,11 +65,8 @@ class RegWriterUnittest(writer_unittest_common.WriterUnittestCommon): |
' },' |
' ],' |
' "placeholders": [],' |
- '}', |
- '<messages>' |
- ' <message name="IDS_POLICY_MAINPOLICY_CAPTION"></message>' |
- ' <message name="IDS_POLICY_MAINPOLICY_DESC"></message>' |
- '</messages>') |
+ ' "messages": {},' |
+ '}') |
output = self.GetOutput(grd, 'fr', {'_google_chrome' : '1'}, 'reg', 'en') |
expected_output = self.NEWLINE.join([ |
'Windows Registry Editor Version 5.00', |
@@ -83,6 +83,8 @@ class RegWriterUnittest(writer_unittest_common.WriterUnittestCommon): |
' {' |
' "name": "StringPolicy",' |
' "type": "string",' |
+ ' "caption": "",' |
+ ' "desc": "",' |
' "supported_on": ["chrome.win:8-"],' |
' "annotations": {' |
' "example_value": "hello, world! \\\" \\\\"' |
@@ -90,11 +92,8 @@ class RegWriterUnittest(writer_unittest_common.WriterUnittestCommon): |
' },' |
' ],' |
' "placeholders": [],' |
- '}', |
- '<messages>' |
- ' <message name="IDS_POLICY_STRINGPOLICY_CAPTION"></message>' |
- ' <message name="IDS_POLICY_STRINGPOLICY_DESC"></message>' |
- '</messages>') |
+ ' "messages": {},' |
+ '}') |
output = self.GetOutput(grd, 'fr', {'_chromium' : '1'}, 'reg', 'en') |
expected_output = self.NEWLINE.join([ |
'Windows Registry Editor Version 5.00', |
@@ -111,6 +110,8 @@ class RegWriterUnittest(writer_unittest_common.WriterUnittestCommon): |
' {' |
' "name": "IntPolicy",' |
' "type": "int",' |
+ ' "caption": "",' |
+ ' "desc": "",' |
' "supported_on": ["chrome.win:8-"],' |
' "annotations": {' |
' "example_value": 26' |
@@ -118,11 +119,8 @@ class RegWriterUnittest(writer_unittest_common.WriterUnittestCommon): |
' },' |
' ],' |
' "placeholders": [],' |
- '}', |
- '<messages>' |
- ' <message name="IDS_POLICY_INTPOLICY_CAPTION"></message>' |
- ' <message name="IDS_POLICY_INTPOLICY_DESC"></message>' |
- '</messages>') |
+ ' "messages": {},' |
+ '}') |
output = self.GetOutput(grd, 'fr', {'_chromium' : '1'}, 'reg', 'en') |
expected_output = self.NEWLINE.join([ |
'Windows Registry Editor Version 5.00', |
@@ -139,9 +137,11 @@ class RegWriterUnittest(writer_unittest_common.WriterUnittestCommon): |
' {' |
' "name": "EnumPolicy",' |
' "type": "int-enum",' |
+ ' "caption": "",' |
+ ' "desc": "",' |
' "items": [' |
- ' {"name": "ProxyServerDisabled", "value": 0},' |
- ' {"name": "ProxyServerAutoDetect", "value": 1},' |
+ ' {"name": "ProxyServerDisabled", "value": 0, "caption": ""},' |
+ ' {"name": "ProxyServerAutoDetect", "value": 1, "caption": ""},' |
' ],' |
' "supported_on": ["chrome.win:8-"],' |
' "annotations": {' |
@@ -150,15 +150,8 @@ class RegWriterUnittest(writer_unittest_common.WriterUnittestCommon): |
' },' |
' ],' |
' "placeholders": [],' |
- '}', |
- '<messages>' |
- ' <message name="IDS_POLICY_ENUMPOLICY_CAPTION"></message>' |
- ' <message name="IDS_POLICY_ENUMPOLICY_DESC"></message>' |
- ' <message name="IDS_POLICY_ENUM_PROXYSERVERDISABLED_CAPTION">' |
- ' </message>' |
- ' <message name="IDS_POLICY_ENUM_PROXYSERVERAUTODETECT_CAPTION">' |
- ' </message>' |
- '</messages>') |
+ ' "messages": {},' |
+ '}') |
output = self.GetOutput(grd, 'fr', {'_google_chrome': '1'}, 'reg', 'en') |
expected_output = self.NEWLINE.join([ |
'Windows Registry Editor Version 5.00', |
@@ -175,9 +168,13 @@ class RegWriterUnittest(writer_unittest_common.WriterUnittestCommon): |
' {' |
' "name": "EnumPolicy",' |
' "type": "string-enum",' |
+ ' "caption": "",' |
+ ' "desc": "",' |
' "items": [' |
- ' {"name": "ProxyServerDisabled", "value": "one"},' |
- ' {"name": "ProxyServerAutoDetect", "value": "two"},' |
+ ' {"name": "ProxyServerDisabled", "value": "one",' |
+ ' "caption": ""},' |
+ ' {"name": "ProxyServerAutoDetect", "value": "two",' |
+ ' "caption": ""},' |
' ],' |
' "supported_on": ["chrome.win:8-"],' |
' "annotations": {' |
@@ -186,15 +183,8 @@ class RegWriterUnittest(writer_unittest_common.WriterUnittestCommon): |
' },' |
' ],' |
' "placeholders": [],' |
- '}', |
- '<messages>' |
- ' <message name="IDS_POLICY_ENUMPOLICY_CAPTION"></message>' |
- ' <message name="IDS_POLICY_ENUMPOLICY_DESC"></message>' |
- ' <message name="IDS_POLICY_ENUM_PROXYSERVERDISABLED_CAPTION">' |
- ' </message>' |
- ' <message name="IDS_POLICY_ENUM_PROXYSERVERAUTODETECT_CAPTION">' |
- ' </message>' |
- '</messages>') |
+ ' "messages": {},' |
+ '}') |
output = self.GetOutput(grd, 'fr', {'_google_chrome': '1'}, 'reg', 'en') |
expected_output = self.NEWLINE.join([ |
'Windows Registry Editor Version 5.00', |
@@ -211,6 +201,8 @@ class RegWriterUnittest(writer_unittest_common.WriterUnittestCommon): |
' {' |
' "name": "ListPolicy",' |
' "type": "list",' |
+ ' "caption": "",' |
+ ' "desc": "",' |
' "supported_on": ["chrome.linux:8-"],' |
' "annotations": {' |
' "example_value": ["foo", "bar"]' |
@@ -218,12 +210,8 @@ class RegWriterUnittest(writer_unittest_common.WriterUnittestCommon): |
' },' |
' ],' |
' "placeholders": [],' |
- '}', |
- '<messages>' |
- ' <message name="IDS_POLICY_LISTPOLICY_DESC"></message>' |
- ' <message name="IDS_POLICY_LISTPOLICY_CAPTION"></message>' |
- ' <message name="IDS_POLICY_LISTPOLICY_LABEL"></message>' |
- '</messages>') |
+ ' "messages": {},' |
+ '}') |
output = self.GetOutput(grd, 'fr', {'_chromium' : '1'}, 'reg', 'en') |
expected_output = self.NEWLINE.join([ |
'Windows Registry Editor Version 5.00', |
@@ -241,6 +229,8 @@ class RegWriterUnittest(writer_unittest_common.WriterUnittestCommon): |
' {' |
' "name": "NonWindowsPolicy",' |
' "type": "list",' |
+ ' "caption": "",' |
+ ' "desc": "",' |
' "supported_on": ["chrome.mac:8-"],' |
' "annotations": {' |
' "example_value": ["a"]' |
@@ -248,11 +238,8 @@ class RegWriterUnittest(writer_unittest_common.WriterUnittestCommon): |
' },' |
' ],' |
' "placeholders": [],' |
- '}', |
- '<messages>' |
- ' <message name="IDS_POLICY_NONWINDOWSPOLICY_CAPTION"></message>' |
- ' <message name="IDS_POLICY_NONWINDOWSPOLICY_DESC"></message>' |
- '</messages>') |
+ ' "messages": {},' |
+ '}') |
output = self.GetOutput(grd, 'fr', {'_chromium' : '1'}, 'reg', 'en') |
expected_output = self.NEWLINE.join([ |
'Windows Registry Editor Version 5.00']) |
@@ -266,9 +253,13 @@ class RegWriterUnittest(writer_unittest_common.WriterUnittestCommon): |
' {' |
' "name": "Group1",' |
' "type": "group",' |
+ ' "caption": "",' |
+ ' "desc": "",' |
' "policies": [{' |
' "name": "Policy1",' |
' "type": "list",' |
+ ' "caption": "",' |
+ ' "desc": "",' |
' "supported_on": ["chrome.win:8-"],' |
' "annotations": {' |
' "example_value": ["a", "b"]' |
@@ -276,6 +267,8 @@ class RegWriterUnittest(writer_unittest_common.WriterUnittestCommon): |
' },{' |
' "name": "Policy2",' |
' "type": "string",' |
+ ' "caption": "",' |
+ ' "desc": "",' |
' "supported_on": ["chrome.win:8-"],' |
' "annotations": {' |
' "example_value": "c"' |
@@ -284,15 +277,8 @@ class RegWriterUnittest(writer_unittest_common.WriterUnittestCommon): |
' },' |
' ],' |
' "placeholders": [],' |
- '}', |
- '<messages>' |
- ' <message name="IDS_POLICY_GROUP1_CAPTION"></message>' |
- ' <message name="IDS_POLICY_GROUP1_DESC"></message>' |
- ' <message name="IDS_POLICY_POLICY1_DESC"></message>' |
- ' <message name="IDS_POLICY_POLICY2_DESC"></message>' |
- ' <message name="IDS_POLICY_POLICY1_CAPTION"></message>' |
- ' <message name="IDS_POLICY_POLICY2_CAPTION"></message>' |
- '</messages>') |
+ ' "messages": {},' |
+ '}') |
output = self.GetOutput(grd, 'fr', {'_chromium' : '1'}, 'reg', 'en') |
expected_output = self.NEWLINE.join([ |
'Windows Registry Editor Version 5.00', |