OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <gdk/gdkkeysyms.h> | 5 #include <gdk/gdkkeysyms.h> |
6 | 6 |
7 #include "gfx/rect.h" | |
8 #include "testing/gtest/include/gtest/gtest.h" | 7 #include "testing/gtest/include/gtest/gtest.h" |
| 8 #include "ui/gfx/rect.h" |
9 #include "views/focus/accelerator_handler.h" | 9 #include "views/focus/accelerator_handler.h" |
10 #include "views/view.h" | 10 #include "views/view.h" |
11 #include "views/window/window_gtk.h" | 11 #include "views/window/window_gtk.h" |
12 #include "views/window/window_delegate.h" | 12 #include "views/window/window_delegate.h" |
13 | 13 |
14 namespace views { | 14 namespace views { |
15 | 15 |
16 class AcceleratorHandlerGtkTest | 16 class AcceleratorHandlerGtkTest |
17 : public testing::Test, | 17 : public testing::Test, |
18 public WindowDelegate, | 18 public WindowDelegate, |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 | 184 |
185 // Release Alt - now this should trigger the menu shortcut. | 185 // Release Alt - now this should trigger the menu shortcut. |
186 evt = CreateKeyEvent(GDK_KEY_RELEASE, GDK_Alt_L, 0); | 186 evt = CreateKeyEvent(GDK_KEY_RELEASE, GDK_Alt_L, 0); |
187 evt.hardware_keycode = 0x40; | 187 evt.hardware_keycode = 0x40; |
188 EXPECT_TRUE(handler.Dispatch(reinterpret_cast<GdkEvent*>(&evt))); | 188 EXPECT_TRUE(handler.Dispatch(reinterpret_cast<GdkEvent*>(&evt))); |
189 | 189 |
190 ASSERT_TRUE(menu_pressed_); | 190 ASSERT_TRUE(menu_pressed_); |
191 } | 191 } |
192 | 192 |
193 } // namespace views | 193 } // namespace views |
OLD | NEW |