| Index: components/policy/tools/template_writers/writers/plist_writer_unittest.py
|
| diff --git a/components/policy/tools/template_writers/writers/plist_writer_unittest.py b/components/policy/tools/template_writers/writers/plist_writer_unittest.py
|
| index 8ffa219f8f9563a65d24ca071dbbe8ea58be6c2e..57727acdc7a2935c3baa65c3cdcedfc5f3caee08 100755
|
| --- a/components/policy/tools/template_writers/writers/plist_writer_unittest.py
|
| +++ b/components/policy/tools/template_writers/writers/plist_writer_unittest.py
|
| @@ -629,6 +629,51 @@ class PListWriterUnittest(writer_unittest_common.WriterUnittestCommon):
|
| </array>''')
|
| self.assertEquals(output.strip(), expected_output.strip())
|
|
|
| + def testExternalPolicy(self):
|
| + # Tests a policy group with a single policy of type 'dict'.
|
| + policy_json = '''
|
| + {
|
| + 'policy_definitions': [
|
| + {
|
| + 'name': 'ExternalGroup',
|
| + 'type': 'group',
|
| + 'desc': '',
|
| + 'caption': '',
|
| + 'policies': [{
|
| + 'name': 'ExternalPolicy',
|
| + 'type': 'external',
|
| + 'supported_on': ['chrome.mac:8-'],
|
| + 'desc': '',
|
| + 'caption': '',
|
| + }],
|
| + },
|
| + ],
|
| + 'placeholders': [],
|
| + 'messages': {},
|
| + }'''
|
| + output = self.GetOutput(
|
| + policy_json,
|
| + {'_chromium' : '1', 'mac_bundle_id': 'com.example.Test'},
|
| + 'plist')
|
| + expected_output = self._GetExpectedOutputs(
|
| + 'Chromium', 'com.example.Test', '''<array>
|
| + <dict>
|
| + <key>pfm_name</key>
|
| + <string>ExternalPolicy</string>
|
| + <key>pfm_description</key>
|
| + <string/>
|
| + <key>pfm_title</key>
|
| + <string/>
|
| + <key>pfm_targets</key>
|
| + <array>
|
| + <string>user-managed</string>
|
| + </array>
|
| + <key>pfm_type</key>
|
| + <string>dictionary</string>
|
| + </dict>
|
| + </array>''')
|
| + self.assertEquals(output.strip(), expected_output.strip())
|
| +
|
| def testNonSupportedPolicy(self):
|
| # Tests a policy that is not supported on Mac, so it shouldn't
|
| # be included in the plist file.
|
|
|