3 // Returns whether the test is being ran in a dedicated or a shared worker. The
4 // testharness.js framework requires done() to be called when this is the case.
5 function isDedicatedOrSharedWorker()
7 return self.importScripts && !self.scope;
10 // Shared Workers will receive their message port once the first page connects to it.
11 self.addEventListener('connect', function(event) {
12 _port = event.ports[0];
16 simulateWebNotificationClick: function(title)
19 _port.postMessage({ type: 'simulateWebNotificationClick', title: title });