1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_CHROMEOS_INPUT_METHOD_MOCK_XKEYBOARD_H_
6 #define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_MOCK_XKEYBOARD_H_
8 #include "chrome/browser/chromeos/input_method/xkeyboard.h"
12 #include "base/compiler_specific.h"
15 namespace input_method
{
17 class MockXKeyboard
: public XKeyboard
{
20 virtual ~MockXKeyboard() {}
22 virtual bool SetCurrentKeyboardLayoutByName(
23 const std::string
& layout_name
) OVERRIDE
;
24 virtual bool ReapplyCurrentKeyboardLayout() OVERRIDE
;
25 virtual void ReapplyCurrentModifierLockStatus() OVERRIDE
;
26 virtual void SetLockedModifiers(
27 ModifierLockStatus new_caps_lock_status
,
28 ModifierLockStatus new_num_lock_status
) OVERRIDE
;
29 virtual void SetNumLockEnabled(bool enable_num_lock
) OVERRIDE
;
30 virtual void SetCapsLockEnabled(bool enable_caps_lock
) OVERRIDE
;
31 virtual bool NumLockIsEnabled() OVERRIDE
;
32 virtual bool CapsLockIsEnabled() OVERRIDE
;
33 virtual unsigned int GetNumLockMask() OVERRIDE
;
34 virtual void GetLockedModifiers(bool* out_caps_lock_enabled
,
35 bool* out_num_lock_enabled
) OVERRIDE
;
37 int set_current_keyboard_layout_by_name_count_
;
38 std::string last_layout_
;
39 bool caps_lock_is_enabled_
;
40 bool num_lock_is_enabled_
;
41 // TODO(yusukes): Add more variables for counting the numbers of the API calls
44 DISALLOW_COPY_AND_ASSIGN(MockXKeyboard
);
47 // TODO(yusukes): Use the mock in
48 // chrome/browser/ui/ash/caps_lock_handler_browsertest.cc.
50 } // namespace input_method
51 } // namespace chromeos
53 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_MOCK_XKEYBOARD_H_