diff options
author | svaldez <svaldez@chromium.org> | 2015-10-27 08:41:25 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-10-27 15:42:17 +0000 |
commit | 5c265faa70626b7754e8b62300f65771dae2adbf (patch) | |
tree | ecebe2e86facbf81c834dcd79e111a4b8f7b2cf8 /extensions/browser/guest_view | |
parent | befca2c1f96ef13bc0a1530187731985d16cb9bb (diff) | |
download | chromium_src-5c265faa70626b7754e8b62300f65771dae2adbf.zip chromium_src-5c265faa70626b7754e8b62300f65771dae2adbf.tar.gz chromium_src-5c265faa70626b7754e8b62300f65771dae2adbf.tar.bz2 |
SSL and add handlers in EmbeddedTestServer
As part of the migration of tests to EmbeddedTestServer, this CL modifies
EmbeddedTestServer to support SSLServerSocket and to add shared default handlers
that can be used by tests to mirror the SpawnedTestServer handlers. The major
changes are:
- SSL support through SSLServerSocket
- Adding SSLServerConfig to configure SSLServerSockets.
- Setting up default handlers for BrowserTestBase tests.
- Asynchronous HttpResponse.
- Moving EmbeddedTestServer to the net:: namespace.
BUG=496825
NOPRESUBMIT=TRUE
Review URL: https://codereview.chromium.org/1376593007
Cr-Commit-Position: refs/heads/master@{#356305}
Diffstat (limited to 'extensions/browser/guest_view')
-rw-r--r-- | extensions/browser/guest_view/web_view/web_view_apitest.cc | 8 |
1 files changed, 2 insertions, 6 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 5857b73..e4ca00b 100644 --- a/extensions/browser/guest_view/web_view/web_view_apitest.cc +++ b/extensions/browser/guest_view/web_view/web_view_apitest.cc @@ -48,11 +48,6 @@ 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( @@ -122,7 +117,8 @@ 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 EmptyHttpResponse); + return scoped_ptr<net::test_server::HttpResponse>( + new net::test_server::RawHttpResponse("", "")); } return scoped_ptr<net::test_server::HttpResponse>(); |