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

Unified Diff: base/json/json_value_converter_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: base/json/json_value_converter_unittest.cc
diff --git a/base/json/json_value_converter_unittest.cc b/base/json/json_value_converter_unittest.cc
index b81a52c81716d9a852c3115042713c9aaf2844b2..46b06ed872f4a4ad1fd4783934d605adb5638efd 100644
--- a/base/json/json_value_converter_unittest.cc
+++ b/base/json/json_value_converter_unittest.cc
@@ -79,7 +79,7 @@ TEST(JSONValueConverterTest, ParseSimpleMessage) {
" \"ints\": [1, 2]"
"}\n";
- scoped_ptr<Value> value(base::JSONReader::Read(normal_data, false));
+ scoped_ptr<Value> value(base::JSONReader::Read(normal_data));
SimpleMessage message;
base::JSONValueConverter<SimpleMessage> converter;
EXPECT_TRUE(converter.Convert(*value.get(), &message));
@@ -114,7 +114,7 @@ TEST(JSONValueConverterTest, ParseNestedMessage) {
" }]\n"
"}\n";
- scoped_ptr<Value> value(base::JSONReader::Read(normal_data, false));
+ scoped_ptr<Value> value(base::JSONReader::Read(normal_data));
NestedMessage message;
base::JSONValueConverter<NestedMessage> converter;
EXPECT_TRUE(converter.Convert(*value.get(), &message));
@@ -147,7 +147,7 @@ TEST(JSONValueConverterTest, ParseFailures) {
" \"ints\": [1, 2]"
"}\n";
- scoped_ptr<Value> value(base::JSONReader::Read(normal_data, false));
+ scoped_ptr<Value> value(base::JSONReader::Read(normal_data));
SimpleMessage message;
base::JSONValueConverter<SimpleMessage> converter;
EXPECT_FALSE(converter.Convert(*value.get(), &message));
@@ -163,7 +163,7 @@ TEST(JSONValueConverterTest, ParseWithMissingFields) {
" \"ints\": [1, 2]"
"}\n";
- scoped_ptr<Value> value(base::JSONReader::Read(normal_data, false));
+ scoped_ptr<Value> value(base::JSONReader::Read(normal_data));
SimpleMessage message;
base::JSONValueConverter<SimpleMessage> converter;
// Convert() still succeeds even if the input doesn't have "bar" field.
@@ -186,7 +186,7 @@ TEST(JSONValueConverterTest, EnumParserFails) {
" \"ints\": [1, 2]"
"}\n";
- scoped_ptr<Value> value(base::JSONReader::Read(normal_data, false));
+ scoped_ptr<Value> value(base::JSONReader::Read(normal_data));
SimpleMessage message;
base::JSONValueConverter<SimpleMessage> converter;
EXPECT_FALSE(converter.Convert(*value.get(), &message));
@@ -203,7 +203,7 @@ TEST(JSONValueConverterTest, RepeatedValueErrorInTheMiddle) {
" \"ints\": [1, false]"
"}\n";
- scoped_ptr<Value> value(base::JSONReader::Read(normal_data, false));
+ scoped_ptr<Value> value(base::JSONReader::Read(normal_data));
SimpleMessage message;
base::JSONValueConverter<SimpleMessage> converter;
EXPECT_FALSE(converter.Convert(*value.get(), &message));

Powered by Google App Engine
This is Rietveld 408576698