mirror of
https://github.com/servo/servo.git
synced 2025-08-25 15:18:22 +01:00
Update web-platform-tests to revision be5419e845d39089ba6dc338c1bd0fa279108317
This commit is contained in:
parent
aa199307c8
commit
2b6f573eb5
3440 changed files with 109438 additions and 41750 deletions
|
@ -1,8 +1,7 @@
|
|||
//This file requires server-side substitutions and must be included as constants.js?pipe=sub
|
||||
|
||||
var PORT = "{{ports[ws][0]}}";
|
||||
//FIXME: Add support for wss
|
||||
var PORT_SSL = "{{ports[ws][0]}}";
|
||||
var PORT_SSL = "{{ports[wss][0]}}";
|
||||
|
||||
var SCHEME_DOMAIN_PORT;
|
||||
if (location.search == '?wss') {
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
#!/usr/bin/python
|
||||
|
||||
from mod_pywebsocket import msgutil
|
||||
|
||||
def web_socket_do_extra_handshake(request):
|
||||
pass
|
||||
|
||||
def web_socket_transfer_data(request):
|
||||
referrer = request.headers_in.get("Referer")
|
||||
if referrer is None:
|
||||
referrer = "MISSING AS PER FETCH"
|
||||
msgutil.send_message(request, referrer)
|
|
@ -3,7 +3,7 @@
|
|||
<title>WebSockets: defineProperty getter for bufferedAmount</title>
|
||||
<script src=/resources/testharness.js></script>
|
||||
<script src=/resources/testharnessreport.js></script>
|
||||
<script src=../../../../constants.js?pipe=sub></script>
|
||||
<script src=../../../constants.js?pipe=sub></script>
|
||||
<meta name="variant" content="">
|
||||
<meta name="variant" content="?wss">
|
||||
<div id=log></div>
|
||||
|
|
13
tests/wpt/web-platform-tests/websockets/referrer.any.js
Normal file
13
tests/wpt/web-platform-tests/websockets/referrer.any.js
Normal file
|
@ -0,0 +1,13 @@
|
|||
// META: script=constants.js?pipe=sub
|
||||
|
||||
async_test(t => {
|
||||
const ws = new WebSocket(SCHEME_DOMAIN_PORT + "/referrer");
|
||||
ws.onmessage = t.step_func_done(e => {
|
||||
assert_equals(e.data, "MISSING AS PER FETCH");
|
||||
ws.close();
|
||||
});
|
||||
|
||||
// Avoid timeouts in case of failure
|
||||
ws.onclose = t.unreached_func("close");
|
||||
ws.onerror = t.unreached_func("error");
|
||||
}, "Ensure no Referer header is included");
|
Loading…
Add table
Add a link
Reference in a new issue