summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authoryuzo@chromium.org <yuzo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-30 01:33:49 +0000
committeryuzo@chromium.org <yuzo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-30 01:33:49 +0000
commitcd613a9e4ec193ebc5163e4b8e660be729077f94 (patch)
treeff58f18d0fd745f49db54cc1da88556721a4be13 /webkit
parent72f53f9945ce253a40b7f7ff441290b49d756836 (diff)
downloadchromium_src-cd613a9e4ec193ebc5163e4b8e660be729077f94.zip
chromium_src-cd613a9e4ec193ebc5163e4b8e660be729077f94.tar.gz
chromium_src-cd613a9e4ec193ebc5163e4b8e660be729077f94.tar.bz2
Change the document root for the test Web Socket server to WebKit/LayoutTests
from WebKit/LayoutTests/websocket/tests. This makes reusing scripts in WebKit/LayoutTests/fast/js/resources easier. For example, a test in WebKit/LayoutTests/websocket/tests/sample.html can include js-test-pre.js as ../../fast/js/resources/js-test-pre.js. TEST=none BUG=none Review URL: http://codereview.chromium.org/339019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30548 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/tools/layout_tests/layout_package/path_utils.py6
-rw-r--r--webkit/tools/layout_tests/layout_package/websocket_server.py17
2 files changed, 11 insertions, 12 deletions
diff --git a/webkit/tools/layout_tests/layout_package/path_utils.py b/webkit/tools/layout_tests/layout_package/path_utils.py
index 88612ea..3d0c56c 100644
--- a/webkit/tools/layout_tests/layout_package/path_utils.py
+++ b/webkit/tools/layout_tests/layout_package/path_utils.py
@@ -181,6 +181,7 @@ def _WinPathToUnix(path):
#
def FilenameToUri(full_path):
"""Convert a test file to a URI."""
+ LAYOUTTESTS_DIR = "LayoutTests/"
LAYOUTTEST_HTTP_DIR = "LayoutTests/http/tests/"
PENDING_HTTP_DIR = "pending/http/tests/"
LAYOUTTEST_WEBSOCKET_DIR = "LayoutTests/websocket/tests/"
@@ -198,8 +199,9 @@ def FilenameToUri(full_path):
relative_path = relative_path[len(PENDING_HTTP_DIR):]
port = 9000
elif relative_path.startswith(LAYOUTTEST_WEBSOCKET_DIR):
- # LayoutTests/websocket/tests/ run off port 8880
- relative_path = relative_path[len(LAYOUTTEST_WEBSOCKET_DIR):]
+ # LayoutTests/websocket/tests/ run off port 8880 and 9323
+ # Note: the root is LayoutTests/, not LayoutTests/websocket/tests/
+ relative_path = relative_path[len(LAYOUTTESTS_DIR):]
port = 8880
elif relative_path.find("/http/") >= 0:
# chrome/http/tests run off of port 8081 with the full path
diff --git a/webkit/tools/layout_tests/layout_package/websocket_server.py b/webkit/tools/layout_tests/layout_package/websocket_server.py
index 4eb1d47..8df66f0 100644
--- a/webkit/tools/layout_tests/layout_package/websocket_server.py
+++ b/webkit/tools/layout_tests/layout_package/websocket_server.py
@@ -27,7 +27,6 @@ _WSS_LOG_PREFIX = 'pywebsocket.wss.log-'
_DEFAULT_WS_PORT = 8880
_DEFAULT_WSS_PORT = 9323
-_DEFAULT_ROOT = '.'
def RemoveLogFiles(folder, starts_with):
@@ -44,7 +43,6 @@ class PyWebSocketNotStarted(Exception):
class PyWebSocket(http_server.Lighttpd):
def __init__(self, output_dir, port=_DEFAULT_WS_PORT,
- root=_DEFAULT_ROOT,
use_tls=False,
private_key=http_server.Lighttpd._pem_file,
certificate=http_server.Lighttpd._pem_file):
@@ -54,7 +52,6 @@ class PyWebSocket(http_server.Lighttpd):
self._output_dir = output_dir
self._process = None
self._port = port
- self._root = root
self._use_tls = use_tls
self._private_key = private_key
self._certificate = certificate
@@ -67,13 +64,15 @@ class PyWebSocket(http_server.Lighttpd):
# Webkit tests
try:
- self._webkit_tests = path_utils.PathFromBase(
+ self._web_socket_tests = path_utils.PathFromBase(
'third_party', 'WebKit', 'LayoutTests', 'websocket', 'tests')
+ self._layout_tests = path_utils.PathFromBase(
+ 'third_party', 'WebKit', 'LayoutTests')
except path_utils.PathNotFound:
- self._webkit_tests = None
+ self._web_socket_tests = None
def Start(self):
- if not self._webkit_tests:
+ if not self._web_socket_tests:
logging.info('No need to start %s server.' % self._server_name)
return
if self.IsRunning():
@@ -97,7 +96,8 @@ class PyWebSocket(http_server.Lighttpd):
start_cmd = [
python_interp, pywebsocket_script,
'-p', str(self._port),
- '-d', self._webkit_tests,
+ '-d', self._layout_tests,
+ '-s', self._web_socket_tests,
]
if self._use_tls:
start_cmd.extend(['-t', '-k', self._private_key,
@@ -157,8 +157,6 @@ if '__main__' == __name__:
option_parser = optparse.OptionParser()
option_parser.add_option('-p', '--port', dest='port',
default=None, help='Port to listen on')
- option_parser.add_option('-r', '--root', dest='root', default='.',
- help='Absolute path to DocumentRoot')
option_parser.add_option('-t', '--tls', dest='use_tls', action='store_true',
default=False, help='use TLS (wss://)')
option_parser.add_option('-k', '--private_key', dest='private_key',
@@ -174,7 +172,6 @@ if '__main__' == __name__:
options.port = _DEFAULT_WS_PORT
kwds = {'port':options.port,
- 'root':options.root,
'use_tls':options.use_tls}
if options.private_key:
kwds['private_key'] = options.private_key