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

Unified Diff: chromeos/network/onc/onc_utils_unittest.cc

Issue 2475583002: Adds option for JSON reader to allow invalid utf characters (Closed)
Patch Set: comment Created 4 years, 1 month 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
« no previous file with comments | « chromeos/network/onc/onc_test_utils.cc ('k') | chromeos/tools/onc_validator/onc_validator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/network/onc/onc_utils_unittest.cc
diff --git a/chromeos/network/onc/onc_utils_unittest.cc b/chromeos/network/onc/onc_utils_unittest.cc
index fd807eb28511035d6dff14ca1e141220b7271dac..a8577b15c380ed1a09df8c73ae031ee774223cee 100644
--- a/chromeos/network/onc/onc_utils_unittest.cc
+++ b/chromeos/network/onc/onc_utils_unittest.cc
@@ -7,6 +7,7 @@
#include <string>
#include "base/json/json_file_value_serializer.h"
+#include "base/json/json_reader.h"
#include "base/logging.h"
#include "base/macros.h"
#include "base/strings/string_number_conversions.h"
@@ -28,8 +29,8 @@ std::unique_ptr<base::Value> ReadTestJson(const std::string& filename) {
NOTREACHED() << "Unable to get test file path for: " << filename;
return result;
}
- JSONFileValueDeserializer deserializer(path);
- deserializer.set_allow_trailing_comma(true);
+ JSONFileValueDeserializer deserializer(path,
+ base::JSON_ALLOW_TRAILING_COMMAS);
std::string error_message;
result = deserializer.Deserialize(nullptr, &error_message);
CHECK(result != nullptr) << "Couldn't json-deserialize file: " << filename
« no previous file with comments | « chromeos/network/onc/onc_test_utils.cc ('k') | chromeos/tools/onc_validator/onc_validator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698