Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /websockets/referrer.any.html - WPT Dashboard Interop Dashboard
- /websockets/referrer.any.worker.html - WPT Dashboard Interop Dashboard
// META: script=constants.sub.js
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");