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

Unified Diff: base/process_util_unittest.cc

Issue 555192: Add a utility function to run a process as an arbitrary user... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: base/process_util_unittest.cc
===================================================================
--- base/process_util_unittest.cc (revision 37643)
+++ base/process_util_unittest.cc (working copy)
@@ -188,6 +188,15 @@
ASSERT_TRUE(base::GetAppOutput(other_cmd_line, &output));
EXPECT_EQ("", output);
}
+
+TEST_F(ProcessUtilTest, LaunchAsUser) {
+ base::UserTokenHandle token;
+ ASSERT_TRUE(OpenProcessToken(GetCurrentProcess(), TOKEN_ALL_ACCESS, &token));
+ std::wstring cmdline =
+ this->MakeCmdLine(L"SimpleChildProcess", false).command_line_string();
+ EXPECT_TRUE(base::LaunchAppAsUser(token, cmdline, false, NULL));
+}
+
#endif // defined(OS_WIN)
#if defined(OS_POSIX)
« no previous file with comments | « base/process_util.h ('k') | base/process_util_win.cc » ('j') | base/process_util_win.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698