| Index: headless/lib/embedder_mojo_browsertest.cc
|
| diff --git a/headless/lib/embedder_mojo_browsertest.cc b/headless/lib/embedder_mojo_browsertest.cc
|
| index 0ae117b33dca0eeed79908682eb1b5a84ffdeefa..92800f1acc35b41be6966362a113cfc28c740839 100644
|
| --- a/headless/lib/embedder_mojo_browsertest.cc
|
| +++ b/headless/lib/embedder_mojo_browsertest.cc
|
| @@ -234,7 +234,7 @@ class HttpDisabledByDefaultWhenMojoBindingsUsed : public EmbedderMojoTest,
|
| }
|
|
|
| void ReturnTestResult(const std::string& result) override {
|
| - FinishAsynchronousTest();
|
| + DisableClientAndFinishAsynchronousTest();
|
| FAIL() << "The HTTP page should not have been served and we should not have"
|
| " recieved a mojo callback!";
|
| }
|
| @@ -242,6 +242,12 @@ class HttpDisabledByDefaultWhenMojoBindingsUsed : public EmbedderMojoTest,
|
| void OnLoadingFailed(const network::LoadingFailedParams& params) override {
|
| // The navigation should fail since HTTP requests are blackholed.
|
| EXPECT_EQ(params.GetErrorText(), "net::ERR_FILE_NOT_FOUND");
|
| + DisableClientAndFinishAsynchronousTest();
|
| + }
|
| +
|
| + void DisableClientAndFinishAsynchronousTest() {
|
| + devtools_client_->GetNetwork()->Disable();
|
| + devtools_client_->GetNetwork()->RemoveObserver(this);
|
| FinishAsynchronousTest();
|
| }
|
| };
|
|
|