diff options
author | timurrrr@chromium.org <timurrrr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-30 14:50:58 +0000 |
---|---|---|
committer | timurrrr@chromium.org <timurrrr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-30 14:50:58 +0000 |
commit | 298883bc55dec7bbcb59897b919d9e07691d0da9 (patch) | |
tree | 36ef93371d363ce52e171043133ea56fe8fc48d2 /chrome/test/in_process_browser_test.cc | |
parent | 2144db715de5552a67f34552c36a5cb3dba2ebd8 (diff) | |
download | chromium_src-298883bc55dec7bbcb59897b919d9e07691d0da9.zip chromium_src-298883bc55dec7bbcb59897b919d9e07691d0da9.tar.gz chromium_src-298883bc55dec7bbcb59897b919d9e07691d0da9.tar.bz2 |
Re-apply http://codereview.chromium.org/1622012
It was reverted as http://codereview.chromium.org/1822001 the fix in Valgrind scripts has been commited as http://codereview.chromium.org/1736026
TEST=trybots
Review URL: http://codereview.chromium.org/1763023
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46070 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/in_process_browser_test.cc')
-rw-r--r-- | chrome/test/in_process_browser_test.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/chrome/test/in_process_browser_test.cc b/chrome/test/in_process_browser_test.cc index 451dd2e..941150e 100644 --- a/chrome/test/in_process_browser_test.cc +++ b/chrome/test/in_process_browser_test.cc @@ -93,12 +93,14 @@ 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."; - if (ShouldDeleteProfile()) - ASSERT_TRUE(file_util::DieFileDie(user_data_dir, true)); + 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. delete g_browser_process; + g_browser_process = NULL; + + SetUpUserDataDirectory(); // Don't delete the resources when BrowserMain returns. Many ui classes // cache SkBitmaps in a static field so that if we delete the resource @@ -140,7 +142,7 @@ void InProcessBrowserTest::SetUp() { ASCIIToWide(kBrowserTestType)); // Single-process mode is not set in BrowserMain so it needs to be processed - // explicitlty. + // explicitly. original_single_process_ = RenderProcessHost::run_renderer_in_process(); if (command_line->HasSwitch(switches::kSingleProcess)) RenderProcessHost::set_run_renderer_in_process(true); @@ -279,7 +281,9 @@ void InProcessBrowserTest::RunTestOnMainThreadLoopDeprecated() { NewRunnableMethod(this, &InProcessBrowserTest::TimedOut), initial_timeout_); - RunTestOnMainThread(); + // If an ASSERT_ failed during SetUp, skip the InProcessBrowserTest test body. + if (!HasFatalFailure()) + RunTestOnMainThread(); CleanUpOnMainThread(); // Close all browser windows. This might not happen immediately, since some |