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

Unified Diff: chrome/common/json_value_serializer_unittest.cc

Issue 9960077: Modify the base::JSONReader interface to take a set of options rather than a boolean flag. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 8 years, 8 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
Index: chrome/common/json_value_serializer_unittest.cc
diff --git a/chrome/common/json_value_serializer_unittest.cc b/chrome/common/json_value_serializer_unittest.cc
index a7b0c37c9af94858430e1971fb39fc6c9b4a908c..11982ec32d8baa1f09135e1b54bde6c912a9681a 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());
}

Powered by Google App Engine
This is Rietveld 408576698