Chromium Code Reviews

Side by Side Diff: base/process_util_unittest.cc

Issue 5272001: Reverting 67000. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | | Annotate | Revision Log
« no previous file with comments | « DEPS ('k') | ceee/common.gypi » ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #define _CRT_SECURE_NO_WARNINGS 5 #define _CRT_SECURE_NO_WARNINGS
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/eintr_wrapper.h" 10 #include "base/eintr_wrapper.h"
(...skipping 185 matching lines...)
196 // Let's create a decently long message. 196 // Let's create a decently long message.
197 std::string message; 197 std::string message;
198 for (int i = 0; i < 1025; i++) { // 1025 so it does not end on a kilo-byte 198 for (int i = 0; i < 1025; i++) { // 1025 so it does not end on a kilo-byte
199 // boundary. 199 // boundary.
200 message += "Hello!"; 200 message += "Hello!";
201 } 201 }
202 202
203 FilePath python_runtime; 203 FilePath python_runtime;
204 ASSERT_TRUE(PathService::Get(base::DIR_SOURCE_ROOT, &python_runtime)); 204 ASSERT_TRUE(PathService::Get(base::DIR_SOURCE_ROOT, &python_runtime));
205 python_runtime = python_runtime.Append(FILE_PATH_LITERAL("third_party")) 205 python_runtime = python_runtime.Append(FILE_PATH_LITERAL("third_party"))
206 .Append(FILE_PATH_LITERAL("python_26")) 206 .Append(FILE_PATH_LITERAL("python_24"))
207 .Append(FILE_PATH_LITERAL("python.exe")); 207 .Append(FILE_PATH_LITERAL("python.exe"));
208 208
209 CommandLine cmd_line(python_runtime); 209 CommandLine cmd_line(python_runtime);
210 cmd_line.AppendArg("-c"); 210 cmd_line.AppendArg("-c");
211 cmd_line.AppendArg("import sys; sys.stdout.write('" + message + "');"); 211 cmd_line.AppendArg("import sys; sys.stdout.write('" + message + "');");
212 std::string output; 212 std::string output;
213 ASSERT_TRUE(base::GetAppOutput(cmd_line, &output)); 213 ASSERT_TRUE(base::GetAppOutput(cmd_line, &output));
214 EXPECT_EQ(message, output); 214 EXPECT_EQ(message, output);
215 215
216 // Let's make sure stderr is ignored. 216 // Let's make sure stderr is ignored.
(...skipping 564 matching lines...)
781 ASSERT_DEATH({ 781 ASSERT_DEATH({
782 SetUpInDeathAssert(); 782 SetUpInDeathAssert();
783 while ((value_ = base::AllocatePsychoticallyBigObjCObject())) {} 783 while ((value_ = base::AllocatePsychoticallyBigObjCObject())) {}
784 }, ""); 784 }, "");
785 } 785 }
786 786
787 #endif // !ARCH_CPU_64_BITS 787 #endif // !ARCH_CPU_64_BITS
788 #endif // OS_MACOSX 788 #endif // OS_MACOSX
789 789
790 #endif // !defined(OS_WIN) 790 #endif // !defined(OS_WIN)
OLDNEW
« no previous file with comments | « DEPS ('k') | ceee/common.gypi » ('j') | no next file with comments »

Powered by Google App Engine