summaryrefslogtreecommitdiffstats
path: root/base/json_reader_unittest.cc
diff options
context:
space:
mode:
authorsky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-01 17:26:06 +0000
committersky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-01 17:26:06 +0000
commitd46d6f3b80099ce0c630185a2e86b649bba49254 (patch)
tree3467712dd0265f76edf1ae0fcc6da131670bad74 /base/json_reader_unittest.cc
parentf89a6233760f8ca8033265046ed9ea38bbc20bf9 (diff)
downloadchromium_src-d46d6f3b80099ce0c630185a2e86b649bba49254.zip
chromium_src-d46d6f3b80099ce0c630185a2e86b649bba49254.tar.gz
chromium_src-d46d6f3b80099ce0c630185a2e86b649bba49254.tar.bz2
Fixes bug where JSON reader errored on reading vertical tabs (\v). The
writer properly escapes a vertical tab, but the readed instead errored on the vertical this. This resulted in lost bookmarks:( BUG=3031 TEST=covered by unit tests Review URL: http://codereview.chromium.org/5628 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2759 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/json_reader_unittest.cc')
-rw-r--r--base/json_reader_unittest.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/base/json_reader_unittest.cc b/base/json_reader_unittest.cc
index c2d6a42..4339be1 100644
--- a/base/json_reader_unittest.cc
+++ b/base/json_reader_unittest.cc
@@ -214,13 +214,13 @@ TEST(JSONReaderTest, Reading) {
// Test basic string escapes
root = NULL;
- ASSERT_TRUE(JSONReader::JsonToValue("\" \\\"\\\\\\/\\b\\f\\n\\r\\t\"", &root,
+ ASSERT_TRUE(JSONReader::JsonToValue("\" \\\"\\\\\\/\\b\\f\\n\\r\\t\\v\"", &root,
false, false));
ASSERT_TRUE(root);
ASSERT_TRUE(root->IsType(Value::TYPE_STRING));
str_val.clear();
ASSERT_TRUE(root->GetAsString(&str_val));
- ASSERT_EQ(L" \"\\/\b\f\n\r\t", str_val);
+ ASSERT_EQ(L" \"\\/\b\f\n\r\t\v", str_val);
delete root;
// Test hex and unicode escapes including the null character.