testing/mochitest/server.py
author gijskruitbosch@gmail.com
Tue, 28 Aug 2007 05:27:34 -0700
changeset 5376 3e479faf29a8fbfc63a2152d586ba3241aecba38
parent 1 9b2a99adc05e53cd4010de512f50118594756650
permissions -rw-r--r--
Bug 380595 - Need unittest for nsIIdleService r=roc@ocallahan.org (Robert O'Callahan) sr=neil@parkwaycc.co.uk (Neil Rashbrook) Tests Only.

import SimpleHTTPServer
import SocketServer

# minimal web server.  serves files relative to the
# current directory.

PORT = 8888

Handler = SimpleHTTPServer.SimpleHTTPRequestHandler
Handler.extensions_map[".xhtml"] = "application/xhtml+xml"
Handler.extensions_map[".svg"] = "image/svg+xml"
Handler.extensions_map[".xul"] = "application/vnd.mozilla.xul+xml"
httpd = SocketServer.TCPServer(("", PORT), Handler)

print "serving at port", PORT
httpd.serve_forever()