1
0
Fork 0
firefox/testing/web-platform/tests/websockets/referrer.any.js
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

13 lines
396 B
JavaScript

// 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");