Commit cc8ecaaf authored by Yann Dago's avatar Yann Dago Committed by Commit Bot

Treat dictionary polies as strings when generating appconfig.xml

Bug: 1065906
Change-Id: Ia8fc6d9e5bd352c3616bb0a9a99c5835055b74e2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2144676Reviewed-by: default avatarJulian Pastarmov <pastarmovj@chromium.org>
Commit-Queue: Yann Dago <ydago@chromium.org>
Cr-Commit-Position: refs/heads/master@{#758836}
parent b4ba1614
...@@ -54,7 +54,7 @@ class IOSAppConfigWriter(xml_formatted_writer.XMLFormattedWriter): ...@@ -54,7 +54,7 @@ class IOSAppConfigWriter(xml_formatted_writer.XMLFormattedWriter):
'string-enum-list': 'stringArray', 'string-enum-list': 'stringArray',
'main': 'boolean', 'main': 'boolean',
'list': 'stringArray', 'list': 'stringArray',
'dict': None, 'dict': 'string',
} }
def GetTemplateText(self): def GetTemplateText(self):
......
...@@ -125,9 +125,10 @@ class IOSAppConfigWriterUnitTests(writer_unittest_common.WriterUnittestCommon): ...@@ -125,9 +125,10 @@ class IOSAppConfigWriterUnitTests(writer_unittest_common.WriterUnittestCommon):
def testDictPolicy(self): def testDictPolicy(self):
policy_json = self._GetTestPolicyTemplate('DictPolicy', 'dict') policy_json = self._GetTestPolicyTemplate('DictPolicy', 'dict')
# Dict policies are not supported by the appconfig.xml format and should not # Dict policies are not supported by the appconfig.xml format, therefore
# be present in the output. # they are treated as JSON strings.
expected = self._GetExpectedOutput('83.0.4089.0', None) expected = self._GetExpectedOutput('83.0.4089.0',
'<string keyName="DictPolicy"/>')
output = self.GetOutput(policy_json, { output = self.GetOutput(policy_json, {
'_google_chrome': '1', '_google_chrome': '1',
'version': '83.0.4089.0' 'version': '83.0.4089.0'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment