summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos/cros/mock_input_method_library.h
blob: ccd0387e0b323c284b710c998ffa9b5c148b8484 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CHROME_BROWSER_CHROMEOS_CROS_MOCK_INPUT_METHOD_LIBRARY_H_
#define CHROME_BROWSER_CHROMEOS_CROS_MOCK_INPUT_METHOD_LIBRARY_H_

#include <string>

#include "chrome/browser/chromeos/cros/input_method_library.h"
#include "testing/gmock/include/gmock/gmock.h"

namespace chromeos {

class MockInputMethodLibrary : public InputMethodLibrary {
 public:
  MockInputMethodLibrary() {}
  virtual ~MockInputMethodLibrary() {}

  MOCK_METHOD1(AddObserver, void(Observer*));
  MOCK_METHOD1(RemoveObserver, void(Observer*));

  MOCK_METHOD0(GetActiveInputMethods, InputMethodDescriptors*(void));
  MOCK_METHOD0(GetNumActiveInputMethods, size_t(void));
  MOCK_METHOD0(GetSupportedInputMethods, InputMethodDescriptors*(void));
  MOCK_METHOD1(ChangeInputMethod, void(const std::string&));
  MOCK_METHOD2(SetImePropertyActivated, void(const std::string&, bool));
  MOCK_METHOD1(InputMethodIsActivated, bool(const std::string&));
  MOCK_METHOD3(GetImeConfig, bool(const char*, const char*, ImeConfigValue*));
  MOCK_METHOD3(SetImeConfig, bool(const char*, const char*,
                                  const ImeConfigValue&));
  MOCK_CONST_METHOD0(previous_input_method, const InputMethodDescriptor&(void));
  MOCK_CONST_METHOD0(current_input_method, const InputMethodDescriptor&(void));
  MOCK_CONST_METHOD0(current_ime_properties, const ImePropertyList&(void));
};

}  // namespace chromeos

#endif  // CHROME_BROWSER_CHROMEOS_CROS_MOCK_INPUT_METHOD_LIBRARY_H_