| Index: content/browser/security_exploit_browsertest.cc
|
| diff --git a/content/browser/security_exploit_browsertest.cc b/content/browser/security_exploit_browsertest.cc
|
| index 65e8540980716e7ecba81d4189b5264733aec369..b1da40206821de9e412651cf150597edfbf5ca8f 100644
|
| --- a/content/browser/security_exploit_browsertest.cc
|
| +++ b/content/browser/security_exploit_browsertest.cc
|
| @@ -180,7 +180,11 @@ class SecurityExploitBrowserTest : public ContentBrowserTest {
|
| SecurityExploitBrowserTest() {}
|
|
|
| void SetUpCommandLine(base::CommandLine* command_line) override {
|
| - ASSERT_TRUE(embedded_test_server()->Start());
|
| + // EmbeddedTestServer::InitializeAndListen() initializes its |base_url_|
|
| + // which is required below. This cannot invoke Start() however as that kicks
|
| + // off the "EmbeddedTestServer IO Thread" which then races with
|
| + // initialization in ContentBrowserTest::SetUp(), http://crbug.com/674545.
|
| + ASSERT_TRUE(embedded_test_server()->InitializeAndListen());
|
|
|
| // Add a host resolver rule to map all outgoing requests to the test server.
|
| // This allows us to use "real" hostnames in URLs, which we can use to
|
| @@ -194,6 +198,10 @@ class SecurityExploitBrowserTest : public ContentBrowserTest {
|
| }
|
|
|
| void SetUpOnMainThread() override {
|
| + // Complete the manual Start() after ContentBrowserTest's own
|
| + // initialization, ref. comment on InitializeAndListen() above.
|
| + embedded_test_server()->StartAcceptingConnections();
|
| +
|
| BrowserThread::PostTask(
|
| BrowserThread::IO, FROM_HERE,
|
| base::Bind(&net::URLRequestSlowDownloadJob::AddUrlHandler));
|
|
|