diff options
author | rohitrao@chromium.org <rohitrao@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-23 20:20:38 +0000 |
---|---|---|
committer | rohitrao@chromium.org <rohitrao@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-23 20:20:38 +0000 |
commit | 470f7a5d7a832152be2f4bd03179d411839bbea8 (patch) | |
tree | aa010c35413f6721988ec40f998bf2e6990058dd /chrome/test/ui/ui_test.cc | |
parent | e558ff82d3f37169fad4abd52200dc75651a3ab5 (diff) | |
download | chromium_src-470f7a5d7a832152be2f4bd03179d411839bbea8.zip chromium_src-470f7a5d7a832152be2f4bd03179d411839bbea8.tar.gz chromium_src-470f7a5d7a832152be2f4bd03179d411839bbea8.tar.bz2 |
Use a scoped temp dir in browser_tests instead of deleting the default user data dir.
BUG=None
TEST=Less flake, I hope.
Review URL: http://codereview.chromium.org/3443021
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60335 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/ui/ui_test.cc')
-rw-r--r-- | chrome/test/ui/ui_test.cc | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/chrome/test/ui/ui_test.cc b/chrome/test/ui/ui_test.cc index 8dcc3a3..9b0fd69 100644 --- a/chrome/test/ui/ui_test.cc +++ b/chrome/test/ui/ui_test.cc @@ -43,6 +43,7 @@ #include "chrome/test/automation/tab_proxy.h" #include "chrome/test/automation/window_proxy.h" #include "chrome/test/chrome_process_util.h" +#include "chrome/test/test_launcher_utils.h" #include "chrome/test/test_switches.h" #include "googleurl/src/gurl.h" #include "net/base/net_util.h" @@ -295,21 +296,8 @@ void UITestBase::LaunchBrowser(const CommandLine& arguments, temp_profile_dir_.reset(new ScopedTempDir()); ASSERT_TRUE(temp_profile_dir_->CreateUniqueTempDir()); - // Update the information about user data directory location on the ui_test - // side. Using PathService seems to be the most reliable, consistent way - // to do that. - ASSERT_TRUE(PathService::Override(chrome::DIR_USER_DATA, user_data_dir())); - -#if defined(OS_LINUX) - // Make sure the cache directory is inside our clear profile. Otherwise - // the cache may contain data from earlier tests that could break the - // current test. - // - // Note: we use an environment variable here, because we have to pass the - // value to the child process. This is the simplest way to do it. - scoped_ptr<base::Environment> env(base::Environment::Create()); - env->SetVar("XDG_CACHE_HOME", user_data_dir().value()); -#endif + ASSERT_TRUE( + test_launcher_utils::OverrideUserDataDir(temp_profile_dir_->path())); } if (!template_user_data_.empty()) { |