mock_input_method_library.h revision 3f50c38dc070f4bb515c1b64450dae14f316474e
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 3// found in the LICENSE file. 4 5#ifndef CHROME_BROWSER_CHROMEOS_CROS_MOCK_INPUT_METHOD_LIBRARY_H_ 6#define CHROME_BROWSER_CHROMEOS_CROS_MOCK_INPUT_METHOD_LIBRARY_H_ 7#pragma once 8 9#include <string> 10 11#include "chrome/browser/chromeos/cros/input_method_library.h" 12#include "testing/gmock/include/gmock/gmock.h" 13 14namespace chromeos { 15 16class MockInputMethodLibrary : public InputMethodLibrary { 17 public: 18 MockInputMethodLibrary() {} 19 virtual ~MockInputMethodLibrary() {} 20 21 MOCK_METHOD1(AddObserver, void(Observer*)); 22 MOCK_METHOD1(RemoveObserver, void(Observer*)); 23 24 MOCK_METHOD0(GetActiveInputMethods, InputMethodDescriptors*(void)); 25 MOCK_METHOD0(GetNumActiveInputMethods, size_t(void)); 26 MOCK_METHOD0(GetSupportedInputMethods, InputMethodDescriptors*(void)); 27 MOCK_METHOD1(ChangeInputMethod, void(const std::string&)); 28 MOCK_METHOD2(SetImePropertyActivated, void(const std::string&, bool)); 29 MOCK_METHOD1(InputMethodIsActivated, bool(const std::string&)); 30 MOCK_METHOD3(GetImeConfig, bool(const std::string&, const std::string&, 31 ImeConfigValue*)); 32 MOCK_METHOD3(SetImeConfig, bool(const std::string&, const std::string&, 33 const ImeConfigValue&)); 34 MOCK_CONST_METHOD0(previous_input_method, const InputMethodDescriptor&(void)); 35 MOCK_CONST_METHOD0(current_input_method, const InputMethodDescriptor&(void)); 36 MOCK_CONST_METHOD0(current_ime_properties, const ImePropertyList&(void)); 37 MOCK_METHOD0(StartInputMethodProcesses, void(void)); 38 MOCK_METHOD0(StopInputMethodProcesses, void(void)); 39 MOCK_METHOD1(SetDeferImeStartup, void(bool)); 40 MOCK_METHOD1(SetEnableAutoImeShutdown, void(bool)); 41}; 42 43} // namespace chromeos 44 45#endif // CHROME_BROWSER_CHROMEOS_CROS_MOCK_INPUT_METHOD_LIBRARY_H_ 46