Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(77)

Unified Diff: net/tools/testserver/testserver.py

Issue 11085039: WebSocket test server migration on browser_tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: retain std::string reference for GURL::Replacements Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« net/test/base_test_server.cc ('K') | « net/test/base_test_server.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/testserver/testserver.py
diff --git a/net/tools/testserver/testserver.py b/net/tools/testserver/testserver.py
index 4870408f7ebf8965273fabb0dca85b497e436e14..f253b36d8db0013e839786c8ded7fea36a46d0b0 100755
--- a/net/tools/testserver/testserver.py
+++ b/net/tools/testserver/testserver.py
@@ -84,10 +84,10 @@ class WebSocketOptions:
self.allow_draft75 = False
self.strict = True
- # TODO(toyoshim): Support SSL and authenticates (http://crbug.com/137639)
self.use_tls = False
self.private_key = None
self.certificate = None
+ self.tls_client_auth = False
self.tls_client_ca = None
self.use_basic_auth = False
@@ -2252,7 +2252,13 @@ def main(options, args):
# TODO(toyoshim): Remove following os.chdir. Currently this operation
# is required to work correctly. It should be fixed from pywebsocket side.
os.chdir(MakeDataDir())
- server = WebSocketServer(WebSocketOptions(host, port, '.'))
+ option = WebSocketOptions(host, port, '.')
+ if options.cert_and_key_file:
+ option.use_tls = True
+ option.private_key = options.cert_and_key_file
+ option.certificate = options.cert_and_key_file
+ # TODO(toyoshim): Add client auth support.
+ server = WebSocketServer(option)
print 'WebSocket server started on %s:%d...' % (host, server.server_port)
server_data['port'] = server.server_port
elif options.server_type == SERVER_SYNC:
« net/test/base_test_server.cc ('K') | « net/test/base_test_server.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698