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

Unified Diff: grit/format/policy_templates/writers/admx_writer_unittest.py

Issue 642443004: Add a chromium version to policy template files. (Closed) Base URL: http://grit-i18n.googlecode.com/svn/trunk/
Patch Set: Created 6 years, 2 months 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 side-by-side diff with in-line comments
Download patch
Index: grit/format/policy_templates/writers/admx_writer_unittest.py
===================================================================
--- grit/format/policy_templates/writers/admx_writer_unittest.py (revision 177)
+++ grit/format/policy_templates/writers/admx_writer_unittest.py (working copy)
@@ -37,7 +37,8 @@
'win_mandatory_category_path': ['test_category'],
'win_recommended_category_path': ['test_recommended_category'],
'admx_namespace': 'ADMXWriter.Test.Namespace',
- 'admx_prefix': 'test_prefix'
+ 'admx_prefix': 'test_prefix',
+ 'build': 'test_product',
}
self.writer = admx_writer.GetWriter(config)
self.writer.Init()
@@ -82,6 +83,38 @@
'</policyDefinitions>')
self.AssertXMLEquals(output, expected_output)
+ def testEmptyVersion(self):
+ self.writer.config['version'] = '39.0.0.0'
+ self.writer.BeginTemplate()
+ self.writer.EndTemplate()
+
+ output = self.writer.GetTemplateText()
+ expected_output = (
+ '<?xml version="1.0" ?>\n'
+ '<policyDefinitions revision="1.0" schemaVersion="1.0">\n'
+ ' <!--test_product version: 39.0.0.0-->\n'
+ ' <policyNamespaces>\n'
+ ' <target namespace="ADMXWriter.Test.Namespace"'
+ ' prefix="test_prefix"/>\n'
+ ' <using namespace="Microsoft.Policies.Windows" prefix="windows"/>\n'
+ ' </policyNamespaces>\n'
+ ' <resources minRequiredRevision="1.0"/>\n'
+ ' <supportedOn>\n'
+ ' <definitions>\n'
+ ' <definition displayName="'
+ '$(string.SUPPORTED_TESTOS)" name="SUPPORTED_TESTOS"/>\n'
+ ' </definitions>\n'
+ ' </supportedOn>\n'
+ ' <categories>\n'
+ ' <category displayName="$(string.test_category)"'
+ ' name="test_category"/>\n'
+ ' <category displayName="$(string.test_recommended_category)"'
+ ' name="test_recommended_category"/>\n'
+ ' </categories>\n'
+ ' <policies/>\n'
+ '</policyDefinitions>')
+ self.AssertXMLEquals(output, expected_output)
+
def testEmptyPolicyGroup(self):
empty_policy_group = {
'name': 'PolicyGroup',
« no previous file with comments | « grit/format/policy_templates/writers/admx_writer.py ('k') | grit/format/policy_templates/writers/doc_writer.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698