diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-18 02:16:21 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-18 02:16:21 +0000 |
commit | 22cdd93852c8f0782cb86b066cfcd95a9121912b (patch) | |
tree | be0f742437de0f4bd0e9753270c22998d02fd947 /chrome/test | |
parent | d3eb7bb27945410cb5d1f5d84f15f9c7017d519e (diff) | |
download | chromium_src-22cdd93852c8f0782cb86b066cfcd95a9121912b.zip chromium_src-22cdd93852c8f0782cb86b066cfcd95a9121912b.tar.gz chromium_src-22cdd93852c8f0782cb86b066cfcd95a9121912b.tar.bz2 |
more linux automation porting: SendKeyPressNotifyWhenDone
also change the interface for SimulateOSKeyPress()/SendKeyPress() to take a VKEY_ value (defined in base/keyboard_codes.h) rather than a VK_ value.
BUG=19076
Review URL: http://codereview.chromium.org/171079
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23611 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test')
-rw-r--r-- | chrome/test/automated_ui_tests/automated_ui_tests.cc | 17 | ||||
-rw-r--r-- | chrome/test/automation/automation_constants.h | 16 |
2 files changed, 9 insertions, 24 deletions
diff --git a/chrome/test/automated_ui_tests/automated_ui_tests.cc b/chrome/test/automated_ui_tests/automated_ui_tests.cc index c33546d..c29e2aa 100644 --- a/chrome/test/automated_ui_tests/automated_ui_tests.cc +++ b/chrome/test/automated_ui_tests/automated_ui_tests.cc @@ -6,6 +6,7 @@ #include "base/command_line.h" #include "base/file_util.h" +#include "base/keyboard_codes.h" #include "base/logging.h" #include "base/path_service.h" #include "base/rand_util.h" @@ -488,35 +489,35 @@ bool AutomatedUITest::Options() { } bool AutomatedUITest::PressDownArrow() { - return SimulateKeyPressInActiveWindow(VK_DOWN, 0); + return SimulateKeyPressInActiveWindow(base::VKEY_DOWN, 0); } bool AutomatedUITest::PressEnterKey() { - return SimulateKeyPressInActiveWindow(VK_RETURN, 0); + return SimulateKeyPressInActiveWindow(base::VKEY_RETURN, 0); } bool AutomatedUITest::PressEscapeKey() { - return SimulateKeyPressInActiveWindow(VK_ESCAPE, 0); + return SimulateKeyPressInActiveWindow(base::VKEY_ESCAPE, 0); } bool AutomatedUITest::PressPageDown() { - return SimulateKeyPressInActiveWindow(VK_PRIOR, 0); + return SimulateKeyPressInActiveWindow(base::VKEY_PRIOR, 0); } bool AutomatedUITest::PressPageUp() { - return SimulateKeyPressInActiveWindow(VK_NEXT, 0); + return SimulateKeyPressInActiveWindow(base::VKEY_NEXT, 0); } bool AutomatedUITest::PressSpaceBar() { - return SimulateKeyPressInActiveWindow(VK_SPACE, 0); + return SimulateKeyPressInActiveWindow(base::VKEY_SPACE, 0); } bool AutomatedUITest::PressTabKey() { - return SimulateKeyPressInActiveWindow(VK_TAB, 0); + return SimulateKeyPressInActiveWindow(base::VKEY_TAB, 0); } bool AutomatedUITest::PressUpArrow() { - return SimulateKeyPressInActiveWindow(VK_UP, 0); + return SimulateKeyPressInActiveWindow(base::VKEY_UP, 0); } bool AutomatedUITest::SelectNextTab() { diff --git a/chrome/test/automation/automation_constants.h b/chrome/test/automation/automation_constants.h index 1972ea8..6d0a034 100644 --- a/chrome/test/automation/automation_constants.h +++ b/chrome/test/automation/automation_constants.h @@ -25,20 +25,4 @@ enum AutomationMsg_NavigationResponseValues { AUTOMATION_MSG_NAVIGATION_AUTH_NEEDED, }; -#if !defined(OS_WIN) - -// WebKit defines a larger set of these in -// WebKit/WebCore/platform/KeyboardCodes.h but I don't think we want to include -// that from here, and besides we only care about a subset of those. -const int VK_TAB = 0x09; -const int VK_RETURN = 0x0D; -const int VK_ESCAPE = 0x1B; -const int VK_SPACE = 0x20; -const int VK_PRIOR = 0x21; -const int VK_NEXT = 0x22; -const int VK_UP = 0x26; -const int VK_DOWN = 0x28; - -#endif // !defined(OS_WIN) - #endif // CHROME_TEST_AUTOMATION_AUTOMATION_CONSTANTS_H_ |