From 93d49d70b89b22ec46d0b00b7950297f64865d56 Mon Sep 17 00:00:00 2001 From: "brettw@chromium.org" Date: Fri, 23 Oct 2009 20:00:20 +0000 Subject: Move the json-related files into a separate json directory. This hopefully also makes the naming of string_escape more clear (it's actually JSON-specific). Move the files into the base namespace. TEST=none BUG=none Review URL: http://codereview.chromium.org/316016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29934 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/common/json_value_serializer_unittest.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'chrome/common/json_value_serializer_unittest.cc') diff --git a/chrome/common/json_value_serializer_unittest.cc b/chrome/common/json_value_serializer_unittest.cc index e622458..d1475ec 100644 --- a/chrome/common/json_value_serializer_unittest.cc +++ b/chrome/common/json_value_serializer_unittest.cc @@ -4,8 +4,8 @@ #include "base/basictypes.h" #include "base/file_util.h" -#include "base/json_reader.h" -#include "base/json_writer.h" +#include "base/json/json_reader.h" +#include "base/json/json_writer.h" #include "base/path_service.h" #include "base/string_util.h" #include "base/values.h" @@ -106,7 +106,7 @@ TEST(JSONValueSerializerTest, StringEscape) { std::string output_js; DictionaryValue valueRoot; valueRoot.SetString(L"all_chars", all_chars); - JSONWriter::Write(&valueRoot, false, &output_js); + base::JSONWriter::Write(&valueRoot, false, &output_js); ASSERT_EQ(expected_output, output_js); // Test JSONValueSerializer interface (uses JSONWriter). @@ -191,7 +191,7 @@ TEST(JSONValueSerializerTest, AllowTrailingComma) { namespace { void ValidateJsonList(const std::string& json) { - scoped_ptr root(JSONReader::Read(json, false)); + scoped_ptr root(base::JSONReader::Read(json, false)); ASSERT_TRUE(root.get() && root->IsType(Value::TYPE_LIST)); ListValue* list = static_cast(root.get()); ASSERT_EQ(1U, list->GetSize()); @@ -215,7 +215,7 @@ TEST(JSONValueSerializerTest, JSONReaderComments) { scoped_ptr root; // It's ok to have a comment in a string. - root.reset(JSONReader::Read("[\"// ok\\n /* foo */ \"]", false)); + root.reset(base::JSONReader::Read("[\"// ok\\n /* foo */ \"]", false)); ASSERT_TRUE(root.get() && root->IsType(Value::TYPE_LIST)); ListValue* list = static_cast(root.get()); ASSERT_EQ(1U, list->GetSize()); @@ -226,11 +226,11 @@ TEST(JSONValueSerializerTest, JSONReaderComments) { ASSERT_EQ(L"// ok\n /* foo */ ", value); // You can't nest comments. - root.reset(JSONReader::Read("/* /* inner */ outer */ [ 1 ]", false)); + root.reset(base::JSONReader::Read("/* /* inner */ outer */ [ 1 ]", false)); ASSERT_FALSE(root.get()); // Not a open comment token. - root.reset(JSONReader::Read("/ * * / [1]", false)); + root.reset(base::JSONReader::Read("/ * * / [1]", false)); ASSERT_FALSE(root.get()); } -- cgit v1.1