summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autocomplete/autocomplete_edit_view_browsertest.cc
diff options
context:
space:
mode:
authorjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-29 00:33:35 +0000
committerjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-29 00:33:35 +0000
commitbc1407f95bae3d7472ee0c85ef83ee10610b3f1f (patch)
treeeeb1e01423fefc13afe5738d809df200b5e50623 /chrome/browser/autocomplete/autocomplete_edit_view_browsertest.cc
parent62525634a6f5727216828f8e05a4f563be90dfeb (diff)
downloadchromium_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/browser/autocomplete/autocomplete_edit_view_browsertest.cc')
-rw-r--r--chrome/browser/autocomplete/autocomplete_edit_view_browsertest.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_browsertest.cc b/chrome/browser/autocomplete/autocomplete_edit_view_browsertest.cc
index f6e4f13..e87ae0c 100644
--- a/chrome/browser/autocomplete/autocomplete_edit_view_browsertest.cc
+++ b/chrome/browser/autocomplete/autocomplete_edit_view_browsertest.cc
@@ -121,7 +121,7 @@ class AutocompleteEditViewTest : public InProcessBrowserTest,
ASSERT_TRUE(*edit_view);
}
- void SendKey(wchar_t key, bool control, bool shift, bool alt) {
+ void SendKey(base::KeyboardCode key, bool control, bool shift, bool alt) {
gfx::NativeWindow window = NULL;
ASSERT_NO_FATAL_FAILURE(GetNativeWindow(&window));
ui_controls::SendKeyPressNotifyWhenDone(window, key, control, shift, alt,
@@ -131,7 +131,8 @@ class AutocompleteEditViewTest : public InProcessBrowserTest,
void SendKeySequence(const wchar_t* keys) {
for (; *keys; ++keys)
- ASSERT_NO_FATAL_FAILURE(SendKey(*keys, false, false, false));
+ ASSERT_NO_FATAL_FAILURE(SendKey(static_cast<base::KeyboardCode>(*keys),
+ false, false, false));
}
void WaitForTabOpenOrClose(int expected_tab_count) {
@@ -144,7 +145,7 @@ class AutocompleteEditViewTest : public InProcessBrowserTest,
(tab_count < expected_tab_count ?
NotificationType::TAB_PARENTED :
NotificationType::TAB_CLOSED),
- NotificationService::AllSources());
+ NotificationService::AllSources());
while (!HasFailure() && browser()->tab_count() != expected_tab_count)
ui_test_utils::RunMessageLoop();