Chromium Code Reviews| 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. |
|
dcheng
2016/07/12 14:22:13
Can we fix the test harness (ChromeRenderViewTest,
leonhsl(Using Gerrit)
2016/07/13 03:48:31
I think even we change ChromeRenderViewTest and so
dcheng
2016/07/14 04:31:44
To help me understand better, which tests were fai
leonhsl(Using Gerrit)
2016/07/14 09:57:31
I encountered the problem in https://codereview.ch
dcheng
2016/07/19 14:34:11
I think we just need to set an InterfaceProvider f
leonhsl(Using Gerrit)
2016/07/20 03:01:07
Which on do you mean?
1, Initialize MockRenderPr
|
| + if (!GetProcess()->GetRemoteInterfaces()) { |
| + remote_interfaces_.reset(new shell::InterfaceProvider); |
| return; |
| + } |
| RegisterMojoInterfaces(); |
| mojom::FrameFactoryPtr frame_factory; |