summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/autocomplete/history_url_provider_unittest.cc5
-rw-r--r--chrome/browser/cocoa/cocoa_test_helper.h9
-rw-r--r--chrome/common/mac_app_names.h16
-rw-r--r--chrome/test/unit/chrome_test_suite.h5
4 files changed, 25 insertions, 10 deletions
diff --git a/chrome/browser/autocomplete/history_url_provider_unittest.cc b/chrome/browser/autocomplete/history_url_provider_unittest.cc
index bc51c798..0a27e9b 100644
--- a/chrome/browser/autocomplete/history_url_provider_unittest.cc
+++ b/chrome/browser/autocomplete/history_url_provider_unittest.cc
@@ -13,6 +13,7 @@
#include "testing/gtest/include/gtest/gtest.h"
#if defined(OS_MACOSX)
#include "base/mac_util.h"
+#include "chrome/common/mac_app_names.h"
#endif
using base::Time;
@@ -131,10 +132,10 @@ void HistoryURLProviderTest::SetUp() {
#if defined(OS_MACOSX)
FilePath path;
PathService::Get(base::DIR_EXE, &path);
- path = path.AppendASCII("Chromium.app");
+ path = path.AppendASCII(MAC_BROWSER_APP_NAME);
mac_util::SetOverrideAppBundlePath(path);
#endif
-
+
profile_.reset(new TestingProfile());
profile_->CreateBookmarkModel(true);
profile_->CreateHistoryService(true);
diff --git a/chrome/browser/cocoa/cocoa_test_helper.h b/chrome/browser/cocoa/cocoa_test_helper.h
index 606a577..50087ac 100644
--- a/chrome/browser/cocoa/cocoa_test_helper.h
+++ b/chrome/browser/cocoa/cocoa_test_helper.h
@@ -11,12 +11,7 @@
#include "base/mac_util.h"
#include "base/path_service.h"
#import "base/scoped_nsobject.h"
-
-#if defined(GOOGLE_CHROME_BUILD)
-#define APP_NAME "Chrome.app"
-#else
-#define APP_NAME "Chromium.app"
-#endif
+#include "chrome/common/mac_app_names.h"
// A class that initializes Cocoa and sets up resources for many of our
// Cocoa controller unit tests. It does several key things:
@@ -35,7 +30,7 @@ class CocoaTestHelper {
// Look in the Chromium app bundle for resources.
FilePath path;
PathService::Get(base::DIR_EXE, &path);
- path = path.AppendASCII(APP_NAME);
+ path = path.AppendASCII(MAC_BROWSER_APP_NAME);
mac_util::SetOverrideAppBundlePath(path);
// Bootstrap Cocoa. It's very unhappy without this.
diff --git a/chrome/common/mac_app_names.h b/chrome/common/mac_app_names.h
new file mode 100644
index 0000000..645fdca
--- /dev/null
+++ b/chrome/common/mac_app_names.h
@@ -0,0 +1,16 @@
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_COMMON_MAC_APP_NAMES_H_
+#define CHROME_COMMON_MAC_APP_NAMES_H_
+
+#if defined(GOOGLE_CHROME_BUILD)
+#define MAC_BROWSER_APP_NAME "Chrome.app"
+#elif defined(CHROMIUM_BUILD)
+#define MAC_BROWSER_APP_NAME "Chromium.app"
+#else
+#error "Not sure what the branding is!"
+#endif
+
+#endif // CHROME_COMMON_MAC_APP_NAMES_H_
diff --git a/chrome/test/unit/chrome_test_suite.h b/chrome/test/unit/chrome_test_suite.h
index b46a105..ef45ec4 100644
--- a/chrome/test/unit/chrome_test_suite.h
+++ b/chrome/test/unit/chrome_test_suite.h
@@ -23,6 +23,9 @@
#include "chrome/browser/browser_process.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
+#if defined(OS_MACOSX)
+#include "chrome/common/mac_app_names.h"
+#endif
#include "chrome/test/testing_browser_process.h"
#include "net/base/host_resolver_unittest.h"
#include "net/base/net_util.h"
@@ -92,7 +95,7 @@ class ChromeTestSuite : public TestSuite {
#if defined(OS_MACOSX)
FilePath path;
PathService::Get(base::DIR_EXE, &path);
- path = path.AppendASCII("Chromium.app");
+ path = path.AppendASCII(MAC_BROWSER_APP_NAME);
mac_util::SetOverrideAppBundlePath(path);
#endif