diff options
author | suzhe@chromium.org <suzhe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-17 12:26:41 +0000 |
---|---|---|
committer | suzhe@chromium.org <suzhe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-17 12:26:41 +0000 |
commit | 6877743b0d10f2597554db43e2041e2b5a6f4d96 (patch) | |
tree | dc7142aff4b2f6696bbbf719be1e272cd354f492 /webkit/tools/test_shell/test_webview_delegate.cc | |
parent | c93cde564fd78aafac9a6b0ca5b91b33d95d99a6 (diff) | |
download | chromium_src-6877743b0d10f2597554db43e2041e2b5a6f4d96.zip chromium_src-6877743b0d10f2597554db43e2041e2b5a6f4d96.tar.gz chromium_src-6877743b0d10f2597554db43e2041e2b5a6f4d96.tar.bz2 |
Fix test_shell's eventSender to set isSystemKey flag for keyboard events correctly on Mac.
This issue was introduced by http://codereview.chromium.org/258032, which just unset isSystemKey flag for RawKeyDown events but not for Char and KeyUp events, while the correct behavior is, like what the browser does, to keep isSystemKey consistent among RawKeyDown, Char and KeyUp events.
This issue hides a webkit bug https://bugs.webkit.org/show_bug.cgi?id=32213, and incorrectly makes LayoutTests/fast/forms/access-key.html pass.
To test this CL, first you need to revert the fix for the webkit bug 32213. Then apply this CL should make the access-key.html test fail. The test should pass again after applying the fix for the webkit bug 32213.
BUG=23221
TEST=See above description.
Review URL: http://codereview.chromium.org/465147
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34825 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/tools/test_shell/test_webview_delegate.cc')
-rw-r--r-- | webkit/tools/test_shell/test_webview_delegate.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/webkit/tools/test_shell/test_webview_delegate.cc b/webkit/tools/test_shell/test_webview_delegate.cc index 1434e0d..3252ace 100644 --- a/webkit/tools/test_shell/test_webview_delegate.cc +++ b/webkit/tools/test_shell/test_webview_delegate.cc @@ -446,6 +446,18 @@ void TestWebViewDelegate::didEndEditing() { } } +bool TestWebViewDelegate::handleCurrentKeyboardEvent() { + if (edit_command_name_.empty()) + return false; + + WebFrame* frame = shell_->webView()->focusedFrame(); + if (!frame) + return false; + + return frame->executeCommand(WebString::fromUTF8(edit_command_name_), + WebString::fromUTF8(edit_command_value_)); +} + WebString TestWebViewDelegate::autoCorrectWord(const WebString& word) { // Dummy implementation. return word; |