OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "base/macros.h" |
5 #include "base/strings/utf_string_conversions.h" | 6 #include "base/strings/utf_string_conversions.h" |
6 #include "chrome/browser/ui/views/menu_test_base.h" | 7 #include "chrome/browser/ui/views/menu_test_base.h" |
7 #include "ui/views/controls/menu/menu_item_view.h" | 8 #include "ui/views/controls/menu/menu_item_view.h" |
8 #include "ui/views/controls/menu/submenu_view.h" | 9 #include "ui/views/controls/menu/submenu_view.h" |
9 | 10 |
10 template<ui::KeyboardCode KEYCODE, int EXPECTED_COMMAND> | 11 template<ui::KeyboardCode KEYCODE, int EXPECTED_COMMAND> |
11 class MenuControllerMnemonicTest : public MenuTestBase { | 12 class MenuControllerMnemonicTest : public MenuTestBase { |
12 public: | 13 public: |
13 MenuControllerMnemonicTest() { | 14 MenuControllerMnemonicTest() { |
14 } | 15 } |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 // Pressing a key which matches the first letter of the menu item's title | 58 // Pressing a key which matches the first letter of the menu item's title |
58 // should execute the command for that menu item. | 59 // should execute the command for that menu item. |
59 typedef MenuControllerMnemonicTest<ui::VKEY_T, 2> | 60 typedef MenuControllerMnemonicTest<ui::VKEY_T, 2> |
60 MenuControllerMnemonicTestTitleMatch; | 61 MenuControllerMnemonicTestTitleMatch; |
61 VIEW_TEST(MenuControllerMnemonicTestTitleMatch, TitleMatch); | 62 VIEW_TEST(MenuControllerMnemonicTestTitleMatch, TitleMatch); |
62 | 63 |
63 // Pressing an arbitrary key should not execute any commands. | 64 // Pressing an arbitrary key should not execute any commands. |
64 typedef MenuControllerMnemonicTest<ui::VKEY_A, 0> | 65 typedef MenuControllerMnemonicTest<ui::VKEY_A, 0> |
65 MenuControllerMnemonicTestNoMatch; | 66 MenuControllerMnemonicTestNoMatch; |
66 VIEW_TEST(MenuControllerMnemonicTestNoMatch, NoMatch); | 67 VIEW_TEST(MenuControllerMnemonicTestNoMatch, NoMatch); |
OLD | NEW |