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

Unified Diff: base/json/json_parser_unittest.cc

Issue 2570113002: Increase the depth limit of JSONParser and IPC serialization from 100 to 200. (Closed)
Patch Set: added comment Created 3 years, 11 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_parser_unittest.cc
diff --git a/base/json/json_parser_unittest.cc b/base/json/json_parser_unittest.cc
index 11d0de262b440e3379bc0b92bc3ff2354f9e1c3f..d004c480cf66702c4a412b385f5a08a86f3de2f3 100644
--- a/base/json/json_parser_unittest.cc
+++ b/base/json/json_parser_unittest.cc
@@ -244,14 +244,14 @@ TEST_F(JSONParserTest, ErrorMessages) {
EXPECT_EQ(JSONReader::JSON_UNEXPECTED_DATA_AFTER_ROOT, error_code);
std::string nested_json;
- for (int i = 0; i < 101; ++i) {
+ for (int i = 0; i < 201; ++i) {
nested_json.insert(nested_json.begin(), '[');
nested_json.append(1, ']');
}
root = JSONReader::ReadAndReturnError(nested_json, JSON_PARSE_RFC,
&error_code, &error_message);
EXPECT_FALSE(root.get());
- EXPECT_EQ(JSONParser::FormatErrorMessage(1, 100, JSONReader::kTooMuchNesting),
+ EXPECT_EQ(JSONParser::FormatErrorMessage(1, 200, JSONReader::kTooMuchNesting),
error_message);
EXPECT_EQ(JSONReader::JSON_TOO_MUCH_NESTING, error_code);
« no previous file with comments | « base/json/json_parser.cc ('k') | components/safe_json/android/java/src/org/chromium/components/safejson/JsonSanitizer.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698