summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/websockets/referrer.any.js
blob: 0972a1dc4dfd237b6cfd91e6b1edf3760cdb14dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// 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");