diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-23 20:00:20 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-23 20:00:20 +0000 |
commit | 93d49d70b89b22ec46d0b00b7950297f64865d56 (patch) | |
tree | 3243e0209c738df0c18c2ba615667f757fcaec94 /chrome/common/json_value_serializer_unittest.cc | |
parent | a9f607e33a91604bc63bd8c846aefbda9bf0dfa9 (diff) | |
download | chromium_src-93d49d70b89b22ec46d0b00b7950297f64865d56.zip chromium_src-93d49d70b89b22ec46d0b00b7950297f64865d56.tar.gz chromium_src-93d49d70b89b22ec46d0b00b7950297f64865d56.tar.bz2 |
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
Diffstat (limited to 'chrome/common/json_value_serializer_unittest.cc')
-rw-r--r-- | chrome/common/json_value_serializer_unittest.cc | 14 |
1 files changed, 7 insertions, 7 deletions
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<Value> root(JSONReader::Read(json, false)); + scoped_ptr<Value> root(base::JSONReader::Read(json, false)); ASSERT_TRUE(root.get() && root->IsType(Value::TYPE_LIST)); ListValue* list = static_cast<ListValue*>(root.get()); ASSERT_EQ(1U, list->GetSize()); @@ -215,7 +215,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 */ \"]", false)); + root.reset(base::JSONReader::Read("[\"// ok\\n /* foo */ \"]", false)); ASSERT_TRUE(root.get() && root->IsType(Value::TYPE_LIST)); ListValue* list = static_cast<ListValue*>(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()); } |