• 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 <libxml/globals.h>
19 #include <libxml/xmlstring.h>
20 
21 #include "window_manager_hilog.h"
22 #include "xml_config_base.h"
23 #include "screen_scene_config.h"
24 #include "screen_session_manager.h"
25 #include "scene_board_judgement.h"
26 
27 using namespace testing;
28 using namespace testing::ext;
29 
30 namespace OHOS {
31 namespace Rosen {
32 namespace {
33 constexpr uint32_t SLEEP_TIME_IN_US = 100000; // 100ms
34 }
35 class ScreenSceneConfigTest : public testing::Test {
36 public:
37     static void SetUpTestCase();
38     static void TearDownTestCase();
39     void SetUp() override;
40     void TearDown() override;
41 };
42 
SetUpTestCase()43 void ScreenSceneConfigTest::SetUpTestCase()
44 {
45 }
46 
TearDownTestCase()47 void ScreenSceneConfigTest::TearDownTestCase()
48 {
49     usleep(SLEEP_TIME_IN_US);
50 }
51 
SetUp()52 void ScreenSceneConfigTest::SetUp()
53 {
54 }
55 
TearDown()56 void ScreenSceneConfigTest::TearDown()
57 {
58 }
59 
60 namespace {
61 /**
62  * @tc.name: IsNumber
63  * @tc.desc: test function : IsNumber
64  * @tc.type: FUNC
65  */
66 HWTEST_F(ScreenSceneConfigTest, IsNumber, Function | SmallTest | Level1)
67 {
68     bool result = ScreenSceneConfig::IsNumber("123");
69     ASSERT_EQ(true, result);
70     result = ScreenSceneConfig::IsNumber("a123");
71     ASSERT_EQ(false, result);
72     result = ScreenSceneConfig::IsNumber("");
73     ASSERT_EQ(false, result);
74     result = ScreenSceneConfig::IsNumber("-123");
75     ASSERT_EQ(false, result);
76     result = ScreenSceneConfig::IsNumber("123.456");
77     ASSERT_EQ(false, result);
78 }
79 
80 /**
81  * @tc.name: GetConfigPath1
82  * @tc.desc: test function : GetConfigPath
83  * @tc.type: FUNC
84  */
85 HWTEST_F(ScreenSceneConfigTest, GetConfigPath1, Function | SmallTest | Level1)
86 {
87     auto result = ScreenSceneConfig::GetConfigPath("");
88     ASSERT_STRNE("/system/", result.c_str());
89 }
90 
91 /**
92  * @tc.name: GetConfigPath2
93  * @tc.desc: test function : GetConfigPath
94  * @tc.type: FUNC
95  */
96 HWTEST_F(ScreenSceneConfigTest, GetConfigPath2, Function | SmallTest | Level1)
97 {
98     auto result = ScreenSceneConfig::GetConfigPath("a.xml");
99     ASSERT_STREQ("/system/a.xml", result.c_str());
100 }
101 
102 /**
103  * @tc.name: LoadConfigXml
104  * @tc.desc: test function : loadConfigXml
105  * @tc.type: FUNC
106  */
107 HWTEST_F(ScreenSceneConfigTest, LoadConfigXml, Function | SmallTest | Level1)
108 {
109     auto result = ScreenSceneConfig::LoadConfigXml();
110     ASSERT_EQ(true, result);
111 }
112 
113 /**
114  * @tc.name: IsValidNode1
115  * @tc.desc: test function : IsValidNode
116  * @tc.type: FUNC
117  */
118 HWTEST_F(ScreenSceneConfigTest, IsValidNode1, Function | SmallTest | Level1)
119 {
120     xmlNode node;
121     auto result = ScreenSceneConfig::IsValidNode(node);
122     ASSERT_EQ(false, result);
123 }
124 
125 /**
126  * @tc.name: IsValidNode2
127  * @tc.desc: test function : IsValidNode
128  * @tc.type: FUNC
129  */
130 HWTEST_F(ScreenSceneConfigTest, IsValidNode2, Function | SmallTest | Level1)
131 {
132     const xmlChar xmlStringText[] = { 't', 'e', 'x', 't', 0 };
133     xmlNode node;
134     node.name = xmlStringText;
135     node.type = XML_TEXT_NODE;
136     auto result = ScreenSceneConfig::IsValidNode(node);
137     ASSERT_EQ(true, result);
138 }
139 
140 /**
141  * @tc.name: IsValidNode3
142  * @tc.desc: test function : IsValidNode
143  * @tc.type: FUNC
144  */
145 HWTEST_F(ScreenSceneConfigTest, IsValidNode3, Function | SmallTest | Level1)
146 {
147     const xmlChar xmlStringText[] = { 't', 'e', 'x', 't', 0 };
148     xmlNode node;
149     node.name = xmlStringText;
150     node.type = XML_COMMENT_NODE;
151     auto result = ScreenSceneConfig::IsValidNode(node);
152     ASSERT_EQ(false, result);
153 }
154 
155 /**
156  * @tc.name: ReadIntNumbersConfigInfo
157  * @tc.desc: test function : ReadIntNumbersConfigInfo
158  * @tc.type: FUNC
159  */
160 HWTEST_F(ScreenSceneConfigTest, ReadIntNumbersConfigInfo, Function | SmallTest | Level1)
161 {
162     ScreenSceneConfig::enableConfig_.clear();
163 
164     auto configFilePath = ScreenSceneConfig::GetConfigPath("etc/window/resources/display_manager_config.xml");
165     xmlDocPtr docPtr = xmlReadFile(configFilePath.c_str(), nullptr, XML_PARSE_NOBLANKS);
166     if (docPtr == nullptr) {
167         return;
168     }
169 
170     xmlNodePtr rootPtr = xmlDocGetRootElement(docPtr);
171     if (rootPtr == nullptr || rootPtr->name == nullptr ||
172         xmlStrcmp(rootPtr->name, reinterpret_cast<const xmlChar*>("Configs"))) {
173         xmlFreeDoc(docPtr);
174         return;
175     }
176     uint32_t readCount = 0;
177     for (xmlNodePtr curNodePtr = rootPtr->xmlChildrenNode; curNodePtr != nullptr; curNodePtr = curNodePtr->next) {
178         if (!ScreenSceneConfig::IsValidNode(*curNodePtr)) {
179             continue;
180         }
181         auto nodeName = curNodePtr->name;
182         if (!xmlStrcmp(nodeName, reinterpret_cast<const xmlChar*>("dpi")) ||
183             !xmlStrcmp(nodeName, reinterpret_cast<const xmlChar*>("defaultDeviceRotationOffset")) ||
184             !xmlStrcmp(nodeName, reinterpret_cast<const xmlChar*>("cutoutArea")) ||
185             !xmlStrcmp(nodeName, reinterpret_cast<const xmlChar*>("curvedScreenBoundary"))) {
186             ScreenSceneConfig::ReadIntNumbersConfigInfo(curNodePtr);
187             readCount++;
188             continue;
189         }
190     }
191     ASSERT_GE(ScreenSceneConfig::intNumbersConfig_.size(), readCount);
192     ScreenSceneConfig::DumpConfig();
193     xmlFreeDoc(docPtr);
194 }
195 
196 /**
197  * @tc.name: ReadIntNumbersConfigInfo02
198  * @tc.desc: Test ReadIntNumbersConfigInfo method when node content is nullptr.
199  * @tc.type: FUNC
200  */
201 HWTEST_F(ScreenSceneConfigTest, ReadIntNumbersConfigInfo02, Function | SmallTest | Level1)
202 {
203     xmlNodePtr currNode = xmlNewNode(nullptr, BAD_CAST "testNode");
204     ASSERT_NE(currNode, nullptr);
205     ScreenSceneConfig::ReadIntNumbersConfigInfo(currNode);
206     xmlFree(currNode);
207 }
208 
209 /**
210  * @tc.name: ReadIntNumbersConfigInfo03
211  * @tc.desc: Test ReadIntNumbersConfigInfo method when node content is empty.
212  * @tc.type: FUNC
213  */
214 HWTEST_F(ScreenSceneConfigTest, ReadIntNumbersConfigInfo03, Function | SmallTest | Level1)
215 {
216     xmlNodePtr currNode = xmlNewNode(nullptr, BAD_CAST "testNode");
217     ASSERT_NE(currNode, nullptr);
218     xmlNodeSetContent(currNode, BAD_CAST "");
219     ScreenSceneConfig::ReadIntNumbersConfigInfo(currNode);
220     xmlFree(currNode);
221 }
222 
223 /**
224  * @tc.name: ReadIntNumbersConfigInfo04
225  * @tc.desc: Test ReadIntNumbersConfigInfo method when node content contains non-number.
226  * @tc.type: FUNC
227  */
228 HWTEST_F(ScreenSceneConfigTest, ReadIntNumbersConfigInfo04, Function | SmallTest | Level1)
229 {
230     xmlNodePtr currNode = xmlNewNode(nullptr, BAD_CAST "testNode");
231     ASSERT_NE(currNode, nullptr);
232     xmlNodeSetContent(currNode, BAD_CAST "123 abc");
233     ScreenSceneConfig::ReadIntNumbersConfigInfo(currNode);
234     xmlFree(currNode);
235 }
236 
237 /**
238  * @tc.name: ReadIntNumbersConfigInfo05
239  * @tc.desc: Test ReadIntNumbersConfigInfo method when node content is valid.
240  * @tc.type: FUNC
241  */
242 HWTEST_F(ScreenSceneConfigTest, ReadIntNumbersConfigInfo05, Function | SmallTest | Level1)
243 {
244     xmlNodePtr currNode = xmlNewNode(nullptr, BAD_CAST "testNode");
245     ASSERT_NE(currNode, nullptr);
246     xmlNodeSetContent(currNode, BAD_CAST "123 456 789");
247     ScreenSceneConfig::ReadIntNumbersConfigInfo(currNode);
248     xmlFree(currNode);
249 }
250 
251 /**
252  * @tc.name: ReadEnableConfigInfo
253  * @tc.desc: test function : ReadEnableConfigInfo
254  * @tc.type: FUNC
255  */
256 HWTEST_F(ScreenSceneConfigTest, ReadEnableConfigInfo, Function | SmallTest | Level1)
257 {
258     ScreenSceneConfig::enableConfig_.clear();
259 
260     auto configFilePath = ScreenSceneConfig::GetConfigPath("etc/window/resources/display_manager_config.xml");
261     xmlDocPtr docPtr = xmlReadFile(configFilePath.c_str(), nullptr, XML_PARSE_NOBLANKS);
262     if (docPtr == nullptr) {
263         return;
264     }
265 
266     xmlNodePtr rootPtr = xmlDocGetRootElement(docPtr);
267     if (rootPtr == nullptr || rootPtr->name == nullptr ||
268         xmlStrcmp(rootPtr->name, reinterpret_cast<const xmlChar*>("Configs"))) {
269         xmlFreeDoc(docPtr);
270         return;
271     }
272     uint32_t readCount = 0;
273     for (xmlNodePtr curNodePtr = rootPtr->xmlChildrenNode; curNodePtr != nullptr; curNodePtr = curNodePtr->next) {
274         if (!ScreenSceneConfig::IsValidNode(*curNodePtr)) {
275             continue;
276         }
277 
278         auto nodeName = curNodePtr->name;
279         if (!xmlStrcmp(nodeName, reinterpret_cast<const xmlChar*>("isWaterfallDisplay"))) {
280             ScreenSceneConfig::ReadEnableConfigInfo(curNodePtr);
281             readCount++;
282             continue;
283         }
284 
285         if (!xmlStrcmp(nodeName, reinterpret_cast<const xmlChar*>("dpi"))) {
286             ScreenSceneConfig::ReadEnableConfigInfo(curNodePtr);
287             readCount++;
288             continue;
289         }
290     }
291 
292     ASSERT_LE(ScreenSceneConfig::enableConfig_.size(), readCount);
293 
294     ScreenSceneConfig::DumpConfig();
295     xmlFreeDoc(docPtr);
296 }
297 
298 /**
299  * @tc.name: ReadStringConfigInfo
300  * @tc.desc: test function : ReadStringConfigInfo
301  * @tc.type: FUNC
302  */
303 HWTEST_F(ScreenSceneConfigTest, ReadStringConfigInfo, Function | SmallTest | Level1)
304 {
305     ScreenSceneConfig::enableConfig_.clear();
306 
307     auto configFilePath = ScreenSceneConfig::GetConfigPath("etc/window/resources/display_manager_config.xml");
308     xmlDocPtr docPtr = xmlReadFile(configFilePath.c_str(), nullptr, XML_PARSE_NOBLANKS);
309     if (docPtr == nullptr) {
310         return;
311     }
312 
313     xmlNodePtr rootPtr = xmlDocGetRootElement(docPtr);
314     if (rootPtr == nullptr || rootPtr->name == nullptr ||
315         xmlStrcmp(rootPtr->name, reinterpret_cast<const xmlChar*>("Configs"))) {
316         xmlFreeDoc(docPtr);
317         return;
318     }
319     uint32_t readCount = 0;
320     for (xmlNodePtr curNodePtr = rootPtr->xmlChildrenNode; curNodePtr != nullptr; curNodePtr = curNodePtr->next) {
321         if (!ScreenSceneConfig::IsValidNode(*curNodePtr)) {
322             continue;
323         }
324 
325         auto nodeName = curNodePtr->name;
326         if (!xmlStrcmp(nodeName, reinterpret_cast<const xmlChar*>("defaultDisplayCutoutPath"))) {
327             ScreenSceneConfig::ReadStringConfigInfo(curNodePtr);
328             readCount++;
329             continue;
330         }
331         if (!xmlStrcmp(nodeName, reinterpret_cast<const xmlChar*>("subDisplayCutoutPath"))) {
332             ScreenSceneConfig::ReadStringConfigInfo(curNodePtr);
333             readCount++;
334             continue;
335         }
336         if (!xmlStrcmp(nodeName, reinterpret_cast<const xmlChar*>("dpi"))) {
337             ScreenSceneConfig::ReadStringConfigInfo(curNodePtr);
338             readCount++;
339             continue;
340         }
341         if (!xmlStrcmp(nodeName, reinterpret_cast<const xmlChar*>("externalScreenDefaultMode"))) {
342             ScreenSceneConfig::ReadStringConfigInfo(curNodePtr);
343             readCount++;
344             continue;
345         }
346     }
347 
348     if (SceneBoardJudgement::IsSceneBoardEnabled()) {
349         ASSERT_GT(ScreenSceneConfig::stringConfig_.size(), readCount);
350     } else {
351         ASSERT_EQ(ScreenSceneConfig::stringConfig_.size(), readCount);
352     }
353     ScreenSceneConfig::DumpConfig();
354     xmlFreeDoc(docPtr);
355 }
356 
357 /**
358  * @tc.name: GetEnableConfig1
359  * @tc.desc: test function : GetEnableConfig
360  * @tc.type: FUNC
361  */
362 HWTEST_F(ScreenSceneConfigTest, GetEnableConfig, Function | SmallTest | Level1)
363 {
364     auto result = ScreenSceneConfig::GetEnableConfig();
365     ASSERT_EQ(true, result.size() == 0);
366 }
367 
368 /**
369  * @tc.name: GetIntNumbersConfig
370  * @tc.desc: test function : GetIntNumbersConfig
371  * @tc.type: FUNC
372  */
373 HWTEST_F(ScreenSceneConfigTest, GetIntNumbersConfig, Function | SmallTest | Level1)
374 {
375     auto result = ScreenSceneConfig::GetIntNumbersConfig();
376     ASSERT_NE(true, result.size() == 0);
377 }
378 
379 /**
380  * @tc.name: GetStringConfig
381  * @tc.desc: test function : GetStringConfig
382  * @tc.type: FUNC
383  */
384 HWTEST_F(ScreenSceneConfigTest, GetStringConfig, Function | SmallTest | Level1)
385 {
386     auto result = ScreenSceneConfig::GetStringConfig();
387     ASSERT_NE(0, result.size());
388 }
389 
390 /**
391  * @tc.name: GetStringListConfig
392  * @tc.desc: test function : GetStringListConfig
393  * @tc.type: FUNC
394  */
395 HWTEST_F(ScreenSceneConfigTest, GetStringListConfig, Function | SmallTest | Level1)
396 {
397     auto result = ScreenSceneConfig::GetStringListConfig();
398     ASSERT_EQ(0, result.size());
399 }
400 
401 /**
402  * @tc.name: GetCurvedScreenBoundaryConfig
403  * @tc.desc: test function : GetCurvedScreenBoundaryConfig
404  * @tc.type: FUNC
405  */
406 HWTEST_F(ScreenSceneConfigTest, GetCurvedScreenBoundaryConfig, Function | SmallTest | Level1)
407 {
408     auto result = ScreenSceneConfig::GetCurvedScreenBoundaryConfig();
409     if ((ScreenSessionManager::GetInstance().GetCurvedCompressionArea() == 0) &&
410         SceneBoardJudgement::IsSceneBoardEnabled()) {
411         ASSERT_EQ(0, result.size());
412     } else {
413         ASSERT_NE(0, result.size());
414     }
415 }
416 
417 /**
418  * @tc.name: GetCutoutBoundaryRect
419  * @tc.desc: GetCutoutBoundaryRect func
420  * @tc.type: FUNC
421  */
422 HWTEST_F(ScreenSceneConfigTest, GetCutoutBoundaryRect, Function | SmallTest | Level3)
423 {
424     uint64_t displayId = -1;
425     auto result = ScreenSceneConfig::GetCutoutBoundaryRect(displayId);
426     ASSERT_FALSE(result.size() > 0);
427 }
428 
429 /**
430  * @tc.name: GetSubCutoutBoundaryRect
431  * @tc.desc: GetSubCutoutBoundaryRect func
432  * @tc.type: FUNC
433  */
434 HWTEST_F(ScreenSceneConfigTest, GetSubCutoutBoundaryRect, Function | SmallTest | Level3)
435 {
436     auto result = ScreenSceneConfig::GetSubCutoutBoundaryRect();
437     if (ScreenSessionManager::GetInstance().IsFoldable()) {
438         ASSERT_TRUE(result.size() > 0);
439     } else {
440         ASSERT_TRUE(result.size() == 0);
441     }
442 }
443 
444 /**
445  * @tc.name: IsWaterfallDisplay
446  * @tc.desc: IsWaterfallDisplay func
447  * @tc.type: FUNC
448  */
449 HWTEST_F(ScreenSceneConfigTest, IsWaterfallDisplay, Function | SmallTest | Level3)
450 {
451     auto result = ScreenSceneConfig::IsWaterfallDisplay();
452     if (result) {
453         ASSERT_EQ(true, result);
454     }
455 }
456 
457 /**
458  * @tc.name: GetCurvedCompressionAreaInLandscape
459  * @tc.desc: GetCurvedCompressionAreaInLandscape func
460  * @tc.type: FUNC
461  */
462 HWTEST_F(ScreenSceneConfigTest, GetCurvedCompressionAreaInLandscape, Function | SmallTest | Level3)
463 {
464     auto result = ScreenSceneConfig::GetCurvedCompressionAreaInLandscape();
465     ASSERT_TRUE(result == 0);
466 }
467 
468 /**
469  * @tc.name: Split
470  * @tc.desc: Split func
471  * @tc.type: FUNC
472  */
473 HWTEST_F(ScreenSceneConfigTest, Split, Function | SmallTest | Level3)
474 {
475     auto result = ScreenSceneConfig::Split("oo", "+9");
476     ASSERT_NE(0, result.size());
477 }
478 
479 /**
480  * @tc.name: CalcCutoutBoundaryRect
481  * @tc.desc: CalcCutoutBoundaryRect func
482  * @tc.type: FUNC
483  */
484 HWTEST_F(ScreenSceneConfigTest, CalcCutoutBoundaryRect, Function | SmallTest | Level3)
485 {
486     DMRect emptyRect = {0, 0, 0, 0};
487     auto result = ScreenSceneConfig::CalcCutoutBoundaryRect("oo");
488     ASSERT_FALSE(result != emptyRect);
489 }
490 
491 /**
492  * @tc.name: CalcCutoutBoundaryRect02
493  * @tc.desc: Test scenario where svg parsing fails and an empty rectangle is expected.
494  * @tc.type: FUNC
495  */
496 HWTEST_F(ScreenSceneConfigTest, CalcCutoutBoundaryRect02, Function | SmallTest | Level3)
497 {
498     std::string invalidSvgPath = "invalid_svg_path";
499     DMRect result = ScreenSceneConfig::CalcCutoutBoundaryRect(invalidSvgPath);
500     EXPECT_EQ(result.posX_, 0);
501     EXPECT_EQ(result.posY_, 0);
502     EXPECT_EQ(result.width_, 0);
503     EXPECT_EQ(result.height_, 0);
504 }
505 
506 /**
507  * @tc.name: CalcCutoutBoundaryRect03
508  * @tc.desc: Test scenario where SkRect is empty and an empty rectangle is expected.
509  * @tc.type: FUNC
510  */
511 HWTEST_F(ScreenSceneConfigTest, CalcCutoutBoundaryRect03, Function | SmallTest | Level3)
512 {
513     std::string emptySvgPath = "M0 0";
514     DMRect result = ScreenSceneConfig::CalcCutoutBoundaryRect(emptySvgPath);
515     EXPECT_EQ(result.posX_, 0);
516     EXPECT_EQ(result.posY_, 0);
517     EXPECT_EQ(result.width_, 0);
518     EXPECT_EQ(result.height_, 0);
519 }
520 
521 /**
522  * @tc.name: CalcCutoutBoundaryRect04
523  * @tc.desc: Test scenario where svg is valid and a valid rectangle is expected.
524  * @tc.type: FUNC
525  */
526 HWTEST_F(ScreenSceneConfigTest, CalcCutoutBoundaryRect04, Function | SmallTest | Level3)
527 {
528     std::string validSvgPath = "M10 10 L20 20";
529     DMRect result = ScreenSceneConfig::CalcCutoutBoundaryRect(validSvgPath);
530     EXPECT_EQ(result.posX_, 10);
531     EXPECT_EQ(result.posY_, 10);
532     EXPECT_EQ(result.width_, 10);
533     EXPECT_EQ(result.height_, 10);
534 }
535 
536 /**
537  * @tc.name: SetCutoutSvgPath
538  * @tc.desc: SetCutoutSvgPath func
539  * @tc.type: FUNC
540  */
541 HWTEST_F(ScreenSceneConfigTest, SetCutoutSvgPath, Function | SmallTest | Level3)
542 {
543     uint64_t displayId = 0;
544     ScreenSceneConfig::SetCutoutSvgPath(displayId, "oo");
545     auto result_ = ScreenSceneConfig::GetCutoutBoundaryRect(displayId);
546     ASSERT_NE(0, result_.size());
547 }
548 
549 /**
550  * @tc.name: SetSubCutoutSvgPath
551  * @tc.desc: SetSubCutoutSvgPath func
552  * @tc.type: FUNC
553  */
554 HWTEST_F(ScreenSceneConfigTest, SetSubCutoutSvgPath, Function | SmallTest | Level3)
555 {
556     ScreenSceneConfig::SetSubCutoutSvgPath("oo");
557     auto result = ScreenSceneConfig::GetSubCutoutBoundaryRect();
558     ASSERT_NE(0, result.size());
559 }
560 
561 /**
562  * @tc.name: SetSubCutoutSvgPath01
563  * @tc.desc: SetSubCutoutSvgPath func
564  * @tc.type: FUNC
565  */
566 HWTEST_F(ScreenSceneConfigTest, SetSubCutoutSvgPath01, Function | SmallTest | Level3)
567 {
568     ScreenSceneConfig::SetSubCutoutSvgPath("M507 18 L573 18 v 66 h -66 Z");
569     std::vector<DMRect> result = ScreenSceneConfig::GetSubCutoutBoundaryRect();
570     if (result.size() <= 0) {
571         ASSERT_EQ(0, result.size());
572     }
573     DMRect targetRect{507, 18, 66, 66}; // the rect size after svg parsing
574     EXPECT_EQ(result[0].posX_, targetRect.posX_);
575     EXPECT_EQ(result[0].posY_, targetRect.posY_);
576     EXPECT_EQ(result[0].width_, targetRect.width_);
577     EXPECT_EQ(result[0].height_, targetRect.height_);
578 }
579 
580 /**
581  * @tc.name: SetCurvedCompressionAreaInLandscape
582  * @tc.desc: SetCurvedCompressionAreaInLandscape func
583  * @tc.type: FUNC
584  */
585 HWTEST_F(ScreenSceneConfigTest, SetCurvedCompressionAreaInLandscape, Function | SmallTest | Level3)
586 {
587     int res = 0;
588     ScreenSceneConfig::SetCurvedCompressionAreaInLandscape();
589     ASSERT_EQ(0, res);
590 }
591 
592 /**
593  * @tc.name: IsSupportRotateWithSensor01
594  * @tc.desc: IsSupportRotateWithSensor
595  * @tc.type: FUNC
596  */
597 HWTEST_F(ScreenSceneConfigTest, IsSupportRotateWithSensor01, Function | SmallTest | Level3)
598 {
599     ScreenSceneConfig::enableConfig_["supportRotateWithSensor"] = true;
600     bool res = ScreenSceneConfig::IsSupportRotateWithSensor();
601     ASSERT_EQ(true, res);
602 }
603 
604 /**
605  * @tc.name: IsSupportRotateWithSensor01
606  * @tc.desc: IsSupportRotateWithSensor
607  * @tc.type: FUNC
608  */
609 HWTEST_F(ScreenSceneConfigTest, IsSupportRotateWithSensor02, Function | SmallTest | Level3)
610 {
611     ScreenSceneConfig::enableConfig_.erase("supportRotateWithSensor");
612     bool res = ScreenSceneConfig::IsSupportRotateWithSensor();
613     ASSERT_EQ(false, res);
614 }
615 
616 /**
617  * @tc.name: GetExternalScreenDefaultMode01
618  * @tc.desc: GetExternalScreenDefaultMode
619  * @tc.type: FUNC
620  */
621 HWTEST_F(ScreenSceneConfigTest, GetExternalScreenDefaultMode01, Function | SmallTest | Level3)
622 {
623     ScreenSceneConfig::stringConfig_["externalScreenDefaultMode"] = "mirror";
624     std::string res = ScreenSceneConfig::GetExternalScreenDefaultMode();
625     ASSERT_EQ("mirror", res);
626 }
627 
628 /**
629  * @tc.name: GetExternalScreenDefaultMode02
630  * @tc.desc: GetExternalScreenDefaultMode
631  * @tc.type: FUNC
632  */
633 HWTEST_F(ScreenSceneConfigTest, GetExternalScreenDefaultMode02, Function | SmallTest | Level3)
634 {
635     ScreenSceneConfig::stringConfig_.erase("externalScreenDefaultMode");
636     std::string res = ScreenSceneConfig::GetExternalScreenDefaultMode();
637     ASSERT_EQ("", res);
638 }
639 
640 /**
641  * @tc.name: GetCurvedCompressionAreaInLandscape01
642  * @tc.desc: GetCurvedCompressionAreaInLandscape
643  * @tc.type: FUNC
644  */
645 HWTEST_F(ScreenSceneConfigTest, GetCurvedCompressionAreaInLandscape01, Function | SmallTest | Level3)
646 {
647     ScreenSceneConfig::isWaterfallDisplay_ = false;
648     ScreenSceneConfig::isScreenCompressionEnableInLandscape_ = false;
649     auto result = ScreenSceneConfig::GetCurvedCompressionAreaInLandscape();
650     ASSERT_TRUE(result == 0);
651 }
652 
653 /**
654  * @tc.name: GetCurvedCompressionAreaInLandscape02
655  * @tc.desc: GetCurvedCompressionAreaInLandscape
656  * @tc.type: FUNC
657  */
658 HWTEST_F(ScreenSceneConfigTest, GetCurvedCompressionAreaInLandscape02, Function | SmallTest | Level3)
659 {
660     ScreenSceneConfig::isWaterfallDisplay_ = true;
661     ScreenSceneConfig::isScreenCompressionEnableInLandscape_ = false;
662     auto result = ScreenSceneConfig::GetCurvedCompressionAreaInLandscape();
663     ASSERT_TRUE(result == 0);
664 }
665 
666 /**
667  * @tc.name: GetCurvedCompressionAreaInLandscape03
668  * @tc.desc: Test GetCurvedCompressionAreaInLandscape method
669  * @tc.type: FUNC
670  */
671 HWTEST_F(ScreenSceneConfigTest, GetCurvedCompressionAreaInLandscape03, Function | SmallTest | Level3)
672 {
673     ScreenSceneConfig::isWaterfallDisplay_ = true;
674     ScreenSceneConfig::isScreenCompressionEnableInLandscape_ = true;
675     auto result = ScreenSceneConfig::GetCurvedCompressionAreaInLandscape();
676     ASSERT_TRUE(result == 0);
677 }
678 
679 /**
680  * @tc.name: ReadStringListConfigInfo01
681  * @tc.desc: ReadStringListConfigInfo
682  * @tc.type: FUNC
683  */
684 HWTEST_F(ScreenSceneConfigTest, ReadStringListConfigInfo01, Function | SmallTest | Level3)
685 {
686     xmlNodePtr rootNode = nullptr;
687     ScreenSceneConfig::ReadStringListConfigInfo(rootNode, "");
688     EXPECT_EQ(rootNode, nullptr);
689 }
690 
691 /**
692  * @tc.name: ReadStringListConfigInfo02
693  * @tc.desc: ReadStringListConfigInfo
694  * @tc.type: FUNC
695  */
696 HWTEST_F(ScreenSceneConfigTest, ReadStringListConfigInfo02, Function | SmallTest | Level3)
697 {
698     xmlNodePtr rootNode = xmlNewNode(nullptr, BAD_CAST "testNode");
699     ASSERT_NE(rootNode, nullptr);
700     rootNode->name = nullptr;
701     std::string name = "testName";
702     ScreenSceneConfig::ReadStringListConfigInfo(rootNode, name);
703     xmlFreeNode(rootNode);
704 }
705 
706 /**
707  * @tc.name: ReadStringListConfigInfo03
708  * @tc.desc: ReadStringListConfigInfo
709  * @tc.type: FUNC
710  */
711 HWTEST_F(ScreenSceneConfigTest, ReadStringListConfigInfo03, Function | SmallTest | Level3)
712 {
713     xmlNodePtr rootNode = xmlNewNode(nullptr, BAD_CAST "testNode");
714     ASSERT_NE(rootNode, nullptr);
715     std::string name = "testName";
716     ScreenSceneConfig::ReadStringListConfigInfo(rootNode, name);
717     xmlFreeNode(rootNode);
718 }
719 
720 /**
721  * @tc.name: ReadStringListConfigInfo04
722  * @tc.desc: ReadStringListConfigInfo
723  * @tc.type: FUNC
724  */
725 HWTEST_F(ScreenSceneConfigTest, ReadStringListConfigInfo04, Function | SmallTest | Level3)
726 {
727     xmlNodePtr rootNode = xmlNewNode(nullptr, BAD_CAST "testNode");
728     ASSERT_NE(rootNode, nullptr);
729     xmlNodePtr curNode = xmlNewNode(nullptr, BAD_CAST "invalidNode");
730     rootNode->children = curNode;
731     std::string name = "testName";
732     ScreenSceneConfig::ReadStringListConfigInfo(rootNode, name);
733     xmlFreeNode(rootNode);
734 }
735 
736 /**
737  * @tc.name: ReadStringListConfigInfo05
738  * @tc.desc: ReadStringListConfigInfo
739  * @tc.type: FUNC
740  */
741 HWTEST_F(ScreenSceneConfigTest, ReadStringListConfigInfo05, Function | SmallTest | Level3)
742 {
743     xmlNodePtr rootNode = xmlNewNode(nullptr, BAD_CAST "testNode");
744     ASSERT_NE(rootNode, nullptr);
745     xmlNodePtr curNode = xmlNewNode(nullptr, BAD_CAST "invalidNode");
746     xmlNodeSetContent(curNode, BAD_CAST "validContent");
747     rootNode->children = curNode;
748     std::string name = "testName";
749     ScreenSceneConfig::ReadStringListConfigInfo(rootNode, name);
750     xmlFreeNode(rootNode);
751 }
752 
753 /**
754  * @tc.name: ReadPhysicalDisplayConfigInfo01
755  * @tc.desc: ReadPhysicalDisplayConfigInfo
756  * @tc.type: FUNC
757  */
758 HWTEST_F(ScreenSceneConfigTest, ReadPhysicalDisplayConfigInfo01, Function | SmallTest | Level3)
759 {
760     xmlNodePtr currNode = xmlNewNode(nullptr, reinterpret_cast<const xmlChar*> ("displayMode"));
761     ASSERT_NE(currNode, nullptr);
762     ScreenSceneConfig::ReadPhysicalDisplayConfigInfo(currNode);
763     xmlFreeNode(currNode);
764 }
765 
766 /**
767  * @tc.name: ReadPhysicalDisplayConfigInfo02
768  * @tc.desc: ReadPhysicalDisplayConfigInfo
769  * @tc.type: FUNC
770  */
771 HWTEST_F(ScreenSceneConfigTest, ReadPhysicalDisplayConfigInfo02, Function | SmallTest | Level3)
772 {
773     xmlNodePtr currNode = xmlNewNode(nullptr, reinterpret_cast<const xmlChar*>("displayMode"));
774     ASSERT_NE(currNode, nullptr);
775     ScreenSceneConfig::ReadPhysicalDisplayConfigInfo(currNode);
776     xmlNodeSetContent(currNode, reinterpret_cast<const xmlChar*>(" "));
777     xmlFreeNode(currNode);
778 }
779 
780 /**
781  * @tc.name: ReadPhysicalDisplayConfigInfo03
782  * @tc.desc: ReadPhysicalDisplayConfigInfo
783  * @tc.type: FUNC
784  */
785 HWTEST_F(ScreenSceneConfigTest, ReadPhysicalDisplayConfigInfo03, Function | SmallTest | Level3)
786 {
787     xmlNodePtr currNode = xmlNewNode(nullptr, reinterpret_cast<const xmlChar*>("displayMode"));
788     ASSERT_NE(currNode, nullptr);
789     ScreenSceneConfig::ReadPhysicalDisplayConfigInfo(currNode);
790     xmlNodeSetContent(currNode, reinterpret_cast<const xmlChar*>("100:200"));
791     xmlFreeNode(currNode);
792 }
793 
794 /**
795  * @tc.name: ReadPhysicalDisplayConfigInfo04
796  * @tc.desc: ReadPhysicalDisplayConfigInfo
797  * @tc.type: FUNC
798  */
799 HWTEST_F(ScreenSceneConfigTest, ReadPhysicalDisplayConfigInfo04, Function | SmallTest | Level3)
800 {
801     xmlNodePtr currNode = xmlNewNode(nullptr, reinterpret_cast<const xmlChar*>("displayMode"));
802     ASSERT_NE(currNode, nullptr);
803     ScreenSceneConfig::ReadPhysicalDisplayConfigInfo(currNode);
804     xmlNodeSetContent(currNode, reinterpret_cast<const xmlChar*>("FOLD_DISPLAY_MODE_FULL:100:200"));
805     xmlFreeNode(currNode);
806 }
807 
808 /**
809  * @tc.name: ReadPhysicalDisplayConfigInfo05
810  * @tc.desc: ReadPhysicalDisplayConfigInfo
811  * @tc.type: FUNC
812  */
813 HWTEST_F(ScreenSceneConfigTest, ReadPhysicalDisplayConfigInfo05, Function | SmallTest | Level3)
814 {
815     xmlNodePtr currNode = xmlNewNode(nullptr, reinterpret_cast<const xmlChar*>("displayMode"));
816     ASSERT_NE(currNode, nullptr);
817     ScreenSceneConfig::ReadPhysicalDisplayConfigInfo(currNode);
818     xmlNodeSetContent(currNode, reinterpret_cast<const xmlChar*>("FOLD_DISPLAY_MODE_MAIN:100:200"));
819     xmlFreeNode(currNode);
820 }
821 
822 /**
823  * @tc.name: ReadPhysicalDisplayConfigInfo06
824  * @tc.desc: ReadPhysicalDisplayConfigInfo
825  * @tc.type: FUNC
826  */
827 HWTEST_F(ScreenSceneConfigTest, ReadPhysicalDisplayConfigInfo0, Function | SmallTest | Level3)
828 {
829     xmlNodePtr currNode = xmlNewNode(nullptr, reinterpret_cast<const xmlChar*>("displayMode"));
830     ASSERT_NE(currNode, nullptr);
831     ScreenSceneConfig::ReadPhysicalDisplayConfigInfo(currNode);
832     xmlNodeSetContent(currNode, reinterpret_cast<const xmlChar*>("FOLD_DISPLAY_MODE_SUB:100:200"));
833     xmlFreeNode(currNode);
834 }
835 
836 /**
837  * @tc.name: ReadPhysicalDisplayConfigInfo07
838  * @tc.desc: ReadPhysicalDisplayConfigInfo
839  * @tc.type: FUNC
840  */
841 HWTEST_F(ScreenSceneConfigTest, ReadPhysicalDisplayConfigInfo07, Function | SmallTest | Level3)
842 {
843     xmlNodePtr currNode = xmlNewNode(nullptr, reinterpret_cast<const xmlChar*>("displayMode"));
844     ASSERT_NE(currNode, nullptr);
845     ScreenSceneConfig::ReadPhysicalDisplayConfigInfo(currNode);
846     xmlNodeSetContent(currNode, reinterpret_cast<const xmlChar*>("UNKNOWN:100:200"));
847     xmlFreeNode(currNode);
848 }
849 
850 /**
851  * @tc.name: ReadPhysicalDisplayConfigInfo08
852  * @tc.desc: ReadPhysicalDisplayConfigInfo
853  * @tc.type: FUNC
854  */
855 HWTEST_F(ScreenSceneConfigTest, ReadPhysicalDisplayConfigInfo08, Function | SmallTest | Level3)
856 {
857     xmlNodePtr currNode = xmlNewNode(nullptr, reinterpret_cast<const xmlChar*>("displayMode"));
858     ASSERT_NE(currNode, nullptr);
859     ScreenSceneConfig::ReadPhysicalDisplayConfigInfo(currNode);
860     xmlNodeSetContent(currNode, reinterpret_cast<const xmlChar*>("FOLD_DISPLAY_MODE_FULL:abc:def"));
861     xmlFreeNode(currNode);
862 }
863 
864 /**
865  * @tc.name: ReadScrollableParam01
866  * @tc.desc: ReadScrollableParam
867  * @tc.type: FUNC
868  */
869 HWTEST_F(ScreenSceneConfigTest, ReadScrollableParam01, Function | SmallTest | Level3)
870 {
871     xmlNodePtr currNode = xmlNewNode(nullptr, reinterpret_cast<const xmlChar*>("displayMode"));
872     ASSERT_NE(currNode, nullptr);
873     ScreenSceneConfig::ReadScrollableParam(currNode);
874     xmlFreeNode(currNode);
875 }
876 
877 /**
878  * @tc.name: ReadScrollableParam02
879  * @tc.desc: ReadScrollableParam
880  * @tc.type: FUNC
881  */
882 HWTEST_F(ScreenSceneConfigTest, ReadScrollableParam02, Function | SmallTest | Level3)
883 {
884     xmlNodePtr currNode = xmlNewNode(nullptr, reinterpret_cast<const xmlChar*>("displayMode"));
885     ASSERT_NE(currNode, nullptr);
886     xmlNodeSetContent(currNode, reinterpret_cast<const xmlChar*>("FOLD_DISPLAY_MODE_FULL:1.5:0.5"));
887     ScreenSceneConfig::ReadScrollableParam(currNode);
888     xmlFreeNode(currNode);
889 }
890 
891 /**
892  * @tc.name: ReadScrollableParam03
893  * @tc.desc: ReadScrollableParam
894  * @tc.type: FUNC
895  */
896 HWTEST_F(ScreenSceneConfigTest, ReadScrollableParam03, Function | SmallTest | Level3)
897 {
898     xmlNodePtr currNode = xmlNewNode(nullptr, reinterpret_cast<const xmlChar*>("displayMode"));
899     ASSERT_NE(currNode, nullptr);
900     xmlNodeSetContent(currNode, reinterpret_cast<const xmlChar*>("FOLD_DISPLAY_MODE_MAIN:1.5:0.5"));
901     ScreenSceneConfig::ReadScrollableParam(currNode);
902     xmlFreeNode(currNode);
903 }
904 
905 /**
906  * @tc.name: ReadScrollableParam04
907  * @tc.desc: ReadScrollableParam
908  * @tc.type: FUNC
909  */
910 HWTEST_F(ScreenSceneConfigTest, ReadScrollableParam04, Function | SmallTest | Level3)
911 {
912     xmlNodePtr currNode = xmlNewNode(nullptr, reinterpret_cast<const xmlChar*>("displayMode"));
913     ASSERT_NE(currNode, nullptr);
914     xmlNodeSetContent(currNode, reinterpret_cast<const xmlChar*>("FOLD_DISPLAY_MODE_SUB:1.5:0.5"));
915     ScreenSceneConfig::ReadScrollableParam(currNode);
916     xmlFreeNode(currNode);
917 }
918 
919 /**
920  * @tc.name: ReadScrollableParam05
921  * @tc.desc: ReadScrollableParam
922  * @tc.type: FUNC
923  */
924 HWTEST_F(ScreenSceneConfigTest, ReadScrollableParam05, Function | SmallTest | Level3)
925 {
926     xmlNodePtr currNode = xmlNewNode(nullptr, reinterpret_cast<const xmlChar*>("displayMode"));
927     ASSERT_NE(currNode, nullptr);
928     xmlNodeSetContent(currNode, reinterpret_cast<const xmlChar*>("UNKNOWN:1.5:0.5"));
929     ScreenSceneConfig::ReadScrollableParam(currNode);
930     xmlFreeNode(currNode);
931 }
932 
933 /**
934  * @tc.name: ReadScrollableParam06
935  * @tc.desc: ReadScrollableParam
936  * @tc.type: FUNC
937  */
938 HWTEST_F(ScreenSceneConfigTest, ReadScrollableParam06, Function | SmallTest | Level3)
939 {
940     xmlNodePtr currNode = xmlNewNode(nullptr, reinterpret_cast<const xmlChar*>("displayMode"));
941     ASSERT_NE(currNode, nullptr);
942         xmlNodeSetContent(currNode, reinterpret_cast<const xmlChar*>("FOLD_DISPLAY_MODE_FULL:1.5:"));
943     ScreenSceneConfig::ReadScrollableParam(currNode);
944     xmlFreeNode(currNode);
945 }
946 
947 /**
948  * @tc.name: ReadScrollableParam07
949  * @tc.desc: ReadScrollableParam
950  * @tc.type: FUNC
951  */
952 HWTEST_F(ScreenSceneConfigTest, ReadScrollableParam07, Function | SmallTest | Level3)
953 {
954     xmlNodePtr currNode = xmlNewNode(nullptr, reinterpret_cast<const xmlChar*>("displayMode"));
955     ASSERT_NE(currNode, nullptr);
956     xmlNodeSetContent(currNode, reinterpret_cast<const xmlChar*>(" "));
957     ScreenSceneConfig::ReadScrollableParam(currNode);
958     xmlFreeNode(currNode);
959 }
960 
961 /**
962  * @tc.name: ReadScrollableParam08
963  * @tc.desc: ReadScrollableParam
964  * @tc.type: FUNC
965  */
966 HWTEST_F(ScreenSceneConfigTest, ReadScrollableParam08, Function | SmallTest | Level3)
967 {
968     xmlNodePtr currNode = xmlNewNode(nullptr, reinterpret_cast<const xmlChar*>("displayMode"));
969     ASSERT_NE(currNode, nullptr);
970     xmlNodeSetContent(currNode, reinterpret_cast<const xmlChar*>("UNKNOWN:!!:aa"));
971     ScreenSceneConfig::ReadScrollableParam(currNode);
972     xmlFreeNode(currNode);
973 }
974 
975 /**
976  * @tc.name: ReadScrollableParam09
977  * @tc.desc: ReadScrollableParam
978  * @tc.type: FUNC
979  */
980 HWTEST_F(ScreenSceneConfigTest, ReadScrollableParam09, Function | SmallTest | Level3)
981 {
982     xmlNodePtr currNode = xmlNewNode(nullptr, reinterpret_cast<const xmlChar*>("displayMode"));
983     ASSERT_NE(currNode, nullptr);
984     xmlNodeSetContent(currNode, reinterpret_cast<const xmlChar*>("FOLD_DISPLAY_MODE_COORDINATION:1.5:0.5"));
985     ScreenSceneConfig::ReadScrollableParam(currNode);
986     xmlFreeNode(currNode);
987 }
988 
989 /**
990  * @tc.name: ParseNodeConfig01
991  * @tc.desc: Test if ParseNodeConfig correctly calls ReadEnableConfigInfo when node name matches.
992  * @tc.type: FUNC
993  */
994 HWTEST_F(ScreenSceneConfigTest, ParseNodeConfig01, Function | SmallTest | Level3)
995 {
996     xmlNodePtr currNode = xmlNewNode(nullptr, reinterpret_cast<const xmlChar*>("IS_WATERFALL_DISPLAY"));
997     ASSERT_NE(currNode, nullptr);
998     ScreenSceneConfig::ParseNodeConfig(currNode);
999     xmlFreeNode(currNode);
1000 }
1001 
1002 /**
1003  * @tc.name: ParseNodeConfig02
1004  * @tc.desc: Test if ParseNodeConfig correctly calls ReadIntNumbersConfigInfo when node name matches.
1005  * @tc.type: FUNC
1006  */
1007 HWTEST_F(ScreenSceneConfigTest, ParseNodeConfig02, Function | SmallTest | Level3)
1008 {
1009     xmlNodePtr currNode = xmlNewNode(nullptr, reinterpret_cast<const xmlChar*>("DPI"));
1010     ASSERT_NE(currNode, nullptr);
1011     ScreenSceneConfig::ParseNodeConfig(currNode);
1012     xmlFreeNode(currNode);
1013 }
1014 
1015 /**
1016  * @tc.name: ParseNodeConfig03
1017  * @tc.desc: Test if ParseNodeConfig correctly calls ReadStringConfigInfo when node name matches.
1018  * @tc.type: FUNC
1019  */
1020 HWTEST_F(ScreenSceneConfigTest, ParseNodeConfig03, Function | SmallTest | Level3)
1021 {
1022     xmlNodePtr currNode = xmlNewNode(nullptr, reinterpret_cast<const xmlChar*>("DEFAULT_DISPLAY_CUTOUT_PATH"));
1023     ASSERT_NE(currNode, nullptr);
1024     ScreenSceneConfig::ParseNodeConfig(currNode);
1025     xmlFreeNode(currNode);
1026 }
1027 
1028 /**
1029  * @tc.name: ParseNodeConfig04
1030  * @tc.desc: Test if ParseNodeConfig correctly calls ReadStringListConfigInfo when node name matches.
1031  * @tc.type: FUNC
1032  */
1033 HWTEST_F(ScreenSceneConfigTest, ParseNodeConfig04, Function | SmallTest | Level3)
1034 {
1035     xmlNodePtr currNode = xmlNewNode(nullptr, reinterpret_cast<const xmlChar*>("HALL_SWITCH_APP"));
1036     ASSERT_NE(currNode, nullptr);
1037     ScreenSceneConfig::ParseNodeConfig(currNode);
1038     xmlFreeNode(currNode);
1039 }
1040 
1041 /**
1042  * @tc.name: ParseNodeConfig05
1043  * @tc.desc: Test if ParseNodeConfig correctly calls ReadPhysicalDisplayConfigInfo when node name matches.
1044  * @tc.type: FUNC
1045  */
1046 HWTEST_F(ScreenSceneConfigTest, ParseNodeConfig05, Function | SmallTest | Level3)
1047 {
1048     xmlNodePtr currNode = xmlNewNode(nullptr, reinterpret_cast<const xmlChar*>("PHYSICAL_DISPLAY_RESOLUTION"));
1049     ASSERT_NE(currNode, nullptr);
1050     ScreenSceneConfig::ParseNodeConfig(currNode);
1051     xmlFreeNode(currNode);
1052 }
1053 
1054 /**
1055  * @tc.name: ParseNodeConfig06
1056  * @tc.desc: Test if ParseNodeConfig correctly calls ReadScrollableParam when node name matches.
1057  * @tc.type: FUNC
1058  */
1059 HWTEST_F(ScreenSceneConfigTest, ParseNodeConfig06, Function | SmallTest | Level3)
1060 {
1061     xmlNodePtr currNode = xmlNewNode(nullptr, reinterpret_cast<const xmlChar*>("SCROLLABLE_PARAM"));
1062     ASSERT_NE(currNode, nullptr);
1063     ScreenSceneConfig::ParseNodeConfig(currNode);
1064     xmlFreeNode(currNode);
1065 }
1066 
1067 /**
1068  * @tc.name: ParseNodeConfig07
1069  * @tc.desc: Test if ParseNodeConfig logs a warning when node name does not match any known node.
1070  * @tc.type: FUNC
1071  */
1072 HWTEST_F(ScreenSceneConfigTest, ParseNodeConfig07, Function | SmallTest | Level3)
1073 {
1074     xmlNodePtr currNode = xmlNewNode(nullptr, reinterpret_cast<const xmlChar*>("UNKNOWN_NODE"));
1075     ASSERT_NE(currNode, nullptr);
1076     ScreenSceneConfig::ParseNodeConfig(currNode);
1077     xmlFreeNode(currNode);
1078 }
1079 }
1080 } // namespace Rosen
1081 } // namespace OHOS
1082