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..80445e5b67c26db79fa6e3342ac4f799668c074c |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/fast/workers/resources/shared-worker-usecounter.js |
@@ -0,0 +1,11 @@ |
+onconnect = e => { |
+ var port = e.ports[0]; |
+ port.onmessage = (e) => { |
+ if (e.data.type == 'COUNT_FEATURE') |
+ internals.countFeature(e.data.feature); |
+ else if (e.data.type == 'COUNT_DEPRECATION') |
+ internals.countDeprecation(e.data.feature); |
+ port.postMessage('COUNTED'); |
+ }; |
+ port.postMessage('CONNECTED'); |
+} |