OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 "chromeos/dbus/ibus/ibus_client.h" | 5 #include "chromeos/dbus/ibus/ibus_client.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "base/values.h" | 9 #include "base/values.h" |
10 #include "chromeos/dbus/ibus/ibus_constants.h" | |
11 #include "dbus/message.h" | 10 #include "dbus/message.h" |
12 #include "dbus/mock_bus.h" | 11 #include "dbus/mock_bus.h" |
13 #include "dbus/mock_object_proxy.h" | 12 #include "dbus/mock_object_proxy.h" |
14 #include "dbus/object_path.h" | 13 #include "dbus/object_path.h" |
15 #include "dbus/values_util.h" | 14 #include "dbus/values_util.h" |
16 #include "testing/gmock/include/gmock/gmock.h" | 15 #include "testing/gmock/include/gmock/gmock.h" |
17 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
18 | 17 |
19 using testing::Invoke; | 18 using testing::Invoke; |
20 using testing::Return; | 19 using testing::Return; |
21 using testing::_; | 20 using testing::_; |
22 | 21 |
23 namespace chromeos { | 22 namespace chromeos { |
24 | 23 |
25 namespace { | 24 namespace { |
26 const char kClientName[] = "chrome"; | 25 const char kClientName[] = "chrome"; |
| 26 const char kIBusServiceName[] = "org.freedesktop.IBus"; |
| 27 const char kIBusServicePath[] = "/org/freedesktop/IBus"; |
27 } // namespace | 28 } // namespace |
28 | 29 |
29 class MockCreateInputContextCallback { | 30 class MockCreateInputContextCallback { |
30 public: | 31 public: |
31 MOCK_METHOD1(Run, void(const dbus::ObjectPath& object_path)); | 32 MOCK_METHOD1(Run, void(const dbus::ObjectPath& object_path)); |
32 }; | 33 }; |
33 | 34 |
34 class MockCreateInputContextErrorCallback { | 35 class MockCreateInputContextErrorCallback { |
35 public: | 36 public: |
36 MOCK_METHOD0(Run, void()); | 37 MOCK_METHOD0(Run, void()); |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 base::Bind(&MockCreateInputContextCallback::Run, | 201 base::Bind(&MockCreateInputContextCallback::Run, |
201 base::Unretained(&callback)), | 202 base::Unretained(&callback)), |
202 base::Bind(&MockCreateInputContextErrorCallback::Run, | 203 base::Bind(&MockCreateInputContextErrorCallback::Run, |
203 base::Unretained(&error_callback))); | 204 base::Unretained(&error_callback))); |
204 | 205 |
205 // Run the message loop. | 206 // Run the message loop. |
206 message_loop_.RunAllPending(); | 207 message_loop_.RunAllPending(); |
207 } | 208 } |
208 | 209 |
209 } // namespace chromeos | 210 } // namespace chromeos |
OLD | NEW |