OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <X11/keysym.h> | 5 #include <X11/keysym.h> |
6 #include <X11/Xlib.h> | 6 #include <X11/Xlib.h> |
7 #undef Bool | 7 #undef Bool |
8 #undef None | 8 #undef None |
9 #undef Status | 9 #undef Status |
10 | 10 |
11 #include <cstring> | 11 #include <cstring> |
12 | 12 |
13 #include "base/message_loop.h" | 13 #include "base/message_loop.h" |
14 #include "chrome/browser/chromeos/input_method/input_method_manager.h" | 14 #include "chrome/browser/chromeos/input_method/input_method_manager.h" |
15 #include "chrome/browser/chromeos/input_method/xkeyboard.h" | 15 #include "chrome/browser/chromeos/input_method/xkeyboard.h" |
16 #include "chrome/browser/chromeos/language_preferences.h" | 16 #include "chrome/browser/chromeos/language_preferences.h" |
17 #include "chrome/browser/chromeos/system_key_event_listener.h" | 17 #include "chrome/browser/chromeos/system_key_event_listener.h" |
18 #include "chrome/test/base/in_process_browser_test.h" | 18 #include "chrome/test/base/in_process_browser_test.h" |
19 #include "chrome/test/base/ui_test_utils.h" | 19 #include "chrome/test/base/ui_test_utils.h" |
20 #include "ui/base/x/x11_util.h" | 20 #include "ui/base/x/x11_util.h" |
21 | 21 |
22 #if defined(USE_VIRTUAL_KEYBOARD) | 22 #if defined(USE_VIRTUAL_KEYBOARD) |
23 // Since USE_VIRTUAL_KEYBOARD build only supports a few keyboard layouts, we | 23 // Since USE_VIRTUAL_KEYBOARD build only supports a few keyboard layouts, we |
24 // skip the tests for now. | 24 // skip the tests for now. |
25 #define TestInputMethod DISABLED_TestInputMethod | 25 #define TestInputMethod DISABLED_TestInputMethod |
26 #define TestInputMethodWithNumLock DISABLED_TestInputMethodWithNumLock | 26 #define TestInputMethodWithNumLock DISABLED_TestInputMethodWithNumLock |
27 #define TestKoreanInputMethod DISABLED_TestKoreanInputMethod | 27 #define TestKoreanInputMethod DISABLED_TestKoreanInputMethod |
28 #endif | 28 #endif |
29 | 29 |
| 30 #if defined(USE_AURA) |
| 31 // When Aura is in use, the short cut is handled in Ash. |
| 32 #define TestCapsLock DISABLED_TestCapsLock |
| 33 #define TestCapsLockWithNumLock DISABLED_TestCapsLockWithNumLock |
| 34 #endif |
| 35 |
30 namespace chromeos { | 36 namespace chromeos { |
31 namespace { | 37 namespace { |
32 | 38 |
33 static const char* active_input_methods[] = { | 39 static const char* active_input_methods[] = { |
34 "xkb:us::eng", // The first one should be US Qwerty. | 40 "xkb:us::eng", // The first one should be US Qwerty. |
35 #if !defined(USE_VIRTUAL_KEYBOARD) | 41 #if !defined(USE_VIRTUAL_KEYBOARD) |
36 "xkb:us:dvorak:eng", | 42 "xkb:us:dvorak:eng", |
37 "xkb:kr:kr104:kor", // for testing XK_space with ShiftMask. | 43 "xkb:kr:kr104:kor", // for testing XK_space with ShiftMask. |
38 // TODO(yusukes): Add "mozc-jp", "xkb:jp::jpn", and "mozc-hangul" to test | 44 // TODO(yusukes): Add "mozc-jp", "xkb:jp::jpn", and "mozc-hangul" to test |
39 // more IME hot keys once build bots start supporting ibus-daemon. | 45 // more IME hot keys once build bots start supporting ibus-daemon. |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
354 // TODO(yusukes): Add tests for input method specific hot keys like XK_Henkan, | 360 // TODO(yusukes): Add tests for input method specific hot keys like XK_Henkan, |
355 // XK_Muhenkan, XK_ZenkakuHankaku, and XK_Hangul. This is not so easy since 1) | 361 // XK_Muhenkan, XK_ZenkakuHankaku, and XK_Hangul. This is not so easy since 1) |
356 // we have to enable "mozc-jp" and "mozc-hangul" that require ibus-daemon, and | 362 // we have to enable "mozc-jp" and "mozc-hangul" that require ibus-daemon, and |
357 // 2) to let XKeysymToKeycode() handle e.g. XK_Henkan etc, we have to change | 363 // 2) to let XKeysymToKeycode() handle e.g. XK_Henkan etc, we have to change |
358 // the XKB layout to "jp" first. | 364 // the XKB layout to "jp" first. |
359 | 365 |
360 manager_->RemoveObserver(&input_method_observer_); | 366 manager_->RemoveObserver(&input_method_observer_); |
361 } | 367 } |
362 | 368 |
363 } // namespace chromeos | 369 } // namespace chromeos |
OLD | NEW |