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

Side by Side Diff: base/process_util_unittest.cc

Issue 7386002: Rename CommandLine::GetCommandLineString(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge. Created 9 years, 5 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/command_line_unittest.cc ('k') | base/process_util_win.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) 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 #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 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 other_cmd_line.AppendArg("import sys; sys.stderr.write('Hello!');"); 382 other_cmd_line.AppendArg("import sys; sys.stderr.write('Hello!');");
383 output.clear(); 383 output.clear();
384 ASSERT_TRUE(base::GetAppOutput(other_cmd_line, &output)); 384 ASSERT_TRUE(base::GetAppOutput(other_cmd_line, &output));
385 EXPECT_EQ("", output); 385 EXPECT_EQ("", output);
386 } 386 }
387 387
388 TEST_F(ProcessUtilTest, LaunchAsUser) { 388 TEST_F(ProcessUtilTest, LaunchAsUser) {
389 base::UserTokenHandle token; 389 base::UserTokenHandle token;
390 ASSERT_TRUE(OpenProcessToken(GetCurrentProcess(), TOKEN_ALL_ACCESS, &token)); 390 ASSERT_TRUE(OpenProcessToken(GetCurrentProcess(), TOKEN_ALL_ACCESS, &token));
391 std::wstring cmdline = 391 std::wstring cmdline =
392 this->MakeCmdLine("SimpleChildProcess", false).command_line_string(); 392 this->MakeCmdLine("SimpleChildProcess", false).GetCommandLineString();
393 base::LaunchOptions options; 393 base::LaunchOptions options;
394 options.as_user = token; 394 options.as_user = token;
395 EXPECT_TRUE(base::LaunchProcess(cmdline, options, NULL)); 395 EXPECT_TRUE(base::LaunchProcess(cmdline, options, NULL));
396 } 396 }
397 397
398 #endif // defined(OS_WIN) 398 #endif // defined(OS_WIN)
399 399
400 #if defined(OS_POSIX) 400 #if defined(OS_POSIX)
401 401
402 namespace { 402 namespace {
(...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after
1001 ASSERT_DEATH({ 1001 ASSERT_DEATH({
1002 SetUpInDeathAssert(); 1002 SetUpInDeathAssert();
1003 while ((value_ = base::AllocatePsychoticallyBigObjCObject())) {} 1003 while ((value_ = base::AllocatePsychoticallyBigObjCObject())) {}
1004 }, ""); 1004 }, "");
1005 } 1005 }
1006 1006
1007 #endif // !ARCH_CPU_64_BITS 1007 #endif // !ARCH_CPU_64_BITS
1008 #endif // OS_MACOSX 1008 #endif // OS_MACOSX
1009 1009
1010 #endif // !defined(OS_WIN) 1010 #endif // !defined(OS_WIN)
OLDNEW
« no previous file with comments | « base/command_line_unittest.cc ('k') | base/process_util_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698