Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/fast/workers/resources/shared-worker-usecounter.js |
| diff --git a/third_party/WebKit/LayoutTests/fast/workers/resources/shared-worker-usecounter.js b/third_party/WebKit/LayoutTests/fast/workers/resources/shared-worker-usecounter.js |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..cc5ee600aa21c3aee5ef8fb4f79ef8bf8c2b4839 |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/fast/workers/resources/shared-worker-usecounter.js |
| @@ -0,0 +1,8 @@ |
| +onconnect = e => { |
| + var port = e.ports[0]; |
| + port.onmessage = () => { |
| + // Call fetch() just for recording API use. |
| + fetch('notfound').catch(() => port.postMessage('fetched')); |
| + }; |
| + port.postMessage('connected'); |
| +} |