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

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

Issue 2586863002: Worker: Enable UseCounter for SharedWorkerGlobalScope (Closed)
Patch Set: address review comments Created 3 years, 11 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..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'));
Rick Byers 2017/01/26 03:02:37 please use a feature which is Deprecated (or even
nhiroki 2017/01/27 16:58:16 You're right! Calling a deprecated feature hits DC
+ };
+ port.postMessage('connected');
+}

Powered by Google App Engine
This is Rietveld 408576698