| Index: chrome/test/base/in_process_browser_test.cc
|
| diff --git a/chrome/test/base/in_process_browser_test.cc b/chrome/test/base/in_process_browser_test.cc
|
| index 9fa29b50bb5f13dfb6ebf174a34c40a021b82d40..cdc51e8f37d6c6a6407de8ed07bc976f04461cbe 100644
|
| --- a/chrome/test/base/in_process_browser_test.cc
|
| +++ b/chrome/test/base/in_process_browser_test.cc
|
| @@ -159,6 +159,13 @@ void InProcessBrowserTest::SetUp() {
|
| command_line->AppendSwitch(switches::kDisableOfflineAutoReload);
|
|
|
| // Allow subclasses to change the command line before running any tests.
|
| + std::vector<BrowserTestBase::Admixture*> admixtures = GetAdmixtures();
|
| + for (std::vector<BrowserTestBase::Admixture*>::iterator it =
|
| + admixtures.begin();
|
| + it != admixtures.end();
|
| + ++it) {
|
| + (*it)->SetUpCommandLine(command_line);
|
| + }
|
| SetUpCommandLine(command_line);
|
| // Add command line arguments that are used by all InProcessBrowserTests.
|
| PrepareTestCommandLine(command_line);
|
| @@ -419,6 +426,13 @@ void InProcessBrowserTest::RunTestOnMainThreadLoop() {
|
| // browser.
|
| content::RunAllPendingInMessageLoop();
|
|
|
| + std::vector<BrowserTestBase::Admixture*> admixtures = GetAdmixtures();
|
| + for (std::vector<BrowserTestBase::Admixture*>::iterator it =
|
| + admixtures.begin();
|
| + it != admixtures.end();
|
| + ++it) {
|
| + (*it)->SetUpOnMainThread();
|
| + }
|
| SetUpOnMainThread();
|
| #if defined(OS_MACOSX)
|
| autorelease_pool_->Recycle();
|
| @@ -433,6 +447,12 @@ void InProcessBrowserTest::RunTestOnMainThreadLoop() {
|
| // Invoke cleanup and quit even if there are failures. This is similar to
|
| // gtest in that it invokes TearDown even if Setup fails.
|
| TearDownOnMainThread();
|
| + for (std::vector<BrowserTestBase::Admixture*>::reverse_iterator it =
|
| + admixtures.rbegin();
|
| + it != admixtures.rend();
|
| + ++it) {
|
| + (*it)->TearDownOnMainThread();
|
| + }
|
| #if defined(OS_MACOSX)
|
| autorelease_pool_->Recycle();
|
| #endif
|
|
|