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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/resources/ping.js

Issue 2480303002: CSP3: Implement 'worker-src'. (Closed)
Patch Set: ServiceWorker Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Service Worker:
2 if (typeof ServiceWorkerGlobalScope) {
3 self.onmessage = function (e) { e.source.postMessage("ping"); };
4 }
5
6 // Shared Workers:
7 if (typeof SharedWorkerGlobalScope) {
8 onconnect = function (e) {
9 var port = e.ports[0];
10
11 port.onmessage = function () { port.postMessage("ping"); }
12 port.postMessage("ping");
13 };
14 }
15
16 // Dedicated web workers:
foolip 2016/11/09 16:17:52 No typeof DedicatedWorkerGlobalScope? Does this re
17 if (self.postMessage) {
18 self.postMessage("ping");
19 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698