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

Unified Diff: grit/format/chrome_messages_json_unittest.py

Issue 18860003: Use JSONEncoder to escape JSON strings. (Closed) Base URL: https://grit-i18n.googlecode.com/svn/trunk
Patch Set: Created 7 years, 5 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/chrome_messages_json.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: grit/format/chrome_messages_json_unittest.py
diff --git a/grit/format/chrome_messages_json_unittest.py b/grit/format/chrome_messages_json_unittest.py
index 8cbd672a53fe43857de2b423c7d2ed05db62abc3..484230fe49b5c7a7cdb84baee20c7189785d9f1b 100644
--- a/grit/format/chrome_messages_json_unittest.py
+++ b/grit/format/chrome_messages_json_unittest.py
@@ -53,7 +53,7 @@ class ChromeMessagesJsonFormatUnittest(unittest.TestCase):
"message": "Simple message."
},
"IDS_QUOTES": {
- "message": "element\u2019s \u201c%s\u201d attribute"
+ "message": "element\\u2019s \\u201c%s\\u201d attribute"
},
"IDS_PLACEHOLDERS": {
"message": "%1$d error, %2$d warning"
@@ -86,10 +86,10 @@ class ChromeMessagesJsonFormatUnittest(unittest.TestCase):
test = u"""
{
"ID_HELLO": {
- "message": "H\xe9P\xe9ll\xf4P\xf4!"
+ "message": "H\\u00e9P\\u00e9ll\\u00f4P\\u00f4!"
},
"ID_HELLO_USER": {
- "message": "H\xe9P\xe9ll\xf4P\xf4 %s"
+ "message": "H\\u00e9P\\u00e9ll\\u00f4P\\u00f4 %s"
}
}
"""
« no previous file with comments | « grit/format/chrome_messages_json.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698