summaryrefslogtreecommitdiffstats
path: root/net/test
diff options
context:
space:
mode:
authorpeter@chromium.org <peter@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-14 09:38:25 +0000
committerpeter@chromium.org <peter@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-14 09:38:25 +0000
commit0beab0474451585b1bd131483e89d04b40c6b88e (patch)
treefbd83d7b8520009d62e85537fd78de436d594b0b /net/test
parentb2486ad5eff861550673fa11566689187390dc2b (diff)
downloadchromium_src-0beab0474451585b1bd131483e89d04b40c6b88e.zip
chromium_src-0beab0474451585b1bd131483e89d04b40c6b88e.tar.gz
chromium_src-0beab0474451585b1bd131483e89d04b40c6b88e.tar.bz2
Revert 156742 - Launch pywebsocket via net::TestServer
The mod_pywebsocket.standalone module cannot be imported on the Chromium OS bots. Example output is available here: http://build.chromium.org/p/chromium.chromiumos/builders/ChromiumOS%20%28amd64%29/builds/4069/steps/VMTest/logs/stdio BUG=137639 Review URL: https://chromiumcodereview.appspot.com/10879029 TBR=toyoshim@chromium.org Review URL: https://codereview.chromium.org/10913268 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@156772 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/test')
-rw-r--r--net/test/base_test_server.cc7
-rw-r--r--net/test/base_test_server.h7
-rw-r--r--net/test/local_test_server.cc4
-rw-r--r--net/test/remote_test_server.cc3
4 files changed, 5 insertions, 16 deletions
diff --git a/net/test/base_test_server.cc b/net/test/base_test_server.cc
index e672f19..a4d1ff9 100644
--- a/net/test/base_test_server.cc
+++ b/net/test/base_test_server.cc
@@ -29,7 +29,8 @@ namespace {
std::string GetHostname(BaseTestServer::Type type,
const BaseTestServer::SSLOptions& options) {
- if (BaseTestServer::UsingSSL(type) &&
+ if ((type == BaseTestServer::TYPE_HTTPS ||
+ type == BaseTestServer::TYPE_WSS) &&
options.server_certificate ==
BaseTestServer::SSLOptions::CERT_MISMATCHED_NAME) {
// Return a different hostname string that resolves to the same hostname.
@@ -126,7 +127,7 @@ BaseTestServer::BaseTestServer(Type type, const SSLOptions& ssl_options)
type_(type),
started_(false),
log_to_console_(false) {
- DCHECK(UsingSSL(type));
+ DCHECK(type == TYPE_HTTPS || type == TYPE_WSS);
Init(GetHostname(type, ssl_options));
}
@@ -308,7 +309,7 @@ bool BaseTestServer::LoadTestRootCert() const {
bool BaseTestServer::SetupWhenServerStarted() {
DCHECK(host_port_pair_.port());
- if (UsingSSL(type_) && !LoadTestRootCert())
+ if ((type_ == TYPE_HTTPS || type_ == TYPE_WSS) && !LoadTestRootCert())
return false;
started_ = true;
diff --git a/net/test/base_test_server.h b/net/test/base_test_server.h
index 9f1290e..173abf7 100644
--- a/net/test/base_test_server.h
+++ b/net/test/base_test_server.h
@@ -30,8 +30,6 @@ class BaseTestServer {
public:
typedef std::pair<std::string, std::string> StringPair;
- // Following types represent protocol schemes. See also
- // http://www.iana.org/assignments/uri-schemes.html
enum Type {
TYPE_BASIC_AUTH_PROXY,
TYPE_FTP,
@@ -182,11 +180,6 @@ class BaseTestServer {
const std::vector<StringPair>& text_to_replace,
std::string* replacement_path);
- static bool UsingSSL(Type type) {
- return type == BaseTestServer::TYPE_HTTPS ||
- type == BaseTestServer::TYPE_WSS;
- }
-
protected:
virtual ~BaseTestServer();
Type type() const { return type_; }
diff --git a/net/test/local_test_server.cc b/net/test/local_test_server.cc
index 17137a69..af94a50 100644
--- a/net/test/local_test_server.cc
+++ b/net/test/local_test_server.cc
@@ -176,8 +176,6 @@ bool LocalTestServer::SetPythonPath() {
AppendToPythonPath(third_party_dir.AppendASCII("tlslite"));
AppendToPythonPath(
third_party_dir.AppendASCII("pyftpdlib").AppendASCII("src"));
- AppendToPythonPath(
- third_party_dir.AppendASCII("pywebsocket").AppendASCII("src"));
// Locate the Python code generated by the protocol buffers compiler.
FilePath pyproto_dir;
@@ -231,7 +229,7 @@ bool LocalTestServer::AddCommandLineArguments(CommandLine* command_line) const {
break;
case TYPE_WS:
case TYPE_WSS:
- command_line->AppendArg("--websocket");
+ // TODO(toyoshim): Handle correctly. See, http://crbug.com/137639 .
break;
case TYPE_FTP:
command_line->AppendArg("-f");
diff --git a/net/test/remote_test_server.cc b/net/test/remote_test_server.cc
index 5020ca7..7532945 100644
--- a/net/test/remote_test_server.cc
+++ b/net/test/remote_test_server.cc
@@ -50,9 +50,6 @@ std::string GetServerTypeString(BaseTestServer::Type type) {
case BaseTestServer::TYPE_HTTP:
case BaseTestServer::TYPE_HTTPS:
return "http";
- case BaseTestServer::TYPE_WS:
- case BaseTestServer::TYPE_WSS:
- return "ws";
case BaseTestServer::TYPE_SYNC:
return "sync";
case BaseTestServer::TYPE_TCP_ECHO: