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

Unified Diff: base/json/json_writer_unittest.cc

Issue 8528051: Revert 110021 - Broke CrOS compile (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 1 month 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_writer.cc ('k') | chrome/browser/browser_about_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/json/json_writer_unittest.cc
===================================================================
--- base/json/json_writer_unittest.cc (revision 110026)
+++ base/json/json_writer_unittest.cc (working copy)
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -93,32 +93,6 @@
period_dict3.SetWithoutPathExpansion("a.b", Value::CreateIntegerValue(1));
JSONWriter::Write(&period_dict3, false, &output_js);
ASSERT_EQ("{\"a\":{\"b\":2},\"a.b\":1}", output_js);
-
- // Test ignoring binary values.
- root = BinaryValue::CreateWithCopiedBuffer("asdf", 4);
- JSONWriter::WriteWithOptions(root, false,
- JSONWriter::OPTIONS_OMIT_BINARY_VALUES,
- &output_js);
- ASSERT_TRUE(output_js.empty());
- delete root;
-
- ListValue binary_list;
- binary_list.Append(Value::CreateIntegerValue(5));
- binary_list.Append(BinaryValue::CreateWithCopiedBuffer("asdf", 4));
- binary_list.Append(Value::CreateIntegerValue(2));
- JSONWriter::WriteWithOptions(&binary_list, false,
- JSONWriter::OPTIONS_OMIT_BINARY_VALUES,
- &output_js);
- ASSERT_EQ("[5,2]", output_js);
-
- DictionaryValue binary_dict;
- binary_dict.Set("a", Value::CreateIntegerValue(5));
- binary_dict.Set("b", BinaryValue::CreateWithCopiedBuffer("asdf", 4));
- binary_dict.Set("c", Value::CreateIntegerValue(2));
- JSONWriter::WriteWithOptions(&binary_dict, false,
- JSONWriter::OPTIONS_OMIT_BINARY_VALUES,
- &output_js);
- ASSERT_EQ("{\"a\":5,\"c\":2}", output_js);
}
} // namespace base
« no previous file with comments | « base/json/json_writer.cc ('k') | chrome/browser/browser_about_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698