summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/streams/transferable/resources/receiving-shared-worker.js
blob: 84f779c3db6e135f172855e8e35684a2668fa87a (plain)
1
2
3
4
5
6
7
8
9
10
11
'use strict';
importScripts('/resources/testharness.js', 'helpers.js');

onconnect = evt => {
  const port = evt.source;
  const promise = testMessageEvent(port);
  port.start();
  promise
      .then(() => port.postMessage('OK'))
      .catch(err => port.postMessage(`BAD: ${err}`));
};