The following use cases would benefit from the ability to override a Mojo service from a worker (probably a service worker work fit best):
* Writing LayoutTests that perform a main frame navigation (brought up in a question on blink-dev, https://groups.google.com/a/chromium.org/d/msg/blink-dev/S8lQZRskXOg/5XUJJYWXBgAJ) doesn't work because the ExecutionContext in which the Mojo mock service is running is destroyed.
* Mocking RPCs that are called synchronously from Blink deadlocks because we don't call into JavaScript reentrantly.
Sending a Mojo pipe to a worker would probably handle most of these cases but it seems cleaner to write tests where the mocks live in a service worker and thus run completely independently from the page where the test is running.
Comment 1 by reillyg@chromium.org
, Mar 14 2017