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

Unified Diff: tools/grit/grit/format/policy_templates/writers/adml_writer_unittest.py

Issue 2509243003: Split off 'Google' category into separate ADMX/ADML files (Closed)
Patch Set: Android build fix Created 4 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 side-by-side diff with in-line comments
Download patch
Index: tools/grit/grit/format/policy_templates/writers/adml_writer_unittest.py
diff --git a/tools/grit/grit/format/policy_templates/writers/adml_writer_unittest.py b/tools/grit/grit/format/policy_templates/writers/adml_writer_unittest.py
index 08bec585618341bd1fc2cd15a4970c9aee90a989..e22d92075ae19b2a9da6ae770f373890bc227661 100755
--- a/tools/grit/grit/format/policy_templates/writers/adml_writer_unittest.py
+++ b/tools/grit/grit/format/policy_templates/writers/adml_writer_unittest.py
@@ -25,6 +25,12 @@ class AdmlWriterUnittest(xml_writer_base_unittest.XmlWriterBaseTest):
'app_name': 'test',
'build': 'test',
'win_supported_os': 'SUPPORTED_TESTOS',
+ 'win_mandatory_category_path': ['test_category'],
+ 'win_recommended_category_path': ['test_recommended_category'],
+ 'win_category_path_strings': {
+ 'test_category': 'TestCategory',
+ 'test_recommended_category': 'TestCategory - recommended'
+ },
}
self.writer = adml_writer.GetWriter(config)
self.writer.messages = {
@@ -73,7 +79,9 @@ class AdmlWriterUnittest(xml_writer_base_unittest.XmlWriterBaseTest):
'<?xml version="1.0" ?><policyDefinitionResources'
' revision="1.0" schemaVersion="1.0"><displayName/><description/>'
'<resources><stringTable><string id="SUPPORTED_TESTOS">Supported on'
- ' Test OS or higher</string></stringTable><presentationTable/>'
+ ' Test OS or higher</string><string id="test_category">TestCategory'
+ '</string><string id="test_recommended_category">'
+ 'TestCategory - recommended</string></stringTable><presentationTable/>'
'</resources></policyDefinitionResources>')
self.AssertXMLEquals(output, expected_output)
@@ -87,7 +95,9 @@ class AdmlWriterUnittest(xml_writer_base_unittest.XmlWriterBaseTest):
' revision="1.0" schemaVersion="1.0"><!--test version: 39.0.0.0-->'
'<displayName/><description/><resources><stringTable>'
'<string id="SUPPORTED_TESTOS">Supported on'
- ' Test OS or higher</string></stringTable><presentationTable/>'
+ ' Test OS or higher</string><string id="test_category">TestCategory'
+ '</string><string id="test_recommended_category">'
+ 'TestCategory - recommended</string></stringTable><presentationTable/>'
'</resources></policyDefinitionResources>')
self.AssertXMLEquals(output, expected_output)
@@ -111,6 +121,9 @@ class AdmlWriterUnittest(xml_writer_base_unittest.XmlWriterBaseTest):
expected_output = (
'<string id="SUPPORTED_TESTOS">'
'Supported on Test OS or higher</string>\n'
+ '<string id="test_category">TestCategory</string>\n'
+ '<string id="test_recommended_category">'
+ 'TestCategory - recommended</string>\n'
'<string id="PolicyGroup_group">Test Group Caption</string>')
self.AssertXMLEquals(output, expected_output)
# Assert generated presentation elements.

Powered by Google App Engine
This is Rietveld 408576698