| Index: content/child/site_isolation_stats_gatherer_browsertest.cc
|
| diff --git a/content/child/site_isolation_stats_gatherer_browsertest.cc b/content/child/site_isolation_stats_gatherer_browsertest.cc
|
| index 852ddabe0454d9294114a97f7658e068699aa16d..9150a97a046ab302d62251d72f585819fb6dc4ae 100644
|
| --- a/content/child/site_isolation_stats_gatherer_browsertest.cc
|
| +++ b/content/child/site_isolation_stats_gatherer_browsertest.cc
|
| @@ -29,7 +29,12 @@ class SiteIsolationStatsGathererBrowserTest : public ContentBrowserTest {
|
| ~SiteIsolationStatsGathererBrowserTest() override {}
|
|
|
| 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
|
| // create arbitrary SiteInstances.
|
| @@ -43,6 +48,12 @@ class SiteIsolationStatsGathererBrowserTest : public ContentBrowserTest {
|
| command_line->AppendSwitch(switches::kDisableWebSecurity);
|
| }
|
|
|
| + void SetUpOnMainThread() override {
|
| + // Complete the manual Start() after ContentBrowserTest's own
|
| + // initialization, ref. comment on InitializeAndListen() above.
|
| + embedded_test_server()->StartAcceptingConnections();
|
| + }
|
| +
|
| void InspectHistograms(const base::HistogramTester& histograms,
|
| bool should_be_blocked,
|
| const std::string& resource_name) {
|
|
|