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

Unified Diff: chrome/test/base/ui_test_utils.cc

Issue 9960077: Modify the base::JSONReader interface to take a set of options rather than a boolean flag. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 8 years, 8 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: chrome/test/base/ui_test_utils.cc
diff --git a/chrome/test/base/ui_test_utils.cc b/chrome/test/base/ui_test_utils.cc
index 26e8df978f519465c6b91430d6980834e43a28b2..58f585dc9fb105b12a78a9b21a8084b74ed3e464 100644
--- a/chrome/test/base/ui_test_utils.cc
+++ b/chrome/test/base/ui_test_utils.cc
@@ -246,7 +246,8 @@ bool ExecuteJavaScriptHelper(RenderViewHost* render_view_host,
json.insert(0, "[");
json.append("]");
- scoped_ptr<Value> root_val(base::JSONReader::Read(json, true));
+ scoped_ptr<Value> root_val(
+ base::JSONReader::Read(json, base::JSON_ALLOW_TRAILING_COMMAS));
if (!root_val->IsType(Value::TYPE_LIST)) {
DLOG(ERROR) << "JSON result is not a list.";
return false;
@@ -1105,7 +1106,8 @@ class SnapshotTaker {
// Parse the JSON.
std::vector<int> dimensions;
- scoped_ptr<Value> value(base::JSONReader::Read(json, true));
+ scoped_ptr<Value> value(
+ base::JSONReader::Read(json, base::JSON_ALLOW_TRAILING_COMMAS));
if (!value->IsType(Value::TYPE_LIST))
return false;
ListValue* list = static_cast<ListValue*>(value.get());

Powered by Google App Engine
This is Rietveld 408576698