diff options
author | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-28 01:37:23 +0000 |
---|---|---|
committer | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-28 01:37:23 +0000 |
commit | 140a7cd1d47292be7c5872c6019c1ab09af774e3 (patch) | |
tree | 5210806d7de816fa0025952e20bf6396b1c0d9fb /chrome/test/ui | |
parent | a7c2ff748541a96df53995216dc2a7c1209dca48 (diff) | |
download | chromium_src-140a7cd1d47292be7c5872c6019c1ab09af774e3.zip chromium_src-140a7cd1d47292be7c5872c6019c1ab09af774e3.tar.gz chromium_src-140a7cd1d47292be7c5872c6019c1ab09af774e3.tar.bz2 |
POSIX: don't spawn zombies.
http://codereview.chromium.org/93147
BUG=9401
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14705 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/ui')
-rw-r--r-- | chrome/test/ui/ui_test.cc | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/chrome/test/ui/ui_test.cc b/chrome/test/ui/ui_test.cc index 0ee888b..687e102 100644 --- a/chrome/test/ui/ui_test.cc +++ b/chrome/test/ui/ui_test.cc @@ -292,7 +292,18 @@ void UITest::LaunchBrowser(const CommandLine& arguments, bool clear_profile) { if (!homepage_.empty()) command_line.AppendSwitchWithValue(switches::kHomePage, homepage_); - PathService::Get(chrome::DIR_USER_DATA, &user_data_dir_); +#if defined(OS_POSIX) + const char* alternative_userdir = getenv("CHROME_UI_TESTS_USER_DATA_DIR"); +#else + const FilePath::StringType::value_type* const alternative_userdir = NULL; +#endif + + if (alternative_userdir) { + user_data_dir_ = FilePath(alternative_userdir); + } else { + PathService::Get(chrome::DIR_USER_DATA, &user_data_dir_); + } + if (!user_data_dir_.empty()) command_line.AppendSwitchWithValue(switches::kUserDataDir, user_data_dir_.ToWStringHack()); |