diff options
author | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-20 01:20:35 +0000 |
---|---|---|
committer | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-20 01:20:35 +0000 |
commit | 90b1260d70a7b0b1c45ed25a42fd3a60ca3a2197 (patch) | |
tree | c18fd0d6448082e9acb2f6c2d53d004d06006bb0 | |
parent | e3cca33f0cc65e22cbc5bfc5baa1a3fabd2977cb (diff) | |
download | chromium_src-90b1260d70a7b0b1c45ed25a42fd3a60ca3a2197.zip chromium_src-90b1260d70a7b0b1c45ed25a42fd3a60ca3a2197.tar.gz chromium_src-90b1260d70a7b0b1c45ed25a42fd3a60ca3a2197.tar.bz2 |
Make unit_tests UtilityProcessHostTest use the helper app on the Mac.
BUG=none, not worth it for this
TEST=unit_tests '--gtest_filter=UtilityProcessHostTest*' runs Chromium Helper,
not Chromium. No application icon should appear in the dock during this
test.
Review URL: http://codereview.chromium.org/174061
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23792 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/utility_process_host_unittest.cc | 10 | ||||
-rw-r--r-- | chrome/common/chrome_constants.cc | 32 | ||||
-rw-r--r-- | chrome/common/chrome_constants.h | 4 |
3 files changed, 26 insertions, 20 deletions
diff --git a/chrome/browser/utility_process_host_unittest.cc b/chrome/browser/utility_process_host_unittest.cc index 759aab0..8703b67 100644 --- a/chrome/browser/utility_process_host_unittest.cc +++ b/chrome/browser/utility_process_host_unittest.cc @@ -80,7 +80,7 @@ class TestUtilityProcessHost : public UtilityProcessHost { FilePath exe_path; PathService::Get(base::DIR_EXE, &exe_path); exe_path = exe_path.AppendASCII(WideToASCII( - chrome::kBrowserProcessExecutablePath)); + chrome::kHelperProcessExecutablePath)); return exe_path.ToWStringHack(); } @@ -93,10 +93,10 @@ class TestUtilityProcessHost : public UtilityProcessHost { class ProcessClosedObserver : public NotificationObserver { public: - ProcessClosedObserver(MessageLoop* message_loop)
- : message_loop_(message_loop) {
- registrar_.Add(this, NotificationType::CHILD_PROCESS_HOST_DISCONNECTED,
- NotificationService::AllSources());
+ ProcessClosedObserver(MessageLoop* message_loop) + : message_loop_(message_loop) { + registrar_.Add(this, NotificationType::CHILD_PROCESS_HOST_DISCONNECTED, + NotificationService::AllSources()); } void RunUntilClose(int child_pid) { diff --git a/chrome/common/chrome_constants.cc b/chrome/common/chrome_constants.cc index ca7f04e..1ec2f79 100644 --- a/chrome/common/chrome_constants.cc +++ b/chrome/common/chrome_constants.cc @@ -8,34 +8,40 @@ #define FPL FILE_PATH_LITERAL +#if defined(OS_MACOSX) +#if defined(GOOGLE_CHROME_BUILD) +#define PRODUCT_STRING L"Google Chrome" +#else +#define PRODUCT_STRING L"Chromium" +#endif +#endif // OS_MACOSX + namespace chrome { // The following should not be used for UI strings; they are meant // for system strings only. UI changes should be made in the GRD. #if defined(OS_WIN) const wchar_t kBrowserProcessExecutableName[] = L"chrome.exe"; +const wchar_t kHelperProcessExecutableName[] = L"chrome.exe"; #elif defined(OS_LINUX) const wchar_t kBrowserProcessExecutableName[] = L"chrome"; +const wchar_t kHelperProcessExecutableName[] = L"chrome"; #elif defined(OS_MACOSX) -#if defined(GOOGLE_CHROME_BUILD) -const wchar_t kBrowserProcessExecutableName[] = L"Google Chrome"; -const wchar_t kHelperProcessExecutableName[] = L"Google Chrome Helper"; -#else -const wchar_t kBrowserProcessExecutableName[] = L"Chromium"; -const wchar_t kHelperProcessExecutableName[] = L"Chromium Helper"; -#endif // GOOGLE_CHROME_BUILD +const wchar_t kBrowserProcessExecutableName[] = PRODUCT_STRING; +const wchar_t kHelperProcessExecutableName[] = PRODUCT_STRING L" Helper"; #endif // OS_* #if defined(OS_WIN) const wchar_t kBrowserProcessExecutablePath[] = L"chrome.exe"; +const wchar_t kHelperProcessExecutablePath[] = L"chrome.exe"; #elif defined(OS_LINUX) const wchar_t kBrowserProcessExecutablePath[] = L"chrome"; +const wchar_t kHelperProcessExecutablePath[] = L"chrome"; #elif defined(OS_MACOSX) const wchar_t kBrowserProcessExecutablePath[] = -#if defined(GOOGLE_CHROME_BUILD) - L"Google Chrome.app/Contents/MacOS/Google Chrome"; -#else - L"Chromium.app/Contents/MacOS/Chromium"; -#endif // GOOGLE_CHROME_BUILD + PRODUCT_STRING L".app/Contents/MacOS/" PRODUCT_STRING; +const wchar_t kHelperProcessExecutablePath[] = + PRODUCT_STRING L".app/Contents/Resources/" + PRODUCT_STRING L" Helper.app/Contents/MacOS/" PRODUCT_STRING L" Helper"; #endif // OS_* #if defined(GOOGLE_CHROME_BUILD) const wchar_t kBrowserAppName[] = L"Chrome"; @@ -99,3 +105,5 @@ const bool kRecordModeEnabled = false; #endif } // namespace chrome + +#undef FPL diff --git a/chrome/common/chrome_constants.h b/chrome/common/chrome_constants.h index 367d5fa..513c4ba 100644 --- a/chrome/common/chrome_constants.h +++ b/chrome/common/chrome_constants.h @@ -12,11 +12,9 @@ namespace chrome { extern const wchar_t kBrowserProcessExecutableName[]; -#if defined(OS_MACOSX) -// Helpers (renderers, etc.) are different bundles on Mac OS X. extern const wchar_t kHelperProcessExecutableName[]; -#endif // defined(OS_MACOSX) extern const wchar_t kBrowserProcessExecutablePath[]; +extern const wchar_t kHelperProcessExecutablePath[]; extern const wchar_t kBrowserAppName[]; extern const wchar_t kMessageWindowClass[]; extern const wchar_t kCrashReportLog[]; |