| 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 d15e54bab0a7ea706f3ba46357a1cac339ad23ea..1ec65ec14b1c755d93bc91199af2e4ce0f8a9fc0 100644
|
| --- a/content/public/test/browser_test_base.cc
|
| +++ b/content/public/test/browser_test_base.cc
|
| @@ -13,6 +13,7 @@
|
| #include "content/public/common/main_function_params.h"
|
| #include "content/public/test/test_utils.h"
|
| #include "net/test/embedded_test_server/embedded_test_server.h"
|
| +#include "ui/compositor/compositor_switches.h"
|
|
|
| #if defined(OS_POSIX)
|
| #include "base/process/process_handle.h"
|
| @@ -64,7 +65,8 @@ extern int BrowserMain(const MainFunctionParams&);
|
| BrowserTestBase::BrowserTestBase()
|
| : embedded_test_server_(
|
| new net::test_server::EmbeddedTestServer(
|
| - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO))) {
|
| + BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO))),
|
| + allow_test_contexts_(true) {
|
| #if defined(OS_MACOSX)
|
| base::mac::SetOverrideAmIBundled(true);
|
| base::PowerMonitor::AllocateSystemIOPorts();
|
| @@ -98,6 +100,14 @@ void BrowserTestBase::SetUp() {
|
| new base::Closure(
|
| base::Bind(&BrowserTestBase::ProxyRunTestOnMainThreadLoop, this));
|
|
|
| +#if defined(USE_AURA)
|
| + // Copy what UITestBase::SetLaunchSwitches() does, and also what
|
| + // ChromeTestSuite does if the process had went into the test path. Otherwise
|
| + // tests will fail on bots.
|
| + if (allow_test_contexts_)
|
| + command_line->AppendSwitch(switches::kTestCompositor);
|
| +#endif
|
| +
|
| SetUpInProcessBrowserTestFixture();
|
| #if defined(OS_ANDROID)
|
| BrowserMainRunner::Create()->Initialize(params);
|
|
|