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 d23a1e9a0e730ad6343b003a59f837d1740ca590..b81a52c81716d9a852c3115042713c9aaf2844b2 100644 |
--- a/base/json/json_value_converter_unittest.cc |
+++ b/base/json/json_value_converter_unittest.cc |
@@ -193,4 +193,21 @@ TEST(JSONValueConverterTest, EnumParserFails) { |
// No check the values as mentioned above. |
} |
+TEST(JSONValueConverterTest, RepeatedValueErrorInTheMiddle) { |
+ const char normal_data[] = |
+ "{\n" |
+ " \"foo\": 1,\n" |
+ " \"bar\": \"bar\",\n" |
+ " \"baz\": true,\n" |
+ " \"simple_enum\": \"baz\"," |
+ " \"ints\": [1, false]" |
+ "}\n"; |
+ |
+ scoped_ptr<Value> value(base::JSONReader::Read(normal_data, false)); |
+ SimpleMessage message; |
+ base::JSONValueConverter<SimpleMessage> converter; |
+ EXPECT_FALSE(converter.Convert(*value.get(), &message)); |
+ // No check the values as mentioned above. |
+} |
+ |
} // namespace base |