Chromium Code Reviews| Index: components/test_runner/web_widget_test_client.cc |
| diff --git a/components/test_runner/web_widget_test_client.cc b/components/test_runner/web_widget_test_client.cc |
| index c38af4205d2721d2a65b6782e588728d8231df2a..582d9324a2488a96e5677edc57904037626e3b79 100644 |
| --- a/components/test_runner/web_widget_test_client.cc |
| +++ b/components/test_runner/web_widget_test_client.cc |
| @@ -17,7 +17,11 @@ |
| #include "components/test_runner/web_view_test_proxy.h" |
| #include "components/test_runner/web_widget_test_proxy.h" |
| #include "third_party/WebKit/public/platform/WebScreenInfo.h" |
| +#include "third_party/WebKit/public/web/WebFrameWidget.h" |
| +#include "third_party/WebKit/public/web/WebInputMethodController.h" |
| +#include "third_party/WebKit/public/web/WebLocalFrame.h" |
| #include "third_party/WebKit/public/web/WebPagePopup.h" |
| +#include "third_party/WebKit/public/web/WebView.h" |
| #include "third_party/WebKit/public/web/WebWidget.h" |
| namespace test_runner { |
| @@ -103,9 +107,22 @@ void WebWidgetTestClient::setToolTipText(const blink::WebString& text, |
| void WebWidgetTestClient::resetInputMethod() { |
| // If a composition text exists, then we need to let the browser process |
| // to cancel the input method's ongoing composition session. |
| - if (web_widget_test_proxy_base_) |
| - web_widget_test_proxy_base_->web_widget()->finishComposingText( |
| + blink::WebFrameWidget* frameWidget = nullptr; |
|
lfg
2016/09/16 20:17:09
frame_widget
EhsanK
2016/09/20 15:38:29
Acknowledged.
|
| + if (web_widget_test_proxy_base_ && |
| + web_widget_test_proxy_base_->web_widget()->isWebFrameWidget()) { |
| + frameWidget = static_cast<blink::WebFrameWidget*>( |
| + web_widget_test_proxy_base_->web_widget()); |
| + } else if (web_view_test_proxy_base_) { |
| + blink::WebLocalFrame* mainFrame = |
|
lfg
2016/09/16 20:17:09
main_frame
EhsanK
2016/09/20 15:38:29
Acknowledged.
|
| + web_view_test_proxy_base_->web_view()->mainFrame()->toWebLocalFrame(); |
| + DCHECK(mainFrame); |
| + frameWidget = mainFrame->frameWidget(); |
| + } |
| + |
| + if (frameWidget && frameWidget->getActiveWebInputMethodController()) { |
| + frameWidget->getActiveWebInputMethodController()->finishComposingText( |
| blink::WebWidget::KeepSelection); |
|
lfg
2016/09/16 20:17:09
Why this method is implemented using KeepSelection
EhsanK
2016/09/20 15:38:29
The one with DoNotKeepSelection sounds more correc
aelias_OOO_until_Jul13
2016/09/21 08:28:02
This was a mistake, you can change it to DoNotKeep
lfg
2016/09/21 16:56:14
I think we should be able to just remove this over
EhsanK
2016/09/26 20:54:29
The difference would be that here we do not send a
lfg
2016/09/29 14:16:41
I think its worth investigating these failures and
EhsanK
2016/11/01 15:46:04
I dug deeper and here is what I found:
In the test
|
| + } |
| } |
| } // namespace test_runner |