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

Side by Side Diff: net/test/python_utils_unittest.cc

Issue 16652007: Use a direct include of strings headers in net/test/, net/third_party/, net/tools/, net/udp/, net/u… (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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <string> 5 #include <string>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/environment.h" 8 #include "base/environment.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "base/process_util.h" 11 #include "base/process_util.h"
12 #include "base/string_util.h" 12 #include "base/strings/string_util.h"
13 #include "base/stringprintf.h" 13 #include "base/strings/stringprintf.h"
14 #include "net/test/python_utils.h" 14 #include "net/test/python_utils.h"
15 #include "testing/gtest/include/gtest/gtest.h" 15 #include "testing/gtest/include/gtest/gtest.h"
16 16
17 TEST(PythonUtils, Append) { 17 TEST(PythonUtils, Append) {
18 const base::FilePath::CharType kAppendDir1[] = 18 const base::FilePath::CharType kAppendDir1[] =
19 FILE_PATH_LITERAL("test/path_append1"); 19 FILE_PATH_LITERAL("test/path_append1");
20 const base::FilePath::CharType kAppendDir2[] = 20 const base::FilePath::CharType kAppendDir2[] =
21 FILE_PATH_LITERAL("test/path_append2"); 21 FILE_PATH_LITERAL("test/path_append2");
22 22
23 scoped_ptr<base::Environment> env(base::Environment::Create()); 23 scoped_ptr<base::Environment> env(base::Environment::Create());
(...skipping 28 matching lines...) Expand all
52 // we want. 52 // we want.
53 cmd_line.AppendArg("-c"); 53 cmd_line.AppendArg("-c");
54 std::string input("PythonUtilsTest"); 54 std::string input("PythonUtilsTest");
55 std::string python_cmd = base::StringPrintf("print '%s';", input.c_str()); 55 std::string python_cmd = base::StringPrintf("print '%s';", input.c_str());
56 cmd_line.AppendArg(python_cmd); 56 cmd_line.AppendArg(python_cmd);
57 std::string output; 57 std::string output;
58 EXPECT_TRUE(base::GetAppOutput(cmd_line, &output)); 58 EXPECT_TRUE(base::GetAppOutput(cmd_line, &output));
59 TrimWhitespace(output, TRIM_TRAILING, &output); 59 TrimWhitespace(output, TRIM_TRAILING, &output);
60 EXPECT_EQ(input, output); 60 EXPECT_EQ(input, output);
61 } 61 }
OLDNEW
« no previous file with comments | « net/test/embedded_test_server/http_response.cc ('k') | net/test/spawned_test_server/local_test_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698