diff options
Diffstat (limited to 'chrome/test')
-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 | ||||
-rw-r--r-- | chrome/test/automation/automation_messages_internal.h | 4 | ||||
-rw-r--r-- | chrome/test/automation/window_proxy.cc | 2 | ||||
-rw-r--r-- | chrome/test/automation/window_proxy.h | 11 | ||||
-rw-r--r-- | chrome/test/interactive_ui/npapi_interactive_test.cc | 3 | ||||
-rw-r--r-- | chrome/test/ui/npapi_uitest.cc | 3 |
7 files changed, 12 insertions, 17 deletions
diff --git a/chrome/test/automated_ui_tests/automated_ui_tests.cc b/chrome/test/automated_ui_tests/automated_ui_tests.cc index fd22151..252689c 100644 --- a/chrome/test/automated_ui_tests/automated_ui_tests.cc +++ b/chrome/test/automated_ui_tests/automated_ui_tests.cc @@ -607,8 +607,7 @@ bool AutomatedUITest::ForceCrash() { return true; } -bool AutomatedUITest::SimulateKeyPressInActiveWindow(base::KeyboardCode key, - int flags) { +bool AutomatedUITest::SimulateKeyPressInActiveWindow(wchar_t 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 286234a..d370b70 100644 --- a/chrome/test/automated_ui_tests/automated_ui_tests.h +++ b/chrome/test/automated_ui_tests/automated_ui_tests.h @@ -102,7 +102,6 @@ #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" @@ -294,7 +293,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(base::KeyboardCode key, int flags); + bool SimulateKeyPressInActiveWindow(wchar_t key, int flags); // Opens init file, reads it into the reader, and closes the file. // Returns false if there are any errors. diff --git a/chrome/test/automation/automation_messages_internal.h b/chrome/test/automation/automation_messages_internal.h index 89f90ff..e7016cf 100644 --- a/chrome/test/automation/automation_messages_internal.h +++ b/chrome/test/automation/automation_messages_internal.h @@ -415,10 +415,10 @@ IPC_BEGIN_MESSAGES(Automation) // This message requests that a key press be performed. // Request: // int - the handle of the window that's the context for this click - // int - the base::KeyboardCode of the key that was pressed. + // wchar_t - char of the key that was pressed. // int - the flags which identify the modifiers (shift, ctrl, alt) // associated for, as defined in chrome/views/event.h - IPC_MESSAGE_ROUTED3(AutomationMsg_WindowKeyPress, int, int, int) + IPC_MESSAGE_ROUTED3(AutomationMsg_WindowKeyPress, int, wchar_t, int) // This message notifies the AutomationProvider to create a tab which is // hosted by an external process. diff --git a/chrome/test/automation/window_proxy.cc b/chrome/test/automation/window_proxy.cc index 5b08842..5766259 100644 --- a/chrome/test/automation/window_proxy.cc +++ b/chrome/test/automation/window_proxy.cc @@ -34,7 +34,7 @@ bool WindowProxy::GetWindowTitle(string16* text) { return sender_->Send(new AutomationMsg_WindowTitle(0, handle_, text)); } -bool WindowProxy::SimulateOSKeyPress(base::KeyboardCode key, int flags) { +bool WindowProxy::SimulateOSKeyPress(wchar_t key, int flags) { if (!is_valid()) return false; return sender_->Send( diff --git a/chrome/test/automation/window_proxy.h b/chrome/test/automation/window_proxy.h index 33a27c0..539ac20 100644 --- a/chrome/test/automation/window_proxy.h +++ b/chrome/test/automation/window_proxy.h @@ -13,7 +13,6 @@ #include <string> -#include "base/keyboard_codes.h" #include "base/string16.h" #include "base/thread.h" #include "chrome/test/automation/automation_handle_tracker.h" @@ -47,11 +46,11 @@ class WindowProxy : public AutomationResourceProxy { // Get the title of the top level window. bool GetWindowTitle(string16* text); - // Simulates a key press at the OS level. |key| is the virtual key code of the - // key pressed and |flags| specifies which modifiers keys are also pressed (as - // defined in chrome/views/event.h). Note that this actually sends the event - // to the window that has focus. - bool SimulateOSKeyPress(base::KeyboardCode key, int flags); + // 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). Note that this actually sends the event to the + // window that has focus. + bool SimulateOSKeyPress(wchar_t key, int flags); // Shows/hides the window and as a result makes it active/inactive. // Returns true if the call was successful. diff --git a/chrome/test/interactive_ui/npapi_interactive_test.cc b/chrome/test/interactive_ui/npapi_interactive_test.cc index 9610f39..49271a6 100644 --- a/chrome/test/interactive_ui/npapi_interactive_test.cc +++ b/chrome/test/interactive_ui/npapi_interactive_test.cc @@ -32,7 +32,6 @@ // #include "base/file_util.h" -#include "base/keyboard_codes.h" #include "chrome/browser/net/url_request_mock_http_job.h" #include "chrome/common/chrome_paths.h" #include "chrome/test/automation/tab_proxy.h" @@ -93,7 +92,7 @@ TEST_F(NPAPIVisiblePluginTester, GetURLRequest404Response) { automation()->WaitForAppModalDialog(action_max_timeout_ms()); scoped_refptr<WindowProxy> window(automation()->GetActiveWindow()); ASSERT_TRUE(window.get()); - ASSERT_TRUE(window->SimulateOSKeyPress(base::VKEY_ESCAPE, 0)); + ASSERT_TRUE(window->SimulateOSKeyPress(VK_ESCAPE, 0)); WaitForFinish("geturl_404_response", "1", url, kTestCompleteCookie, kTestCompleteSuccess, kShortWaitTimeout); diff --git a/chrome/test/ui/npapi_uitest.cc b/chrome/test/ui/npapi_uitest.cc index ab43ca9..32139fa 100644 --- a/chrome/test/ui/npapi_uitest.cc +++ b/chrome/test/ui/npapi_uitest.cc @@ -16,7 +16,6 @@ #include <ostream> #include "base/file_util.h" -#include "base/keyboard_codes.h" #include "chrome/browser/net/url_request_mock_http_job.h" #include "chrome/common/chrome_paths.h" #include "chrome/test/automation/tab_proxy.h" @@ -139,7 +138,7 @@ TEST_F(NPAPITester, DISABLED_SelfDeletePluginInvokeAlert) { automation()->WaitForAppModalDialog(5000); scoped_refptr<WindowProxy> window(automation()->GetActiveWindow()); ASSERT_TRUE(window.get()); - ASSERT_TRUE(window->SimulateOSKeyPress(base::VKEY_ESCAPE, 0)); + ASSERT_TRUE(window->SimulateOSKeyPress(VK_ESCAPE, 0)); WaitForFinish("self_delete_plugin_invoke_alert", "1", url, kTestCompleteCookie, kTestCompleteSuccess, |