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

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

Issue 648623003: PushMessagingBrowserTest for registration success and failure (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git/+/master
Patch Set: Respond to the infobar asynchronously, like a user. Created 6 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 unified diff | Download patch
« no previous file with comments | « chrome/test/data/push_messaging/test.html ('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 2013 The Chromium Authors. All rights reserved. 2 # Copyright 2013 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/TCP/UDP/BASIC_AUTH_PROXY/WEBSOCKET server used for 6 """This is a simple HTTP/FTP/TCP/UDP/BASIC_AUTH_PROXY/WEBSOCKET server used for
7 testing Chrome. 7 testing Chrome.
8 8
9 It supports several test URLs, as specified by the handlers in TestPageHandler. 9 It supports several test URLs, as specified by the handlers in TestPageHandler.
10 By default, it listens on an ephemeral port and sends the port number back to 10 By default, it listens on an ephemeral port and sends the port number back to
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 head_handlers = [ 351 head_handlers = [
352 self.FileHandler, 352 self.FileHandler,
353 self.DefaultResponseHandler] 353 self.DefaultResponseHandler]
354 354
355 self._mime_types = { 355 self._mime_types = {
356 'crx' : 'application/x-chrome-extension', 356 'crx' : 'application/x-chrome-extension',
357 'exe' : 'application/octet-stream', 357 'exe' : 'application/octet-stream',
358 'gif': 'image/gif', 358 'gif': 'image/gif',
359 'jpeg' : 'image/jpeg', 359 'jpeg' : 'image/jpeg',
360 'jpg' : 'image/jpeg', 360 'jpg' : 'image/jpeg',
361 'js' : 'application/javascript',
361 'json': 'application/json', 362 'json': 'application/json',
362 'pdf' : 'application/pdf', 363 'pdf' : 'application/pdf',
363 'txt' : 'text/plain', 364 'txt' : 'text/plain',
364 'wav' : 'audio/wav', 365 'wav' : 'audio/wav',
365 'xml' : 'text/xml' 366 'xml' : 'text/xml'
366 } 367 }
367 self._default_mime_type = 'text/html' 368 self._default_mime_type = 'text/html'
368 369
369 testserver_base.BasePageHandler.__init__(self, request, client_address, 370 testserver_base.BasePageHandler.__init__(self, request, client_address,
370 socket_server, connect_handlers, 371 socket_server, connect_handlers,
(...skipping 1895 matching lines...) Expand 10 before | Expand all | Expand 10 after
2266 self.option_parser.add_option('--file-root-url', default='/files/', 2267 self.option_parser.add_option('--file-root-url', default='/files/',
2267 help='Specify a root URL for files served.') 2268 help='Specify a root URL for files served.')
2268 # TODO(ricea): Generalize this to support basic auth for HTTP too. 2269 # TODO(ricea): Generalize this to support basic auth for HTTP too.
2269 self.option_parser.add_option('--ws-basic-auth', action='store_true', 2270 self.option_parser.add_option('--ws-basic-auth', action='store_true',
2270 dest='ws_basic_auth', 2271 dest='ws_basic_auth',
2271 help='Enable basic-auth for WebSocket') 2272 help='Enable basic-auth for WebSocket')
2272 2273
2273 2274
2274 if __name__ == '__main__': 2275 if __name__ == '__main__':
2275 sys.exit(ServerRunner().main()) 2276 sys.exit(ServerRunner().main())
OLDNEW
« no previous file with comments | « chrome/test/data/push_messaging/test.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698