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

Unified Diff: base/json/json_value_serializer_unittest.cc

Issue 1180693002: Update from https://crrev.com/333737 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: rebased Created 5 years, 6 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
« no previous file with comments | « base/json/json_value_converter_unittest.cc ('k') | base/json/json_writer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/json/json_value_serializer_unittest.cc
diff --git a/base/json/json_value_serializer_unittest.cc b/base/json/json_value_serializer_unittest.cc
index b8aebe0656d3c6ea649dc8e650d73bc9e463e1f2..a4d7cdce06b66d33e4e8fae5a31843ca540cacd1 100644
--- a/base/json/json_value_serializer_unittest.cc
+++ b/base/json/json_value_serializer_unittest.cc
@@ -75,7 +75,7 @@ void CheckJSONIsStillTheSame(const Value& value) {
}
void ValidateJsonList(const std::string& json) {
- scoped_ptr<Value> root(JSONReader::Read(json));
+ scoped_ptr<Value> root = JSONReader::Read(json);
ASSERT_TRUE(root.get() && root->IsType(Value::TYPE_LIST));
ListValue* list = static_cast<ListValue*>(root.get());
ASSERT_EQ(1U, list->GetSize());
@@ -302,7 +302,7 @@ TEST(JSONValueSerializerTest, StringEscape) {
std::string output_js;
DictionaryValue valueRoot;
valueRoot.SetString("all_chars", all_chars);
- JSONWriter::Write(&valueRoot, &output_js);
+ JSONWriter::Write(valueRoot, &output_js);
ASSERT_EQ(expected_output, output_js);
// Test JSONValueSerializer interface (uses JSONWriter).
@@ -379,7 +379,7 @@ TEST(JSONValueSerializerTest, JSONReaderComments) {
scoped_ptr<Value> root;
// It's ok to have a comment in a string.
- root.reset(JSONReader::Read("[\"// ok\\n /* foo */ \"]"));
+ root.reset(JSONReader::DeprecatedRead("[\"// ok\\n /* foo */ \"]"));
ASSERT_TRUE(root.get() && root->IsType(Value::TYPE_LIST));
ListValue* list = static_cast<ListValue*>(root.get());
ASSERT_EQ(1U, list->GetSize());
@@ -390,11 +390,11 @@ TEST(JSONValueSerializerTest, JSONReaderComments) {
ASSERT_EQ("// ok\n /* foo */ ", value);
// You can't nest comments.
- root.reset(JSONReader::Read("/* /* inner */ outer */ [ 1 ]"));
+ root.reset(JSONReader::DeprecatedRead("/* /* inner */ outer */ [ 1 ]"));
ASSERT_FALSE(root.get());
// Not a open comment token.
- root.reset(JSONReader::Read("/ * * / [1]"));
+ root.reset(JSONReader::DeprecatedRead("/ * * / [1]"));
ASSERT_FALSE(root.get());
}
« no previous file with comments | « base/json/json_value_converter_unittest.cc ('k') | base/json/json_writer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698