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

Unified Diff: components/safe_json/json_sanitizer_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: components/safe_json/json_sanitizer_unittest.cc
diff --git a/components/safe_json/json_sanitizer_unittest.cc b/components/safe_json/json_sanitizer_unittest.cc
index 7caa0992e2b607b93d101a78784fc0a313f39111..aac3a494020703fdf8706428a4c4ce0858be3620 100644
--- a/components/safe_json/json_sanitizer_unittest.cc
+++ b/components/safe_json/json_sanitizer_unittest.cc
@@ -133,13 +133,13 @@ TEST_F(JsonSanitizerTest, Json) {
}
TEST_F(JsonSanitizerTest, Nesting) {
- // 99 nested arrays are fine.
- std::string nested(99u, '[');
- nested.append(99u, ']');
+ // 199 nested arrays are fine.
+ std::string nested(199u, '[');
+ nested.append(199u, ']');
CheckSuccess(nested);
- // 100 nested arrays is too much.
- CheckError(std::string(100u, '[') + std::string(100u, ']'));
+ // 200 nested arrays is too much.
+ CheckError(std::string(200u, '[') + std::string(200u, ']'));
}
TEST_F(JsonSanitizerTest, Unicode) {
« no previous file with comments | « components/safe_json/android/java/src/org/chromium/components/safejson/JsonSanitizer.java ('k') | ipc/ipc_message_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698