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

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, use writable string copies, restore TODO comment and empty string compare. 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
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 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 other_cmd_line.AppendArg("import sys; sys.stderr.write('Hello!');"); 381 other_cmd_line.AppendArg("import sys; sys.stderr.write('Hello!');");
382 output.clear(); 382 output.clear();
383 ASSERT_TRUE(base::GetAppOutput(other_cmd_line, &output)); 383 ASSERT_TRUE(base::GetAppOutput(other_cmd_line, &output));
384 EXPECT_EQ("", output); 384 EXPECT_EQ("", output);
385 } 385 }
386 386
387 TEST_F(ProcessUtilTest, LaunchAsUser) { 387 TEST_F(ProcessUtilTest, LaunchAsUser) {
388 base::UserTokenHandle token; 388 base::UserTokenHandle token;
389 ASSERT_TRUE(OpenProcessToken(GetCurrentProcess(), TOKEN_ALL_ACCESS, &token)); 389 ASSERT_TRUE(OpenProcessToken(GetCurrentProcess(), TOKEN_ALL_ACCESS, &token));
390 std::wstring cmdline = 390 std::wstring cmdline =
391 this->MakeCmdLine("SimpleChildProcess", false).command_line_string(); 391 this->MakeCmdLine("SimpleChildProcess", false).GetCommandLineString();
392 EXPECT_TRUE(base::LaunchAppAsUser(token, cmdline, false, NULL)); 392 EXPECT_TRUE(base::LaunchAppAsUser(token, cmdline, false, NULL));
393 } 393 }
394 394
395 #endif // defined(OS_WIN) 395 #endif // defined(OS_WIN)
396 396
397 #if defined(OS_POSIX) 397 #if defined(OS_POSIX)
398 398
399 namespace { 399 namespace {
400 400
401 // Returns the maximum number of files that a process can have open. 401 // Returns the maximum number of files that a process can have open.
(...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after
995 ASSERT_DEATH({ 995 ASSERT_DEATH({
996 SetUpInDeathAssert(); 996 SetUpInDeathAssert();
997 while ((value_ = base::AllocatePsychoticallyBigObjCObject())) {} 997 while ((value_ = base::AllocatePsychoticallyBigObjCObject())) {}
998 }, ""); 998 }, "");
999 } 999 }
1000 1000
1001 #endif // !ARCH_CPU_64_BITS 1001 #endif // !ARCH_CPU_64_BITS
1002 #endif // OS_MACOSX 1002 #endif // OS_MACOSX
1003 1003
1004 #endif // !defined(OS_WIN) 1004 #endif // !defined(OS_WIN)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698