diff options
author | toyoshim@chromium.org <toyoshim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-23 01:05:12 +0000 |
---|---|---|
committer | toyoshim@chromium.org <toyoshim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-23 01:05:12 +0000 |
commit | 295e5cda96aa124dc3faf62acdcda1be40dcb465 (patch) | |
tree | d7633d2d4c1fe32215173c4b6daae9d5f5217efd /net/tools/testserver | |
parent | c5a9fabe9d846da44d7c29fda67aacf7260c1206 (diff) | |
download | chromium_src-295e5cda96aa124dc3faf62acdcda1be40dcb465.zip chromium_src-295e5cda96aa124dc3faf62acdcda1be40dcb465.tar.gz chromium_src-295e5cda96aa124dc3faf62acdcda1be40dcb465.tar.bz2 |
Refactoring for merging WebSocket test server to net::TestServer
- rename HTTPSOptions to SSLOptions
- pass an argument for secure server to specify the service protocol type
BUG=137639
Review URL: https://chromiumcodereview.appspot.com/10878003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@152902 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/tools/testserver')
-rw-r--r-- | net/tools/testserver/run_testserver.cc | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/net/tools/testserver/run_testserver.cc b/net/tools/testserver/run_testserver.cc index f1e4362..c02d4d6 100644 --- a/net/tools/testserver/run_testserver.cc +++ b/net/tools/testserver/run_testserver.cc @@ -112,18 +112,18 @@ int main(int argc, const char* argv[]) { return RunSyncTest() ? 0 : -1; } - net::TestServer::HTTPSOptions https_options; + net::TestServer::SSLOptions ssl_options; if (command_line->HasSwitch("https-cert")) { server_type = net::TestServer::TYPE_HTTPS; std::string cert_option = command_line->GetSwitchValueASCII("https-cert"); if (cert_option == "ok") { - https_options.server_certificate = net::TestServer::HTTPSOptions::CERT_OK; + ssl_options.server_certificate = net::TestServer::SSLOptions::CERT_OK; } else if (cert_option == "mismatched-name") { - https_options.server_certificate = - net::TestServer::HTTPSOptions::CERT_MISMATCHED_NAME; + ssl_options.server_certificate = + net::TestServer::SSLOptions::CERT_MISMATCHED_NAME; } else if (cert_option == "expired") { - https_options.server_certificate = - net::TestServer::HTTPSOptions::CERT_EXPIRED; + ssl_options.server_certificate = + net::TestServer::SSLOptions::CERT_EXPIRED; } else { printf("Error: --https-cert has invalid value %s\n", cert_option.c_str()); PrintUsage(); @@ -141,7 +141,9 @@ int main(int argc, const char* argv[]) { scoped_ptr<net::TestServer> test_server; switch (server_type) { case net::TestServer::TYPE_HTTPS: { - test_server.reset(new net::TestServer(https_options, doc_root)); + test_server.reset(new net::TestServer(server_type, + ssl_options, + doc_root)); break; } case net::TestServer::TYPE_SYNC: { |