1 /*
2 * Copyright (c) 2024 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16 #include <gtest/gtest.h>
17 #include <libinput.h>
18
19 #include "multimodal_input_connect_stub.h"
20 #include "mmi_service.h"
21
22 #include "accesstoken_kit.h"
23 #include "nativetoken_kit.h"
24 #include "token_setproc.h"
25 namespace OHOS {
26 namespace MMI {
27 using namespace Security::AccessToken;
28 using Security::AccessToken::AccessTokenID;
29 namespace {
30 using namespace testing::ext;
31 uint64_t g_tokenID { 0 };
32 const std::string SYSTEM_BASIC { "system_basic" };
33 const char* g_basics[] = { "ohos.permission.COOPERATE_MANAGER" };
34 } // namespace
35
36 class MultimodalInputConnectStubTest : public testing::Test {
37 public:
SetUpTestCase(void)38 static void SetUpTestCase(void) {}
TearDownTestCase(void)39 static void TearDownTestCase(void) {}
SetUp()40 void SetUp() {}
TearDown()41 void TearDown() {}
42 static void SetPermission(const std::string &level, const char** perms, size_t permAmount);
43 };
44
SetPermission(const std::string & level,const char ** perms,size_t permAmount)45 void MultimodalInputConnectStubTest::SetPermission(const std::string &level, const char** perms, size_t permAmount)
46 {
47 if (perms == nullptr || permAmount == 0) {
48 return;
49 }
50
51 NativeTokenInfoParams infoInstance = {
52 .dcapsNum = 0,
53 .permsNum = permAmount,
54 .aclsNum = 0,
55 .dcaps = nullptr,
56 .perms = perms,
57 .acls = nullptr,
58 .processName = "ConnectManagerTest",
59 .aplStr = level.c_str(),
60 };
61 g_tokenID = GetAccessTokenId(&infoInstance);
62 SetSelfTokenID(g_tokenID);
63 OHOS::Security::AccessToken::AccessTokenKit::AccessTokenKit::ReloadNativeTokenInfo();
64 }
65
66 /**
67 * @tc.name: MultimodalInputConnectStubTest_StubSetMouseHotSpot
68 * @tc.desc: Test the function StubSetMouseHotSpot
69 * @tc.type: FUNC
70 * @tc.require:
71 */
72 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubSetMouseHotSpot, TestSize.Level1)
73 {
74 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
75 std::shared_ptr<MMIService> service = std::static_pointer_cast<MMIService>(stub);
76 service->state_ = ServiceRunningState::STATE_NOT_START;
77 MessageParcel data;
78 MessageParcel reply;
79 int32_t pid = 100;
80 int32_t windowId = -1;
81 int32_t hotSpotX = 300;
82 int32_t hotSpotY = 300;
83 data.WriteInt32(pid);
84 data.WriteInt32(windowId);
85 EXPECT_EQ(stub->StubSetMouseHotSpot(data, reply), MMISERVICE_NOT_RUNNING);
86 service->state_ = ServiceRunningState::STATE_RUNNING;
87 EXPECT_NE(stub->StubSetMouseHotSpot(data, reply), RET_OK);
88 windowId = 30;
89 data.WriteInt32(pid);
90 data.WriteInt32(windowId);
91 data.WriteInt32(hotSpotX);
92 data.WriteInt32(hotSpotY);
93 EXPECT_NE(stub->StubSetMouseHotSpot(data, reply), RET_OK);
94 }
95
96 /**
97 * @tc.name: MultimodalInputConnectStubTest_StubGetMouseScrollRows
98 * @tc.desc: Test the function StubGetMouseScrollRows
99 * @tc.type: FUNC
100 * @tc.require:
101 */
102 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubGetMouseScrollRows, TestSize.Level1)
103 {
104 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
105 std::shared_ptr<MMIService> service = std::static_pointer_cast<MMIService>(stub);
106 service->state_ = ServiceRunningState::STATE_NOT_START;
107 MessageParcel data;
108 MessageParcel reply;
109 EXPECT_EQ(stub->StubGetMouseScrollRows(data, reply), MMISERVICE_NOT_RUNNING);
110
111 service->state_ = ServiceRunningState::STATE_RUNNING;
112 EXPECT_NE(stub->StubGetMouseScrollRows(data, reply), RET_OK);
113 }
114
115 /**
116 * @tc.name: MultimodalInputConnectStubTest_StubSetPointerSize
117 * @tc.desc: Test the function StubSetPointerSize
118 * @tc.type: FUNC
119 * @tc.require:
120 */
121 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubSetPointerSize, TestSize.Level1)
122 {
123 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
124 std::shared_ptr<MMIService> service = std::static_pointer_cast<MMIService>(stub);
125 service->state_ = ServiceRunningState::STATE_NOT_START;
126 MessageParcel data;
127 MessageParcel reply;
128 EXPECT_EQ(stub->StubSetPointerSize(data, reply), MMISERVICE_NOT_RUNNING);
129 int32_t size = 10;
130 data.WriteInt32(size);
131 service->state_ = ServiceRunningState::STATE_RUNNING;
132 EXPECT_NE(stub->StubSetPointerSize(data, reply), RET_OK);
133 }
134
135 /**
136 * @tc.name: MultimodalInputConnectStubTest_StubSetNapStatus
137 * @tc.desc: Test the function StubSetNapStatus
138 * @tc.type: FUNC
139 * @tc.require:
140 */
141 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubSetNapStatus, TestSize.Level1)
142 {
143 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
144 std::shared_ptr<MMIService> service = std::static_pointer_cast<MMIService>(stub);
145 service->state_ = ServiceRunningState::STATE_NOT_START;
146 MessageParcel data;
147 MessageParcel reply;
148 EXPECT_EQ(stub->StubSetNapStatus(data, reply), MMISERVICE_NOT_RUNNING);
149
150 int32_t pid = 1000;
151 int32_t uid = 1500;
152 std::string bundleName = "abc";
153 int32_t napStatus = 100;
154 data.WriteInt32(pid);
155 data.WriteInt32(uid);
156 data.WriteString(bundleName);
157 data.WriteInt32(napStatus);
158 service->state_ = ServiceRunningState::STATE_RUNNING;
159 EXPECT_NE(stub->StubSetNapStatus(data, reply), RET_OK);
160 }
161
162 /**
163 * @tc.name: MultimodalInputConnectStubTest_StubGetPointerSize
164 * @tc.desc: Test the function StubGetPointerSize
165 * @tc.type: FUNC
166 * @tc.require:
167 */
168 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubGetPointerSize, TestSize.Level1)
169 {
170 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
171 std::shared_ptr<MMIService> service = std::static_pointer_cast<MMIService>(stub);
172 service->state_ = ServiceRunningState::STATE_NOT_START;
173 MessageParcel data;
174 MessageParcel reply;
175 EXPECT_EQ(stub->StubGetPointerSize(data, reply), MMISERVICE_NOT_RUNNING);
176
177 service->state_ = ServiceRunningState::STATE_RUNNING;
178 EXPECT_NE(stub->StubGetPointerSize(data, reply), RET_OK);
179 }
180
181 /**
182 * @tc.name: MultimodalInputConnectStubTest_StubSetMousePrimaryButton
183 * @tc.desc: Test the function StubSetMousePrimaryButton
184 * @tc.type: FUNC
185 * @tc.require:
186 */
187 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubSetMousePrimaryButton, TestSize.Level1)
188 {
189 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
190 MessageParcel data;
191 MessageParcel reply;
192 int32_t primaryButton = 2072;
193 data.WriteInt32(primaryButton);
194 EXPECT_NE(stub->StubSetMousePrimaryButton(data, reply), RET_OK);
195 }
196
197 /**
198 * @tc.name: MultimodalInputConnectStubTest_StubSetHoverScrollState
199 * @tc.desc: Test the function StubSetHoverScrollState
200 * @tc.type: FUNC
201 * @tc.require:
202 */
203 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubSetHoverScrollState, TestSize.Level1)
204 {
205 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
206 MessageParcel data;
207 MessageParcel reply;
208 bool state = false;
209 data.WriteBool(state);
210 EXPECT_NE(stub->StubSetHoverScrollState(data, reply), RET_OK);
211 }
212
213 /**
214 * @tc.name: MultimodalInputConnectStubTest_StubSetPointerVisible
215 * @tc.desc: Test the function StubSetPointerVisible
216 * @tc.type: FUNC
217 * @tc.require:
218 */
219 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubSetPointerVisible, TestSize.Level1)
220 {
221 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
222 MessageParcel data;
223 MessageParcel reply;
224 bool visible = true;
225 int32_t priority = 1;
226 data.WriteBool(visible);
227 data.WriteInt32(priority);
228 EXPECT_NE(stub->StubSetPointerVisible(data, reply), RET_OK);
229 }
230
231 /**
232 * @tc.name: MultimodalInputConnectStubTest_StubMarkProcessed
233 * @tc.desc: Test the function StubMarkProcessed
234 * @tc.type: FUNC
235 * @tc.require:
236 */
237 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubMarkProcessed, TestSize.Level1)
238 {
239 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
240 std::shared_ptr<MMIService> service = std::static_pointer_cast<MMIService>(stub);
241 service->state_ = ServiceRunningState::STATE_NOT_START;
242 MessageParcel data;
243 MessageParcel reply;
244 EXPECT_NE(stub->StubMarkProcessed(data, reply), RET_OK);
245
246 int32_t eventType = 1;
247 int32_t eventId = 100;
248 data.WriteInt32(eventType);
249 data.WriteInt32(eventId);
250 service->state_ = ServiceRunningState::STATE_RUNNING;
251 EXPECT_NE(stub->StubMarkProcessed(data, reply), RET_OK);
252 }
253
254 /**
255 * @tc.name: MultimodalInputConnectStubTest_StubSetPointerColor
256 * @tc.desc: Test the function StubSetPointerColor
257 * @tc.type: FUNC
258 * @tc.require:
259 */
260 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubSetPointerColor, TestSize.Level1)
261 {
262 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
263 std::shared_ptr<MMIService> service = std::static_pointer_cast<MMIService>(stub);
264 service->state_ = ServiceRunningState::STATE_NOT_START;
265 MessageParcel data;
266 MessageParcel reply;
267 EXPECT_NE(stub->StubSetPointerColor(data, reply), RET_OK);
268
269 int32_t color = 123456;
270 data.WriteInt32(color);
271 service->state_ = ServiceRunningState::STATE_RUNNING;
272 EXPECT_NE(stub->StubSetPointerColor(data, reply), RET_OK);
273 }
274
275 /**
276 * @tc.name: MultimodalInputConnectStubTest_StubGetPointerColor
277 * @tc.desc: Test the function StubGetPointerColor
278 * @tc.type: FUNC
279 * @tc.require:
280 */
281 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubGetPointerColor, TestSize.Level1)
282 {
283 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
284 std::shared_ptr<MMIService> service = std::static_pointer_cast<MMIService>(stub);
285 service->state_ = ServiceRunningState::STATE_NOT_START;
286 MessageParcel data;
287 MessageParcel reply;
288 EXPECT_NE(stub->StubGetPointerColor(data, reply), RET_OK);
289 service->state_ = ServiceRunningState::STATE_RUNNING;
290 EXPECT_NE(stub->StubGetPointerColor(data, reply), RET_OK);
291 }
292
293 /**
294 * @tc.name: MultimodalInputConnectStubTest_StubAddInputHandler
295 * @tc.desc: Test the function StubAddInputHandler
296 * @tc.type: FUNC
297 * @tc.require:
298 */
299 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubAddInputHandler, TestSize.Level1)
300 {
301 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
302 std::shared_ptr<MMIService> service = std::static_pointer_cast<MMIService>(stub);
303 service->state_ = ServiceRunningState::STATE_NOT_START;
304 MessageParcel data;
305 MessageParcel reply;
306 EXPECT_NE(stub->StubAddInputHandler(data, reply), RET_OK);
307
308 int32_t handlerType = InputHandlerType::NONE;
309 uint32_t eventType = 0x1;
310 int32_t priority = 1;
311 uint32_t deviceTags = 100;
312 data.WriteInt32(handlerType);
313 data.WriteUint32(eventType);
314 data.WriteInt32(priority);
315 data.WriteUint32(deviceTags);
316 service->state_ = ServiceRunningState::STATE_RUNNING;
317 EXPECT_NE(stub->StubAddInputHandler(data, reply), RET_OK);
318 }
319
320 /**
321 * @tc.name: MultimodalInputConnectStubTest_OnRemoteRequest_001
322 * @tc.desc: Test the function OnRemoteRequest
323 * @tc.type: FUNC
324 * @tc.require:
325 */
326 HWTEST_F(MultimodalInputConnectStubTest, OnRemoteRequest_001, TestSize.Level1)
327 {
328 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
329 MessageParcel data;
330 MessageParcel reply;
331 MessageOption option;
332 uint32_t code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::ALLOC_SOCKET_FD);
333 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
334 int32_t ret = stub->OnRemoteRequest(code, data, reply, option);
335 int32_t temp = stub->StubHandleAllocSocketFd(data, reply);
336 EXPECT_EQ(ret, temp);
337 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::ADD_INPUT_EVENT_FILTER);
338 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
339 ret = stub->OnRemoteRequest(code, data, reply, option);
340 temp = stub->StubAddInputEventFilter(data, reply);
341 EXPECT_EQ(ret, temp);
342 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::RMV_INPUT_EVENT_FILTER);
343 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
344 ret = stub->OnRemoteRequest(code, data, reply, option);
345 temp = stub->StubRemoveInputEventFilter(data, reply);
346 EXPECT_EQ(ret, temp);
347 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SET_MOUSE_SCROLL_ROWS);
348 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
349 ret = stub->OnRemoteRequest(code, data, reply, option);
350 temp = stub->StubSetMouseScrollRows(data, reply);
351 EXPECT_EQ(ret, temp);
352 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::GET_MOUSE_SCROLL_ROWS);
353 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
354 ret = stub->OnRemoteRequest(code, data, reply, option);
355 temp = stub->StubGetMouseScrollRows(data, reply);
356 EXPECT_EQ(ret, temp);
357 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SET_POINTER_SIZE);
358 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
359 ret = stub->OnRemoteRequest(code, data, reply, option);
360 temp = stub->StubSetPointerSize(data, reply);
361 EXPECT_EQ(ret, temp);
362 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::GET_POINTER_SIZE);
363 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
364 ret = stub->OnRemoteRequest(code, data, reply, option);
365 temp = stub->StubGetPointerSize(data, reply);
366 EXPECT_EQ(ret, temp);
367 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SET_CUSTOM_CURSOR);
368 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
369 ret = stub->OnRemoteRequest(code, data, reply, option);
370 temp = stub->StubSetCustomCursor(data, reply);
371 EXPECT_EQ(ret, temp);
372 }
373
374 /**
375 * @tc.name: MultimodalInputConnectStubTest_OnRemoteRequest_002
376 * @tc.desc: Test the function OnRemoteRequest
377 * @tc.type: FUNC
378 * @tc.require:
379 */
380 HWTEST_F(MultimodalInputConnectStubTest, OnRemoteRequest_002, TestSize.Level1)
381 {
382 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
383 MessageParcel data;
384 MessageParcel reply;
385 MessageOption option;
386 uint32_t code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SET_MOUSE_ICON);
387 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
388 int32_t ret = stub->OnRemoteRequest(code, data, reply, option);
389 int32_t temp = stub->StubSetMouseIcon(data, reply);
390 EXPECT_EQ(ret, temp);
391 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SET_MOUSE_PRIMARY_BUTTON);
392 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
393 ret = stub->OnRemoteRequest(code, data, reply, option);
394 temp = stub->StubSetMousePrimaryButton(data, reply);
395 EXPECT_EQ(ret, temp);
396 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::GET_MOUSE_PRIMARY_BUTTON);
397 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
398 ret = stub->OnRemoteRequest(code, data, reply, option);
399 temp = stub->StubGetMousePrimaryButton(data, reply);
400 EXPECT_EQ(ret, temp);
401 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SET_HOVER_SCROLL_STATE);
402 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
403 ret = stub->OnRemoteRequest(code, data, reply, option);
404 temp = stub->StubSetHoverScrollState(data, reply);
405 EXPECT_EQ(ret, temp);
406 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::GET_HOVER_SCROLL_STATE);
407 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
408 ret = stub->OnRemoteRequest(code, data, reply, option);
409 temp = stub->StubGetHoverScrollState(data, reply);
410 EXPECT_EQ(ret, temp);
411 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SET_POINTER_VISIBLE);
412 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
413 ret = stub->OnRemoteRequest(code, data, reply, option);
414 temp = stub->StubSetPointerVisible(data, reply);
415 EXPECT_EQ(ret, temp);
416 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SET_POINTER_STYLE);
417 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
418 ret = stub->OnRemoteRequest(code, data, reply, option);
419 temp = stub->StubSetPointerStyle(data, reply);
420 EXPECT_EQ(ret, temp);
421 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::NOTIFY_NAP_ONLINE);
422 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
423 ret = stub->OnRemoteRequest(code, data, reply, option);
424 temp = stub->StubNotifyNapOnline(data, reply);
425 EXPECT_EQ(ret, temp);
426 }
427
428 /**
429 * @tc.name: MultimodalInputConnectStubTest_OnRemoteRequest_003
430 * @tc.desc: Test the function OnRemoteRequest
431 * @tc.type: FUNC
432 * @tc.require:
433 */
434 HWTEST_F(MultimodalInputConnectStubTest, OnRemoteRequest_003, TestSize.Level1)
435 {
436 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
437 MessageParcel data;
438 MessageParcel reply;
439 MessageOption option;
440 uint32_t code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::RMV_INPUT_EVENT_OBSERVER);
441 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
442 int32_t ret = stub->OnRemoteRequest(code, data, reply, option);
443 int32_t temp = stub->StubRemoveInputEventObserver(data, reply);
444 EXPECT_EQ(ret, temp);
445 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SET_NAP_STATUS);
446 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
447 ret = stub->OnRemoteRequest(code, data, reply, option);
448 temp = stub->StubSetNapStatus(data, reply);
449 EXPECT_EQ(ret, temp);
450 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::CLEAN_WIDNOW_STYLE);
451 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
452 ret = stub->OnRemoteRequest(code, data, reply, option);
453 temp = stub->StubClearWindowPointerStyle(data, reply);
454 EXPECT_EQ(ret, temp);
455 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::GET_POINTER_STYLE);
456 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
457 ret = stub->OnRemoteRequest(code, data, reply, option);
458 temp = stub->StubGetPointerStyle(data, reply);
459 EXPECT_EQ(ret, temp);
460 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::IS_POINTER_VISIBLE);
461 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
462 ret = stub->OnRemoteRequest(code, data, reply, option);
463 temp = stub->StubIsPointerVisible(data, reply);
464 EXPECT_EQ(ret, temp);
465 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::REGISTER_DEV_MONITOR);
466 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
467 ret = stub->OnRemoteRequest(code, data, reply, option);
468 temp = stub->StubRegisterInputDeviceMonitor(data, reply);
469 EXPECT_EQ(ret, temp);
470 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::REGISTER_DEV_MONITOR);
471 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
472 ret = stub->OnRemoteRequest(code, data, reply, option);
473 temp = stub->StubRegisterInputDeviceMonitor(data, reply);
474 EXPECT_EQ(ret, temp);
475 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::UNREGISTER_DEV_MONITOR);
476 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
477 ret = stub->OnRemoteRequest(code, data, reply, option);
478 temp = stub->StubUnregisterInputDeviceMonitor(data, reply);
479 EXPECT_EQ(ret, temp);
480 }
481
482 /**
483 * @tc.name: MultimodalInputConnectStubTest_OnRemoteRequest_004
484 * @tc.desc: Test the function OnRemoteRequest
485 * @tc.type: FUNC
486 * @tc.require:
487 */
488 HWTEST_F(MultimodalInputConnectStubTest, OnRemoteRequest_004, TestSize.Level1)
489 {
490 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
491 MessageParcel data;
492 MessageParcel reply;
493 MessageOption option;
494 uint32_t code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::GET_DEVICE_IDS);
495 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
496 int32_t ret = stub->OnRemoteRequest(code, data, reply, option);
497 int32_t temp = stub->StubGetDeviceIds(data, reply);
498 EXPECT_EQ(ret, temp);
499 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::GET_DEVICE);
500 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
501 ret = stub->OnRemoteRequest(code, data, reply, option);
502 temp = stub->StubGetDevice(data, reply);
503 EXPECT_EQ(ret, temp);
504 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SUPPORT_KEYS);
505 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
506 ret = stub->OnRemoteRequest(code, data, reply, option);
507 temp = stub->StubSupportKeys(data, reply);
508 EXPECT_EQ(ret, temp);
509 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::GET_KEYBOARD_TYPE);
510 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
511 ret = stub->OnRemoteRequest(code, data, reply, option);
512 temp = stub->StubGetKeyboardType(data, reply);
513 EXPECT_EQ(ret, temp);
514 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SET_POINTER_COLOR);
515 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
516 ret = stub->OnRemoteRequest(code, data, reply, option);
517 temp = stub->StubSetPointerColor(data, reply);
518 EXPECT_EQ(ret, temp);
519 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::GET_POINTER_COLOR);
520 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
521 ret = stub->OnRemoteRequest(code, data, reply, option);
522 temp = stub->StubGetPointerColor(data, reply);
523 EXPECT_EQ(ret, temp);
524 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SET_POINTER_SPEED);
525 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
526 ret = stub->OnRemoteRequest(code, data, reply, option);
527 temp = stub->StubSetPointerSpeed(data, reply);
528 EXPECT_EQ(ret, temp);
529 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::GET_POINTER_SPEED);
530 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
531 ret = stub->OnRemoteRequest(code, data, reply, option);
532 temp = stub->StubGetPointerSpeed(data, reply);
533 EXPECT_EQ(ret, temp);
534 }
535
536 /**
537 * @tc.name: MultimodalInputConnectStubTest_OnRemoteRequest_005
538 * @tc.desc: Test the function OnRemoteRequest
539 * @tc.type: FUNC
540 * @tc.require:
541 */
542 HWTEST_F(MultimodalInputConnectStubTest, OnRemoteRequest_005, TestSize.Level1)
543 {
544 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
545 MessageParcel data;
546 MessageParcel reply;
547 MessageOption option;
548 uint32_t code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SUBSCRIBE_KEY_EVENT);
549 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
550 int32_t ret = stub->OnRemoteRequest(code, data, reply, option);
551 int32_t temp = stub->StubSubscribeKeyEvent(data, reply);
552 EXPECT_EQ(ret, temp);
553 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::UNSUBSCRIBE_KEY_EVENT);
554 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
555 ret = stub->OnRemoteRequest(code, data, reply, option);
556 temp = stub->StubUnsubscribeKeyEvent(data, reply);
557 EXPECT_EQ(ret, temp);
558 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SUBSCRIBE_SWITCH_EVENT);
559 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
560 ret = stub->OnRemoteRequest(code, data, reply, option);
561 temp = stub->StubSubscribeSwitchEvent(data, reply);
562 EXPECT_EQ(ret, temp);
563 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::UNSUBSCRIBE_SWITCH_EVENT);
564 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
565 ret = stub->OnRemoteRequest(code, data, reply, option);
566 temp = stub->StubUnsubscribeSwitchEvent(data, reply);
567 EXPECT_EQ(ret, temp);
568 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::MARK_PROCESSED);
569 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
570 ret = stub->OnRemoteRequest(code, data, reply, option);
571 temp = stub->StubMarkProcessed(data, reply);
572 EXPECT_EQ(ret, temp);
573 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::ADD_INPUT_HANDLER);
574 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
575 ret = stub->OnRemoteRequest(code, data, reply, option);
576 temp = stub->StubAddInputHandler(data, reply);
577 EXPECT_EQ(ret, temp);
578 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::REMOVE_INPUT_HANDLER);
579 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
580 ret = stub->OnRemoteRequest(code, data, reply, option);
581 temp = stub->StubRemoveInputHandler(data, reply);
582 EXPECT_EQ(ret, temp);
583 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::MARK_EVENT_CONSUMED);
584 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
585 ret = stub->OnRemoteRequest(code, data, reply, option);
586 temp = stub->StubMarkEventConsumed(data, reply);
587 EXPECT_EQ(ret, temp);
588 }
589
590 /**
591 * @tc.name: MultimodalInputConnectStubTest_OnRemoteRequest_006
592 * @tc.desc: Test the function OnRemoteRequest
593 * @tc.type: FUNC
594 * @tc.require:
595 */
596 HWTEST_F(MultimodalInputConnectStubTest, OnRemoteRequest_006, TestSize.Level1)
597 {
598 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
599 MessageParcel data;
600 MessageParcel reply;
601 MessageOption option;
602 uint32_t code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::MOVE_MOUSE);
603 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
604 int32_t ret = stub->OnRemoteRequest(code, data, reply, option);
605 int32_t temp = stub->StubMoveMouseEvent(data, reply);
606 EXPECT_EQ(ret, temp);
607 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::INJECT_KEY_EVENT);
608 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
609 ret = stub->OnRemoteRequest(code, data, reply, option);
610 temp = stub->StubInjectKeyEvent(data, reply);
611 EXPECT_EQ(ret, temp);
612 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::INJECT_POINTER_EVENT);
613 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
614 ret = stub->OnRemoteRequest(code, data, reply, option);
615 temp = stub->StubInjectPointerEvent(data, reply);
616 EXPECT_EQ(ret, temp);
617 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SET_ANR_OBSERVER);
618 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
619 ret = stub->OnRemoteRequest(code, data, reply, option);
620 temp = stub->StubSetAnrListener(data, reply);
621 EXPECT_EQ(ret, temp);
622 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::GET_DISPLAY_BIND_INFO);
623 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
624 ret = stub->OnRemoteRequest(code, data, reply, option);
625 temp = stub->StubGetDisplayBindInfo(data, reply);
626 EXPECT_EQ(ret, temp);
627 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::GET_ALL_NAPSTATUS_DATA);
628 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
629 ret = stub->OnRemoteRequest(code, data, reply, option);
630 temp = stub->StubGetAllMmiSubscribedEvents(data, reply);
631 EXPECT_EQ(ret, temp);
632 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SET_DISPLAY_BIND);
633 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
634 ret = stub->OnRemoteRequest(code, data, reply, option);
635 temp = stub->StubSetDisplayBind(data, reply);
636 EXPECT_EQ(ret, temp);
637 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::GET_FUNCTION_KEY_STATE);
638 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
639 ret = stub->OnRemoteRequest(code, data, reply, option);
640 temp = stub->StubGetFunctionKeyState(data, reply);
641 EXPECT_EQ(ret, temp);
642 }
643
644 /**
645 * @tc.name: MultimodalInputConnectStubTest_OnRemoteRequest_007
646 * @tc.desc: Test the function OnRemoteRequest
647 * @tc.type: FUNC
648 * @tc.require:
649 */
650 HWTEST_F(MultimodalInputConnectStubTest, OnRemoteRequest_007, TestSize.Level1)
651 {
652 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
653 MessageParcel data;
654 MessageParcel reply;
655 MessageOption option;
656 uint32_t code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SET_FUNCTION_KEY_STATE);
657 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
658 int32_t ret = stub->OnRemoteRequest(code, data, reply, option);
659 int32_t temp = stub->StubSetFunctionKeyState(data, reply);
660 EXPECT_EQ(ret, temp);
661 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SET_POINTER_LOCATION);
662 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
663 ret = stub->OnRemoteRequest(code, data, reply, option);
664 temp = stub->StubSetPointerLocation(data, reply);
665 EXPECT_EQ(ret, temp);
666 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SET_CAPTURE_MODE);
667 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
668 ret = stub->OnRemoteRequest(code, data, reply, option);
669 temp = stub->StubSetMouseCaptureMode(data, reply);
670 EXPECT_EQ(ret, temp);
671 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::GET_WINDOW_PID);
672 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
673 ret = stub->OnRemoteRequest(code, data, reply, option);
674 temp = stub->StubGetWindowPid(data, reply);
675 EXPECT_EQ(ret, temp);
676 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::APPEND_EXTRA_DATA);
677 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
678 ret = stub->OnRemoteRequest(code, data, reply, option);
679 temp = stub->StubAppendExtraData(data, reply);
680 EXPECT_EQ(ret, temp);
681 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::ENABLE_INPUT_DEVICE);
682 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
683 ret = stub->OnRemoteRequest(code, data, reply, option);
684 temp = stub->StubEnableInputDevice(data, reply);
685 EXPECT_EQ(ret, temp);
686 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::ENABLE_COMBINE_KEY);
687 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
688 ret = stub->OnRemoteRequest(code, data, reply, option);
689 temp = stub->StubEnableCombineKey(data, reply);
690 EXPECT_EQ(ret, temp);
691 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SET_KEY_DOWN_DURATION);
692 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
693 ret = stub->OnRemoteRequest(code, data, reply, option);
694 temp = stub->StubSetKeyDownDuration(data, reply);
695 EXPECT_EQ(ret, temp);
696 }
697
698 /**
699 * @tc.name: MultimodalInputConnectStubTest_OnRemoteRequest_008
700 * @tc.desc: Test the function OnRemoteRequest
701 * @tc.type: FUNC
702 * @tc.require:
703 */
704 HWTEST_F(MultimodalInputConnectStubTest, OnRemoteRequest_008, TestSize.Level1)
705 {
706 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
707 MessageParcel data;
708 MessageParcel reply;
709 MessageOption option;
710 uint32_t code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SET_TP_SCROLL_SWITCH);
711 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
712 int32_t ret = stub->OnRemoteRequest(code, data, reply, option);
713 int32_t temp = stub->StubSetTouchpadScrollSwitch(data, reply);
714 EXPECT_EQ(ret, temp);
715 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::GET_TP_SCROLL_SWITCH);
716 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
717 ret = stub->OnRemoteRequest(code, data, reply, option);
718 temp = stub->StubGetTouchpadScrollSwitch(data, reply);
719 EXPECT_EQ(ret, temp);
720 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SET_TP_SCROLL_DIRECT_SWITCH);
721 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
722 ret = stub->OnRemoteRequest(code, data, reply, option);
723 temp = stub->StubSetTouchpadScrollDirection(data, reply);
724 EXPECT_EQ(ret, temp);
725 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::GET_TP_SCROLL_DIRECT_SWITCH);
726 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
727 ret = stub->OnRemoteRequest(code, data, reply, option);
728 temp = stub->StubGetTouchpadScrollDirection(data, reply);
729 EXPECT_EQ(ret, temp);
730 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SET_TP_TAP_SWITCH);
731 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
732 ret = stub->OnRemoteRequest(code, data, reply, option);
733 temp = stub->StubSetTouchpadTapSwitch(data, reply);
734 EXPECT_EQ(ret, temp);
735 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::GET_TP_TAP_SWITCH);
736 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
737 ret = stub->OnRemoteRequest(code, data, reply, option);
738 temp = stub->StubGetTouchpadTapSwitch(data, reply);
739 EXPECT_EQ(ret, temp);
740 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SET_TP_POINTER_SPEED);
741 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
742 ret = stub->OnRemoteRequest(code, data, reply, option);
743 temp = stub->StubSetTouchpadPointerSpeed(data, reply);
744 EXPECT_EQ(ret, temp);
745 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::GET_TP_POINTER_SPEED);
746 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
747 ret = stub->OnRemoteRequest(code, data, reply, option);
748 temp = stub->StubGetTouchpadPointerSpeed(data, reply);
749 EXPECT_EQ(ret, temp);
750 }
751
752 /**
753 * @tc.name: MultimodalInputConnectStubTest_OnRemoteRequest_009
754 * @tc.desc: Test the function OnRemoteRequest
755 * @tc.type: FUNC
756 * @tc.require:
757 */
758 HWTEST_F(MultimodalInputConnectStubTest, OnRemoteRequest_009, TestSize.Level1)
759 {
760 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
761 MessageParcel data;
762 MessageParcel reply;
763 MessageOption option;
764 uint32_t code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SET_KEYBOARD_REPEAT_DELAY);
765 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
766 int32_t ret = stub->OnRemoteRequest(code, data, reply, option);
767 int32_t temp = stub->StubSetKeyboardRepeatDelay(data, reply);
768 EXPECT_EQ(ret, temp);
769 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SET_KEYBOARD_REPEAT_RATE);
770 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
771 ret = stub->OnRemoteRequest(code, data, reply, option);
772 temp = stub->StubSetKeyboardRepeatRate(data, reply);
773 EXPECT_EQ(ret, temp);
774 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SET_TP_PINCH_SWITCH);
775 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
776 ret = stub->OnRemoteRequest(code, data, reply, option);
777 temp = stub->StubSetTouchpadPinchSwitch(data, reply);
778 EXPECT_EQ(ret, temp);
779 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::GET_TP_PINCH_SWITCH);
780 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
781 ret = stub->OnRemoteRequest(code, data, reply, option);
782 temp = stub->StubGetTouchpadPinchSwitch(data, reply);
783 EXPECT_EQ(ret, temp);
784 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SET_TP_SWIPE_SWITCH);
785 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
786 ret = stub->OnRemoteRequest(code, data, reply, option);
787 temp = stub->StubSetTouchpadSwipeSwitch(data, reply);
788 EXPECT_EQ(ret, temp);
789 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::GET_TP_SWIPE_SWITCH);
790 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
791 ret = stub->OnRemoteRequest(code, data, reply, option);
792 temp = stub->StubGetTouchpadSwipeSwitch(data, reply);
793 EXPECT_EQ(ret, temp);
794 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SET_TP_RIGHT_CLICK_TYPE);
795 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
796 ret = stub->OnRemoteRequest(code, data, reply, option);
797 temp = stub->StubSetTouchpadRightClickType(data, reply);
798 EXPECT_EQ(ret, temp);
799 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::GET_TP_RIGHT_CLICK_TYPE);
800 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
801 ret = stub->OnRemoteRequest(code, data, reply, option);
802 temp = stub->StubGetTouchpadRightClickType(data, reply);
803 EXPECT_EQ(ret, temp);
804 }
805
806 /**
807 * @tc.name: MultimodalInputConnectStubTest_OnRemoteRequest_010
808 * @tc.desc: Test the function OnRemoteRequest
809 * @tc.type: FUNC
810 * @tc.require:
811 */
812 HWTEST_F(MultimodalInputConnectStubTest, OnRemoteRequest_010, TestSize.Level1)
813 {
814 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
815 MessageParcel data;
816 MessageParcel reply;
817 MessageOption option;
818 uint32_t code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SET_TP_ROTATE_SWITCH);
819 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
820 int32_t ret = stub->OnRemoteRequest(code, data, reply, option);
821 int32_t temp = stub->StubSetTouchpadRotateSwitch(data, reply);
822 EXPECT_EQ(ret, temp);
823 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::GET_TP_ROTATE_SWITCH);
824 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
825 ret = stub->OnRemoteRequest(code, data, reply, option);
826 temp = stub->StubGetTouchpadRotateSwitch(data, reply);
827 EXPECT_EQ(ret, temp);
828 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::GET_KEYBOARD_REPEAT_DELAY);
829 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
830 ret = stub->OnRemoteRequest(code, data, reply, option);
831 temp = stub->StubGetKeyboardRepeatDelay(data, reply);
832 EXPECT_EQ(ret, temp);
833 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::GET_KEYBOARD_REPEAT_RATE);
834 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
835 ret = stub->OnRemoteRequest(code, data, reply, option);
836 temp = stub->StubGetKeyboardRepeatRate(data, reply);
837 EXPECT_EQ(ret, temp);
838 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SET_MOUSE_HOT_SPOT);
839 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
840 ret = stub->OnRemoteRequest(code, data, reply, option);
841 temp = stub->StubSetMouseHotSpot(data, reply);
842 EXPECT_EQ(ret, temp);
843 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SET_SHIELD_STATUS);
844 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
845 ret = stub->OnRemoteRequest(code, data, reply, option);
846 temp = stub->StubSetShieldStatus(data, reply);
847 EXPECT_EQ(ret, temp);
848 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::GET_SHIELD_STATUS);
849 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
850 ret = stub->OnRemoteRequest(code, data, reply, option);
851 temp = stub->StubGetShieldStatus(data, reply);
852 EXPECT_EQ(ret, temp);
853 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::GET_KEY_STATE);
854 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
855 ret = stub->OnRemoteRequest(code, data, reply, option);
856 temp = stub->StubGetKeyState(data, reply);
857 EXPECT_EQ(ret, temp);
858 }
859
860 /**
861 * @tc.name: MultimodalInputConnectStubTest_OnRemoteRequest_011
862 * @tc.desc: Test the function OnRemoteRequest
863 * @tc.type: FUNC
864 * @tc.require:
865 */
866 HWTEST_F(MultimodalInputConnectStubTest, OnRemoteRequest_011, TestSize.Level1)
867 {
868 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
869 MessageParcel data;
870 MessageParcel reply;
871 MessageOption option;
872 uint32_t code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::NATIVE_AUTHORIZE);
873 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
874 int32_t ret = stub->OnRemoteRequest(code, data, reply, option);
875 int32_t temp = stub->StubAuthorize(data, reply);
876 EXPECT_EQ(ret, temp);
877 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::NATIVE_CANCEL_INJECTION);
878 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
879 ret = stub->OnRemoteRequest(code, data, reply, option);
880 temp = stub->StubCancelInjection(data, reply);
881 EXPECT_EQ(ret, temp);
882 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::NATIVE_INFRARED_OWN);
883 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
884 ret = stub->OnRemoteRequest(code, data, reply, option);
885 temp = stub->StubHasIrEmitter(data, reply);
886 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::NATIVE_INFRARED_FREQUENCY);
887 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
888 ret = stub->OnRemoteRequest(code, data, reply, option);
889 temp = stub->StubGetInfraredFrequencies(data, reply);
890 EXPECT_EQ(ret, temp);
891 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::NATIVE_CANCEL_TRANSMIT);
892 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
893 ret = stub->OnRemoteRequest(code, data, reply, option);
894 temp = stub->StubTransmitInfrared(data, reply);
895 EXPECT_EQ(ret, temp);
896 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SET_PIXEL_MAP_DATA);
897 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
898 ret = stub->OnRemoteRequest(code, data, reply, option);
899 temp = stub->StubSetPixelMapData(data, reply);
900 EXPECT_EQ(ret, temp);
901 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SET_CURRENT_USERID);
902 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
903 ret = stub->OnRemoteRequest(code, data, reply, option);
904 temp = stub->StubSetCurrentUser(data, reply);
905 EXPECT_EQ(ret, temp);
906 }
907
908 /**
909 * @tc.name: MultimodalInputConnectStubTest_OnRemoteRequest_012
910 * @tc.desc: Test the function OnRemoteRequest
911 * @tc.type: FUNC
912 * @tc.require:
913 */
914 HWTEST_F(MultimodalInputConnectStubTest, OnRemoteRequest_012, TestSize.Level1)
915 {
916 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
917 MessageParcel data;
918 MessageParcel reply;
919 MessageOption option;
920 uint32_t code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SET_TOUCHPAD_SCROLL_ROWS);
921 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
922 int32_t ret = stub->OnRemoteRequest(code, data, reply, option);
923 int32_t temp = stub->StubSetTouchpadScrollRows(data, reply);
924 EXPECT_EQ(ret, temp);
925 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::GET_TOUCHPAD_SCROLL_ROWS);
926 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
927 ret = stub->OnRemoteRequest(code, data, reply, option);
928 temp = stub->StubGetTouchpadScrollRows(data, reply);
929 EXPECT_EQ(ret, temp);
930 }
931
932 /**
933 * @tc.name: StubHandleAllocSocketFd_001
934 * @tc.desc: Test the function StubHandleAllocSocketFd
935 * @tc.type: FUNC
936 * @tc.require:
937 */
938 HWTEST_F(MultimodalInputConnectStubTest, StubHandleAllocSocketFd_001, TestSize.Level1)
939 {
940 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
941 MessageParcel data;
942 MessageParcel reply;
943 int32_t returnCode = 65142800;
944 int32_t ret = stub->StubHandleAllocSocketFd(data, reply);
945 EXPECT_EQ(ret, returnCode);
946 }
947
948 /**
949 * @tc.name: StubAddInputEventFilter_001
950 * @tc.desc: Test the function StubAddInputEventFilter
951 * @tc.type: FUNC
952 * @tc.require:
953 */
954 HWTEST_F(MultimodalInputConnectStubTest, StubAddInputEventFilter_001, TestSize.Level1)
955 {
956 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
957 MessageParcel data;
958 MessageParcel reply;
959 int32_t returnCode = 22;
960 int32_t ret = stub->StubAddInputEventFilter(data, reply);
961 EXPECT_EQ(ret, returnCode);
962 }
963
964 /**
965 * @tc.name: StubRemoveInputEventFilter_001
966 * @tc.desc: Test the function StubRemoveInputEventFilter
967 * @tc.type: FUNC
968 * @tc.require:
969 */
970 HWTEST_F(MultimodalInputConnectStubTest, StubRemoveInputEventFilter_001, TestSize.Level1)
971 {
972 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
973 MessageParcel data;
974 MessageParcel reply;
975 int32_t returnCode = 201;
976 int32_t ret = stub->StubRemoveInputEventFilter(data, reply);
977 EXPECT_EQ(ret, returnCode);
978 }
979
980 /**
981 * @tc.name: StubSetMouseScrollRows_001
982 * @tc.desc: Test the function StubSetMouseScrollRows
983 * @tc.type: FUNC
984 * @tc.require:
985 */
986 HWTEST_F(MultimodalInputConnectStubTest, StubSetMouseScrollRows_001, TestSize.Level1)
987 {
988 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
989 MessageParcel data;
990 MessageParcel reply;
991 int32_t returnCode = 65142800;
992 int32_t ret = stub->StubSetMouseScrollRows(data, reply);
993 EXPECT_EQ(ret, returnCode);
994 }
995
996 /**
997 * @tc.name: StubSetCustomCursor_001
998 * @tc.desc: Test the function StubSetCustomCursor
999 * @tc.type: FUNC
1000 * @tc.require:
1001 */
1002 HWTEST_F(MultimodalInputConnectStubTest, StubSetCustomCursor_001, TestSize.Level1)
1003 {
1004 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1005 MessageParcel data;
1006 MessageParcel reply;
1007 int32_t returnCode = 65142800;
1008 int32_t ret = stub->StubSetCustomCursor(data, reply);
1009 EXPECT_EQ(ret, returnCode);
1010 }
1011
1012 /**
1013 * @tc.name: StubSetMouseIcon_001
1014 * @tc.desc: Test the function StubSetMouseIcon
1015 * @tc.type: FUNC
1016 * @tc.require:
1017 */
1018 HWTEST_F(MultimodalInputConnectStubTest, StubSetMouseIcon_001, TestSize.Level1)
1019 {
1020 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1021 MessageParcel data;
1022 MessageParcel reply;
1023 int32_t returnCode = 65142800;
1024 int32_t ret = stub->StubSetMouseIcon(data, reply);
1025 EXPECT_EQ(ret, returnCode);
1026 }
1027
1028 /**
1029 * @tc.name: StubSetMouseHotSpot_001
1030 * @tc.desc: Test the function StubSetMouseHotSpot
1031 * @tc.type: FUNC
1032 * @tc.require:
1033 */
1034 HWTEST_F(MultimodalInputConnectStubTest, StubSetMouseHotSpot_001, TestSize.Level1)
1035 {
1036 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1037 MessageParcel data;
1038 MessageParcel reply;
1039 int32_t returnCode = 65142800;
1040 int32_t ret = stub->StubSetMouseHotSpot(data, reply);
1041 EXPECT_EQ(ret, returnCode);
1042 }
1043
1044 /**
1045 * @tc.name: StubGetMouseScrollRows_001
1046 * @tc.desc: Test the function StubGetMouseScrollRows
1047 * @tc.type: FUNC
1048 * @tc.require:
1049 */
1050 HWTEST_F(MultimodalInputConnectStubTest, StubGetMouseScrollRows_001, TestSize.Level1)
1051 {
1052 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1053 MessageParcel data;
1054 MessageParcel reply;
1055 int32_t returnCode = 65142800;
1056 int32_t ret = stub->StubGetMouseScrollRows(data, reply);
1057 EXPECT_EQ(ret, returnCode);
1058 }
1059
1060 /**
1061 * @tc.name: StubSetPointerSize_001
1062 * @tc.desc: Test the function StubSetPointerSize
1063 * @tc.type: FUNC
1064 * @tc.require:
1065 */
1066 HWTEST_F(MultimodalInputConnectStubTest, StubSetPointerSize_001, TestSize.Level1)
1067 {
1068 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1069 MessageParcel data;
1070 MessageParcel reply;
1071 int32_t returnCode = 65142800;
1072 int32_t ret = stub->StubSetPointerSize(data, reply);
1073 EXPECT_EQ(ret, returnCode);
1074 }
1075
1076 /**
1077 * @tc.name: StubSetNapStatus_001
1078 * @tc.desc: Test the function StubSetNapStatus
1079 * @tc.type: FUNC
1080 * @tc.require:
1081 */
1082 HWTEST_F(MultimodalInputConnectStubTest, StubSetNapStatus_001, TestSize.Level1)
1083 {
1084 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1085 MessageParcel data;
1086 MessageParcel reply;
1087 int32_t returnCode = 65142800;
1088 int32_t ret = stub->StubSetNapStatus(data, reply);
1089 EXPECT_EQ(ret, returnCode);
1090 }
1091
1092 /**
1093 * @tc.name: StubGetPointerSize_001
1094 * @tc.desc: Test the function StubGetPointerSize
1095 * @tc.type: FUNC
1096 * @tc.require:
1097 */
1098 HWTEST_F(MultimodalInputConnectStubTest, StubGetPointerSize_001, TestSize.Level1)
1099 {
1100 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1101 MessageParcel data;
1102 MessageParcel reply;
1103 int32_t returnCode = 65142800;
1104 int32_t ret = stub->StubGetPointerSize(data, reply);
1105 EXPECT_EQ(ret, returnCode);
1106 }
1107
1108 /**
1109 * @tc.name: MultimodalInputConnectStubTest_StubGetPointerSize_002
1110 * @tc.desc: Test the function StubGetPointerSize
1111 * @tc.type: FUNC
1112 * @tc.require:
1113 */
1114 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubGetPointerSize_002, TestSize.Level1)
1115 {
1116 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1117 MessageParcel data;
1118 MessageParcel reply;
1119 std::atomic<ServiceRunningState> state_ = ServiceRunningState::STATE_NOT_START;
1120 int32_t ret = stub->StubGetPointerSize(data, reply);
1121 EXPECT_EQ(ret, MMISERVICE_NOT_RUNNING);
1122 state_ = ServiceRunningState::STATE_RUNNING;
1123 ret = stub->StubGetPointerSize(data, reply);
1124 EXPECT_NE(ret, RET_OK);
1125 }
1126
1127 /**
1128 * @tc.name: MultimodalInputConnectStubTest_StubSetMousePrimaryButton_001
1129 * @tc.desc: Test the function StubSetMousePrimaryButton
1130 * @tc.type: FUNC
1131 * @tc.require:
1132 */
1133 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubSetMousePrimaryButton_001, TestSize.Level1)
1134 {
1135 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1136 MessageParcel data;
1137 MessageParcel reply;
1138 int32_t ret = stub->StubSetMousePrimaryButton(data, reply);
1139 EXPECT_NE(ret, RET_OK);
1140 }
1141
1142 /**
1143 * @tc.name: MultimodalInputConnectStubTest_StubGetMousePrimaryButton_001
1144 * @tc.desc: Test the function StubGetMousePrimaryButton
1145 * @tc.type: FUNC
1146 * @tc.require:
1147 */
1148 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubGetMousePrimaryButton_001, TestSize.Level1)
1149 {
1150 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1151 MessageParcel data;
1152 MessageParcel reply;
1153 int32_t ret = stub->StubGetMousePrimaryButton(data, reply);
1154 EXPECT_NE(ret, RET_ERR);
1155 }
1156
1157 /**
1158 * @tc.name: MultimodalInputConnectStubTest_StubSetHoverScrollState_001
1159 * @tc.desc: Test the function StubSetHoverScrollState
1160 * @tc.type: FUNC
1161 * @tc.require:
1162 */
1163 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubSetHoverScrollState_001, TestSize.Level1)
1164 {
1165 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1166 MessageParcel data;
1167 MessageParcel reply;
1168 int32_t ret = stub->StubSetHoverScrollState(data, reply);
1169 EXPECT_NE(ret, RET_OK);
1170 }
1171
1172 /**
1173 * @tc.name: MultimodalInputConnectStubTest_StubGetHoverScrollState_001
1174 * @tc.desc: Test the function StubGetHoverScrollState
1175 * @tc.type: FUNC
1176 * @tc.require:
1177 */
1178 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubGetHoverScrollState_001, TestSize.Level1)
1179 {
1180 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1181 MessageParcel data;
1182 MessageParcel reply;
1183 int32_t ret = stub->StubGetHoverScrollState(data, reply);
1184 EXPECT_NE(ret, RET_OK);
1185 }
1186
1187 /**
1188 * @tc.name: MultimodalInputConnectStubTest_StubSetPointerVisible_001
1189 * @tc.desc: Test the function StubSetPointerVisible
1190 * @tc.type: FUNC
1191 * @tc.require:
1192 */
1193 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubSetPointerVisible_001, TestSize.Level1)
1194 {
1195 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1196 MessageParcel data;
1197 MessageParcel reply;
1198 int32_t ret = stub->StubSetPointerVisible(data, reply);
1199 EXPECT_NE(ret, RET_OK);
1200 }
1201
1202 /**
1203 * @tc.name: MultimodalInputConnectStubTest_StubIsPointerVisible_001
1204 * @tc.desc: Test the function StubIsPointerVisible
1205 * @tc.type: FUNC
1206 * @tc.require:
1207 */
1208 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubIsPointerVisible_001, TestSize.Level1)
1209 {
1210 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1211 MessageParcel data;
1212 MessageParcel reply;
1213 int32_t ret = stub->StubIsPointerVisible(data, reply);
1214 EXPECT_NE(ret, RET_ERR);
1215 }
1216
1217 /**
1218 * @tc.name: MultimodalInputConnectStubTest_StubMarkProcessed_001
1219 * @tc.desc: Test the function StubMarkProcessed
1220 * @tc.type: FUNC
1221 * @tc.require:
1222 */
1223 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubMarkProcessed_001, TestSize.Level1)
1224 {
1225 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1226 MessageParcel data;
1227 MessageParcel reply;
1228 int32_t ret = stub->StubMarkProcessed(data, reply);
1229 EXPECT_NE(ret, RET_OK);
1230 }
1231
1232 /**
1233 * @tc.name: MultimodalInputConnectStubTest_StubSetPointerColor_001
1234 * @tc.desc: Test the function StubSetPointerColor
1235 * @tc.type: FUNC
1236 * @tc.require:
1237 */
1238 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubSetPointerColor_001, TestSize.Level1)
1239 {
1240 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1241 MessageParcel data;
1242 MessageParcel reply;
1243 std::atomic<ServiceRunningState> state_ = ServiceRunningState::STATE_NOT_START;
1244 int32_t ret = stub->StubSetPointerColor(data, reply);
1245 EXPECT_EQ(ret, MMISERVICE_NOT_RUNNING);
1246 state_ = ServiceRunningState::STATE_RUNNING;
1247 ret = stub->StubSetPointerColor(data, reply);
1248 EXPECT_NE(ret, RET_OK);
1249 }
1250
1251 /**
1252 * @tc.name: MultimodalInputConnectStubTest_StubGetPointerColor_001
1253 * @tc.desc: Test the function StubGetPointerColor
1254 * @tc.type: FUNC
1255 * @tc.require:
1256 */
1257 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubGetPointerColor_001, TestSize.Level1)
1258 {
1259 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1260 MessageParcel data;
1261 MessageParcel reply;
1262 std::atomic<ServiceRunningState> state_ = ServiceRunningState::STATE_NOT_START;
1263 int32_t ret = stub->StubGetPointerColor(data, reply);
1264 EXPECT_EQ(ret, MMISERVICE_NOT_RUNNING);
1265 state_ = ServiceRunningState::STATE_RUNNING;
1266 ret = stub->StubGetPointerColor(data, reply);
1267 EXPECT_NE(ret, RET_OK);
1268 }
1269
1270 /**
1271 * @tc.name: MultimodalInputConnectStubTest_StubSetPointerSpeed_001
1272 * @tc.desc: Test the function StubSetPointerSpeed
1273 * @tc.type: FUNC
1274 * @tc.require:
1275 */
1276 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubSetPointerSpeed_001, TestSize.Level1)
1277 {
1278 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1279 MessageParcel data;
1280 MessageParcel reply;
1281 int32_t ret = stub->StubSetPointerSpeed(data, reply);
1282 EXPECT_NE(ret, RET_OK);
1283 }
1284
1285 /**
1286 * @tc.name: MultimodalInputConnectStubTest_StubGetPointerSpeed_001
1287 * @tc.desc: Test the function StubGetPointerSpeed
1288 * @tc.type: FUNC
1289 * @tc.require:
1290 */
1291 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubGetPointerSpeed_001, TestSize.Level1)
1292 {
1293 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1294 MessageParcel data;
1295 MessageParcel reply;
1296 int32_t ret = stub->StubGetPointerSpeed(data, reply);
1297 EXPECT_EQ(ret, RET_ERR);
1298 }
1299
1300 /**
1301 * @tc.name: MultimodalInputConnectStubTest_StubNotifyNapOnline_001
1302 * @tc.desc: Test the function StubNotifyNapOnline
1303 * @tc.type: FUNC
1304 * @tc.require:
1305 */
1306 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubNotifyNapOnline_001, TestSize.Level1)
1307 {
1308 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1309 MessageParcel data;
1310 MessageParcel reply;
1311 int32_t ret = stub->StubNotifyNapOnline(data, reply);
1312 EXPECT_EQ(ret, RET_OK);
1313 }
1314
1315 /**
1316 * @tc.name: MultimodalInputConnectStubTest_StubRemoveInputEventObserver_001
1317 * @tc.desc: Test the function StubRemoveInputEventObserver
1318 * @tc.type: FUNC
1319 * @tc.require:
1320 */
1321 HWTEST_F(MultimodalInputConnectStubTest, StubRemoveInputEventObserver_001, TestSize.Level1)
1322 {
1323 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1324 MessageParcel data;
1325 MessageParcel reply;
1326 int32_t ret = stub->StubRemoveInputEventObserver(data, reply);
1327 EXPECT_EQ(ret, RET_OK);
1328 }
1329
1330 /**
1331 * @tc.name: MultimodalInputConnectStubTest_StubSetPointerStyle_001
1332 * @tc.desc: Test the function StubSetPointerStyle
1333 * @tc.type: FUNC
1334 * @tc.require:
1335 */
1336 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubSetPointerStyle_001, TestSize.Level1)
1337 {
1338 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1339 MessageParcel data;
1340 MessageParcel reply;
1341 int32_t ret = stub->StubSetPointerStyle(data, reply);
1342 EXPECT_EQ(ret, RET_ERR);
1343 }
1344
1345 /**
1346 * @tc.name: MultimodalInputConnectStubTest_StubClearWindowPointerStyle_001
1347 * @tc.desc: Test the function StubClearWindowPointerStyle
1348 * @tc.type: FUNC
1349 * @tc.require:
1350 */
1351 HWTEST_F(MultimodalInputConnectStubTest, StubClearWindowPointerStyle_001, TestSize.Level1)
1352 {
1353 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1354 MessageParcel data;
1355 MessageParcel reply;
1356 int32_t ret = stub->StubClearWindowPointerStyle(data, reply);
1357 EXPECT_EQ(ret, RET_ERR);
1358 }
1359
1360 /**
1361 * @tc.name: MultimodalInputConnectStubTest_StubGetPointerStyle_001
1362 * @tc.desc: Test the function StubGetPointerStyle
1363 * @tc.type: FUNC
1364 * @tc.require:
1365 */
1366 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubGetPointerStyle_001, TestSize.Level1)
1367 {
1368 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1369 MessageParcel data;
1370 MessageParcel reply;
1371 int32_t ret = stub->StubGetPointerStyle(data, reply);
1372 EXPECT_EQ(ret, RET_ERR);
1373 }
1374
1375 /**
1376 * @tc.name: MultimodalInputConnectStubTest_StubSupportKeys_001
1377 * @tc.desc: Test the function StubSupportKeys
1378 * @tc.type: FUNC
1379 * @tc.require:
1380 */
1381 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubSupportKeys_001, TestSize.Level1)
1382 {
1383 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1384 MessageParcel data;
1385 MessageParcel reply;
1386 int32_t ret = stub->StubSupportKeys(data, reply);
1387 EXPECT_NE(ret, RET_OK);
1388 }
1389 /**
1390 * @tc.name: StubGetDevice_001
1391 * @tc.desc: Test the function StubGetDevice
1392 * @tc.type: FUNC
1393 * @tc.require:
1394 */
1395 HWTEST_F(MultimodalInputConnectStubTest, StubGetDevice_001, TestSize.Level1)
1396 {
1397 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1398 MessageParcel data;
1399 MessageParcel reply;
1400 int32_t returnCode = 201;
1401 int32_t ret = stub->StubGetDevice(data, reply);
1402 EXPECT_EQ(ret, returnCode);
1403 }
1404
1405 /**
1406 * @tc.name: StubRegisterInputDeviceMonitor_001
1407 * @tc.desc: Test the function StubRegisterInputDeviceMonitor
1408 * @tc.type: FUNC
1409 * @tc.require:
1410 */
1411 HWTEST_F(MultimodalInputConnectStubTest, StubRegisterInputDeviceMonitor_001, TestSize.Level1)
1412 {
1413 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1414 MessageParcel data;
1415 MessageParcel reply;
1416 int32_t ret = stub->StubRegisterInputDeviceMonitor(data, reply);
1417 EXPECT_NE(ret, RET_ERR);
1418 }
1419
1420 /**
1421 * @tc.name: StubGetKeyboardType_001
1422 * @tc.desc: Test the function StubGetKeyboardType
1423 * @tc.type: FUNC
1424 * @tc.require:
1425 */
1426 HWTEST_F(MultimodalInputConnectStubTest, StubGetKeyboardType_001, TestSize.Level1)
1427 {
1428 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1429 MessageParcel data;
1430 MessageParcel reply;
1431 int32_t returnCode = 201;
1432 int32_t ret = stub->StubGetKeyboardType(data, reply);
1433 EXPECT_EQ(ret, returnCode);
1434 }
1435
1436 /**
1437 * @tc.name: StubAddInputHandler_001
1438 * @tc.desc: Test the function StubAddInputHandler
1439 * @tc.type: FUNC
1440 * @tc.require:
1441 */
1442 HWTEST_F(MultimodalInputConnectStubTest, StubAddInputHandler_001, TestSize.Level1)
1443 {
1444 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1445 MessageParcel data;
1446 MessageParcel reply;
1447 int32_t returnCode = 201;
1448 int32_t ret = stub->StubAddInputHandler(data, reply);
1449 EXPECT_EQ(ret, returnCode);
1450 }
1451
1452 /**
1453 * @tc.name: StubRemoveInputHandler_001
1454 * @tc.desc: Test the function StubRemoveInputHandler
1455 * @tc.type: FUNC
1456 * @tc.require:
1457 */
1458 HWTEST_F(MultimodalInputConnectStubTest, StubRemoveInputHandler_001, TestSize.Level1)
1459 {
1460 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1461 MessageParcel data;
1462 MessageParcel reply;
1463 int32_t returnCode = 201;
1464 int32_t ret = stub->StubRemoveInputHandler(data, reply);
1465 EXPECT_EQ(ret, returnCode);
1466 }
1467
1468 /**
1469 * @tc.name: StubMarkEventConsumed_001
1470 * @tc.desc: Test the function StubMarkEventConsumed
1471 * @tc.type: FUNC
1472 * @tc.require:
1473 */
1474 HWTEST_F(MultimodalInputConnectStubTest, StubMarkEventConsumed_001, TestSize.Level1)
1475 {
1476 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1477 MessageParcel data;
1478 MessageParcel reply;
1479 int32_t returnCode = 65142800;
1480 int32_t ret = stub->StubMarkEventConsumed(data, reply);
1481 EXPECT_EQ(ret, returnCode);
1482 }
1483
1484 /**
1485 * @tc.name: StubSubscribeKeyEvent_001
1486 * @tc.desc: Test the function StubSubscribeKeyEvent
1487 * @tc.type: FUNC
1488 * @tc.require:
1489 */
1490 HWTEST_F(MultimodalInputConnectStubTest, StubSubscribeKeyEvent_001, TestSize.Level1)
1491 {
1492 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1493 MessageParcel data;
1494 MessageParcel reply;
1495 int32_t returnCode = 65142800;
1496 int32_t ret = stub->StubSubscribeKeyEvent(data, reply);
1497 EXPECT_EQ(ret, returnCode);
1498 }
1499
1500 /**
1501 * @tc.name: StubUnsubscribeKeyEvent_001
1502 * @tc.desc: Test the function StubUnsubscribeKeyEvent
1503 * @tc.type: FUNC
1504 * @tc.require:
1505 */
1506 HWTEST_F(MultimodalInputConnectStubTest, StubUnsubscribeKeyEvent_001, TestSize.Level1)
1507 {
1508 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1509 MessageParcel data;
1510 MessageParcel reply;
1511 int32_t returnCode = 65142800;
1512 int32_t ret = stub->StubUnsubscribeKeyEvent(data, reply);
1513 EXPECT_EQ(ret, returnCode);
1514 }
1515
1516 /**
1517 * @tc.name: StubSubscribeSwitchEvent_001
1518 * @tc.desc: Test the function StubSubscribeSwitchEvent
1519 * @tc.type: FUNC
1520 * @tc.require:
1521 */
1522 HWTEST_F(MultimodalInputConnectStubTest, StubSubscribeSwitchEvent_001, TestSize.Level1)
1523 {
1524 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1525 MessageParcel data;
1526 MessageParcel reply;
1527 int32_t returnCode = 65142800;
1528 int32_t ret = stub->StubSubscribeSwitchEvent(data, reply);
1529 EXPECT_EQ(ret, returnCode);
1530 }
1531
1532 /**
1533 * @tc.name: StubUnsubscribeSwitchEvent_001
1534 * @tc.desc: Test the function StubUnsubscribeSwitchEvent
1535 * @tc.type: FUNC
1536 * @tc.require:
1537 */
1538 HWTEST_F(MultimodalInputConnectStubTest, StubUnsubscribeSwitchEvent_001, TestSize.Level1)
1539 {
1540 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1541 MessageParcel data;
1542 MessageParcel reply;
1543 int32_t returnCode = 65142800;
1544 int32_t ret = stub->StubUnsubscribeSwitchEvent(data, reply);
1545 EXPECT_EQ(ret, returnCode);
1546 }
1547
1548 /**
1549 * @tc.name: StubMoveMouseEvent_001
1550 * @tc.desc: Test the function StubMoveMouseEvent
1551 * @tc.type: FUNC
1552 * @tc.require:
1553 */
1554 HWTEST_F(MultimodalInputConnectStubTest, StubMoveMouseEvent_001, TestSize.Level1)
1555 {
1556 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1557 MessageParcel data;
1558 MessageParcel reply;
1559 int32_t returnCode = 65142800;
1560 int32_t ret = stub->StubMoveMouseEvent(data, reply);
1561 EXPECT_EQ(ret, returnCode);
1562 }
1563
1564 /**
1565 * @tc.name: StubInjectKeyEvent_001
1566 * @tc.desc: Test the function StubInjectKeyEvent
1567 * @tc.type: FUNC
1568 * @tc.require:
1569 */
1570 HWTEST_F(MultimodalInputConnectStubTest, StubInjectKeyEvent_001, TestSize.Level1)
1571 {
1572 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1573 MessageParcel data;
1574 MessageParcel reply;
1575 int32_t returnCode = 65142800;
1576 int32_t ret = stub->StubInjectKeyEvent(data, reply);
1577 EXPECT_EQ(ret, returnCode);
1578 }
1579
1580 /**
1581 * @tc.name: StubSetAnrListener_001
1582 * @tc.desc: Test the function StubSetAnrListener
1583 * @tc.type: FUNC
1584 * @tc.require:
1585 */
1586 HWTEST_F(MultimodalInputConnectStubTest, StubSetAnrListener_001, TestSize.Level1)
1587 {
1588 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1589 MessageParcel data;
1590 MessageParcel reply;
1591 int32_t returnCode = 65142800;
1592 int32_t ret = stub->StubSetAnrListener(data, reply);
1593 EXPECT_EQ(ret, returnCode);
1594 }
1595
1596 /**
1597 * @tc.name: StubGetDisplayBindInfo_001
1598 * @tc.desc: Test the function StubGetDisplayBindInfo
1599 * @tc.type: FUNC
1600 * @tc.require:
1601 */
1602 HWTEST_F(MultimodalInputConnectStubTest, StubGetDisplayBindInfo_001, TestSize.Level1)
1603 {
1604 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1605 MessageParcel data;
1606 MessageParcel reply;
1607 int32_t returnCode = 65142800;
1608 int32_t ret = stub->StubGetDisplayBindInfo(data, reply);
1609 EXPECT_EQ(ret, returnCode);
1610 }
1611
1612 /**
1613 * @tc.name: StubGetAllMmiSubscribedEvents_001
1614 * @tc.desc: Test the function StubGetAllMmiSubscribedEvents
1615 * @tc.type: FUNC
1616 * @tc.require:
1617 */
1618 HWTEST_F(MultimodalInputConnectStubTest, StubGetAllMmiSubscribedEvents_001, TestSize.Level1)
1619 {
1620 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1621 MessageParcel data;
1622 MessageParcel reply;
1623 int32_t returnCode = 65142800;
1624 int32_t ret = stub->StubGetAllMmiSubscribedEvents(data, reply);
1625 EXPECT_EQ(ret, returnCode);
1626 }
1627
1628 /**
1629 * @tc.name: StubSetDisplayBind_001
1630 * @tc.desc: Test the function StubSetDisplayBind
1631 * @tc.type: FUNC
1632 * @tc.require:
1633 */
1634 HWTEST_F(MultimodalInputConnectStubTest, StubSetDisplayBind_001, TestSize.Level1)
1635 {
1636 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1637 MessageParcel data;
1638 MessageParcel reply;
1639 int32_t returnCode = 65142800;
1640 int32_t ret = stub->StubSetDisplayBind(data, reply);
1641 EXPECT_EQ(ret, returnCode);
1642 }
1643
1644 /**
1645 * @tc.name: StubGetFunctionKeyState_001
1646 * @tc.desc: Test the function StubGetFunctionKeyState
1647 * @tc.type: FUNC
1648 * @tc.require:
1649 */
1650 HWTEST_F(MultimodalInputConnectStubTest, StubGetFunctionKeyState_001, TestSize.Level1)
1651 {
1652 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1653 MessageParcel data;
1654 MessageParcel reply;
1655 int32_t returnCode = 65142800;
1656 int32_t ret = stub->StubGetFunctionKeyState(data, reply);
1657 EXPECT_EQ(ret, returnCode);
1658 }
1659
1660 /**
1661 * @tc.name: StubSetFunctionKeyState_001
1662 * @tc.desc: Test the function StubSetFunctionKeyState
1663 * @tc.type: FUNC
1664 * @tc.require:
1665 */
1666 HWTEST_F(MultimodalInputConnectStubTest, StubSetFunctionKeyState_001, TestSize.Level1)
1667 {
1668 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1669 MessageParcel data;
1670 MessageParcel reply;
1671 int32_t returnCode = 65142800;
1672 int32_t ret = stub->StubSetFunctionKeyState(data, reply);
1673 EXPECT_EQ(ret, returnCode);
1674 }
1675
1676 /**
1677 * @tc.name: StubSetPointerLocation_001
1678 * @tc.desc: Test the function StubSetPointerLocation
1679 * @tc.type: FUNC
1680 * @tc.require:
1681 */
1682 HWTEST_F(MultimodalInputConnectStubTest, StubSetPointerLocation_001, TestSize.Level1)
1683 {
1684 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1685 MessageParcel data;
1686 MessageParcel reply;
1687 int32_t returnCode = 65142800;
1688 int32_t ret = stub->StubSetPointerLocation(data, reply);
1689 EXPECT_EQ(ret, returnCode);
1690 }
1691
1692 /**
1693 * @tc.name: StubSetMouseCaptureMode_001
1694 * @tc.desc: Test the function StubSetMouseCaptureMode
1695 * @tc.type: FUNC
1696 * @tc.require:
1697 */
1698 HWTEST_F(MultimodalInputConnectStubTest, StubSetMouseCaptureMode_001, TestSize.Level1)
1699 {
1700 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1701 MessageParcel data;
1702 MessageParcel reply;
1703 int32_t returnCode = 201;
1704 int32_t ret = stub->StubSetMouseCaptureMode(data, reply);
1705 EXPECT_EQ(ret, returnCode);
1706 }
1707
1708 /**
1709 * @tc.name: MultimodalInputConnectStubTest_StubGetWindowPid_001
1710 * @tc.desc: Test the function StubGetWindowPid
1711 * @tc.type: FUNC
1712 * @tc.require:
1713 */
1714 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubGetWindowPid_001, TestSize.Level1)
1715 {
1716 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1717 MessageParcel data;
1718 MessageParcel reply;
1719 std::atomic<ServiceRunningState> state = ServiceRunningState::STATE_NOT_START;
1720 int32_t ret = stub->StubGetWindowPid(data, reply);
1721 EXPECT_EQ(ret, MMISERVICE_NOT_RUNNING);
1722 state = ServiceRunningState::STATE_RUNNING;
1723 ret = stub->StubGetWindowPid(data, reply);
1724 EXPECT_NE(ret, RET_OK);
1725 }
1726
1727 /**
1728 * @tc.name: MultimodalInputConnectStubTest_StubAppendExtraData_001
1729 * @tc.desc: Test the function StubAppendExtraData
1730 * @tc.type: FUNC
1731 * @tc.require:
1732 */
1733 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubAppendExtraData_001, TestSize.Level1)
1734 {
1735 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1736 MessageParcel data;
1737 MessageParcel reply;
1738 std::atomic<ServiceRunningState> state = ServiceRunningState::STATE_NOT_START;
1739 int32_t ret = stub->StubAppendExtraData(data, reply);
1740 EXPECT_EQ(ret, MMISERVICE_NOT_RUNNING);
1741 state = ServiceRunningState::STATE_RUNNING;
1742 ret = stub->StubAppendExtraData(data, reply);
1743 EXPECT_NE(ret, RET_OK);
1744 }
1745
1746 /**
1747 * @tc.name: MultimodalInputConnectStubTest_StubEnableCombineKey_001
1748 * @tc.desc: Test the function StubEnableCombineKey
1749 * @tc.type: FUNC
1750 * @tc.require:
1751 */
1752 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubEnableCombineKey_001, TestSize.Level1)
1753 {
1754 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1755 MessageParcel data;
1756 MessageParcel reply;
1757 std::atomic<ServiceRunningState> state = ServiceRunningState::STATE_NOT_START;
1758 int32_t ret = stub->StubEnableCombineKey(data, reply);
1759 EXPECT_EQ(ret, MMISERVICE_NOT_RUNNING);
1760 state = ServiceRunningState::STATE_RUNNING;
1761 ret = stub->StubEnableCombineKey(data, reply);
1762 EXPECT_NE(ret, RET_OK);
1763 }
1764
1765 /**
1766 * @tc.name: MultimodalInputConnectStubTest_StubEnableInputDevice_001
1767 * @tc.desc: Test the function StubEnableInputDevice
1768 * @tc.type: FUNC
1769 * @tc.require:
1770 */
1771 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubEnableInputDevice_001, TestSize.Level1)
1772 {
1773 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1774 MessageParcel data;
1775 MessageParcel reply;
1776 std::atomic<ServiceRunningState> state = ServiceRunningState::STATE_NOT_START;
1777 int32_t ret = stub->StubEnableInputDevice(data, reply);
1778 EXPECT_EQ(ret, RET_OK);
1779 state = ServiceRunningState::STATE_RUNNING;
1780 ret = stub->StubEnableInputDevice(data, reply);
1781 EXPECT_EQ(ret, RET_OK);
1782 }
1783
1784 /**
1785 * @tc.name: MultimodalInputConnectStubTest_StubSetKeyDownDuration_001
1786 * @tc.desc: Test the function StubSetKeyDownDuration
1787 * @tc.type: FUNC
1788 * @tc.require:
1789 */
1790 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubSetKeyDownDuration_001, TestSize.Level1)
1791 {
1792 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1793 MessageParcel data;
1794 MessageParcel reply;
1795 std::atomic<ServiceRunningState> state = ServiceRunningState::STATE_NOT_START;
1796 int32_t ret = stub->StubSetKeyDownDuration(data, reply);
1797 EXPECT_EQ(ret, MMISERVICE_NOT_RUNNING);
1798 state = ServiceRunningState::STATE_RUNNING;
1799 ret = stub->StubSetKeyDownDuration(data, reply);
1800 EXPECT_NE(ret, RET_OK);
1801 }
1802
1803 /**
1804 * @tc.name: MultimodalInputConnectStubTest_VerifyTouchPadSetting_001
1805 * @tc.desc: Test the function VerifyTouchPadSetting
1806 * @tc.type: FUNC
1807 * @tc.require:
1808 */
1809 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_VerifyTouchPadSetting_001, TestSize.Level1)
1810 {
1811 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1812 std::atomic<ServiceRunningState> state = ServiceRunningState::STATE_NOT_START;
1813 int32_t ret = stub->VerifyTouchPadSetting();
1814 EXPECT_EQ(ret, MMISERVICE_NOT_RUNNING);
1815 state = ServiceRunningState::STATE_RUNNING;
1816 ret = stub->VerifyTouchPadSetting();
1817 EXPECT_NE(ret, RET_OK);
1818 }
1819
1820 /**
1821 * @tc.name: MultimodalInputConnectStubTest_StubSetTouchpadScrollSwitch_001
1822 * @tc.desc: Test the function StubSetTouchpadScrollSwitch
1823 * @tc.type: FUNC
1824 * @tc.require:
1825 */
1826 HWTEST_F(MultimodalInputConnectStubTest, StubSetTouchpadScrollSwitch_001, TestSize.Level1)
1827 {
1828 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1829 MessageParcel data;
1830 MessageParcel reply;
1831 int32_t ret = stub->StubSetTouchpadScrollSwitch(data, reply);
1832 EXPECT_NE(ret, RET_OK);
1833 }
1834
1835 /**
1836 * @tc.name: MultimodalInputConnectStubTest_StubGetTouchpadScrollSwitch_001
1837 * @tc.desc: Test the function StubGetTouchpadScrollSwitch
1838 * @tc.type: FUNC
1839 * @tc.require:
1840 */
1841 HWTEST_F(MultimodalInputConnectStubTest, StubGetTouchpadScrollSwitch_001, TestSize.Level1)
1842 {
1843 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1844 MessageParcel data;
1845 MessageParcel reply;
1846 int32_t ret = stub->StubGetTouchpadScrollSwitch(data, reply);
1847 EXPECT_NE(ret, RET_OK);
1848 }
1849
1850 /**
1851 * @tc.name: MultimodalInputConnectStubTest_StubSetTouchpadScrollDirection_001
1852 * @tc.desc: Test the function StubSetTouchpadScrollDirection
1853 * @tc.type: FUNC
1854 * @tc.require:
1855 */
1856 HWTEST_F(MultimodalInputConnectStubTest, StubSetTouchpadScrollDirection_001, TestSize.Level1)
1857 {
1858 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1859 MessageParcel data;
1860 MessageParcel reply;
1861 int32_t ret = stub->StubSetTouchpadScrollDirection(data, reply);
1862 EXPECT_NE(ret, RET_OK);
1863 }
1864
1865 /**
1866 * @tc.name: MultimodalInputConnectStubTest_StubGetTouchpadScrollDirection_001
1867 * @tc.desc: Test the function StubGetTouchpadScrollDirection
1868 * @tc.type: FUNC
1869 * @tc.require:
1870 */
1871 HWTEST_F(MultimodalInputConnectStubTest, StubGetTouchpadScrollDirection_001, TestSize.Level1)
1872 {
1873 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1874 MessageParcel data;
1875 MessageParcel reply;
1876 int32_t ret = stub->StubGetTouchpadScrollDirection(data, reply);
1877 EXPECT_NE(ret, RET_OK);
1878 }
1879
1880 /**
1881 * @tc.name: MultimodalInputConnectStubTest_StubSetTouchpadTapSwitch_001
1882 * @tc.desc: Test the function StubSetTouchpadTapSwitch
1883 * @tc.type: FUNC
1884 * @tc.require:
1885 */
1886 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubSetTouchpadTapSwitch_001, TestSize.Level1)
1887 {
1888 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1889 MessageParcel data;
1890 MessageParcel reply;
1891 int32_t ret = stub->StubSetTouchpadTapSwitch(data, reply);
1892 EXPECT_NE(ret, RET_OK);
1893 }
1894
1895 /**
1896 * @tc.name: MultimodalInputConnectStubTest_StubGetTouchpadTapSwitch_001
1897 * @tc.desc: Test the function StubGetTouchpadTapSwitch
1898 * @tc.type: FUNC
1899 * @tc.require:
1900 */
1901 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubGetTouchpadTapSwitch_001, TestSize.Level1)
1902 {
1903 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1904 MessageParcel data;
1905 MessageParcel reply;
1906 int32_t ret = stub->StubGetTouchpadTapSwitch(data, reply);
1907 EXPECT_NE(ret, RET_OK);
1908 }
1909
1910 /**
1911 * @tc.name: MultimodalInputConnectStubTest_StubSetTouchpadPointerSpeed_001
1912 * @tc.desc: Test the function StubSetTouchpadPointerSpeed
1913 * @tc.type: FUNC
1914 * @tc.require:
1915 */
1916 HWTEST_F(MultimodalInputConnectStubTest, StubSetTouchpadPointerSpeed_001, TestSize.Level1)
1917 {
1918 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1919 MessageParcel data;
1920 MessageParcel reply;
1921 int32_t ret = stub->StubSetTouchpadPointerSpeed(data, reply);
1922 EXPECT_NE(ret, RET_OK);
1923 }
1924
1925 /**
1926 * @tc.name: MultimodalInputConnectStubTest_StubGetTouchpadPointerSpeed_001
1927 * @tc.desc: Test the function StubGetTouchpadPointerSpeed
1928 * @tc.type: FUNC
1929 * @tc.require:
1930 */
1931 HWTEST_F(MultimodalInputConnectStubTest, StubGetTouchpadPointerSpeed_001, TestSize.Level1)
1932 {
1933 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1934 MessageParcel data;
1935 MessageParcel reply;
1936 int32_t ret = stub->StubGetTouchpadPointerSpeed(data, reply);
1937 EXPECT_NE(ret, RET_OK);
1938 }
1939
1940 /**
1941 * @tc.name: MultimodalInputConnectStubTest_StubSetKeyboardRepeatDelay_001
1942 * @tc.desc: Test the function StubSetKeyboardRepeatDelay
1943 * @tc.type: FUNC
1944 * @tc.require:
1945 */
1946 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubSetKeyboardRepeatDelay_001, TestSize.Level1)
1947 {
1948 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1949 MessageParcel data;
1950 MessageParcel reply;
1951 std::atomic<ServiceRunningState> state = ServiceRunningState::STATE_NOT_START;
1952 int32_t ret = stub->StubSetKeyboardRepeatDelay(data, reply);
1953 EXPECT_EQ(ret, MMISERVICE_NOT_RUNNING);
1954 state = ServiceRunningState::STATE_RUNNING;
1955 ret = stub->StubSetKeyboardRepeatDelay(data, reply);
1956 EXPECT_NE(ret, RET_OK);
1957 }
1958
1959 /**
1960 * @tc.name: MultimodalInputConnectStubTest_StubSetKeyboardRepeatRate_001
1961 * @tc.desc: Test the function StubSetKeyboardRepeatRate
1962 * @tc.type: FUNC
1963 * @tc.require:
1964 */
1965 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubSetKeyboardRepeatRate_001, TestSize.Level1)
1966 {
1967 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1968 MessageParcel data;
1969 MessageParcel reply;
1970 std::atomic<ServiceRunningState> state = ServiceRunningState::STATE_NOT_START;
1971 int32_t ret = stub->StubSetKeyboardRepeatRate(data, reply);
1972 EXPECT_EQ(ret, MMISERVICE_NOT_RUNNING);
1973 state = ServiceRunningState::STATE_RUNNING;
1974 ret = stub->StubSetKeyboardRepeatRate(data, reply);
1975 EXPECT_NE(ret, RET_OK);
1976 }
1977
1978 /**
1979 * @tc.name: MultimodalInputConnectStubTest_StubGetKeyboardRepeatDelay_001
1980 * @tc.desc: Test the function StubGetKeyboardRepeatDelay
1981 * @tc.type: FUNC
1982 * @tc.require:
1983 */
1984 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubGetKeyboardRepeatDelay_001, TestSize.Level1)
1985 {
1986 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1987 MessageParcel data;
1988 MessageParcel reply;
1989 std::atomic<ServiceRunningState> state = ServiceRunningState::STATE_NOT_START;
1990 int32_t ret = stub->StubGetKeyboardRepeatDelay(data, reply);
1991 EXPECT_EQ(ret, MMISERVICE_NOT_RUNNING);
1992 state = ServiceRunningState::STATE_RUNNING;
1993 ret = stub->StubGetKeyboardRepeatDelay(data, reply);
1994 EXPECT_NE(ret, RET_OK);
1995 }
1996
1997 /**
1998 * @tc.name: MultimodalInputConnectStubTest_StubGetKeyboardRepeatRate_001
1999 * @tc.desc: Test the function StubGetKeyboardRepeatRate
2000 * @tc.type: FUNC
2001 * @tc.require:
2002 */
2003 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubGetKeyboardRepeatRate_001, TestSize.Level1)
2004 {
2005 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
2006 MessageParcel data;
2007 MessageParcel reply;
2008 std::atomic<ServiceRunningState> state = ServiceRunningState::STATE_NOT_START;
2009 int32_t ret = stub->StubGetKeyboardRepeatRate(data, reply);
2010 EXPECT_EQ(ret, MMISERVICE_NOT_RUNNING);
2011 state = ServiceRunningState::STATE_RUNNING;
2012 ret = stub->StubGetKeyboardRepeatRate(data, reply);
2013 EXPECT_NE(ret, RET_OK);
2014 }
2015
2016 /**
2017 * @tc.name: MultimodalInputConnectStubTest_StubSetTouchpadPinchSwitch_001
2018 * @tc.desc: Test the function StubSetTouchpadPinchSwitch
2019 * @tc.type: FUNC
2020 * @tc.require:
2021 */
2022 HWTEST_F(MultimodalInputConnectStubTest, StubSetTouchpadPinchSwitch_001, TestSize.Level1)
2023 {
2024 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
2025 MessageParcel data;
2026 MessageParcel reply;
2027 int32_t ret = stub->StubSetTouchpadPinchSwitch(data, reply);
2028 EXPECT_NE(ret, RET_OK);
2029 }
2030
2031 /**
2032 * @tc.name: MultimodalInputConnectStubTest_StubGetTouchpadPinchSwitch_001
2033 * @tc.desc: Test the function StubGetTouchpadPinchSwitch
2034 * @tc.type: FUNC
2035 * @tc.require:
2036 */
2037 HWTEST_F(MultimodalInputConnectStubTest, StubGetTouchpadPinchSwitch_001, TestSize.Level1)
2038 {
2039 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
2040 MessageParcel data;
2041 MessageParcel reply;
2042 int32_t ret = stub->StubGetTouchpadPinchSwitch(data, reply);
2043 EXPECT_NE(ret, RET_OK);
2044 }
2045
2046 /**
2047 * @tc.name: MultimodalInputConnectStubTest_StubSetTouchpadSwipeSwitch_001
2048 * @tc.desc: Test the function StubSetTouchpadSwipeSwitch
2049 * @tc.type: FUNC
2050 * @tc.require:
2051 */
2052 HWTEST_F(MultimodalInputConnectStubTest, StubSetTouchpadSwipeSwitch_001, TestSize.Level1)
2053 {
2054 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
2055 MessageParcel data;
2056 MessageParcel reply;
2057 int32_t ret = stub->StubSetTouchpadSwipeSwitch(data, reply);
2058 EXPECT_NE(ret, RET_OK);
2059 }
2060
2061 /**
2062 * @tc.name: MultimodalInputConnectStubTest_StubGetTouchpadSwipeSwitch_001
2063 * @tc.desc: Test the function StubGetTouchpadSwipeSwitch
2064 * @tc.type: FUNC
2065 * @tc.require:
2066 */
2067 HWTEST_F(MultimodalInputConnectStubTest, StubGetTouchpadSwipeSwitch_001, TestSize.Level1)
2068 {
2069 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
2070 MessageParcel data;
2071 MessageParcel reply;
2072 int32_t ret = stub->StubGetTouchpadSwipeSwitch(data, reply);
2073 EXPECT_NE(ret, RET_OK);
2074 }
2075
2076 /**
2077 * @tc.name: MultimodalInputConnectStubTest_StubSetTouchpadRightClickType_001
2078 * @tc.desc: Test the function StubSetTouchpadRightClickType
2079 * @tc.type: FUNC
2080 * @tc.require:
2081 */
2082 HWTEST_F(MultimodalInputConnectStubTest, StubSetTouchpadRightClickType_001, TestSize.Level1)
2083 {
2084 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
2085 MessageParcel data;
2086 MessageParcel reply;
2087 int32_t ret = stub->StubSetTouchpadRightClickType(data, reply);
2088 EXPECT_NE(ret, RET_OK);
2089 }
2090
2091 /**
2092 * @tc.name: MultimodalInputConnectStubTest_StubGetTouchpadRightClickType_001
2093 * @tc.desc: Test the function StubGetTouchpadRightClickType
2094 * @tc.type: FUNC
2095 * @tc.require:
2096 */
2097 HWTEST_F(MultimodalInputConnectStubTest, StubGetTouchpadRightClickType_001, TestSize.Level1)
2098 {
2099 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
2100 MessageParcel data;
2101 MessageParcel reply;
2102 int32_t ret = stub->StubGetTouchpadRightClickType(data, reply);
2103 EXPECT_NE(ret, RET_OK);
2104 }
2105
2106 /**
2107 * @tc.name: MultimodalInputConnectStubTest_StubSetTouchpadRotateSwitch_001
2108 * @tc.desc: Test the function StubSetTouchpadRotateSwitch
2109 * @tc.type: FUNC
2110 * @tc.require:
2111 */
2112 HWTEST_F(MultimodalInputConnectStubTest, StubSetTouchpadRotateSwitch_001, TestSize.Level1)
2113 {
2114 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
2115 MessageParcel data;
2116 MessageParcel reply;
2117 int32_t ret = stub->StubSetTouchpadRotateSwitch(data, reply);
2118 EXPECT_NE(ret, RET_OK);
2119 }
2120
2121 /**
2122 * @tc.name: MultimodalInputConnectStubTest_StubGetTouchpadRotateSwitch_001
2123 * @tc.desc: Test the function StubGetTouchpadRotateSwitch
2124 * @tc.type: FUNC
2125 * @tc.require:
2126 */
2127 HWTEST_F(MultimodalInputConnectStubTest, StubGetTouchpadRotateSwitch_001, TestSize.Level1)
2128 {
2129 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
2130 MessageParcel data;
2131 MessageParcel reply;
2132 int32_t ret = stub->StubGetTouchpadRotateSwitch(data, reply);
2133 EXPECT_NE(ret, RET_OK);
2134 }
2135
2136 /**
2137 * @tc.name: MultimodalInputConnectStubTest_StubSetShieldStatus_001
2138 * @tc.desc: Test the function StubSetShieldStatus
2139 * @tc.type: FUNC
2140 * @tc.require:
2141 */
2142 HWTEST_F(MultimodalInputConnectStubTest, StubSetShieldStatus_001, TestSize.Level1)
2143 {
2144 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
2145 MessageParcel data;
2146 MessageParcel reply;
2147 int32_t ret = stub->StubSetShieldStatus(data, reply);
2148 EXPECT_NE(ret, RET_OK);
2149 }
2150
2151 /**
2152 * @tc.name: MultimodalInputConnectStubTest_StubSetShieldStatus_001
2153 * @tc.desc: Test the function StubSetShieldStatus
2154 * @tc.type: FUNC
2155 * @tc.require:
2156 */
2157 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubSetShieldStatus_001, TestSize.Level1)
2158 {
2159 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
2160 MessageParcel data;
2161 MessageParcel reply;
2162 std::atomic<ServiceRunningState> state = ServiceRunningState::STATE_NOT_START;
2163 int32_t ret = stub->StubSetShieldStatus(data, reply);
2164 EXPECT_EQ(ret, MMISERVICE_NOT_RUNNING);
2165 state = ServiceRunningState::STATE_RUNNING;
2166 ret = stub->StubSetShieldStatus(data, reply);
2167 EXPECT_NE(ret, RET_OK);
2168 }
2169
2170 /**
2171 * @tc.name: MultimodalInputConnectStubTest_StubGetShieldStatus_001
2172 * @tc.desc: Test the function StubGetShieldStatus
2173 * @tc.type: FUNC
2174 * @tc.require:
2175 */
2176 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubGetShieldStatus_001, TestSize.Level1)
2177 {
2178 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
2179 MessageParcel data;
2180 MessageParcel reply;
2181 std::atomic<ServiceRunningState> state = ServiceRunningState::STATE_NOT_START;
2182 int32_t ret = stub->StubGetShieldStatus(data, reply);
2183 EXPECT_EQ(ret, MMISERVICE_NOT_RUNNING);
2184 state = ServiceRunningState::STATE_RUNNING;
2185 ret = stub->StubGetShieldStatus(data, reply);
2186 EXPECT_NE(ret, RET_OK);
2187 }
2188
2189 /**
2190 * @tc.name: MultimodalInputConnectStubTest_StubGetKeyState_001
2191 * @tc.desc: Test the function StubGetKeyState
2192 * @tc.type: FUNC
2193 * @tc.require:
2194 */
2195 HWTEST_F(MultimodalInputConnectStubTest, StubGetKeyState_001, TestSize.Level1)
2196 {
2197 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
2198 MessageParcel data;
2199 MessageParcel reply;
2200 int32_t ret = stub->StubGetKeyState(data, reply);
2201 EXPECT_EQ(ret, RET_ERR);
2202 }
2203
2204 /**
2205 * @tc.name: MultimodalInputConnectStubTest_StubAuthorize_001
2206 * @tc.desc: Test the function StubAuthorize
2207 * @tc.type: FUNC
2208 * @tc.require:
2209 */
2210 HWTEST_F(MultimodalInputConnectStubTest, StubAuthorize_001, TestSize.Level1)
2211 {
2212 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
2213 MessageParcel data;
2214 MessageParcel reply;
2215 int32_t ret = stub->StubAuthorize(data, reply);
2216 EXPECT_NE(ret, RET_OK);
2217 }
2218
2219 /**
2220 * @tc.name: MultimodalInputConnectStubTest_StubCancelInjection_001
2221 * @tc.desc: Test the function StubCancelInjection
2222 * @tc.type: FUNC
2223 * @tc.require:
2224 */
2225 HWTEST_F(MultimodalInputConnectStubTest, StubCancelInjection_001, TestSize.Level1)
2226 {
2227 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
2228 MessageParcel data;
2229 MessageParcel reply;
2230 int32_t ret = stub->StubCancelInjection(data, reply);
2231 EXPECT_NE(ret, RET_OK);
2232 }
2233
2234 /**
2235 * @tc.name: MultimodalInputConnectStubTest_StubHasIrEmitter_001
2236 * @tc.desc: Test the function StubHasIrEmitter
2237 * @tc.type: FUNC
2238 * @tc.require:
2239 */
2240 HWTEST_F(MultimodalInputConnectStubTest, StubHasIrEmitter_001, TestSize.Level1)
2241 {
2242 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
2243 MessageParcel data;
2244 MessageParcel reply;
2245 int32_t ret = stub->StubHasIrEmitter(data, reply);
2246 EXPECT_NE(ret, RET_OK);
2247 }
2248
2249 /**
2250 * @tc.name: MultimodalInputConnectStubTest_StubGetInfraredFrequencies_001
2251 * @tc.desc: Test the function StubGetInfraredFrequencies
2252 * @tc.type: FUNC
2253 * @tc.require:
2254 */
2255 HWTEST_F(MultimodalInputConnectStubTest, StubGetInfraredFrequencies_001, TestSize.Level1)
2256 {
2257 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
2258 MessageParcel data;
2259 MessageParcel reply;
2260 int32_t ret = stub->StubGetInfraredFrequencies(data, reply);
2261 EXPECT_NE(ret, RET_OK);
2262 }
2263
2264 /**
2265 * @tc.name: MultimodalInputConnectStubTest_StubTransmitInfrared_001
2266 * @tc.desc: Test the function StubTransmitInfrared
2267 * @tc.type: FUNC
2268 * @tc.require:
2269 */
2270 HWTEST_F(MultimodalInputConnectStubTest, StubTransmitInfrared_001, TestSize.Level1)
2271 {
2272 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
2273 MessageParcel data;
2274 MessageParcel reply;
2275 int32_t ret = stub->StubTransmitInfrared(data, reply);
2276 EXPECT_NE(ret, RET_OK);
2277 }
2278
2279 /**
2280 * @tc.name: MultimodalInputConnectStubTest_StubSetPixelMapData_001
2281 * @tc.desc: Test the function StubSetPixelMapData
2282 * @tc.type: FUNC
2283 * @tc.require:
2284 */
2285 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubSetPixelMapData_001, TestSize.Level1)
2286 {
2287 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
2288 MessageParcel data;
2289 MessageParcel reply;
2290 std::atomic<ServiceRunningState> state = ServiceRunningState::STATE_NOT_START;
2291 int32_t ret = stub->StubSetPixelMapData(data, reply);
2292 EXPECT_EQ(ret, MMISERVICE_NOT_RUNNING);
2293 state = ServiceRunningState::STATE_RUNNING;
2294 ret = stub->StubSetPixelMapData(data, reply);
2295 EXPECT_NE(ret, RET_OK);
2296 }
2297
2298 /**
2299 * @tc.name: MultimodalInputConnectStubTest_StubSetCurrentUser_001
2300 * @tc.desc: Test the function StubSetCurrentUser
2301 * @tc.type: FUNC
2302 * @tc.require:
2303 */
2304 HWTEST_F(MultimodalInputConnectStubTest, StubSetCurrentUser_001, TestSize.Level1)
2305 {
2306 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
2307 MessageParcel data;
2308 MessageParcel reply;
2309 int32_t ret = stub->StubSetCurrentUser(data, reply);
2310 EXPECT_NE(ret, RET_OK);
2311 }
2312
2313 /**
2314 * @tc.name: StubHandleAllocSocketFd_002
2315 * @tc.desc: Test the function StubHandleAllocSocketFd
2316 * @tc.type: FUNC
2317 * @tc.require:
2318 */
2319 HWTEST_F(MultimodalInputConnectStubTest, StubHandleAllocSocketFd_002, TestSize.Level1)
2320 {
2321 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
2322 MessageParcel data;
2323 MessageParcel reply;
2324 std::atomic<ServiceRunningState> state_ = ServiceRunningState::STATE_NOT_START;
2325 int32_t ret = stub->StubHandleAllocSocketFd(data, reply);
2326 EXPECT_EQ(ret, MMISERVICE_NOT_RUNNING);
2327 state_ = ServiceRunningState::STATE_RUNNING;
2328 ret = stub->StubHandleAllocSocketFd(data, reply);
2329 EXPECT_NE(ret, RET_OK);
2330 }
2331
2332 /**
2333 * @tc.name: StubSetMouseScrollRows_002
2334 * @tc.desc: Test the function StubSetMouseScrollRows
2335 * @tc.type: FUNC
2336 * @tc.require:
2337 */
2338 HWTEST_F(MultimodalInputConnectStubTest, StubSetMouseScrollRows_002, TestSize.Level1)
2339 {
2340 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
2341 MessageParcel data;
2342 MessageParcel reply;
2343 std::atomic<ServiceRunningState> state_ = ServiceRunningState::STATE_NOT_START;
2344 int32_t ret = stub->StubSetMouseScrollRows(data, reply);
2345 EXPECT_EQ(ret, MMISERVICE_NOT_RUNNING);
2346 state_ = ServiceRunningState::STATE_RUNNING;
2347 ret = stub->StubSetMouseScrollRows(data, reply);
2348 EXPECT_NE(ret, RET_OK);
2349 }
2350
2351 /**
2352 * @tc.name: StubSetCustomCursor_002
2353 * @tc.desc: Test the function StubSetCustomCursor
2354 * @tc.type: FUNC
2355 * @tc.require:
2356 */
2357 HWTEST_F(MultimodalInputConnectStubTest, StubSetCustomCursor_002, TestSize.Level1)
2358 {
2359 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
2360 MessageParcel data;
2361 MessageParcel reply;
2362 std::atomic<ServiceRunningState> state_ = ServiceRunningState::STATE_NOT_START;
2363 int32_t ret = stub->StubSetCustomCursor(data, reply);
2364 EXPECT_EQ(ret, MMISERVICE_NOT_RUNNING);
2365 state_ = ServiceRunningState::STATE_RUNNING;
2366 ret = stub->StubSetCustomCursor(data, reply);
2367 EXPECT_NE(ret, RET_OK);
2368 }
2369
2370 /**
2371 * @tc.name: StubSetMouseIcon_002
2372 * @tc.desc: Test the function StubSetMouseIcon
2373 * @tc.type: FUNC
2374 * @tc.require:
2375 */
2376 HWTEST_F(MultimodalInputConnectStubTest, StubSetMouseIcon_002, TestSize.Level1)
2377 {
2378 std::shared_ptr<MultimodalInputConnectStub>stub = std::make_shared<MMIService>();
2379 MessageParcel data;
2380 MessageParcel reply;
2381 std::atomic<ServiceRunningState> state_ = ServiceRunningState::STATE_NOT_START;
2382 int32_t ret = stub->StubSetMouseIcon(data, reply);
2383 EXPECT_EQ(ret, MMISERVICE_NOT_RUNNING);
2384 state_ = ServiceRunningState::STATE_RUNNING;
2385 ret = stub->StubSetMouseIcon(data, reply);
2386 EXPECT_NE(ret, RET_OK);
2387 }
2388
2389 /**
2390 * @tc.name: StubSetMouseHotSpot_002
2391 * @tc.desc: Test the function StubSetMouseHotSpot
2392 * @tc.type: FUNC
2393 * @tc.require:
2394 */
2395 HWTEST_F(MultimodalInputConnectStubTest, StubSetMouseHotSpot_002, TestSize.Level1)
2396 {
2397 std::shared_ptr<MultimodalInputConnectStub>stub = std::make_shared<MMIService>();
2398 MessageParcel data;
2399 MessageParcel reply;
2400 std::atomic<ServiceRunningState> state_ = ServiceRunningState::STATE_NOT_START;
2401 int32_t ret = stub->StubSetMouseHotSpot(data, reply);
2402 EXPECT_EQ(ret, MMISERVICE_NOT_RUNNING);
2403 state_ = ServiceRunningState::STATE_RUNNING;
2404 ret = stub->StubSetMouseHotSpot(data, reply);
2405 EXPECT_NE(ret, RET_OK);
2406 }
2407
2408 /**
2409 * @tc.name: StubGetMouseScrollRows_002
2410 * @tc.desc: Test the function StubGetMouseScrollRows
2411 * @tc.type: FUNC
2412 * @tc.require:
2413 */
2414 HWTEST_F(MultimodalInputConnectStubTest, StubGetMouseScrollRows_002, TestSize.Level1)
2415 {
2416 std::shared_ptr<MultimodalInputConnectStub>stub = std::make_shared<MMIService>();
2417 MessageParcel data;
2418 MessageParcel reply;
2419 std::atomic<ServiceRunningState> state_ = ServiceRunningState::STATE_NOT_START;
2420 int32_t ret = stub->StubGetMouseScrollRows(data, reply);
2421 EXPECT_EQ(ret, MMISERVICE_NOT_RUNNING);
2422 state_ = ServiceRunningState::STATE_RUNNING;
2423 ret = stub->StubGetMouseScrollRows(data, reply);
2424 EXPECT_NE(ret, RET_OK);
2425 }
2426
2427 /**
2428 * @tc.name: StubSetPointerSize_002
2429 * @tc.desc: Test the function StubSetPointerSize
2430 * @tc.type: FUNC
2431 * @tc.require:
2432 */
2433 HWTEST_F(MultimodalInputConnectStubTest, StubSetPointerSize_002, TestSize.Level1)
2434 {
2435 std::shared_ptr<MultimodalInputConnectStub>stub = std::make_shared<MMIService>();
2436 MessageParcel data;
2437 MessageParcel reply;
2438 std::atomic<ServiceRunningState> state_ = ServiceRunningState::STATE_NOT_START;
2439 int32_t ret = stub->StubSetPointerSize(data, reply);
2440 EXPECT_EQ(ret, MMISERVICE_NOT_RUNNING);
2441 state_ = ServiceRunningState::STATE_RUNNING;
2442 ret = stub->StubSetPointerSize(data, reply);
2443 EXPECT_NE(ret, RET_OK);
2444 }
2445
2446 /**
2447 * @tc.name: StubSetNapStatus_002
2448 * @tc.desc: Test the function StubSetNapStatus
2449 * @tc.type: FUNC
2450 * @tc.require:
2451 */
2452 HWTEST_F(MultimodalInputConnectStubTest, StubSetNapStatus_002, TestSize.Level1)
2453 {
2454 std::shared_ptr<MultimodalInputConnectStub>stub = std::make_shared<MMIService>();
2455 MessageParcel data;
2456 MessageParcel reply;
2457 std::atomic<ServiceRunningState> state_ = ServiceRunningState::STATE_NOT_START;
2458 int32_t ret = stub->StubSetNapStatus(data, reply);
2459 EXPECT_EQ(ret, MMISERVICE_NOT_RUNNING);
2460 state_ = ServiceRunningState::STATE_RUNNING;
2461 ret = stub->StubSetNapStatus(data, reply);
2462 EXPECT_NE(ret, RET_OK);
2463 }
2464
2465 /**
2466 * @tc.name: StubInjectKeyEvent_002
2467 * @tc.desc: Test the function StubInjectKeyEvent
2468 * @tc.type: FUNC
2469 * @tc.require:
2470 */
2471 HWTEST_F(MultimodalInputConnectStubTest, StubInjectKeyEvent_002, TestSize.Level1)
2472 {
2473 std::shared_ptr<MultimodalInputConnectStub>stub = std::make_shared<MMIService>();
2474 MessageParcel data;
2475 MessageParcel reply;
2476 std::atomic<ServiceRunningState> state_ = ServiceRunningState::STATE_NOT_START;
2477 int32_t ret = stub->StubInjectKeyEvent(data, reply);
2478 EXPECT_EQ(ret, MMISERVICE_NOT_RUNNING);
2479 state_ = ServiceRunningState::STATE_RUNNING;
2480 ret = stub->StubInjectKeyEvent(data, reply);
2481 EXPECT_NE(ret, RET_OK);
2482 }
2483
2484 /**
2485 * @tc.name: StubInjectPointerEvent_001
2486 * @tc.desc: Test the function StubInjectPointerEvent
2487 * @tc.type: FUNC
2488 * @tc.require:
2489 */
2490 HWTEST_F(MultimodalInputConnectStubTest, StubInjectPointerEvent_001, TestSize.Level1)
2491 {
2492 std::shared_ptr<MultimodalInputConnectStub>stub = std::make_shared<MMIService>();
2493 MessageParcel data;
2494 MessageParcel reply;
2495 std::atomic<ServiceRunningState> state_ = ServiceRunningState::STATE_NOT_START;
2496 int32_t ret = stub->StubInjectPointerEvent(data, reply);
2497 EXPECT_EQ(ret, MMISERVICE_NOT_RUNNING);
2498 state_ = ServiceRunningState::STATE_RUNNING;
2499 ret = stub->StubInjectPointerEvent(data, reply);
2500 EXPECT_NE(ret, RET_OK);
2501 }
2502
2503 /**
2504 * @tc.name: StubSetTouchpadScrollRows_001
2505 * @tc.desc: Test the function StubSetTouchpadScrollRows
2506 * @tc.type: FUNC
2507 * @tc.require:
2508 */
2509 HWTEST_F(MultimodalInputConnectStubTest, StubSetTouchpadScrollRows_001, TestSize.Level1)
2510 {
2511 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
2512 MessageParcel data;
2513 MessageParcel reply;
2514 int32_t returnCode = 65142800;
2515 int32_t ret = stub->StubSetTouchpadScrollRows(data, reply);
2516 EXPECT_EQ(ret, returnCode);
2517 }
2518
2519 /**
2520 * @tc.name: StubSetTouchpadScrollRows_002
2521 * @tc.desc: Test the function StubSetTouchpadScrollRows
2522 * @tc.type: FUNC
2523 * @tc.require:
2524 */
2525 HWTEST_F(MultimodalInputConnectStubTest, StubSetTouchpadScrollRows_002, TestSize.Level1)
2526 {
2527 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
2528 MessageParcel data;
2529 MessageParcel reply;
2530 std::atomic<ServiceRunningState> state_ = ServiceRunningState::STATE_NOT_START;
2531 int32_t ret = stub->StubSetTouchpadScrollRows(data, reply);
2532 EXPECT_EQ(ret, MMISERVICE_NOT_RUNNING);
2533 state_ = ServiceRunningState::STATE_RUNNING;
2534 ret = stub->StubSetTouchpadScrollRows(data, reply);
2535 EXPECT_NE(ret, RET_OK);
2536 }
2537
2538 /**
2539 * @tc.name: StubGetTouchpadScrollRows_001
2540 * @tc.desc: Test the function StubGetTouchpadScrollRows
2541 * @tc.type: FUNC
2542 * @tc.require:
2543 */
2544 HWTEST_F(MultimodalInputConnectStubTest, StubGetTouchpadScrollRows_001, TestSize.Level1)
2545 {
2546 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
2547 MessageParcel data;
2548 MessageParcel reply;
2549 int32_t returnCode = 65142800;
2550 int32_t ret = stub->StubGetTouchpadScrollRows(data, reply);
2551 EXPECT_EQ(ret, returnCode);
2552 }
2553
2554 /**
2555 * @tc.name: StubGetTouchpadScrollRows_002
2556 * @tc.desc: Test the function StubGetTouchpadScrollRows
2557 * @tc.type: FUNC
2558 * @tc.require:
2559 */
2560 HWTEST_F(MultimodalInputConnectStubTest, StubGetTouchpadScrollRows_002, TestSize.Level1)
2561 {
2562 std::shared_ptr<MultimodalInputConnectStub>stub = std::make_shared<MMIService>();
2563 MessageParcel data;
2564 MessageParcel reply;
2565 std::atomic<ServiceRunningState> state_ = ServiceRunningState::STATE_NOT_START;
2566 int32_t ret = stub->StubGetTouchpadScrollRows(data, reply);
2567 EXPECT_EQ(ret, MMISERVICE_NOT_RUNNING);
2568 state_ = ServiceRunningState::STATE_RUNNING;
2569 ret = stub->StubGetTouchpadScrollRows(data, reply);
2570 EXPECT_NE(ret, RET_OK);
2571 }
2572
2573 /**
2574 * @tc.name: StubAddInputEventFilter_111
2575 * @tc.desc: Test the function StubAddInputEventFilter
2576 * @tc.type: FUNC
2577 * @tc.require:
2578 */
2579 HWTEST_F(MultimodalInputConnectStubTest, StubAddInputEventFilter_111, TestSize.Level1)
2580 {
2581 SetPermission(SYSTEM_BASIC, g_basics, sizeof(g_basics) / sizeof(g_basics[0]));
2582 std::shared_ptr<MultimodalInputConnectStub>stub = std::make_shared<MMIService>();
2583 MessageParcel data;
2584 MessageParcel reply;
2585 int32_t ret = stub->StubAddInputEventFilter(data, reply);
2586 int32_t returnCode = -201;
2587 EXPECT_EQ(ret, returnCode);
2588 }
2589
2590 /**
2591 * @tc.name: StubRemoveInputEventFilter_111
2592 * @tc.desc: Test the function StubRemoveInputEventFilter
2593 * @tc.type: FUNC
2594 * @tc.require:
2595 */
2596 HWTEST_F(MultimodalInputConnectStubTest, StubRemoveInputEventFilter_111, TestSize.Level1)
2597 {
2598 SetPermission(SYSTEM_BASIC, g_basics, sizeof(g_basics) / sizeof(g_basics[0]));
2599 std::shared_ptr<MultimodalInputConnectStub>stub = std::make_shared<MMIService>();
2600 MessageParcel data;
2601 MessageParcel reply;
2602 int32_t ret = stub->StubRemoveInputEventFilter(data, reply);
2603 int32_t returnCode = -201;
2604 EXPECT_EQ(ret, returnCode);
2605 }
2606
2607 /**
2608 * @tc.name: StubSetPointerLocation_111
2609 * @tc.desc: Test the function StubSetPointerLocation
2610 * @tc.type: FUNC
2611 * @tc.require:
2612 */
2613 HWTEST_F(MultimodalInputConnectStubTest, StubSetPointerLocation_111, TestSize.Level1)
2614 {
2615 SetPermission(SYSTEM_BASIC, g_basics, sizeof(g_basics) / sizeof(g_basics[0]));
2616 std::shared_ptr<MultimodalInputConnectStub>stub = std::make_shared<MMIService>();
2617 MessageParcel data;
2618 MessageParcel reply;
2619 int32_t ret = stub->StubSetPointerLocation(data, reply);
2620 int32_t returnCode = -201;
2621 EXPECT_EQ(ret, returnCode);
2622 }
2623
2624 /**
2625 * @tc.name: StubAuthorize_111
2626 * @tc.desc: Test the function StubAuthorize
2627 * @tc.type: FUNC
2628 * @tc.require:
2629 */
2630 HWTEST_F(MultimodalInputConnectStubTest, StubAuthorize_111, TestSize.Level1)
2631 {
2632 SetPermission(SYSTEM_BASIC, g_basics, sizeof(g_basics) / sizeof(g_basics[0]));
2633 std::shared_ptr<MultimodalInputConnectStub>stub = std::make_shared<MMIService>();
2634 MessageParcel data;
2635 MessageParcel reply;
2636 int32_t ret = stub->StubAuthorize(data, reply);
2637 int32_t returnCode = -201;
2638 EXPECT_EQ(ret, returnCode);
2639 }
2640
2641 /**
2642 * @tc.name: StubSetCurrentUser_111
2643 * @tc.desc: Test the function StubSetCurrentUser
2644 * @tc.type: FUNC
2645 * @tc.require:
2646 */
2647 HWTEST_F(MultimodalInputConnectStubTest, StubSetCurrentUser_111, TestSize.Level1)
2648 {
2649 std::shared_ptr<MultimodalInputConnectStub>stub = std::make_shared<MMIService>();
2650 MessageParcel data;
2651 MessageParcel reply;
2652 int32_t userId = 100;
2653 data.WriteInt32(userId);
2654 int32_t returnCode = -1;
2655 int32_t ret = stub->StubSetCurrentUser(data, reply);
2656 EXPECT_EQ(ret, returnCode);
2657 }
2658
2659 /**
2660 * @tc.name: StubSetInputDeviceInputEnable_001
2661 * @tc.desc: Test the function StubSetInputDeviceInputEnable
2662 * @tc.type: FUNC
2663 * @tc.require:
2664 */
2665 HWTEST_F(MultimodalInputConnectStubTest, StubSetInputDeviceInputEnable_001, TestSize.Level1)
2666 {
2667 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
2668 MessageParcel data;
2669 MessageParcel reply;
2670 MessageOption option;
2671 int32_t returnCode = 65142800;
2672 uint32_t code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SET_INPUT_DEVICE_ENABLE);
2673 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
2674 int32_t ret = stub->OnRemoteRequest(code, data, reply, option);
2675 EXPECT_EQ(ret, returnCode);
2676 }
2677
2678 /**
2679 * @tc.name: StubShiftAppPointerEvent_001
2680 * @tc.desc: Test the function StubShiftAppPointerEvent
2681 * @tc.type: FUNC
2682 * @tc.require:
2683 */
2684 HWTEST_F(MultimodalInputConnectStubTest, StubShiftAppPointerEvent_001, TestSize.Level1)
2685 {
2686 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
2687 MessageParcel data;
2688 MessageParcel reply;
2689 MessageOption option;
2690 int32_t returnCode = MMISERVICE_NOT_RUNNING;
2691 uint32_t code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SHIFT_APP_POINTER_EVENT);
2692 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
2693 int32_t ret = stub->OnRemoteRequest(code, data, reply, option);
2694 EXPECT_EQ(ret, returnCode);
2695 }
2696
2697 /**
2698 * @tc.name: StubAddPreInputHandler_001
2699 * @tc.desc: Test the function StubShiftAppPointerEvent
2700 * @tc.type: FUNC
2701 * @tc.require:
2702 */
2703 HWTEST_F(MultimodalInputConnectStubTest, StubAddPreInputHandler_001, TestSize.Level1)
2704 {
2705 std::shared_ptr<MultimodalInputConnectStub>stub = std::make_shared<MMIService>();
2706 MessageParcel data;
2707 MessageParcel reply;
2708 int32_t handlerId = 0;
2709 data.WriteInt32(handlerId);
2710 int32_t eventType = 0;
2711 data.WriteInt32(eventType);
2712 int32_t keysLen = 0;
2713 data.WriteInt32(keysLen);
2714 EXPECT_NO_FATAL_FAILURE(stub->StubAddPreInputHandler(data, reply));
2715 }
2716
2717 /**
2718 * @tc.name: StubAddPreInputHandler_002
2719 * @tc.desc: Test the function StubShiftAppPointerEvent
2720 * @tc.type: FUNC
2721 * @tc.require:
2722 */
2723 HWTEST_F(MultimodalInputConnectStubTest, StubAddPreInputHandler_002, TestSize.Level1)
2724 {
2725 std::shared_ptr<MultimodalInputConnectStub>stub = std::make_shared<MMIService>();
2726 MessageParcel data;
2727 MessageParcel reply;
2728 int32_t handlerId = 0;
2729 data.WriteInt32(handlerId);
2730 int32_t eventType = 0;
2731 data.WriteInt32(eventType);
2732 int32_t keysLen = 6;
2733 data.WriteInt32(keysLen);
2734 EXPECT_NO_FATAL_FAILURE(stub->StubAddPreInputHandler(data, reply));
2735 }
2736
2737 /**
2738 * @tc.name: StubAddPreInputHandler_003
2739 * @tc.desc: Test the function StubShiftAppPointerEvent
2740 * @tc.type: FUNC
2741 * @tc.require:
2742 */
2743 HWTEST_F(MultimodalInputConnectStubTest, StubAddPreInputHandler_003, TestSize.Level1)
2744 {
2745 std::shared_ptr<MultimodalInputConnectStub>stub = std::make_shared<MMIService>();
2746 MessageParcel data;
2747 MessageParcel reply;
2748 int32_t handlerId = 0;
2749 data.WriteInt32(handlerId);
2750 int32_t eventType = 0;
2751 data.WriteInt32(eventType);
2752 int32_t keysLen = 4;
2753 data.WriteInt32(keysLen);
2754 EXPECT_NO_FATAL_FAILURE(stub->StubAddPreInputHandler(data, reply));
2755 }
2756
2757 /**
2758 * @tc.name: MultimodalInputConnectStubTest_OnRemoteRequest_013
2759 * @tc.desc: Test the function OnRemoteRequest
2760 * @tc.type: FUNC
2761 * @tc.require:
2762 */
2763 HWTEST_F(MultimodalInputConnectStubTest, OnRemoteRequest_013, TestSize.Level1)
2764 {
2765 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
2766 MessageParcel data;
2767 MessageParcel reply;
2768 MessageOption option;
2769 uint32_t code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::ADD_PRE_INPUT_HANDLER);
2770 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
2771 int32_t ret = stub->OnRemoteRequest(code, data, reply, option);
2772 int32_t temp = stub->StubSetTouchpadScrollRows(data, reply);
2773 EXPECT_EQ(ret, temp);
2774 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::REMOVE_PRE_INPUT_HANDLER);
2775 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
2776 ret = stub->OnRemoteRequest(code, data, reply, option);
2777 temp = stub->StubGetTouchpadScrollRows(data, reply);
2778 EXPECT_EQ(ret, temp);
2779 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SET_DOUBLE_TAP_DRAG_STATE);
2780 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
2781 ret = stub->OnRemoteRequest(code, data, reply, option);
2782 temp = stub->StubGetTouchpadScrollRows(data, reply);
2783 EXPECT_EQ(ret, temp);
2784 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::GET_DOUBLE_TAP_DRAG_STATE);
2785 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
2786 ret = stub->OnRemoteRequest(code, data, reply, option);
2787 temp = stub->StubGetTouchpadScrollRows(data, reply);
2788 EXPECT_EQ(ret, temp);
2789 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::GET_CURSOR_SURFACE_ID);
2790 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
2791 ret = stub->OnRemoteRequest(code, data, reply, option);
2792 temp = stub->StubGetTouchpadScrollRows(data, reply);
2793 EXPECT_EQ(ret, temp);
2794 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SUBSCRIBE_LONG_PRESS);
2795 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
2796 ret = stub->OnRemoteRequest(code, data, reply, option);
2797 temp = stub->StubGetTouchpadScrollRows(data, reply);
2798 EXPECT_EQ(ret, temp);
2799 }
2800
2801 /**
2802 * @tc.name: MultimodalInputConnectStubTest_OnRemoteRequest_014
2803 * @tc.desc: Test the function OnRemoteRequest
2804 * @tc.type: FUNC
2805 * @tc.require:
2806 */
2807 HWTEST_F(MultimodalInputConnectStubTest, OnRemoteRequest_014, TestSize.Level1)
2808 {
2809 std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
2810 MessageParcel data;
2811 MessageParcel reply;
2812 MessageOption option;
2813 uint32_t code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::UNSUBSCRIBE_LONG_PRESS);
2814 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
2815 int32_t ret = stub->OnRemoteRequest(code, data, reply, option);
2816 int32_t temp = stub->StubSetTouchpadScrollRows(data, reply);
2817 EXPECT_EQ(ret, temp);
2818 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SET_CUSTOM_MOUSE_CURSOR);
2819 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
2820 ret = stub->OnRemoteRequest(code, data, reply, option);
2821 temp = stub->StubGetTouchpadScrollRows(data, reply);
2822 EXPECT_EQ(ret, temp);
2823 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SET_MUILT_WINDOW_SCREEN_ID);
2824 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
2825 ret = stub->OnRemoteRequest(code, data, reply, option);
2826 temp = stub->StubSetMultiWindowScreenId(data, reply);
2827 EXPECT_EQ(ret, temp);
2828 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SUBSCRIBE_KEY_MONITOR);
2829 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
2830 ret = stub->OnRemoteRequest(code, data, reply, option);
2831 temp = stub->StubSubscribeKeyMonitor(data, reply);
2832 EXPECT_EQ(ret, temp);
2833 code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::UNSUBSCRIBE_KEY_MONITOR);
2834 data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
2835 ret = stub->OnRemoteRequest(code, data, reply, option);
2836 temp = stub->StubUnsubscribeKeyMonitor(data, reply);
2837 EXPECT_EQ(ret, temp);
2838 }
2839 } // namespace MMI
2840 } // namespace OHOS