summaryrefslogtreecommitdiffstats
path: root/extensions/browser/guest_view
diff options
context:
space:
mode:
authorsvaldez <svaldez@chromium.org>2015-10-28 12:39:53 -0700
committerCommit bot <commit-bot@chromium.org>2015-10-28 19:40:56 +0000
commit6e7e82a2007d29942ccc68a58bf60e4c2cdb075f (patch)
tree298d64e8abbba2bf510251b27436890ae5958f7f /extensions/browser/guest_view
parentea1e159e5ab8b5221b1f43e4cff8a1f92fdf5f17 (diff)
downloadchromium_src-6e7e82a2007d29942ccc68a58bf60e4c2cdb075f.zip
chromium_src-6e7e82a2007d29942ccc68a58bf60e4c2cdb075f.tar.gz
chromium_src-6e7e82a2007d29942ccc68a58bf60e4c2cdb075f.tar.bz2
SSL and add handlers in EmbeddedTestServer
(This is a re-landing of CL 1376593007) 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, 548358, 548492 NOPRESUBMIT=TRUE TBR=davidben@chromium.org,kelvinp@chromium.org,lazyboy@chromium.org,sergeyu@chromium.org Review URL: https://codereview.chromium.org/1411573006 Cr-Commit-Position: refs/heads/master@{#356616}
Diffstat (limited to 'extensions/browser/guest_view')
-rw-r--r--extensions/browser/guest_view/web_view/web_view_apitest.cc8
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>();