| Index: chrome/test/data/subresource_filter/websocket_connection.js
|
| diff --git a/chrome/test/data/subresource_filter/websocket_connection.js b/chrome/test/data/subresource_filter/websocket_connection.js
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..de43a5a0f3156d7917fdce6b2e1076a9b12bc786
|
| --- /dev/null
|
| +++ b/chrome/test/data/subresource_filter/websocket_connection.js
|
| @@ -0,0 +1,11 @@
|
| +// Note: This JS can run either in a worker or as a script in the main document
|
| +// context.
|
| +function connectWebSocketWithMessageCallback(url, messageCallback) {
|
| + var ws = new WebSocket(url);
|
| +
|
| + ws.onopen = () => { ws.send('hello world'); };
|
| +
|
| + ws.onclose = () => { messageCallback('onclose'); };
|
| +
|
| + ws.onmessage = () => { messageCallback('onmessage'); };
|
| +}
|
|
|