Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / workers / resources / shared-worker-create-common.js
blob383695ab22c8f51f8924a98277fe020519eebc68
1 // Make a SharedWorker that has the same external interface as a DedicatedWorker, to use in shared test code.
2 function createWorker()
4     var worker = new SharedWorker('resources/shared-worker-common.js', 'name');
5     worker.port.onmessage = function(evt) { worker.onmessage(evt); };
6     worker.postMessage = function(msg, port) { worker.port.postMessage(msg, port); };
7     return worker;