summaryrefslogtreecommitdiffstats
path: root/chrome/common/json_value_serializer_unittest.cc
diff options
context:
space:
mode:
authorrsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-11 00:15:41 +0000
committerrsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-11 00:15:41 +0000
commitcd57857578b7b905ee27580d8ca279f6f7642e82 (patch)
tree82230a21554f358452b508ee64ef1ea3efcb518b /chrome/common/json_value_serializer_unittest.cc
parentcc7cde43832b547cdab856fe1bedc9514ca38e13 (diff)
downloadchromium_src-cd57857578b7b905ee27580d8ca279f6f7642e82.zip
chromium_src-cd57857578b7b905ee27580d8ca279f6f7642e82.tar.gz
chromium_src-cd57857578b7b905ee27580d8ca279f6f7642e82.tar.bz2
Modify the base::JSONReader interface to take a set of options rather than a boolean flag.
This is just prep work for a large CL that rewrites the JSON parser. Splitting out this interface change will make it easier to review the other CL. BUG=121469 TEST=No functional change. Review URL: https://chromiumcodereview.appspot.com/9960077 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@131680 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/json_value_serializer_unittest.cc')
-rw-r--r--chrome/common/json_value_serializer_unittest.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/chrome/common/json_value_serializer_unittest.cc b/chrome/common/json_value_serializer_unittest.cc
index a7b0c37..11982ec 100644
--- a/chrome/common/json_value_serializer_unittest.cc
+++ b/chrome/common/json_value_serializer_unittest.cc
@@ -195,7 +195,7 @@ TEST(JSONValueSerializerTest, AllowTrailingComma) {
namespace {
void ValidateJsonList(const std::string& json) {
- scoped_ptr<Value> root(base::JSONReader::Read(json, false));
+ scoped_ptr<Value> root(base::JSONReader::Read(json));
ASSERT_TRUE(root.get() && root->IsType(Value::TYPE_LIST));
ListValue* list = static_cast<ListValue*>(root.get());
ASSERT_EQ(1U, list->GetSize());
@@ -219,7 +219,7 @@ TEST(JSONValueSerializerTest, JSONReaderComments) {
scoped_ptr<Value> root;
// It's ok to have a comment in a string.
- root.reset(base::JSONReader::Read("[\"// ok\\n /* foo */ \"]", false));
+ root.reset(base::JSONReader::Read("[\"// ok\\n /* foo */ \"]"));
ASSERT_TRUE(root.get() && root->IsType(Value::TYPE_LIST));
ListValue* list = static_cast<ListValue*>(root.get());
ASSERT_EQ(1U, list->GetSize());
@@ -230,11 +230,11 @@ TEST(JSONValueSerializerTest, JSONReaderComments) {
ASSERT_EQ("// ok\n /* foo */ ", value);
// You can't nest comments.
- root.reset(base::JSONReader::Read("/* /* inner */ outer */ [ 1 ]", false));
+ root.reset(base::JSONReader::Read("/* /* inner */ outer */ [ 1 ]"));
ASSERT_FALSE(root.get());
// Not a open comment token.
- root.reset(base::JSONReader::Read("/ * * / [1]", false));
+ root.reset(base::JSONReader::Read("/ * * / [1]"));
ASSERT_FALSE(root.get());
}