• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2023 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 
18 #include "screen_session_manager/include/fold_screen_controller/fold_screen_controller.h"
19 #include "screen_session_manager/include/screen_session_manager.h"
20 #include "fold_screen_state_internel.h"
21 
22 using namespace testing;
23 using namespace testing::ext;
24 
25 namespace OHOS {
26 namespace Rosen {
27 namespace {
28 constexpr uint32_t SLEEP_TIME_IN_US = 100000; // 100ms
29 }
30 class FoldScreenControllerTest : public testing::Test {
31 public:
32     static void SetUpTestCase();
33     static void TearDownTestCase();
34     void SetUp() override;
35     void TearDown() override;
36 
37     static ScreenSessionManager& ssm_;
38 };
39 
40 ScreenSessionManager& FoldScreenControllerTest::ssm_ = ScreenSessionManager::GetInstance();
41 
SetUpTestCase()42 void FoldScreenControllerTest::SetUpTestCase()
43 {
44 }
45 
TearDownTestCase()46 void FoldScreenControllerTest::TearDownTestCase()
47 {
48     usleep(SLEEP_TIME_IN_US);
49 }
50 
SetUp()51 void FoldScreenControllerTest::SetUp()
52 {
53 }
54 
TearDown()55 void FoldScreenControllerTest::TearDown()
56 {
57 }
58 
59 namespace {
60 
61     /**
62      * @tc.name: GetFoldScreenPolicy
63      * @tc.desc: test function :GetFoldScreenPolicy
64      * @tc.type: FUNC
65      */
66     HWTEST_F(FoldScreenControllerTest, GetFoldScreenPolicy, Function | SmallTest | Level3)
67     {
68         std::recursive_mutex mutex;
69         FoldScreenController fsc_(mutex, std::shared_ptr<TaskScheduler>());
70 
71         DisplayDeviceType productType = DisplayDeviceType::SINGLE_DISPLAY_DEVICE;
72         auto ret = fsc_.GetFoldScreenPolicy(productType);
73         ASSERT_NE(ret, nullptr);
74 
75         productType = DisplayDeviceType::DOUBLE_DISPLAY_DEVICE;
76         ret = fsc_.GetFoldScreenPolicy(productType);
77         ASSERT_NE(ret, nullptr);
78 
79         productType = DisplayDeviceType::SINGLE_DISPLAY_POCKET_DEVICE;
80         ret = fsc_.GetFoldScreenPolicy(productType);
81         ASSERT_NE(ret, nullptr);
82 
83         productType = DisplayDeviceType::DISPLAY_DEVICE_UNKNOWN;
84         ret = fsc_.GetFoldScreenPolicy(productType);
85         ASSERT_EQ(ret, nullptr);
86     }
87 
88     /**
89      * @tc.name: SetDisplayMode01
90      * @tc.desc: test function :SetDisplayMode
91      * @tc.type: FUNC
92      */
93     HWTEST_F(FoldScreenControllerTest, SetDisplayMode01, Function | SmallTest | Level3)
94     {
95         std::recursive_mutex mutex;
96         FoldScreenController fsc_(mutex, std::shared_ptr<TaskScheduler>());
97 
98         fsc_.foldScreenPolicy_ = nullptr;
99         FoldDisplayMode displayMode = FoldDisplayMode::FULL;
100         fsc_.SetDisplayMode(displayMode);
101         ASSERT_EQ(fsc_.GetDisplayMode(), FoldDisplayMode::UNKNOWN);
102     }
103 
104     /**
105      * @tc.name: SetDisplayMode02
106      * @tc.desc: test function :SetDisplayMode
107      * @tc.type: FUNC
108      */
109     HWTEST_F(FoldScreenControllerTest, SetDisplayMode02, Function | SmallTest | Level3)
110     {
111         std::recursive_mutex mutex;
112         FoldScreenController fsc_(mutex, std::shared_ptr<TaskScheduler>());
113 
114         ASSERT_NE(fsc_.foldScreenPolicy_, nullptr);
115         auto mode = fsc_.GetDisplayMode();
116         FoldDisplayMode displayMode = FoldDisplayMode::UNKNOWN;
117         fsc_.SetDisplayMode(displayMode);
118         if (ssm_.IsFoldable()) {
119             ASSERT_EQ(fsc_.GetDisplayMode(), displayMode);
120             fsc_.SetDisplayMode(mode);
121         } else {
122             ASSERT_EQ(fsc_.GetDisplayMode(), FoldDisplayMode::UNKNOWN);
123         }
124     }
125 
126     /**
127      * @tc.name: LockDisplayStatus01
128      * @tc.desc: test function :LockDisplayStatus
129      * @tc.type: FUNC
130      */
131     HWTEST_F(FoldScreenControllerTest, LockDisplayStatus01, Function | SmallTest | Level3)
132     {
133         std::recursive_mutex mutex;
134         FoldScreenController fsc_(mutex, std::shared_ptr<TaskScheduler>());
135 
136         fsc_.foldScreenPolicy_ = nullptr;
137         bool locked = false;
138         fsc_.LockDisplayStatus(locked);
139         ASSERT_EQ(fsc_.foldScreenPolicy_, nullptr);
140     }
141 
142     /**
143      * @tc.name: LockDisplayStatus02
144      * @tc.desc: test function :LockDisplayStatus
145      * @tc.type: FUNC
146      */
147     HWTEST_F(FoldScreenControllerTest, LockDisplayStatus02, Function | SmallTest | Level3)
148     {
149         std::recursive_mutex mutex;
150         FoldScreenController fsc_(mutex, std::shared_ptr<TaskScheduler>());
151 
152         fsc_.foldScreenPolicy_ = new FoldScreenPolicy();
153         bool locked = false;
154         fsc_.LockDisplayStatus(locked);
155         ASSERT_EQ((fsc_.foldScreenPolicy_)->lockDisplayStatus_, locked);
156     }
157 
158     /**
159      * @tc.name: GetDisplayMode
160      * @tc.desc: test function :GetDisplayMode
161      * @tc.type: FUNC
162      */
163     HWTEST_F(FoldScreenControllerTest, GetDisplayMode01, Function | SmallTest | Level3)
164     {
165         std::recursive_mutex mutex;
166         FoldScreenController fsc_(mutex, std::shared_ptr<TaskScheduler>());
167 
168         fsc_.foldScreenPolicy_ = nullptr;
169         auto ret = fsc_.GetDisplayMode();
170         ASSERT_EQ(ret, FoldDisplayMode::UNKNOWN);
171     }
172 
173     /**
174      * @tc.name: GetDisplayMode
175      * @tc.desc: foldScreenPolicy_ is not nullptr
176      * @tc.type: FUNC
177      */
178     HWTEST_F(FoldScreenControllerTest, GetDisplayMode02, Function | SmallTest | Level3)
179     {
180         std::recursive_mutex mutex;
181         FoldScreenController fsc_(mutex, std::shared_ptr<TaskScheduler>());
182 
183         fsc_.foldScreenPolicy_ = new FoldScreenPolicy();
184         auto ret = fsc_.GetDisplayMode();
185         ASSERT_EQ(ret, FoldDisplayMode::UNKNOWN);
186     }
187 
188     /**
189      * @tc.name: GetFoldStatus
190      * @tc.desc: test function :GetFoldStatus
191      * @tc.type: FUNC
192      */
193     HWTEST_F(FoldScreenControllerTest, GetFoldStatus, Function | SmallTest | Level3)
194     {
195         std::recursive_mutex mutex;
196         FoldScreenController fsc_(mutex, std::shared_ptr<TaskScheduler>());
197 
198         fsc_.foldScreenPolicy_ = nullptr;
199         auto ret = fsc_.GetFoldStatus();
200         ASSERT_EQ(ret, FoldStatus::UNKNOWN);
201     }
202 
203     /**
204      * @tc.name: SetFoldStatus01
205      * @tc.desc: test function :SetFoldStatus
206      * @tc.type: FUNC
207      */
208     HWTEST_F(FoldScreenControllerTest, SetFoldStatus01, Function | SmallTest | Level3)
209     {
210         std::recursive_mutex mutex;
211         FoldScreenController fsc_(mutex, std::shared_ptr<TaskScheduler>());
212 
213         FoldStatus foldStatus = FoldStatus::HALF_FOLD;
214         fsc_.foldScreenPolicy_ = nullptr;
215         fsc_.SetFoldStatus(foldStatus);
216         ASSERT_EQ(fsc_.foldScreenPolicy_, nullptr);
217         ASSERT_EQ(fsc_.GetFoldStatus(), FoldStatus::UNKNOWN);
218     }
219 
220     /**
221      * @tc.name: SetFoldStatus02
222      * @tc.desc: test function :SetFoldStatus
223      * @tc.type: FUNC
224      */
225     HWTEST_F(FoldScreenControllerTest, SetFoldStatus02, Function | SmallTest | Level3)
226     {
227         std::recursive_mutex mutex;
228         FoldScreenController fsc_(mutex, std::shared_ptr<TaskScheduler>());
229 
230         FoldStatus foldStatus = FoldStatus::HALF_FOLD;
231         fsc_.foldScreenPolicy_ = new FoldScreenPolicy();
232         fsc_.SetFoldStatus(foldStatus);
233         ASSERT_EQ(fsc_.GetFoldStatus(), foldStatus);
234     }
235 
236     /**
237      * @tc.name: GetCurrentFoldCreaseRegion
238      * @tc.desc: test function :GetCurrentFoldCreaseRegion
239      * @tc.type: FUNC
240      */
241     HWTEST_F(FoldScreenControllerTest, GetCurrentFoldCreaseRegion01, Function | SmallTest | Level3)
242     {
243         std::recursive_mutex mutex;
244         FoldScreenController fsc_(mutex, std::shared_ptr<TaskScheduler>());
245 
246         fsc_.foldScreenPolicy_ = nullptr;
247         auto ret = fsc_.GetCurrentFoldCreaseRegion();
248         ASSERT_EQ(ret, nullptr);
249     }
250 
251     /**
252      * @tc.name: GetCurrentFoldCreaseRegion
253      * @tc.desc: test function :GetCurrentFoldCreaseRegion
254      * @tc.type: FUNC
255      */
256     HWTEST_F(FoldScreenControllerTest, GetCurrentFoldCreaseRegion02, Function | SmallTest | Level3)
257     {
258         std::recursive_mutex mutex;
259         FoldScreenController fsc_(mutex, std::shared_ptr<TaskScheduler>());
260 
261         fsc_.foldScreenPolicy_ = new FoldScreenPolicy();
262         auto ret = fsc_.GetCurrentFoldCreaseRegion();
263         ASSERT_EQ(ret, fsc_.foldScreenPolicy_->GetCurrentFoldCreaseRegion());
264     }
265 
266     /**
267      * @tc.name: GetCurrentScreenId01
268      * @tc.desc: test function :GetCurrentScreenId
269      * @tc.type: FUNC
270      */
271     HWTEST_F(FoldScreenControllerTest, GetCurrentScreenId01, Function | SmallTest | Level3)
272     {
273         std::recursive_mutex mutex;
274         FoldScreenController fsc_(mutex, std::shared_ptr<TaskScheduler>());
275 
276         fsc_.foldScreenPolicy_ = nullptr;
277         auto ret = fsc_.GetCurrentScreenId();
278         ASSERT_EQ(ret, 0);
279     }
280 
281     /**
282      * @tc.name: GetCurrentScreenId02
283      * @tc.desc: test function :GetCurrentScreenId
284      * @tc.type: FUNC
285      */
286     HWTEST_F(FoldScreenControllerTest, GetCurrentScreenId02, Function | SmallTest | Level3)
287     {
288         std::recursive_mutex mutex;
289         FoldScreenController fsc_(mutex, std::shared_ptr<TaskScheduler>());
290 
291         fsc_.foldScreenPolicy_ = new FoldScreenPolicy();
292         auto ret = fsc_.GetCurrentScreenId();
293         ASSERT_NE(ret, 0);
294     }
295 
296     /**
297      * @tc.name: GetCurrentScreenId03
298      * @tc.desc: test function :GetCurrentScreenId
299      * @tc.type: FUNC
300      */
301     HWTEST_F(FoldScreenControllerTest, GetCurrentScreenId03, Function | SmallTest | Level3)
302     {
303         std::recursive_mutex mutex;
304         FoldScreenController fsc_(mutex, std::shared_ptr<TaskScheduler>());
305 
306         fsc_.foldScreenPolicy_ = nullptr;
307         auto ret = fsc_.GetCurrentScreenId();
308         ASSERT_EQ(ret, 0);
309 
310         fsc_.foldScreenPolicy_ = new FoldScreenPolicy();
311         ret = fsc_.GetCurrentScreenId();
312         ASSERT_NE(ret, 0);
313     }
314 
315     /**
316      * @tc.name: SetOnBootAnimation01
317      * @tc.desc: test function :SetOnBootAnimation
318      * @tc.type: FUNC
319      */
320     HWTEST_F(FoldScreenControllerTest, SetOnBootAnimation01, Function | SmallTest | Level3)
321     {
322         std::recursive_mutex mutex;
323         FoldScreenController fsc_(mutex, std::shared_ptr<TaskScheduler>());
324 
325         bool onBootAnimation = false;
326         fsc_.foldScreenPolicy_ = nullptr;
327         fsc_.SetOnBootAnimation(onBootAnimation);
328         ASSERT_EQ(onBootAnimation, false);
329     }
330 
331     /**
332      * @tc.name: SetOnBootAnimation02
333      * @tc.desc: test function :SetOnBootAnimation
334      * @tc.type: FUNC
335      */
336     HWTEST_F(FoldScreenControllerTest, SetOnBootAnimation02, Function | SmallTest | Level3)
337     {
338         std::recursive_mutex mutex;
339         FoldScreenController fsc_(mutex, std::shared_ptr<TaskScheduler>());
340 
341         bool onBootAnimation = true;
342         fsc_.foldScreenPolicy_ = new FoldScreenPolicy();
343         fsc_.SetOnBootAnimation(onBootAnimation);
344         ASSERT_EQ(onBootAnimation, true);
345     }
346 
347     /**
348      * @tc.name: SetOnBootAnimation03
349      * @tc.desc: test function :SetOnBootAnimation
350      * @tc.type: FUNC
351      */
352     HWTEST_F(FoldScreenControllerTest, SetOnBootAnimation03, Function | SmallTest | Level3)
353     {
354         std::recursive_mutex mutex;
355         FoldScreenController fsc_(mutex, std::shared_ptr<TaskScheduler>());
356 
357         bool onBootAnimation = true;
358         fsc_.foldScreenPolicy_ = new FoldScreenPolicy();
359         fsc_.SetOnBootAnimation(onBootAnimation);
360         ASSERT_EQ(onBootAnimation, true);
361         fsc_.foldScreenPolicy_ = nullptr;
362         bool onBootAnimation01 = false;
363         fsc_.SetOnBootAnimation(onBootAnimation01);
364         ASSERT_EQ(onBootAnimation, true);
365     }
366 
367     /**
368      * @tc.name: UpdateForPhyScreenPropertyChange01
369      * @tc.desc: test function :UpdateForPhyScreenPropertyChange
370      * @tc.type: FUNC
371      */
372     HWTEST_F(FoldScreenControllerTest, UpdateForPhyScreenPropertyChange01, Function | SmallTest | Level3)
373     {
374         std::recursive_mutex mutex;
375         FoldScreenController fsc_(mutex, std::shared_ptr<TaskScheduler>());
376 
377         fsc_.foldScreenPolicy_ = nullptr;
378         fsc_.UpdateForPhyScreenPropertyChange();
379         ASSERT_EQ(fsc_.foldScreenPolicy_, nullptr);
380     }
381 
382     /**
383      * @tc.name: UpdateForPhyScreenPropertyChange02
384      * @tc.desc: test function :UpdateForPhyScreenPropertyChange
385      * @tc.type: FUNC
386      */
387     HWTEST_F(FoldScreenControllerTest, UpdateForPhyScreenPropertyChange02, Function | SmallTest | Level3)
388     {
389         std::recursive_mutex mutex;
390         FoldScreenController fsc_(mutex, std::shared_ptr<TaskScheduler>());
391 
392         fsc_.foldScreenPolicy_ = new FoldScreenPolicy();
393         fsc_.UpdateForPhyScreenPropertyChange();
394         ASSERT_NE(fsc_.foldScreenPolicy_, nullptr);
395     }
396 
397     /**
398      * @tc.name: AddOrRemoveDisplayNodeToTree01
399      * @tc.desc: test function :AddOrRemoveDisplayNodeToTree
400      * @tc.type: FUNC
401      */
402     HWTEST_F(FoldScreenControllerTest, AddOrRemoveDisplayNodeToTree01, Function | SmallTest | Level3)
403     {
404         std::recursive_mutex mutex;
405         FoldScreenController fsc_(mutex, std::shared_ptr<TaskScheduler>());
406 
407         ScreenId screenId = 1;
408         int32_t command = 0;
409 
410         fsc_.foldScreenPolicy_ = new FoldScreenPolicy();
411         fsc_.AddOrRemoveDisplayNodeToTree(screenId, command);
412         ASSERT_NE(fsc_.foldScreenPolicy_, nullptr);
413     }
414 
415     /**
416      * @tc.name: AddOrRemoveDisplayNodeToTree02
417      * @tc.desc: test function :AddOrRemoveDisplayNodeToTree
418      * @tc.type: FUNC
419      */
420     HWTEST_F(FoldScreenControllerTest, AddOrRemoveDisplayNodeToTree02, Function | SmallTest | Level3)
421     {
422         std::recursive_mutex mutex;
423         FoldScreenController fsc_(mutex, std::shared_ptr<TaskScheduler>());
424 
425         ScreenId screenId = 0;
426         int32_t command = 1;
427 
428         fsc_.foldScreenPolicy_ = new FoldScreenPolicy();
429         fsc_.AddOrRemoveDisplayNodeToTree(screenId, command);
430         ASSERT_NE(fsc_.foldScreenPolicy_, nullptr);
431     }
432 
433     /**
434      * @tc.name: GetdisplayModeRunningStatus&SetdisplayModeChangeStatus01
435      * @tc.desc: test function :GetdisplayModeRunningStatus&SetdisplayModeChangeStatus
436      * @tc.type: FUNC
437      */
438     HWTEST_F(FoldScreenControllerTest, ModeChangeStatusTest01, Function | SmallTest | Level3)
439     {
440         std::recursive_mutex mutex;
441         FoldScreenController fsc_(mutex, std::shared_ptr<TaskScheduler>());
442 
443         bool status = false;
444 
445         fsc_.SetdisplayModeChangeStatus(status);
446         auto ret = fsc_.GetdisplayModeRunningStatus();
447 
448         ASSERT_EQ(ret, false);
449     }
450 
451     /**
452      * @tc.name: GetdisplayModeRunningStatus&SetdisplayModeChangeStatus02
453      * @tc.desc: test function :GetdisplayModeRunningStatus&SetdisplayModeChangeStatus
454      * @tc.type: FUNC
455      */
456     HWTEST_F(FoldScreenControllerTest, ModeChangeStatusTest02, Function | SmallTest | Level3)
457     {
458         std::recursive_mutex mutex;
459         FoldScreenController fsc_(mutex, std::shared_ptr<TaskScheduler>());
460 
461         bool status = true;
462 
463         fsc_.SetdisplayModeChangeStatus(status);
464         auto ret = fsc_.GetdisplayModeRunningStatus();
465 
466         ASSERT_EQ(ret, true);
467     }
468 
469     /**
470      * @tc.name: GetLastCacheDisplayMode01
471      * @tc.desc: test function :GetLastCacheDisplayMode
472      * @tc.type: FUNC
473      */
474     HWTEST_F(FoldScreenControllerTest, GetLastCacheDisplayMode01, Function | SmallTest | Level3)
475     {
476         std::recursive_mutex mutex;
477         FoldScreenController fsc_(mutex, std::shared_ptr<TaskScheduler>());
478 
479         FoldDisplayMode displayMode = FoldDisplayMode::UNKNOWN;
480         fsc_.SetDisplayMode(displayMode);
481         auto ret = fsc_.GetLastCacheDisplayMode();
482 
483         ASSERT_EQ(ret, FoldDisplayMode::UNKNOWN);
484     }
485 
486     /**
487      * @tc.name: GetLastCacheDisplayMode02
488      * @tc.desc: test function :GetLastCacheDisplayMode
489      * @tc.type: FUNC
490      */
491     HWTEST_F(FoldScreenControllerTest, GetLastCacheDisplayMode02, Function | SmallTest | Level3)
492     {
493         std::recursive_mutex mutex;
494         FoldScreenController fsc_(mutex, std::shared_ptr<TaskScheduler>());
495 
496         FoldDisplayMode displayMode = FoldDisplayMode::FULL;
497         fsc_.SetDisplayMode(displayMode);
498         auto ret = fsc_.GetLastCacheDisplayMode();
499 
500         ASSERT_EQ(ret, FoldDisplayMode::FULL);
501     }
502 
503     /**
504      * @tc.name: GetModeChangeRunningStatus
505      * @tc.desc: test function :GetModeChangeRunningStatus
506      * @tc.type: FUNC
507      */
508     HWTEST_F(FoldScreenControllerTest, GetModeChangeRunningStatus, Function | SmallTest | Level3)
509     {
510         std::recursive_mutex mutex;
511         FoldScreenController fsc_(mutex, std::shared_ptr<TaskScheduler>());
512 
513         auto ret = fsc_.GetModeChangeRunningStatus();
514 
515         ASSERT_EQ(ret, false);
516     }
517 
518     /**
519      * @tc.name: ExitCoordination01
520      * @tc.desc: test function :ExitCoordination
521      * @tc.type: FUNC
522      */
523     HWTEST_F(FoldScreenControllerTest, ExitCoordination01, Function | SmallTest | Level3)
524     {
525         std::recursive_mutex mutex;
526         FoldScreenController fsc_(mutex, std::shared_ptr<TaskScheduler>());
527 
528         fsc_.foldScreenPolicy_ = new FoldScreenPolicy();
529         fsc_.ExitCoordination();
530 
531         ASSERT_NE(fsc_.foldScreenPolicy_, nullptr);
532     }
533 
534     /**
535      * @tc.name: ExitCoordination02
536      * @tc.desc: test function :ExitCoordination
537      * @tc.type: FUNC
538      */
539     HWTEST_F(FoldScreenControllerTest, ExitCoordination02, Function | SmallTest | Level3)
540     {
541         std::recursive_mutex mutex;
542         FoldScreenController fsc_(mutex, std::shared_ptr<TaskScheduler>());
543 
544         fsc_.foldScreenPolicy_ = nullptr;
545         fsc_.ExitCoordination();
546 
547         ASSERT_EQ(fsc_.foldScreenPolicy_, nullptr);
548     }
549 
550     /**
551      * @tc.name: GetTentMode
552      * @tc.desc: test function :GetTentMode
553      * @tc.type: FUNC
554      */
555     HWTEST_F(FoldScreenControllerTest, GetTentMode, Function | SmallTest | Level1)
556     {
557         if (ssm_.IsFoldable()) {
558             ASSERT_NE(ssm_.foldScreenController_, nullptr);
559             auto tentMode = ssm_.foldScreenController_->GetTentMode();
560             ASSERT_EQ(tentMode, false);
561         }
562     }
563 
564     /**
565      * @tc.name: OnTentModeChanged01
566      * @tc.desc: test function :OnTentModeChanged
567      * @tc.type: FUNC
568      */
569     HWTEST_F(FoldScreenControllerTest, OnTentModeChanged01, Function | SmallTest | Level1)
570     {
571         if (!FoldScreenStateInternel::IsSingleDisplayPocketFoldDevice()||
572             !FoldScreenStateInternel::IsDualDisplayFoldDevice()) {
573             GTEST_SKIP();
574         }
575         bool isTentMode = false;
576         ssm_.foldScreenController_->OnTentModeChanged(isTentMode);
577         ASSERT_EQ(ssm_.foldScreenController_->GetTentMode(), false);
578     }
579 
580     /**
581      * @tc.name: OnTentModeChanged02
582      * @tc.desc: test function :OnTentModeChanged
583      * @tc.type: FUNC
584      */
585     HWTEST_F(FoldScreenControllerTest, OnTentModeChanged02, Function | SmallTest | Level1)
586     {
587         if (ssm_.IsFoldable()) {
588             bool isTentMode = true;
589             ssm_.foldScreenController_->OnTentModeChanged(isTentMode);
590             ASSERT_EQ(ssm_.foldScreenController_->GetTentMode(), true);
591         }
592     }
593 }
594 } // namespace Rosen
595 } // namespace OHOS
596 
597