diff options
author | evanm@google.com <evanm@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-07 18:51:49 +0000 |
---|---|---|
committer | evanm@google.com <evanm@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-07 18:51:49 +0000 |
commit | ded678ec915e3ca698c91d67611ba48f8a938511 (patch) | |
tree | f9e1bd118b9b25f4aee983c5fa2d51569294e44d | |
parent | adfb96766acd6e5ac6ef3654f258ee57747570c8 (diff) | |
download | chromium_src-ded678ec915e3ca698c91d67611ba48f8a938511.zip chromium_src-ded678ec915e3ca698c91d67611ba48f8a938511.tar.gz chromium_src-ded678ec915e3ca698c91d67611ba48f8a938511.tar.bz2 |
Fix keyboard unit test.
We work around all event names being null (!!!) by testing a enum instead. This code should be faster anyway, but I will also investigate the enum.
Review URL: http://codereview.chromium.org/9495
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5001 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | webkit/glue/editor_client_impl.cc | 2 | ||||
-rw-r--r-- | webkit/tools/test_shell/keyboard_unittest.cc | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/webkit/glue/editor_client_impl.cc b/webkit/glue/editor_client_impl.cc index bcc431d..722d5fb 100644 --- a/webkit/glue/editor_client_impl.cc +++ b/webkit/glue/editor_client_impl.cc @@ -543,7 +543,7 @@ const char* EditorClientImpl::interpretKeyEvent( if (keyEvent->metaKey()) modifiers |= MetaKey; - if (evt->type() == WebCore::EventNames::keydownEvent) { + if (keyEvent->type() == WebCore::PlatformKeyboardEvent::RawKeyDown) { int mapKey = modifiers << 16 | evt->keyCode(); return mapKey ? keyDownCommandsMap->get(mapKey) : 0; } diff --git a/webkit/tools/test_shell/keyboard_unittest.cc b/webkit/tools/test_shell/keyboard_unittest.cc index 8ed5e3c..71b8690 100644 --- a/webkit/tools/test_shell/keyboard_unittest.cc +++ b/webkit/tools/test_shell/keyboard_unittest.cc @@ -39,6 +39,9 @@ static inline void SetupKeyDownEvent(WebKeyboardEvent& keyboard_event, keyboard_event.key_code = key_code; keyboard_event.modifiers = modifiers; keyboard_event.type = WebInputEvent::KEY_DOWN; +#if defined(OS_LINUX) + keyboard_event.text = key_code; +#endif } static inline const char* InterpretCtrlKeyPress(char key_code) { |