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

Unified Diff: chrome/common/json_value_serializer_unittest.cc

Issue 316016: Move the json-related files into a separate json directory. This hopefully al... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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 | « chrome/common/json_value_serializer.cc ('k') | chrome/common/sandbox_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/json_value_serializer_unittest.cc
===================================================================
--- chrome/common/json_value_serializer_unittest.cc (revision 29830)
+++ chrome/common/json_value_serializer_unittest.cc (working copy)
@@ -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 @@
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 @@
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 @@
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 @@
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());
}
« no previous file with comments | « chrome/common/json_value_serializer.cc ('k') | chrome/common/sandbox_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698