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

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

Issue 14940026: Fixes the policy template generator to work predictably even with Python hash randomization turned … (Closed) Base URL: http://grit-i18n.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 7 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
« no previous file with comments | « grit/format/policy_templates/writers/json_writer_unittest.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: grit/format/policy_templates/writers/reg_writer_unittest.py
===================================================================
--- grit/format/policy_templates/writers/reg_writer_unittest.py (revision 119)
+++ grit/format/policy_templates/writers/reg_writer_unittest.py (working copy)
@@ -224,9 +224,6 @@
'b': 2,
}
}
- # Encode |value| here, to make sure the string encoded within the reg_writer
- # and the expected value are the same.
- value = str(example)
grd = self.PrepareTest(
'{'
' "policy_definitions": ['
@@ -236,7 +233,7 @@
' "caption": "",'
' "desc": "",'
' "supported_on": ["chrome.win:8-"],'
- ' "example_value": ' + value +
+ ' "example_value": ' + str(example) +
' },'
' ],'
' "placeholders": [],'
@@ -247,7 +244,8 @@
'Windows Registry Editor Version 5.00',
'',
'[HKEY_LOCAL_MACHINE\\Software\\Policies\\Chromium]',
- '"DictionaryPolicy"="%s"' % str(eval(value))])
+ '"DictionaryPolicy"="{\'bool\': True, \'dict\': {\'a\': 1, '
+ '\'b\': 2}, \'int\': 10, \'list\': [1, 2, 3], \'string\': \'abc\'}"'])
self.CompareOutputs(output, expected_output)
def testNonSupportedPolicy(self):
« no previous file with comments | « grit/format/policy_templates/writers/json_writer_unittest.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698