From 56f0f264ff866052ebcb24e75147cb600e6547a1 Mon Sep 17 00:00:00 2001 From: "dmaclach@chromium.org" Date: Thu, 24 Feb 2011 17:14:36 +0000 Subject: Get service process running standalone on the mac by hooking it into launchd. BUG=NONE TEST=BUILD Review URL: http://codereview.chromium.org/6482016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75893 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/common/service_process_util_unittest.cc | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'chrome/common/service_process_util_unittest.cc') diff --git a/chrome/common/service_process_util_unittest.cc b/chrome/common/service_process_util_unittest.cc index ad6b257..eadf51f 100644 --- a/chrome/common/service_process_util_unittest.cc +++ b/chrome/common/service_process_util_unittest.cc @@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "base/basictypes.h" + +#if !defined(OS_MACOSX) +// TODO(dmaclach): Figure out tests that will work with launchd on Mac OS. + #include "base/at_exit.h" #include "base/process_util.h" #include "base/string_util.h" @@ -95,11 +100,11 @@ TEST_F(ServiceProcessStateTest, SharedMem) { // GetServiceProcessPid to lie. On Windows, we use a named event so we // don't have this issue. Until we have a more stable shared memory // implementation on Posix, this check will only execute on Windows. - ASSERT_FALSE(GetServiceProcessSharedData(&version, &pid)); + ASSERT_FALSE(GetServiceProcessData(&version, &pid)); #endif // defined(OS_WIN) ServiceProcessState* state = ServiceProcessState::GetInstance(); ASSERT_TRUE(state->Initialize()); - ASSERT_TRUE(GetServiceProcessSharedData(&version, &pid)); + ASSERT_TRUE(GetServiceProcessData(&version, &pid)); ASSERT_EQ(base::GetCurrentProcId(), pid); } @@ -113,7 +118,7 @@ TEST_F(ServiceProcessStateTest, ForceShutdown) { ASSERT_TRUE(CheckServiceProcessReady()); std::string version; base::ProcessId pid; - ASSERT_TRUE(GetServiceProcessSharedData(&version, &pid)); + ASSERT_TRUE(GetServiceProcessData(&version, &pid)); ASSERT_TRUE(ForceServiceProcessShutdown(version, pid)); int exit_code = 0; ASSERT_TRUE(base::WaitForExitCodeWithTimeout(handle, @@ -157,3 +162,4 @@ MULTIPROCESS_TEST_MAIN(ServiceProcessStateTestShutdown) { return 0; } +#endif // !OS_MACOSX -- cgit v1.1