diff options
author | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-29 00:33:35 +0000 |
---|---|---|
committer | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-29 00:33:35 +0000 |
commit | bc1407f95bae3d7472ee0c85ef83ee10610b3f1f (patch) | |
tree | eeb1e01423fefc13afe5738d809df200b5e50623 /chrome/test/automated_ui_tests | |
parent | 62525634a6f5727216828f8e05a4f563be90dfeb (diff) | |
download | chromium_src-bc1407f95bae3d7472ee0c85ef83ee10610b3f1f.zip chromium_src-bc1407f95bae3d7472ee0c85ef83ee10610b3f1f.tar.gz chromium_src-bc1407f95bae3d7472ee0c85ef83ee10610b3f1f.tar.bz2 |
Relanding keyboard code refactoring:
http://codereview.chromium.org/248010/show
Changing the KeyboardEvent to use a KeyboardCode instead of a w_char. Led to several places where I had to switch from VK_ to VKEY_.
Also cleaned-up the table view OnKeyDown method. Since TableView is a NativeControl it can use the NativeControl::OnKeyDown directly.
BUG=None
TEST=Make sure short-cuts works as expected, especially in the omnibox.
Review URL: http://codereview.chromium.org/251020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27444 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/automated_ui_tests')
-rw-r--r-- | chrome/test/automated_ui_tests/automated_ui_tests.cc | 3 | ||||
-rw-r--r-- | chrome/test/automated_ui_tests/automated_ui_tests.h | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/chrome/test/automated_ui_tests/automated_ui_tests.cc b/chrome/test/automated_ui_tests/automated_ui_tests.cc index 252689c..fd22151 100644 --- a/chrome/test/automated_ui_tests/automated_ui_tests.cc +++ b/chrome/test/automated_ui_tests/automated_ui_tests.cc @@ -607,7 +607,8 @@ bool AutomatedUITest::ForceCrash() { return true; } -bool AutomatedUITest::SimulateKeyPressInActiveWindow(wchar_t key, int flags) { +bool AutomatedUITest::SimulateKeyPressInActiveWindow(base::KeyboardCode key, + int flags) { scoped_refptr<WindowProxy> window(automation()->GetActiveWindow()); if (window.get() == NULL) { AddErrorAttribute("active_window_not_found"); diff --git a/chrome/test/automated_ui_tests/automated_ui_tests.h b/chrome/test/automated_ui_tests/automated_ui_tests.h index d370b70..286234a 100644 --- a/chrome/test/automated_ui_tests/automated_ui_tests.h +++ b/chrome/test/automated_ui_tests/automated_ui_tests.h @@ -102,6 +102,7 @@ #include <string> +#include "base/keyboard_codes.h" #include "chrome/test/automated_ui_tests/automated_ui_test_base.h" #include "chrome/test/ui/ui_test.h" @@ -293,7 +294,7 @@ class AutomatedUITest : public AutomatedUITestBase { // Calls SimulateOSKeyPress on the active window. Simulates a key press at // the OS level. |key| is the key pressed and |flags| specifies which // modifiers keys are also pressed (as defined in chrome/views/event.h). - bool SimulateKeyPressInActiveWindow(wchar_t key, int flags); + bool SimulateKeyPressInActiveWindow(base::KeyboardCode key, int flags); // Opens init file, reads it into the reader, and closes the file. // Returns false if there are any errors. |