diff options
Diffstat (limited to 'extensions/browser/guest_view')
-rw-r--r-- | extensions/browser/guest_view/web_view/web_view_apitest.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/extensions/browser/guest_view/web_view/web_view_apitest.cc b/extensions/browser/guest_view/web_view/web_view_apitest.cc index e4ca00b..5857b73 100644 --- a/extensions/browser/guest_view/web_view/web_view_apitest.cc +++ b/extensions/browser/guest_view/web_view/web_view_apitest.cc @@ -48,6 +48,11 @@ const char kTestServerPort[] = "testServer.port"; const char kTestWebSocketPort[] = "testWebSocketPort"; const char kSitePerProcess[] = "sitePerProcess"; +class EmptyHttpResponse : public net::test_server::HttpResponse { + public: + std::string ToResponseString() const override { return std::string(); } +}; + // Handles |request| by serving a redirect response if the |User-Agent| is // foobar. static scoped_ptr<net::test_server::HttpResponse> UserAgentResponseHandler( @@ -117,8 +122,7 @@ scoped_ptr<net::test_server::HttpResponse> EmptyResponseHandler( const net::test_server::HttpRequest& request) { if (base::StartsWith(path, request.relative_url, base::CompareCase::SENSITIVE)) { - return scoped_ptr<net::test_server::HttpResponse>( - new net::test_server::RawHttpResponse("", "")); + return scoped_ptr<net::test_server::HttpResponse>(new EmptyHttpResponse); } return scoped_ptr<net::test_server::HttpResponse>(); |