summaryrefslogtreecommitdiffstats
path: root/views/view_unittest.cc
diff options
context:
space:
mode:
authorjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-31 22:53:37 +0000
committerjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-31 22:53:37 +0000
commit148d105e27c7c8c2cda0c81292690b9edafcae1f (patch)
treee278052fc84a6e5399aec5bd0d423162aecb6d16 /views/view_unittest.cc
parentdc75d4823b598a9b9b313728a06f6b47d6a73929 (diff)
downloadchromium_src-148d105e27c7c8c2cda0c81292690b9edafcae1f.zip
chromium_src-148d105e27c7c8c2cda0c81292690b9edafcae1f.tar.gz
chromium_src-148d105e27c7c8c2cda0c81292690b9edafcae1f.tar.bz2
This CL adds accelerators to the Linux toolkit views.
The MessageLoop had to be modified to support Dispatchers on Linux. BUG=None TEST=On Windows and Linux, make sure the accelerators still work as expected. On Linux toolkit views, build and run the unit-tests. Review URL: http://codereview.chromium.org/159046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22210 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/view_unittest.cc')
-rw-r--r--views/view_unittest.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/views/view_unittest.cc b/views/view_unittest.cc
index 8591e3b..6778135 100644
--- a/views/view_unittest.cc
+++ b/views/view_unittest.cc
@@ -7,6 +7,7 @@
#include "app/gfx/canvas.h"
#include "app/gfx/path.h"
#include "base/clipboard.h"
+#include "base/keyboard_codes.h"
#include "base/message_loop.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "views/background.h"
@@ -1058,7 +1059,8 @@ class DefaultButtonTest : public ViewTest {
void SimularePressingEnterAndCheckDefaultButton(ButtonID button_id) {
#if defined(OS_WIN)
- focus_manager_->OnKeyDown(native_window_, WM_KEYDOWN, VK_RETURN, 0);
+ KeyEvent event(Event::ET_KEY_PRESSED, VK_RETURN, 0, 0);
+ focus_manager_->OnKeyEvent(event);
#else
// TODO(platform)
return;