InterfacePtr::FlushForTesting() doesn't work for JS bindings |
||
Issue descriptionBackground: I am working on updating the Media Router integration tests to make sure all pending callbacks for calls to the MediaRouteProvider interface are run before tearing down the test. To do that I call FlushForTesting() on the MediaRouteProviderPtr from C++ before the end of test. The MediaRouteProvider interface is implemented in the extension and therefore uses JS bindings. However FlushForTesting() gets stuck. The reason is that the JS side a ReferenceError "RunInput.query_version is not currently set." (see gen/mojo/public/interfaces/bindings/interface_control_messages.mojom.js). It seems to be triggered here: https://cs.chromium.org/chromium/src/mojo/public/js/lib/control_message_handler.js?dr&q=mojo/public/js/lib/control_message_handler&sq=package:chromium&l=65 If I modified the generated JS bindings to return undefined instead, then FlushForTesting() works fine.
,
Nov 3 2017
Nope, this is not exactly urgent since we usually run our tests on release builds, so the untriggered callback DCHECK doesn't happen there in the first place.
,
Nov 3 2017
Then I won't bother fixing the old JS bindings. Instead I will focus on moving media router away from it.
,
Jan 8
This works in the new JS bindings. |
||
►
Sign in to add a comment |
||
Comment 1 by yzshen@chromium.org
, Nov 3 2017