Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(85)

Unified Diff: third_party/WebKit/LayoutTests/fast/workers/resources/shared-worker-usecounter.js

Issue 2586863002: Worker: Enable UseCounter for SharedWorkerGlobalScope (Closed)
Patch Set: tweak Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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');
+}

Powered by Google App Engine
This is Rietveld 408576698