Re: [workers-tests] SharedWorker no longer throws URLMismatchError (#3942)

LGTM. Firefox passes this; Chrome fails per https://bugs.chromium.org/p/chromium/issues/detail?id=538914

For future reference here's a version using EventWatcher and promises to avoid the manual bookkeeping (untested):

```js
promise_test(t => {
  const worker1 = new SharedWorker("shared-worker.js", "name");
  worker1.port.postMessage("trigger a response");
  const eventWatcher1 = new EventWatcher(worker1, ["message"]);

  const worker2 = new SharedWorker("1", "name");
  const eventWatcher2 = new EventWatcher(worker2, ["message"]);
  
  return Promise.all([
    eventWatcher1.wait_for("message").then(e => {
      assert_equals(e.data, "ping");
    }),
    eventWatcher2.wait_for("message").then(e => {
      assert_array_equals(e.data, ["1", "name"]);
    })
  ]);
});
```

View on GitHub: https://github.com/w3c/web-platform-tests/pull/3942#issuecomment-253513651

Received on Thursday, 13 October 2016 13:32:03 UTC