mirror of
https://github.com/servo/servo.git
synced 2025-09-15 09:28:20 +01:00
Update web-platform-tests to revision 60220357131c65146444da1f54624d5b54d0975d
This commit is contained in:
parent
c45192614c
commit
775b784f79
2144 changed files with 58115 additions and 29658 deletions
|
@ -4,7 +4,15 @@ async_test(t => {
|
|||
function workerCode() {
|
||||
close();
|
||||
var ws = new WebSocket(self.location.origin.replace('http', 'ws'));
|
||||
postMessage(ws.readyState == WebSocket.CONNECTING);
|
||||
var data = {
|
||||
originalState: ws.readyState,
|
||||
afterCloseState: null
|
||||
};
|
||||
|
||||
ws.close();
|
||||
|
||||
data.afterCloseState = ws.readyState;
|
||||
postMessage(data);
|
||||
}
|
||||
|
||||
var workerBlob = new Blob([workerCode.toString() + ";workerCode();"], {
|
||||
|
@ -12,8 +20,9 @@ async_test(t => {
|
|||
});
|
||||
|
||||
var w = new Worker(URL.createObjectURL(workerBlob));
|
||||
w.onmessage = function(e) {
|
||||
assert_true(e.data, "WebSocket created on worker shutdown.");
|
||||
w.onmessage = t.step_func(function(e) {
|
||||
assert_equals(e.data.originalState, WebSocket.CONNECTING, "WebSocket created on worker shutdown is in connecting state.");
|
||||
assert_equals(e.data.afterCloseState, WebSocket.CLOSING, "Closed WebSocket created on worker shutdown is in closing state.");
|
||||
t.done();
|
||||
}
|
||||
});
|
||||
}, 'WebSocket created after a worker self.close()');
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
spec: https://html.spec.whatwg.org/multipage/web-sockets.html
|
||||
suggested_reviewers:
|
||||
- kristijanburnik
|
||||
- zqzhang
|
||||
- Jxck
|
||||
- jdm
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#!/usr/bin/python
|
||||
import urlparse
|
||||
from six.moves import urllib
|
||||
|
||||
|
||||
def web_socket_do_extra_handshake(request):
|
||||
url_parts = urlparse.urlsplit(request.uri)
|
||||
url_parts = urllib.parse.urlsplit(request.uri)
|
||||
request.extra_headers.append(('Set-Cookie', 'ws_test_'+(url_parts.query or '')+'=test; Secure; Path=/'))
|
||||
|
||||
def web_socket_transfer_data(request):
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#!/usr/bin/python
|
||||
|
||||
import urlparse
|
||||
from six.moves import urllib
|
||||
|
||||
def web_socket_do_extra_handshake(request):
|
||||
url_parts = urlparse.urlsplit(request.uri)
|
||||
url_parts = urllib.parse.urlsplit(request.uri)
|
||||
request.extra_headers.append(('Set-Cookie', 'ws_test_'+(url_parts.query or '')+'=test; Path=/; HttpOnly\x0D\x0ASec-WebSocket-Origin: '+request.ws_origin))
|
||||
|
||||
def web_socket_transfer_data(request):
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#!/usr/bin/python
|
||||
import urlparse
|
||||
from six.moves import urllib
|
||||
|
||||
|
||||
def web_socket_do_extra_handshake(request):
|
||||
url_parts = urlparse.urlsplit(request.uri)
|
||||
url_parts = urllib.parse.urlsplit(request.uri)
|
||||
request.extra_headers.append(('Set-Cookie', 'ws_test_'+(url_parts.query or '')+'=test; Path=/'))
|
||||
|
||||
def web_socket_transfer_data(request):
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#!/usr/bin/python
|
||||
import urlparse, json
|
||||
from six.moves import urllib
|
||||
import json
|
||||
from mod_pywebsocket import common, msgutil, util
|
||||
from mod_pywebsocket.handshake import hybi
|
||||
from wptserve import stash
|
||||
|
@ -15,7 +16,7 @@ def web_socket_transfer_data(request):
|
|||
line = request.ws_stream.receive_message()
|
||||
if line == "echo":
|
||||
query = request.unparsed_uri.split('?')[1]
|
||||
GET = dict(urlparse.parse_qsl(query))
|
||||
GET = dict(urllib.parse.parse_qsl(query))
|
||||
|
||||
# TODO(kristijanburnik): This code should be reused from
|
||||
# /mixed-content/generic/expect.py or implemented more generally
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue