| Index: content/browser/frame_host/render_frame_host_impl.cc
|
| diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
|
| index fadeeca42041cb03120150ffe39978fa7c35804d..ee28ece633ca3ea5454cf9713b5d80969d0af936 100644
|
| --- a/content/browser/frame_host/render_frame_host_impl.cc
|
| +++ b/content/browser/frame_host/render_frame_host_impl.cc
|
| @@ -2394,8 +2394,14 @@ void RenderFrameHostImpl::SetUpMojoIfNeeded() {
|
| return;
|
|
|
| interface_registry_.reset(new shell::InterfaceRegistry(nullptr));
|
| - if (!GetProcess()->GetRemoteInterfaces())
|
| +
|
| + // The RenderProcessHost may not have remote interfaces in some test
|
| + // environments. In that case we create an empty InterfaceProvider so tests
|
| + // can register mock implementations.
|
| + if (!GetProcess()->GetRemoteInterfaces()) {
|
| + remote_interfaces_.reset(new shell::InterfaceProvider);
|
| return;
|
| + }
|
|
|
| RegisterMojoInterfaces();
|
| mojom::FrameFactoryPtr frame_factory;
|
|
|