- From: Domenic Denicola <web-platform-tests-notifications@w3.org>
- Date: Thu, 13 Oct 2016 13:31:55 GMT
- To: public-web-platform-tests-notifications@w3.org
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