| Index: chrome/test/chromedriver/chrome/web_view_impl.cc
|
| diff --git a/chrome/test/chromedriver/chrome/web_view_impl.cc b/chrome/test/chromedriver/chrome/web_view_impl.cc
|
| index 8dc01b002e2b19ee7a5ef7d1c0525e58e5675e16..aa7fe1ea71c3c81acd388b57a2dfb41ea4f1ea7d 100644
|
| --- a/chrome/test/chromedriver/chrome/web_view_impl.cc
|
| +++ b/chrome/test/chromedriver/chrome/web_view_impl.cc
|
| @@ -33,6 +33,8 @@
|
| #include "chrome/test/chromedriver/chrome/status.h"
|
| #include "chrome/test/chromedriver/chrome/ui_events.h"
|
| #include "chrome/test/chromedriver/net/timeout.h"
|
| +#include "ui/events/keycodes/dom/keycode_converter.h"
|
| +#include "ui/events/keycodes/keyboard_code_conversion.h"
|
|
|
| namespace {
|
|
|
| @@ -399,6 +401,10 @@ Status WebViewImpl::DispatchKeyEvents(const std::list<KeyEvent>& events) {
|
| params.SetString("unmodifiedText", it->unmodified_text);
|
| params.SetInteger("nativeVirtualKeyCode", it->key_code);
|
| params.SetInteger("windowsVirtualKeyCode", it->key_code);
|
| + ui::DomCode dom_code = ui::UsLayoutKeyboardCodeToDomCode(it->key_code);
|
| + std::string key = ui::KeycodeConverter::DomCodeToCodeString(dom_code);
|
| + if (!key.empty())
|
| + params.SetString("key", key);
|
| Status status = client_->SendCommand("Input.dispatchKeyEvent", params);
|
| if (status.IsError())
|
| return status;
|
|
|