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

Side by Side Diff: base/json/string_escape_unittest.cc

Issue 15735027: Use a direct include of utf_string_conversions.h in android_webview/, apps/, ash/, base/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/json/json_writer.cc ('k') | base/logging.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/json/string_escape.h" 5 #include "base/json/string_escape.h"
6 #include "base/utf_string_conversions.h" 6 #include "base/strings/utf_string_conversions.h"
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 8
9 namespace base { 9 namespace base {
10 10
11 namespace { 11 namespace {
12 12
13 const struct json_narrow_test_data { 13 const struct json_narrow_test_data {
14 const char* to_escape; 14 const char* to_escape;
15 const char* escaped; 15 const char* escaped;
16 } json_narrow_cases[] = { 16 } json_narrow_cases[] = {
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 null_prepend.push_back(0); 91 null_prepend.push_back(0);
92 in = null_prepend + in; 92 in = null_prepend + in;
93 std::string expected = "test\\u0000"; 93 std::string expected = "test\\u0000";
94 expected += json_wide_cases[0].escaped; 94 expected += json_wide_cases[0].escaped;
95 out.clear(); 95 out.clear();
96 JsonDoubleQuote(in, false, &out); 96 JsonDoubleQuote(in, false, &out);
97 EXPECT_EQ(expected, out); 97 EXPECT_EQ(expected, out);
98 } 98 }
99 99
100 } // namespace base 100 } // namespace base
OLDNEW
« no previous file with comments | « base/json/json_writer.cc ('k') | base/logging.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698