Index: content/public/test/browser_test_base.cc |
diff --git a/content/public/test/browser_test_base.cc b/content/public/test/browser_test_base.cc |
index 34932427aa6b832a7b00595fadf4f11e9c2509eb..925bf58b795ee9ddae955ddad119b955ba7063e4 100644 |
--- a/content/public/test/browser_test_base.cc |
+++ b/content/public/test/browser_test_base.cc |
@@ -12,8 +12,8 @@ |
#include "base/strings/string_number_conversions.h" |
#include "base/sys_info.h" |
#include "base/test/test_timeouts.h" |
-#include "content/public/app/content_main.h" |
#include "content/browser/renderer_host/render_process_host_impl.h" |
+#include "content/public/app/content_main.h" |
#include "content/public/browser/browser_thread.h" |
#include "content/public/common/content_switches.h" |
#include "content/public/common/main_function_params.h" |
@@ -158,7 +158,6 @@ BrowserTestBase::~BrowserTestBase() { |
void BrowserTestBase::SetUp() { |
CommandLine* command_line = CommandLine::ForCurrentProcess(); |
- |
// Override the child process connection timeout since tests can exceed that |
// when sharded. |
command_line->AppendSwitchASCII( |
@@ -237,8 +236,12 @@ void BrowserTestBase::SetUp() { |
rule_based_resolver_->AddSimulatedFailure("wpad"); |
net::ScopedDefaultHostResolverProc scoped_local_host_resolver_proc( |
rule_based_resolver_.get()); |
+ for (ScopedVector<Admixture>::iterator it = admixtures_.begin(); |
+ it != admixtures_.end(); |
+ ++it) { |
+ (*it)->SetUpInProcessBrowserTestFixture(); |
+ } |
SetUpInProcessBrowserTestFixture(); |
- |
base::Closure* ui_task = |
new base::Closure( |
base::Bind(&BrowserTestBase::ProxyRunTestOnMainThreadLoop, this)); |
@@ -253,6 +256,11 @@ void BrowserTestBase::SetUp() { |
EXPECT_EQ(expected_exit_code_, ContentMain(*GetContentMainParams())); |
#endif |
TearDownInProcessBrowserTestFixture(); |
+ for (ScopedVector<Admixture>::reverse_iterator it = admixtures_.rbegin(); |
+ it != admixtures_.rend(); |
+ ++it) { |
+ (*it)->TearDownInProcessBrowserTestFixture(); |
+ } |
} |
void BrowserTestBase::TearDown() { |
@@ -304,4 +312,12 @@ bool BrowserTestBase::UsingOSMesa() const { |
gfx::kGLImplementationOSMesaName; |
} |
+void BrowserTestBase::AddAdmixture(BrowserTestBase::Admixture* admixture) { |
+ admixtures_.push_back(admixture); |
+} |
+ |
+std::vector<BrowserTestBase::Admixture*> BrowserTestBase::GetAdmixtures() { |
+ return admixtures_.get(); |
+} |
+ |
} // namespace content |