summaryrefslogtreecommitdiffstats
path: root/chrome/test/in_process_browser_test.cc
diff options
context:
space:
mode:
authortim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-07 00:43:49 +0000
committertim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-07 00:43:49 +0000
commit2c9bf9d7fc00e4d3a2b3655300156424127d4fc6 (patch)
tree7eaa0bbd608e9f5e4894b6a21139fc0fb08ae339 /chrome/test/in_process_browser_test.cc
parent956bb3f6af144d6da6784311556244bf6bd4595e (diff)
downloadchromium_src-2c9bf9d7fc00e4d3a2b3655300156424127d4fc6.zip
chromium_src-2c9bf9d7fc00e4d3a2b3655300156424127d4fc6.tar.gz
chromium_src-2c9bf9d7fc00e4d3a2b3655300156424127d4fc6.tar.bz2
Make user data dir deletion optional for InProcessBrowserTests.
Original patch by tejasshah@google.com Original review: http://codereview.chromium.org/159896 TEST=any browser test or live sync test TBR=nick Review URL: http://codereview.chromium.org/164118 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22705 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/in_process_browser_test.cc')
-rw-r--r--chrome/test/in_process_browser_test.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/chrome/test/in_process_browser_test.cc b/chrome/test/in_process_browser_test.cc
index 0815941..6c07e41 100644
--- a/chrome/test/in_process_browser_test.cc
+++ b/chrome/test/in_process_browser_test.cc
@@ -54,6 +54,9 @@ InProcessBrowserTest::InProcessBrowserTest()
}
void InProcessBrowserTest::SetUp() {
+ // This method does nothing in default case. But can be overridden
+ // to set user data dir for test.
+ SetUpUserDataDirForTest();
// Cleanup the user data dir.
FilePath user_data_dir;
PathService::Get(chrome::DIR_USER_DATA, &user_data_dir);
@@ -61,7 +64,8 @@ void InProcessBrowserTest::SetUp() {
"The user data directory name passed into this test was too "
"short to delete safely. Please check the user-data-dir "
"argument and try again.";
- ASSERT_TRUE(file_util::DieFileDie(user_data_dir, true));
+ if (ShouldDeleteProfile())
+ ASSERT_TRUE(file_util::DieFileDie(user_data_dir, true));
// The unit test suite creates a testingbrowser, but we want the real thing.
// Delete the current one. We'll install the testing one in TearDown.