chromium/components/test/data/subresource_filter/websocket_worker.js

self.importScripts('websocket_connection.js');
self.addEventListener('message', (e) => {
  connectWebSocketWithMessageCallback(e.data.url, self.postMessage);
});