- Revision
- 247640
- Author
- [email protected]
- Date
- 2019-07-19 01:34:57 -0700 (Fri, 19 Jul 2019)
Log Message
Remove pywebsockets from thirdparty
https://bugs.webkit.org/show_bug.cgi?id=199710
Patch by Carlos Garcia Campos <[email protected]> on 2019-07-19
Reviewed by Jonathan Bedard.
Tools:
We have a very old version of pywebsocket in webkitpy thirdparty, but we are also importing pywebsocket as part
of wpt tools. We can simply use the wpt one for all websocket tests and remove the old copy from sources.
* Scripts/webkitpy/layout_tests/servers/websocket_server.py:
(PyWebSocket._prepare_config): Use pywebsocket from imported w3c tools directory.
* Scripts/webkitpy/thirdparty/mod_pywebsocket/COPYING: Removed.
* Scripts/webkitpy/thirdparty/mod_pywebsocket/__init__.py: Removed.
* Scripts/webkitpy/thirdparty/mod_pywebsocket/_stream_base.py: Removed.
* Scripts/webkitpy/thirdparty/mod_pywebsocket/_stream_hixie75.py: Removed.
* Scripts/webkitpy/thirdparty/mod_pywebsocket/_stream_hybi.py: Removed.
* Scripts/webkitpy/thirdparty/mod_pywebsocket/common.py: Removed.
* Scripts/webkitpy/thirdparty/mod_pywebsocket/dispatch.py: Removed.
* Scripts/webkitpy/thirdparty/mod_pywebsocket/extensions.py: Removed.
* Scripts/webkitpy/thirdparty/mod_pywebsocket/handshake/__init__.py: Removed.
* Scripts/webkitpy/thirdparty/mod_pywebsocket/handshake/_base.py: Removed.
* Scripts/webkitpy/thirdparty/mod_pywebsocket/handshake/hybi.py: Removed.
* Scripts/webkitpy/thirdparty/mod_pywebsocket/handshake/hybi00.py: Removed.
* Scripts/webkitpy/thirdparty/mod_pywebsocket/headerparserhandler.py: Removed.
* Scripts/webkitpy/thirdparty/mod_pywebsocket/http_header_util.py: Removed.
* Scripts/webkitpy/thirdparty/mod_pywebsocket/memorizingfile.py: Removed.
* Scripts/webkitpy/thirdparty/mod_pywebsocket/msgutil.py: Removed.
* Scripts/webkitpy/thirdparty/mod_pywebsocket/mux.py: Removed.
* Scripts/webkitpy/thirdparty/mod_pywebsocket/standalone.py: Removed.
* Scripts/webkitpy/thirdparty/mod_pywebsocket/stream.py: Removed.
* Scripts/webkitpy/thirdparty/mod_pywebsocket/util.py: Removed.
LayoutTests:
Update two tests that timeout with the new pywebsocket version, because the server doesn't close the connection
after handshake.AbortedByUserException(). Simply assume onopen to be called a success in handshake like other
tests using handshake.AbortedByUserException() do.
* http/tests/websocket/tests/hybi/handshake-ok-with-legacy-sec-websocket-response-headers-expected.txt:
* http/tests/websocket/tests/hybi/handshake-ok-with-legacy-sec-websocket-response-headers.html:
* http/tests/websocket/tests/hybi/handshake-ok-with-legacy-websocket-response-headers-expected.txt:
* http/tests/websocket/tests/hybi/handshake-ok-with-legacy-websocket-response-headers.html:
Modified Paths
Removed Paths
- trunk/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/
Diff
Modified: trunk/LayoutTests/ChangeLog (247639 => 247640)
--- trunk/LayoutTests/ChangeLog 2019-07-19 07:39:12 UTC (rev 247639)
+++ trunk/LayoutTests/ChangeLog 2019-07-19 08:34:57 UTC (rev 247640)
@@ -1,3 +1,19 @@
+2019-07-19 Carlos Garcia Campos <[email protected]>
+
+ Remove pywebsockets from thirdparty
+ https://bugs.webkit.org/show_bug.cgi?id=199710
+
+ Reviewed by Jonathan Bedard.
+
+ Update two tests that timeout with the new pywebsocket version, because the server doesn't close the connection
+ after handshake.AbortedByUserException(). Simply assume onopen to be called a success in handshake like other
+ tests using handshake.AbortedByUserException() do.
+
+ * http/tests/websocket/tests/hybi/handshake-ok-with-legacy-sec-websocket-response-headers-expected.txt:
+ * http/tests/websocket/tests/hybi/handshake-ok-with-legacy-sec-websocket-response-headers.html:
+ * http/tests/websocket/tests/hybi/handshake-ok-with-legacy-websocket-response-headers-expected.txt:
+ * http/tests/websocket/tests/hybi/handshake-ok-with-legacy-websocket-response-headers.html:
+
2019-07-18 Said Abou-Hallawa <[email protected]>
[iOS Sim] Multiple quicklook tests are failing
Modified: trunk/LayoutTests/http/tests/websocket/tests/hybi/handshake-ok-with-legacy-sec-websocket-response-headers-expected.txt (247639 => 247640)
--- trunk/LayoutTests/http/tests/websocket/tests/hybi/handshake-ok-with-legacy-sec-websocket-response-headers-expected.txt 2019-07-19 07:39:12 UTC (rev 247639)
+++ trunk/LayoutTests/http/tests/websocket/tests/hybi/handshake-ok-with-legacy-sec-websocket-response-headers-expected.txt 2019-07-19 08:34:57 UTC (rev 247640)
@@ -2,7 +2,7 @@
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-PASS closeEvent.isTrusted is true
+PASS open event fired
PASS successfullyParsed is true
TEST COMPLETE
Modified: trunk/LayoutTests/http/tests/websocket/tests/hybi/handshake-ok-with-legacy-sec-websocket-response-headers.html (247639 => 247640)
--- trunk/LayoutTests/http/tests/websocket/tests/hybi/handshake-ok-with-legacy-sec-websocket-response-headers.html 2019-07-19 07:39:12 UTC (rev 247639)
+++ trunk/LayoutTests/http/tests/websocket/tests/hybi/handshake-ok-with-legacy-sec-websocket-response-headers.html 2019-07-19 08:34:57 UTC (rev 247640)
@@ -16,12 +16,12 @@
var closeEvent;
ws._onopen_ = function() {
- ws.close();
+ testPassed("open event fired");
+ finishJSTest();
};
- ws._onclose_ = function(event) {
- closeEvent = event;
- shouldBeTrue("closeEvent.isTrusted");
+ ws._onerror_ = function(event) {
+ testFailed("error event fired");
finishJSTest();
};
</script>
Modified: trunk/LayoutTests/http/tests/websocket/tests/hybi/handshake-ok-with-legacy-websocket-response-headers-expected.txt (247639 => 247640)
--- trunk/LayoutTests/http/tests/websocket/tests/hybi/handshake-ok-with-legacy-websocket-response-headers-expected.txt 2019-07-19 07:39:12 UTC (rev 247639)
+++ trunk/LayoutTests/http/tests/websocket/tests/hybi/handshake-ok-with-legacy-websocket-response-headers-expected.txt 2019-07-19 08:34:57 UTC (rev 247640)
@@ -2,7 +2,7 @@
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-PASS closeEvent.isTrusted is true
+PASS open event fired
PASS successfullyParsed is true
TEST COMPLETE
Modified: trunk/LayoutTests/http/tests/websocket/tests/hybi/handshake-ok-with-legacy-websocket-response-headers.html (247639 => 247640)
--- trunk/LayoutTests/http/tests/websocket/tests/hybi/handshake-ok-with-legacy-websocket-response-headers.html 2019-07-19 07:39:12 UTC (rev 247639)
+++ trunk/LayoutTests/http/tests/websocket/tests/hybi/handshake-ok-with-legacy-websocket-response-headers.html 2019-07-19 08:34:57 UTC (rev 247640)
@@ -16,12 +16,12 @@
var closeEvent;
ws._onopen_ = function() {
- ws.close();
+ testPassed("open event fired");
+ finishJSTest();
};
- ws._onclose_ = function(event) {
- closeEvent = event;
- shouldBeTrue("closeEvent.isTrusted");
+ ws._onerror_ = function(event) {
+ testFailed("error event fired");
finishJSTest();
};
</script>
Modified: trunk/Tools/ChangeLog (247639 => 247640)
--- trunk/Tools/ChangeLog 2019-07-19 07:39:12 UTC (rev 247639)
+++ trunk/Tools/ChangeLog 2019-07-19 08:34:57 UTC (rev 247640)
@@ -1,3 +1,36 @@
+2019-07-19 Carlos Garcia Campos <[email protected]>
+
+ Remove pywebsockets from thirdparty
+ https://bugs.webkit.org/show_bug.cgi?id=199710
+
+ Reviewed by Jonathan Bedard.
+
+ We have a very old version of pywebsocket in webkitpy thirdparty, but we are also importing pywebsocket as part
+ of wpt tools. We can simply use the wpt one for all websocket tests and remove the old copy from sources.
+
+ * Scripts/webkitpy/layout_tests/servers/websocket_server.py:
+ (PyWebSocket._prepare_config): Use pywebsocket from imported w3c tools directory.
+ * Scripts/webkitpy/thirdparty/mod_pywebsocket/COPYING: Removed.
+ * Scripts/webkitpy/thirdparty/mod_pywebsocket/__init__.py: Removed.
+ * Scripts/webkitpy/thirdparty/mod_pywebsocket/_stream_base.py: Removed.
+ * Scripts/webkitpy/thirdparty/mod_pywebsocket/_stream_hixie75.py: Removed.
+ * Scripts/webkitpy/thirdparty/mod_pywebsocket/_stream_hybi.py: Removed.
+ * Scripts/webkitpy/thirdparty/mod_pywebsocket/common.py: Removed.
+ * Scripts/webkitpy/thirdparty/mod_pywebsocket/dispatch.py: Removed.
+ * Scripts/webkitpy/thirdparty/mod_pywebsocket/extensions.py: Removed.
+ * Scripts/webkitpy/thirdparty/mod_pywebsocket/handshake/__init__.py: Removed.
+ * Scripts/webkitpy/thirdparty/mod_pywebsocket/handshake/_base.py: Removed.
+ * Scripts/webkitpy/thirdparty/mod_pywebsocket/handshake/hybi.py: Removed.
+ * Scripts/webkitpy/thirdparty/mod_pywebsocket/handshake/hybi00.py: Removed.
+ * Scripts/webkitpy/thirdparty/mod_pywebsocket/headerparserhandler.py: Removed.
+ * Scripts/webkitpy/thirdparty/mod_pywebsocket/http_header_util.py: Removed.
+ * Scripts/webkitpy/thirdparty/mod_pywebsocket/memorizingfile.py: Removed.
+ * Scripts/webkitpy/thirdparty/mod_pywebsocket/msgutil.py: Removed.
+ * Scripts/webkitpy/thirdparty/mod_pywebsocket/mux.py: Removed.
+ * Scripts/webkitpy/thirdparty/mod_pywebsocket/standalone.py: Removed.
+ * Scripts/webkitpy/thirdparty/mod_pywebsocket/stream.py: Removed.
+ * Scripts/webkitpy/thirdparty/mod_pywebsocket/util.py: Removed.
+
2019-07-18 Jonathan Bedard <[email protected]>
results.webkit.org: Move resultsdbpy to WebKit
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/servers/websocket_server.py (247639 => 247640)
--- trunk/Tools/Scripts/webkitpy/layout_tests/servers/websocket_server.py 2019-07-19 07:39:12 UTC (rev 247639)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/servers/websocket_server.py 2019-07-19 08:34:57 UTC (rev 247640)
@@ -117,11 +117,10 @@
output_log = self._filesystem.join(self._output_dir, log_file_name + "-out.txt")
self._wsout = self._filesystem.open_text_file_for_writing(output_log)
- from webkitpy.thirdparty import mod_pywebsocket
python_interp = sys.executable
- # FIXME: Use self._filesystem.path_to_module(self.__module__) instead of __file__
- # I think this is trying to get the chrome directory? Doesn't the port object know that?
- pywebsocket_base = self._filesystem.join(self._filesystem.dirname(self._filesystem.dirname(self._filesystem.dirname(self._filesystem.abspath(__file__)))), 'thirdparty')
+ wpt_tools_base = self._filesystem.join(self._layout_tests, "imported", "w3c", "web-platform-tests", "tools")
+ pywebsocket_base = self._filesystem.join(wpt_tools_base, "pywebsocket")
+ pywebsocket_deps = [self._filesystem.join(wpt_tools_base, "third_party", "six")]
pywebsocket_script = self._filesystem.join(pywebsocket_base, 'mod_pywebsocket', 'standalone.py')
start_cmd = [
python_interp, '-u', pywebsocket_script,
@@ -152,7 +151,7 @@
self._start_cmd = start_cmd
server_name = self._filesystem.basename(pywebsocket_script)
self._env = self._port_obj.setup_environ_for_server(server_name)
- self._env['PYTHONPATH'] = (pywebsocket_base + os.path.pathsep + self._env.get('PYTHONPATH', ''))
+ self._env['PYTHONPATH'] = os.path.pathsep.join([pywebsocket_base] + pywebsocket_deps + [self._env.get('PYTHONPATH', '')])
def _remove_stale_logs(self):
try: