1 /*
2 * Copyright (c) 2022-2022 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 "window_manager_proxy.h"
18 #include "window_manager_stub_impl.h"
19 #include "iremote_object_mocker.h"
20 #include <rs_window_animation_target.h>
21
22 using namespace testing;
23 using namespace testing::ext;
24 namespace OHOS {
25 namespace Rosen {
26 class WindowManagerProxyTest : public testing::Test {
27 public:
28 static void SetUpTestCase();
29 static void TearDownTestCase();
30 void SetUp() override;
31 void TearDown() override;
32 sptr<WindowManagerStubImpl> mockWindowManagerStub_;
33 sptr<WindowManagerProxy> windowManagerProxy_;
34 };
35
SetUpTestCase()36 void WindowManagerProxyTest::SetUpTestCase()
37 {
38 }
39
TearDownTestCase()40 void WindowManagerProxyTest::TearDownTestCase()
41 {
42 }
43
SetUp()44 void WindowManagerProxyTest::SetUp()
45 {
46 mockWindowManagerStub_ = new WindowManagerStubImpl();
47 windowManagerProxy_ = new WindowManagerProxy(mockWindowManagerStub_);
48 }
49
TearDown()50 void WindowManagerProxyTest::TearDown()
51 {
52 }
53
54 namespace {
55 /**
56 * @tc.name: RequestFocus
57 * @tc.desc: test success
58 * @tc.type: FUNC
59 */
60 HWTEST_F(WindowManagerProxyTest, RequestFocus, Function | SmallTest | Level2)
61 {
62 uint32_t windowId = 0;
63 WMError err = windowManagerProxy_->RequestFocus(windowId);
64 ASSERT_EQ(err, WMError::WM_OK);
65 }
66
67 /**
68 * @tc.name: SetWindowAnimationController
69 * @tc.desc: test failed
70 * @tc.type: FUNC
71 */
72 HWTEST_F(WindowManagerProxyTest, SetWindowAnimationController, Function | SmallTest | Level2)
73 {
74 sptr<RSIWindowAnimationController> controller = nullptr;
75 WMError err = windowManagerProxy_->SetWindowAnimationController(controller);
76 ASSERT_EQ(err, WMError::WM_ERROR_IPC_FAILED);
77 }
78
79 /**
80 * @tc.name: SetWindowAnimationController01
81 * @tc.desc: test success
82 * @tc.type: FUNC
83 */
84 HWTEST_F(WindowManagerProxyTest, SetWindowAnimationController01, Function | SmallTest | Level2)
85 {
86 sptr<IRemoteObject> iRemoteObjectMocker = new IRemoteObjectMocker();
87 sptr<RSIWindowAnimationController> controller = iface_cast<RSIWindowAnimationController>(iRemoteObjectMocker);
88 WMError err = windowManagerProxy_->SetWindowAnimationController(controller);
89 ASSERT_EQ(err, WMError::WM_OK);
90 }
91
92 /**
93 * @tc.name: ToggleShownStateForAllAppWindows
94 * @tc.desc: test success
95 * @tc.type: FUNC
96 */
97 HWTEST_F(WindowManagerProxyTest, ToggleShownStateForAllAppWindows, Function | SmallTest | Level2)
98 {
99 WMError err = windowManagerProxy_->ToggleShownStateForAllAppWindows();
100 ASSERT_EQ(err, WMError::WM_OK);
101 }
102
103 /**
104 * @tc.name: GetTopWindowId
105 * @tc.desc: test success
106 * @tc.type: FUNC
107 */
108 HWTEST_F(WindowManagerProxyTest, GetTopWindowId, Function | SmallTest | Level2)
109 {
110 uint32_t mainWinId = 0;
111 uint32_t topWinId;
112 WMError err = windowManagerProxy_->GetTopWindowId(mainWinId, topWinId);
113 ASSERT_EQ(err, WMError::WM_OK);
114 }
115
116 /**
117 * @tc.name: NotifyWindowTransition
118 * @tc.desc: test success
119 * @tc.type: FUNC
120 */
121 HWTEST_F(WindowManagerProxyTest, NotifyWindowTransition, Function | SmallTest | Level2)
122 {
123 sptr<WindowTransitionInfo> from = new WindowTransitionInfo();
124 sptr<WindowTransitionInfo> to = new WindowTransitionInfo();
125 bool isFromClient = false;
126 WMError err = windowManagerProxy_->NotifyWindowTransition(from, to, isFromClient);
127 ASSERT_EQ(err, WMError::WM_OK);
128 }
129
130 /**
131 * @tc.name: GetModeChangeHotZones
132 * @tc.desc: test success
133 * @tc.type: FUNC
134 */
135 HWTEST_F(WindowManagerProxyTest, GetModeChangeHotZones, Function | SmallTest | Level2)
136 {
137 DisplayId displayId = 10;
138 ModeChangeHotZones hotZones;
139 WMError err = windowManagerProxy_->GetModeChangeHotZones(displayId, hotZones);
140 ASSERT_EQ(err, WMError::WM_OK);
141 }
142
143 /**
144 * @tc.name: MinimizeWindowsByLauncher
145 * @tc.desc: test success
146 * @tc.type: FUNC
147 */
148 HWTEST_F(WindowManagerProxyTest, MinimizeWindowsByLauncher, Function | SmallTest | Level2)
149 {
150 std::vector<uint32_t> windowIds;
151 bool isAnimated = false;
152 sptr<RSIWindowAnimationFinishedCallback> finishCallback;
153 windowManagerProxy_->MinimizeWindowsByLauncher(windowIds, isAnimated, finishCallback);
154 ASSERT_EQ(finishCallback, nullptr);
155 }
156
157 /**
158 * @tc.name: MinimizeWindowsByLauncher01
159 * @tc.desc: test success
160 * @tc.type: FUNC
161 */
162 HWTEST_F(WindowManagerProxyTest, MinimizeWindowsByLauncher01, Function | SmallTest | Level2)
163 {
164 std::vector<uint32_t> windowIds;
165 windowIds.push_back(0);
166 windowIds.push_back(1);
167 bool isAnimated = false;
168 sptr<RSIWindowAnimationFinishedCallback> finishCallback;
169 windowManagerProxy_->MinimizeWindowsByLauncher(windowIds, isAnimated, finishCallback);
170 ASSERT_EQ(finishCallback, nullptr);
171 }
172
173 /**
174 * @tc.name: UpdateRsTree
175 * @tc.desc: test success
176 * @tc.type: FUNC
177 */
178 HWTEST_F(WindowManagerProxyTest, UpdateRsTree, Function | SmallTest | Level2)
179 {
180 uint32_t windowId = 0;
181 bool isAdd = false;
182 WMError err = windowManagerProxy_->UpdateRsTree(windowId, isAdd);
183 ASSERT_EQ(err, WMError::WM_OK);
184 }
185
186 /**
187 * @tc.name: BindDialogTarget
188 * @tc.desc: test success
189 * @tc.type: FUNC
190 */
191 HWTEST_F(WindowManagerProxyTest, BindDialogTarget, Function | SmallTest | Level2)
192 {
193 uint32_t windowId = 0;
194 sptr<IRemoteObject> targetToken = nullptr;
195 WMError err = windowManagerProxy_->BindDialogTarget(windowId, targetToken);
196 ASSERT_EQ(err, WMError::WM_OK);
197 }
198
199 /**
200 * @tc.name: BindDialogTarget01
201 * @tc.desc: test success
202 * @tc.type: FUNC
203 */
204 HWTEST_F(WindowManagerProxyTest, BindDialogTarget01, Function | SmallTest | Level2)
205 {
206 uint32_t windowId = 0;
207 sptr<IRemoteObject> targetToken = nullptr;
208 WMError err = windowManagerProxy_->BindDialogTarget(windowId, targetToken);
209 ASSERT_EQ(err, WMError::WM_OK);
210 }
211
212 /**
213 * @tc.name: GetVisibilityWindowInfo01
214 * @tc.desc: test success
215 * @tc.type: FUNC
216 */
217 HWTEST_F(WindowManagerProxyTest, GetVisibilityWindowInfo01, Function | SmallTest | Level2)
218 {
219 std::vector<sptr<WindowVisibilityInfo>> infos;
220 WMError err = windowManagerProxy_->GetVisibilityWindowInfo(infos);
221 ASSERT_EQ(err, WMError::WM_OK);
222 }
223
224 /**
225 * @tc.name: GetWindowAnimationTargets01
226 * @tc.desc: test success
227 * @tc.type: FUNC
228 */
229 HWTEST_F(WindowManagerProxyTest, GetWindowAnimationTargets01, Function | SmallTest | Level2)
230 {
231 std::vector<uint32_t> missionIds;
232 missionIds.push_back(0);
233 missionIds.push_back(1);
234 std::vector<sptr<RSWindowAnimationTarget>> targets;
235 WMError err = windowManagerProxy_->GetWindowAnimationTargets(missionIds, targets);
236 ASSERT_EQ(err, WMError::WM_OK);
237 }
238
239 /**
240 * @tc.name: RemoveWindow
241 * @tc.desc: test success
242 * @tc.type: FUNC
243 */
244 HWTEST_F(WindowManagerProxyTest, RemoveWindow, Function | SmallTest | Level2)
245 {
246 uint32_t windowId = 0;
247 bool isFromInnerkits = true;
248 WMError err = windowManagerProxy_->RemoveWindow(windowId, isFromInnerkits);
249 EXPECT_NE(err, static_cast<WMError>(1));
250 }
251
252 /**
253 * @tc.name: DestroyWindow
254 * @tc.desc: test success
255 * @tc.type: FUNC
256 */
257 HWTEST_F(WindowManagerProxyTest, DestroyWindow, Function | SmallTest | Level2)
258 {
259 uint32_t windowId = 0;
260 bool isFromInnerkits = true;
261 WMError err = windowManagerProxy_->DestroyWindow(windowId, isFromInnerkits);
262 EXPECT_NE(err, static_cast<WMError>(1));
263 }
264
265 /**
266 * @tc.name: GetAvoidAreaByType
267 * @tc.desc: test success
268 * @tc.type: FUNC
269 */
270 HWTEST_F(WindowManagerProxyTest, GetAvoidAreaByType, Function | SmallTest | Level2)
271 {
272 uint32_t windowId = 0;
273 AvoidAreaType type = AvoidAreaType::TYPE_SYSTEM;
274 AvoidArea avoidArea;
275 AvoidArea err = windowManagerProxy_->GetAvoidAreaByType(windowId, type);
276 EXPECT_EQ(err, avoidArea);
277 }
278
279 /**
280 * @tc.name: RegisterWindowManagerAgent
281 * @tc.desc: test success
282 * @tc.type: FUNC
283 */
284 HWTEST_F(WindowManagerProxyTest, RegisterWindowManagerAgent, Function | SmallTest | Level2)
285 {
286 MessageParcel reply;
287 sptr<IWindowManagerAgent> windowManagerAgent = new WindowManagerAgent();
288 WindowManagerAgentType type = WindowManagerAgentType::WINDOW_MANAGER_AGENT_TYPE_FOCUS;
289 WMError err = windowManagerProxy_->RegisterWindowManagerAgent(type, windowManagerAgent);
290 EXPECT_EQ(err, static_cast<WMError>(reply.ReadInt32()));
291 }
292
293 /**
294 * @tc.name: UnregisterWindowManagerAgent
295 * @tc.desc: test success
296 * @tc.type: FUNC
297 */
298 HWTEST_F(WindowManagerProxyTest, UnregisterWindowManagerAgent, Function | SmallTest | Level2)
299 {
300 MessageParcel reply;
301 sptr<IWindowManagerAgent> windowManagerAgent = new WindowManagerAgent();
302 WindowManagerAgentType type = WindowManagerAgentType::WINDOW_MANAGER_AGENT_TYPE_FOCUS;
303 WMError err = windowManagerProxy_->UnregisterWindowManagerAgent(type, windowManagerAgent);
304 EXPECT_EQ(err, static_cast<WMError>(reply.ReadInt32()));
305 }
306
307 /**
308 * @tc.name: NotifyServerReadyToMoveOrDrag
309 * @tc.desc: test success
310 * @tc.type: FUNC
311 */
312 HWTEST_F(WindowManagerProxyTest, NotifyServerReadyToMoveOrDrag, Function | SmallTest | Level2)
313 {
314 uint32_t windowId = 0;
315 sptr<WindowProperty> windowProperty;
316 sptr<MoveDragProperty> moveDragProperty;
317 MessageParcel reply;
318 sptr<IWindowManagerAgent> windowManagerAgent = new WindowManagerAgent();
319 WindowManagerAgentType type = WindowManagerAgentType::WINDOW_MANAGER_AGENT_TYPE_FOCUS;
320 windowManagerProxy_->NotifyServerReadyToMoveOrDrag(windowId, windowProperty, moveDragProperty);
321 WMError err = windowManagerProxy_->UnregisterWindowManagerAgent(type, windowManagerAgent);
322 EXPECT_EQ(err, static_cast<WMError>(reply.ReadInt32()));
323 }
324
325 /**
326 * @tc.name: ProcessPointDown
327 * @tc.desc: test success
328 * @tc.type: FUNC
329 */
330 HWTEST_F(WindowManagerProxyTest, ProcessPointDown, Function | SmallTest | Level2)
331 {
332 uint32_t windowId = 0;
333 bool isPointDown = true;
334 MessageParcel reply;
335 sptr<IWindowManagerAgent> windowManagerAgent = new WindowManagerAgent();
336 WindowManagerAgentType type = WindowManagerAgentType::WINDOW_MANAGER_AGENT_TYPE_FOCUS;
337 windowManagerProxy_->ProcessPointDown(windowId, isPointDown);
338 WMError err = windowManagerProxy_->UnregisterWindowManagerAgent(type, windowManagerAgent);
339 EXPECT_EQ(err, static_cast<WMError>(reply.ReadInt32()));
340 }
341
342 /**
343 * @tc.name: ProcessPointUp
344 * @tc.desc: test success
345 * @tc.type: FUNC
346 */
347 HWTEST_F(WindowManagerProxyTest, ProcessPointUp, Function | SmallTest | Level2)
348 {
349 uint32_t windowId = 0;
350 MessageParcel reply;
351 sptr<IWindowManagerAgent> windowManagerAgent = new WindowManagerAgent();
352 WindowManagerAgentType type = WindowManagerAgentType::WINDOW_MANAGER_AGENT_TYPE_FOCUS;
353 windowManagerProxy_->ProcessPointUp(windowId);
354 WMError err = windowManagerProxy_->UnregisterWindowManagerAgent(type, windowManagerAgent);
355 EXPECT_EQ(err, static_cast<WMError>(reply.ReadInt32()));
356 }
357
358 /**
359 * @tc.name: MinimizeAllAppWindows
360 * @tc.desc: test success
361 * @tc.type: FUNC
362 */
363 HWTEST_F(WindowManagerProxyTest, MinimizeAllAppWindows, Function | SmallTest | Level2)
364 {
365 DisplayId displayId = 0;
366 WMError err = windowManagerProxy_->MinimizeAllAppWindows(displayId);
367 EXPECT_EQ(err, WMError::WM_OK);
368 }
369
370 /**
371 * @tc.name: SetWindowLayoutMode
372 * @tc.desc: test success
373 * @tc.type: FUNC
374 */
375 HWTEST_F(WindowManagerProxyTest, SetWindowLayoutMode, Function | SmallTest | Level2)
376 {
377 WindowLayoutMode mode = WindowLayoutMode::BASE;
378 MessageParcel reply;
379 WMError err = windowManagerProxy_->SetWindowLayoutMode(mode);
380 EXPECT_EQ(err, static_cast<WMError>(reply.ReadInt32()));
381 }
382
383 /**
384 * @tc.name: UpdateProperty
385 * @tc.desc: test success
386 * @tc.type: FUNC
387 */
388 HWTEST_F(WindowManagerProxyTest, UpdateProperty, Function | SmallTest | Level2)
389 {
390 sptr<WindowProperty> windowProperty = new WindowProperty();
391 PropertyChangeAction action = PropertyChangeAction::ACTION_UPDATE_RECT;
392 bool isAsyncTask = true;
393 MessageParcel reply;
394 WMError err = windowManagerProxy_->UpdateProperty(windowProperty, action, isAsyncTask);
395 EXPECT_EQ(err, static_cast<WMError>(reply.ReadInt32()));
396 }
397
398 /**
399 * @tc.name: SetWindowGravity
400 * @tc.desc: test success
401 * @tc.type: FUNC
402 */
403 HWTEST_F(WindowManagerProxyTest, SetWindowGravity, Function | SmallTest | Level2)
404 {
405 uint32_t windowId = 1;
406 WindowGravity gravity = WindowGravity::WINDOW_GRAVITY_FLOAT;
407 uint32_t percent = 1;
408 MessageParcel reply;
409 WMError err = windowManagerProxy_->SetWindowGravity(windowId, gravity, percent);
410 EXPECT_EQ(err, static_cast<WMError>(reply.ReadInt32()));
411 }
412
413 /**
414 * @tc.name: GetSystemConfig
415 * @tc.desc: test success
416 * @tc.type: FUNC
417 */
418 HWTEST_F(WindowManagerProxyTest, GetSystemConfig, Function | SmallTest | Level2)
419 {
420 SystemConfig systemConfig;
421 MessageParcel reply;
422 WMError err = windowManagerProxy_->GetSystemConfig(systemConfig);
423 EXPECT_EQ(err, static_cast<WMError>(reply.ReadInt32()));
424 }
425
426 /**
427 * @tc.name: UpdateAvoidAreaListener
428 * @tc.desc: test success
429 * @tc.type: FUNC
430 */
431 HWTEST_F(WindowManagerProxyTest, UpdateAvoidAreaListener, Function | SmallTest | Level2)
432 {
433 uint32_t windowId = 0;
434 bool haveListener = true;
435 MessageParcel reply;
436 WMError err = windowManagerProxy_->UpdateAvoidAreaListener(windowId, haveListener);
437 EXPECT_EQ(err, static_cast<WMError>(reply.ReadInt32()));
438 }
439
440 /**
441 * @tc.name: SetAnchorAndScale
442 * @tc.desc: test success
443 * @tc.type: FUNC
444 */
445 HWTEST_F(WindowManagerProxyTest, SetAnchorAndScale, Function | SmallTest | Level2)
446 {
447 int32_t x = 0;
448 int32_t y = 1;
449 float scale = 1.1;
450 MessageParcel reply;
451 SystemConfig systemConfig;
452 windowManagerProxy_->SetAnchorAndScale(x, y, scale);
453 WMError err = windowManagerProxy_->GetSystemConfig(systemConfig);
454 EXPECT_EQ(err, static_cast<WMError>(reply.ReadInt32()));
455 }
456
457 /**
458 * @tc.name: SetAnchorOffset
459 * @tc.desc: test success
460 * @tc.type: FUNC
461 */
462 HWTEST_F(WindowManagerProxyTest, SetAnchorOffset, Function | SmallTest | Level2)
463 {
464 int32_t deltaX = 0;
465 int32_t deltaY = 1;
466 SystemConfig systemConfig;
467 MessageParcel reply;
468 windowManagerProxy_->SetAnchorOffset(deltaX, deltaY);
469 WMError err = windowManagerProxy_->GetSystemConfig(systemConfig);
470 EXPECT_EQ(err, static_cast<WMError>(reply.ReadInt32()));
471 }
472
473 /**
474 * @tc.name: OffWindowZoom
475 * @tc.desc: test success
476 * @tc.type: FUNC
477 */
478 HWTEST_F(WindowManagerProxyTest, OffWindowZoom, Function | SmallTest | Level2)
479 {
480 SystemConfig systemConfig;
481 MessageParcel reply;
482 windowManagerProxy_->OffWindowZoom();
483 WMError err = windowManagerProxy_->GetSystemConfig(systemConfig);
484 EXPECT_EQ(err, static_cast<WMError>(reply.ReadInt32()));
485 }
486
487 /**
488 * @tc.name: RaiseToAppTop
489 * @tc.desc: test success
490 * @tc.type: FUNC
491 */
492 HWTEST_F(WindowManagerProxyTest, RaiseToAppTop, Function | SmallTest | Level2)
493 {
494 uint32_t windowId = 0;
495 WmErrorCode err = windowManagerProxy_->RaiseToAppTop(windowId);
496 EXPECT_EQ(err, WmErrorCode::WM_OK);
497 }
498
499 /**
500 * @tc.name: GetSnapshot
501 * @tc.desc: test success
502 * @tc.type: FUNC
503 */
504 HWTEST_F(WindowManagerProxyTest, GetSnapshot, Function | SmallTest | Level2)
505 {
506 uint32_t windowId = 0;
507 Media::InitializationOptions opts;
508 opts.size.width = 200;
509 opts.size.height = 300;
510 std::shared_ptr<Media::PixelMap> pixelMap(Media::PixelMap::Create(opts).release());
511 auto res = windowManagerProxy_->GetSnapshot(windowId);
512 EXPECT_NE(res, pixelMap);
513 }
514
515 /**
516 * @tc.name: SetGestureNavigaionEnabled
517 * @tc.desc: test success
518 * @tc.type: FUNC
519 */
520 HWTEST_F(WindowManagerProxyTest, SetGestureNavigaionEnabled, Function | SmallTest | Level2)
521 {
522 bool enable = true;
523 MessageParcel reply;
524 WMError err = windowManagerProxy_->SetGestureNavigaionEnabled(enable);
525 EXPECT_EQ(err, static_cast<WMError>(reply.ReadInt32()));
526 }
527
528 /**
529 * @tc.name: DispatchKeyEvent
530 * @tc.desc: test success
531 * @tc.type: FUNC
532 */
533 HWTEST_F(WindowManagerProxyTest, DispatchKeyEvent, Function | SmallTest | Level2)
534 {
535 uint32_t windowId = 0;
536 std::shared_ptr<MMI::KeyEvent> event = MMI::KeyEvent::Create();
537 SystemConfig systemConfig;
538 MessageParcel reply;
539 windowManagerProxy_->DispatchKeyEvent(windowId, event);
540 WMError err = windowManagerProxy_->GetSystemConfig(systemConfig);
541 EXPECT_EQ(err, static_cast<WMError>(reply.ReadInt32()));
542 }
543
544 /**
545 * @tc.name: NotifyDumpInfoResult
546 * @tc.desc: test success
547 * @tc.type: FUNC
548 */
549 HWTEST_F(WindowManagerProxyTest, NotifyDumpInfoResult, Function | SmallTest | Level2)
550 {
551 std::vector<std::string> info;
552 string windowName = "windowName";
553 info.push_back(windowName);
554 SystemConfig systemConfig;
555 MessageParcel reply;
556 windowManagerProxy_->NotifyDumpInfoResult(info);
557 WMError err = windowManagerProxy_->GetSystemConfig(systemConfig);
558 EXPECT_EQ(err, static_cast<WMError>(reply.ReadInt32()));
559 }
560
561 /**
562 * @tc.name: SetMaximizeMode
563 * @tc.desc: test success
564 * @tc.type: FUNC
565 */
566 HWTEST_F(WindowManagerProxyTest, SetMaximizeMode, Function | SmallTest | Level2)
567 {
568 MaximizeMode maximizeMode = MaximizeMode::MODE_FULL_FILL;
569 SystemConfig systemConfig;
570 MessageParcel reply;
571 windowManagerProxy_->SetMaximizeMode(maximizeMode);
572 WMError err = windowManagerProxy_->GetSystemConfig(systemConfig);
573 EXPECT_EQ(err, static_cast<WMError>(reply.ReadInt32()));
574 }
575
576 /**
577 * @tc.name: GetMaximizeMode
578 * @tc.desc: test success
579 * @tc.type: FUNC
580 */
581 HWTEST_F(WindowManagerProxyTest, GetMaximizeMode, Function | SmallTest | Level2)
582 {
583 MessageParcel reply;
584 MaximizeMode mode = windowManagerProxy_->GetMaximizeMode();
585 EXPECT_NE(mode, static_cast<MaximizeMode>(reply.ReadInt32()));
586 }
587
588 /**
589 * @tc.name: GetFocusWindowInfo
590 * @tc.desc: test success
591 * @tc.type: FUNC
592 */
593 HWTEST_F(WindowManagerProxyTest, GetFocusWindowInfo, Function | SmallTest | Level2)
594 {
595 FocusChangeInfo focusInfo;
596 SystemConfig systemConfig;
597 MessageParcel reply;
598 windowManagerProxy_->GetFocusWindowInfo(focusInfo);
599 WMError err = windowManagerProxy_->GetSystemConfig(systemConfig);
600 EXPECT_EQ(err, static_cast<WMError>(reply.ReadInt32()));
601 }
602 }
603 }
604 }
605