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

Unified Diff: chrome/test/unit/chrome_test_suite.h

Issue 28214: Add a macutil for the main app bundle and override... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 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: chrome/test/unit/chrome_test_suite.h
===================================================================
--- chrome/test/unit/chrome_test_suite.h (revision 10790)
+++ chrome/test/unit/chrome_test_suite.h (working copy)
@@ -9,6 +9,9 @@
#include "base/stats_table.h"
#include "base/file_util.h"
+#if defined(OS_MACOSX)
+#include "base/mac_util.h"
+#endif
#include "base/path_service.h"
#include "base/scoped_nsautorelease_pool.h"
#include "base/test_suite.h"
@@ -47,6 +50,13 @@
if (!user_data_dir.empty())
PathService::Override(chrome::DIR_USER_DATA, user_data_dir);
+#if defined(OS_MACOSX)
+ FilePath path;
+ PathService::Get(base::DIR_EXE, &path);
+ path = path.AppendASCII("Chromium.app");
+ mac_util::SetOverrideAppBundlePath(path);
+#endif
+
// Force unittests to run using en-us so if we test against string
// output, it'll pass regardless of the system language.
ResourceBundle::InitSharedInstance(L"en-us");
@@ -64,6 +74,10 @@
// TODO(port): Remove the #ifdef when ResourceBundle is ported.
ResourceBundle::CleanupSharedInstance();
+#if defined(OS_MACOSX)
+ mac_util::SetOverrideAppBundle(NULL);
+#endif
+
delete g_browser_process;
g_browser_process = NULL;

Powered by Google App Engine
This is Rietveld 408576698