Many layout tests inject JS mock impls of remotely-provided Mojo interfaces (e.g., battery status or vibration).
The current approach to this problem uses Gin (see e.g. https://cs.chromium.org/chromium/src/content/renderer/mojo/interface_provider_js_wrapper.cc?q=interface_provider_js+package:%5Echromium$&l=16).
However, what would be cleaner would be to add the ability to override remote service interface implementations via Blink IDL. AFAICT it's not possible currently because all of the JS bindings are still using AMD modules, whereas an API defined via Blink IDL would need to use the recently-added (but not yet used) Blink IDL Mojo handle type. This incompatibility would result in a mismatch in the C++ implementation of that Blink IDL API (i.e., the handle object that it would pass into the JS-side factory function would not be the type that the JS side understands). Yuzhu tells me that it's going to be a month at a minimum (and probably longer) before the JS bindings are switched over to use the new Blink IDL types. Once that is done, it will be possible to revisit making this change.
Comment 1 by sheriffbot@chromium.org
, Mar 28 2018Status: Untriaged (was: Available)