TestRenderFrame::GetFrameHost should not flush its AssociatedInterfacePtr |
|
Issue descriptionSee [1] and related comments on the CL for more context. The gist is that previously, we made a fake mojom::RenderMessageFilter and explicitly swapped [2] out the production RenderMessageFilter during browser tests. This fake endpoint only used the client side binding. We wanted a slightly better interface for the new FrameHost interface, so we used OverrideBinderForTesting to swap in a MockFrameHost. This meant that theoretically calls to GetRemoteAssociatedInterfaces()->GetInterface should Just Work. However in practice this didn't really work. Subsequent synchronous IPCs would stall, waiting for the interface to bind [3]. This was solved by directly Flushing the interface before accessing it in TestRenderFrame, so we never ended up using GetRemoteAssociatedInterfaces()->GetInterface directly anyways. One solution would be to just go back to how we were testing before with RenderMessageFilter, and explicitly return the mock in TestRenderFrame::GetFrameHost. Another option would be to initialize and wait for the binding at the start of all (?) browser tests. Any other ideas welcome. [1]: https://codereview.chromium.org/2821473002/diff/400001/content/test/test_render_frame.cc#newcode129 [2]: https://cs.chromium.org/chromium/src/content/renderer/render_thread_impl.cc?rcl=09c6267d605eabfb49885e147f7de04ff2160641&l=584 [3]: https://codereview.chromium.org/2821473002/diff/320001/content/common/associated_interface_provider_impl.cc#newcode85 |
|
►
Sign in to add a comment |
|
Comment 1 by roc...@chromium.org
, Oct 17