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

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

Issue 2475583002: Adds option for JSON reader to allow invalid utf characters (Closed)
Patch Set: replace 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
Index: chromeos/network/onc/onc_test_utils.cc
diff --git a/chromeos/network/onc/onc_test_utils.cc b/chromeos/network/onc/onc_test_utils.cc
index ffb18df88cdef0794727b1aec8d658973f1e3d83..d11f759c6727093704c22aad760cd04552c27b05 100644
--- a/chromeos/network/onc/onc_test_utils.cc
+++ b/chromeos/network/onc/onc_test_utils.cc
@@ -9,6 +9,7 @@
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/json/json_file_value_serializer.h"
+#include "base/json/json_reader.h"
#include "base/logging.h"
#include "base/values.h"
#include "chromeos/chromeos_test_utils.h"
@@ -50,8 +51,8 @@ std::unique_ptr<base::DictionaryValue> ReadTestDictionary(
return dict;
}
- JSONFileValueDeserializer deserializer(path);
- deserializer.set_allow_trailing_comma(true);
+ JSONFileValueDeserializer deserializer(path,
+ base::JSON_ALLOW_TRAILING_COMMAS);
std::string error_message;
std::unique_ptr<base::Value> content =

Powered by Google App Engine
This is Rietveld 408576698