xref: /aosp_15_r20/external/cronet/net/data/websocket/connect_check_worker.js (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)
1onmessage = () => {
2  var protocol = location.protocol.replace('http', 'ws');
3  var url = protocol + '//' + location.host + '/echo-with-no-extension';
4  var ws = new WebSocket(url);
5
6  ws.onopen = () => postMessage('PASS');
7  ws.onclose = () => postMessage('FAIL');
8}
9