aboutsummaryrefslogtreecommitdiff
path: root/grit/format/policy_templates/writers/reg_writer_unittest.py
diff options
context:
space:
mode:
Diffstat (limited to 'grit/format/policy_templates/writers/reg_writer_unittest.py')
-rw-r--r--grit/format/policy_templates/writers/reg_writer_unittest.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/grit/format/policy_templates/writers/reg_writer_unittest.py b/grit/format/policy_templates/writers/reg_writer_unittest.py
index 88fb2e2..2851a8b 100644
--- a/grit/format/policy_templates/writers/reg_writer_unittest.py
+++ b/grit/format/policy_templates/writers/reg_writer_unittest.py
@@ -48,6 +48,20 @@ class RegWriterUnittest(writer_unittest_common.WriterUnittestCommon):
expected_output = 'Windows Registry Editor Version 5.00'
self.CompareOutputs(output, expected_output)
+ def testEmptyVersion(self):
+ # Test the handling of an empty policy list.
+ grd = self.PrepareTest(
+ '{'
+ ' "policy_definitions": [],'
+ ' "placeholders": [],'
+ ' "messages": {}'
+ '}')
+ output = self.GetOutput(
+ grd, 'fr', {'_chromium': '1', 'version': '39.0.0.0' }, 'reg', 'en')
+ expected_output = ('Windows Registry Editor Version 5.00\r\n'
+ '; chromium version: 39.0.0.0\r\n')
+ self.CompareOutputs(output, expected_output)
+
def testMainPolicy(self):
# Tests a policy group with a single policy of type 'main'.
grd = self.PrepareTest(