| Index: content/public/test/browser_test_utils.cc
|
| diff --git a/content/public/test/browser_test_utils.cc b/content/public/test/browser_test_utils.cc
|
| index 27083866f81ff1442bda724f05c1ab1c098b3803..79fd6170245e383d4f99aa70ed7ff58aec365016 100644
|
| --- a/content/public/test/browser_test_utils.cc
|
| +++ b/content/public/test/browser_test_utils.cc
|
| @@ -227,8 +227,11 @@ void InjectRawKeyEvent(WebContents* web_contents,
|
| int modifiers) {
|
| NativeWebKeyboardEvent event;
|
| BuildSimpleWebKeyEvent(type, key_code, native_key_code, modifiers, &event);
|
| - static_cast<WebContentsImpl*>(web_contents)
|
| - ->GetFocusedRenderWidgetHost()
|
| + WebContentsImpl* web_contents_impl =
|
| + static_cast<WebContentsImpl*>(web_contents);
|
| + RenderWidgetHostImpl* main_frame_rwh =
|
| + web_contents_impl->GetMainFrame()->GetRenderWidgetHost();
|
| + web_contents_impl->GetFocusedRenderWidgetHost(main_frame_rwh)
|
| ->ForwardKeyboardEvent(event);
|
| }
|
|
|
|
|