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

Side by Side Diff: net/tools/testserver/testserver.py

Issue 11363194: Enable 307 net unit tests on Android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « build/android/gtest_filter/net_unittests_disabled ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """This is a simple HTTP/FTP/SYNC/TCP/UDP/ server used for testing Chrome. 6 """This is a simple HTTP/FTP/SYNC/TCP/UDP/ server used for testing Chrome.
7 7
8 It supports several test URLs, as specified by the handlers in TestPageHandler. 8 It supports several test URLs, as specified by the handlers in TestPageHandler.
9 By default, it listens on an ephemeral port and sends the port number back to 9 By default, it listens on an ephemeral port and sends the port number back to
10 the originating process over a pipe. The originating process can specify an 10 the originating process over a pipe. The originating process can specify an
(...skipping 19 matching lines...) Expand all
30 import socket 30 import socket
31 import SocketServer 31 import SocketServer
32 import sys 32 import sys
33 import threading 33 import threading
34 import time 34 import time
35 import urllib 35 import urllib
36 import urlparse 36 import urlparse
37 import zlib 37 import zlib
38 38
39 import echo_message 39 import echo_message
40 from mod_pywebsocket.standalone import WebSocketServer
41 import pyftpdlib.ftpserver 40 import pyftpdlib.ftpserver
42 import testserver_base 41 import testserver_base
43 import tlslite 42 import tlslite
44 import tlslite.api 43 import tlslite.api
45 44
46 BASE_DIR = os.path.dirname(os.path.abspath(__file__)) 45 BASE_DIR = os.path.dirname(os.path.abspath(__file__))
46 sys.path.insert(
47 0, os.path.join(BASE_DIR, '..', '..', '..', 'third_party/pywebsocket/src'))
48 from mod_pywebsocket.standalone import WebSocketServer
47 49
48 SERVER_HTTP = 0 50 SERVER_HTTP = 0
49 SERVER_FTP = 1 51 SERVER_FTP = 1
50 SERVER_SYNC = 2 52 SERVER_SYNC = 2
51 SERVER_TCP_ECHO = 3 53 SERVER_TCP_ECHO = 3
52 SERVER_UDP_ECHO = 4 54 SERVER_UDP_ECHO = 4
53 SERVER_BASIC_AUTH_PROXY = 5 55 SERVER_BASIC_AUTH_PROXY = 5
54 SERVER_WEBSOCKET = 6 56 SERVER_WEBSOCKET = 6
55 57
56 # Default request queue size for WebSocketServer. 58 # Default request queue size for WebSocketServer.
(...skipping 2374 matching lines...) Expand 10 before | Expand all | Expand 10 after
2431 'should report back to the client as the ' 2433 'should report back to the client as the '
2432 'user owning the token used for making the ' 2434 'user owning the token used for making the '
2433 'policy request.') 2435 'policy request.')
2434 self.option_parser.add_option('--auth-token', dest='auth_token', 2436 self.option_parser.add_option('--auth-token', dest='auth_token',
2435 help='Specify the auth token which should be ' 2437 help='Specify the auth token which should be '
2436 'used in the authorization header for GData.') 2438 'used in the authorization header for GData.')
2437 2439
2438 2440
2439 if __name__ == '__main__': 2441 if __name__ == '__main__':
2440 sys.exit(ServerRunner().main()) 2442 sys.exit(ServerRunner().main())
OLDNEW
« no previous file with comments | « build/android/gtest_filter/net_unittests_disabled ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698