• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 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 <list>
17 #include <unordered_map>
18 #include <vector>
19 
20 #include "gtest/gtest.h"
21 
22 #define protected public
23 #define private public
24 
25 #include "base/geometry/dimension.h"
26 #include "base/geometry/dimension_rect.h"
27 #include "base/geometry/ng/offset_t.h"
28 #include "base/json/json_util.h"
29 #include "base/log/dump_log.h"
30 #include "base/memory/referenced.h"
31 #include "base/utils/system_properties.h"
32 #include "core/common/ace_application_info.h"
33 #include "core/common/resource/resource_configuration.h"
34 #include "core/components/common/layout/screen_system_manager.h"
35 #include "core/components_ng/animation/geometry_transition.h"
36 #include "core/components_ng/base/frame_node.h"
37 #include "core/components_ng/base/frame_scene_status.h"
38 #include "core/components_ng/base/modifier.h"
39 #include "core/components_ng/event/focus_hub.h"
40 #include "core/components_ng/layout/layout_wrapper.h"
41 #include "core/components_ng/pattern/linear_layout/linear_layout_pattern.h"
42 #include "core/components_ng/pattern/pattern.h"
43 #include "core/components_ng/pattern/stack/stack_pattern.h"
44 #include "core/components_ng/syntax/if_else_model_ng.h"
45 #include "test/mock/core/render/mock_render_context.h"
46 #include "core/components_v2/inspector/inspector_constants.h"
47 #include "core/event/mouse_event.h"
48 #include "core/pipeline_ng/pipeline_context.h"
49 #include "test/mock/core/common/mock_udmf.h"
50 #include "test/mock/core/pipeline/mock_pipeline_context.h"
51 
52 using namespace testing;
53 using namespace testing::ext;
54 
55 namespace OHOS::Ace::NG {
56 namespace {
57 const InspectorFilter filter;
58 const std::string NODE_TAG_ONE("111");
59 const std::string NODE_TAG_A("aaa");
60 const std::string NODE_TAG_SPOT("...");
61 const std::string NODE_TAG_EMPTY("");
62 } // namespace
63 class FrameNodeDropTestNg : public testing::Test {
64 public:
65     static void SetUpTestSuite();
66     static void TearDownTestSuite();
67 };
68 
SetUpTestSuite()69 void FrameNodeDropTestNg::SetUpTestSuite()
70 {
71     MockPipelineContext::SetUp();
72 }
73 
TearDownTestSuite()74 void FrameNodeDropTestNg::TearDownTestSuite()
75 {
76     MockPipelineContext::TearDown();
77 }
78 
79 class TestNode : public UINode {
80     DECLARE_ACE_TYPE(TestNode, UINode);
81 
82 public:
CreateTestNode(int32_t nodeId)83     static RefPtr<TestNode> CreateTestNode(int32_t nodeId)
84     {
85         auto node = MakeRefPtr<TestNode>(nodeId);
86         return node;
87     }
88 
IsAtomicNode() const89     bool IsAtomicNode() const override
90     {
91         return true;
92     }
93 
TestNode(int32_t nodeId)94     explicit TestNode(int32_t nodeId) : UINode("TestNode", nodeId) {}
95     ~TestNode() override = default;
96 };
97 
98 /**
99  * @tc.name: FrameNodeDropTestNg001
100  * @tc.desc: Test frame node method
101  * @tc.type: FUNC
102  */
103 HWTEST_F(FrameNodeDropTestNg, FrameNodeDropTestNg001, TestSize.Level1)
104 {
105     /**
106      * @tc.steps: step1. construct a frameNode.
107      * @tc.expected: frameNode is not null.
108      */
109     auto frameNodeNullId = ElementRegister::GetInstance()->MakeUniqueId();
110     auto frameNode = AceType::MakeRefPtr<FrameNode>(NODE_TAG_EMPTY, frameNodeNullId, AceType::MakeRefPtr<Pattern>());
111     ASSERT_NE(frameNode, nullptr);
112 
113     /**
114      * @tc.steps: step2. construct a allowDropSet.
115      * @tc.expected: allowDropSet is not null.
116      */
117     std::set<std::string> allowDropSet = { NODE_TAG_EMPTY };
118 
119     /**
120      * @tc.steps: step3. Set an allowDrop in the frameNode and then get an allowDrop.
121      * @tc.expected: The set allowDrop is the same as the get allowDrop.
122      */
123     frameNode->SetAllowDrop(allowDropSet);
124     std::set<std::string> allowDropGet = frameNode->GetAllowDrop();
125     EXPECT_EQ(allowDropGet, allowDropSet);
126 
127     /**
128      * @tc.steps: step4. Set an isDisallowDropForcedly in the frameNode and then get an isDisallowDropForcedly.
129      * @tc.expected: The set isDisallowDropForcedly is the same as the get isDisallowDropForcedly.
130      */
131     bool isDisallowDropForcedly = frameNode->GetDisallowDropForcedly();
132     ASSERT_FALSE(isDisallowDropForcedly);
133 }
134 
135 /**
136  * @tc.name: FrameNodeDropTestNg002
137  * @tc.desc: Test frame node method
138  * @tc.type: FUNC
139  */
140 HWTEST_F(FrameNodeDropTestNg, FrameNodeDropTestNg002, TestSize.Level1)
141 {
142     /**
143      * @tc.steps: step1. construct a frameNode.
144      * @tc.expected: frameNode is not null.
145      */
146     auto frameNodeNullId = ElementRegister::GetInstance()->MakeUniqueId();
147     auto frameNode = AceType::MakeRefPtr<FrameNode>(NODE_TAG_ONE, frameNodeNullId, AceType::MakeRefPtr<Pattern>());
148     ASSERT_NE(frameNode, nullptr);
149 
150     /**
151      * @tc.steps: step2. construct a allowDropSet.
152      * @tc.expected: allowDropSet is not null.
153      */
154     std::set<std::string> allowDropSet = { NODE_TAG_ONE };
155 
156     /**
157      * @tc.steps: step3. Set an allowDrop in the frameNode and then get an allowDrop.
158      * @tc.expected: The set allowDrop is the same as the get allowDrop.
159      */
160     frameNode->SetAllowDrop(allowDropSet);
161     std::set<std::string> allowDropGet = frameNode->GetAllowDrop();
162     EXPECT_EQ(allowDropGet, allowDropSet);
163 
164     /**
165      * @tc.steps: step4. Set an isDisallowDropForcedly in the frameNode and then get an isDisallowDropForcedly.
166      * @tc.expected: The set isDisallowDropForcedly is the same as the get isDisallowDropForcedly.
167      */
168     bool isDisallowDropForcedly = frameNode->GetDisallowDropForcedly();
169     ASSERT_FALSE(isDisallowDropForcedly);
170 }
171 
172 /**
173  * @tc.name: FrameNodeDropTestNg003
174  * @tc.desc: Test frame node method
175  * @tc.type: FUNC
176  */
177 HWTEST_F(FrameNodeDropTestNg, FrameNodeDropTestNg003, TestSize.Level1)
178 {
179     /**
180      * @tc.steps: step1. construct a frameNode.
181      * @tc.expected: frameNode is not null.
182      */
183     auto frameNodeNullId = ElementRegister::GetInstance()->MakeUniqueId();
184     auto frameNode = AceType::MakeRefPtr<FrameNode>(NODE_TAG_SPOT, frameNodeNullId, AceType::MakeRefPtr<Pattern>());
185     ASSERT_NE(frameNode, nullptr);
186 
187     /**
188      * @tc.steps: step2. construct a allowDropSet.
189      * @tc.expected: allowDropSet is not null.
190      */
191     std::set<std::string> allowDropSet = { NODE_TAG_SPOT };
192 
193     /**
194      * @tc.steps: step3. Set an allowDrop in the frameNode and then get an allowDrop.
195      * @tc.expected: The set allowDrop is the same as the get allowDrop.
196      */
197     frameNode->SetAllowDrop(allowDropSet);
198     std::set<std::string> allowDropGet = frameNode->GetAllowDrop();
199     EXPECT_EQ(allowDropGet, allowDropSet);
200 
201     /**
202      * @tc.steps: step4. Set an isDisallowDropForcedly in the frameNode and then get an isDisallowDropForcedly.
203      * @tc.expected: The set isDisallowDropForcedly is the same as the get isDisallowDropForcedly.
204      */
205     bool isDisallowDropForcedly = frameNode->GetDisallowDropForcedly();
206     ASSERT_FALSE(isDisallowDropForcedly);
207 }
208 
209 /**
210  * @tc.name: FrameNodeDropTestNg004
211  * @tc.desc: Test frame node method
212  * @tc.type: FUNC
213  */
214 HWTEST_F(FrameNodeDropTestNg, FrameNodeDropTestNg004, TestSize.Level1)
215 {
216     /**
217      * @tc.steps: step1. construct a frameNode.
218      * @tc.expected: frameNode is not null.
219      */
220     auto frameNodeNullId = ElementRegister::GetInstance()->MakeUniqueId();
221     auto frameNode = AceType::MakeRefPtr<FrameNode>(NODE_TAG_A, frameNodeNullId, AceType::MakeRefPtr<Pattern>());
222     ASSERT_NE(frameNode, nullptr);
223 
224     /**
225      * @tc.steps: step2. construct a allowDropSet.
226      * @tc.expected: allowDropSet is not null.
227      */
228     std::set<std::string> allowDropSet = { NODE_TAG_A };
229 
230     /**
231      * @tc.steps: step3. Set an allowDrop in the frameNode and then get an allowDrop.
232      * @tc.expected: The set allowDrop is the same as the get allowDrop.
233      */
234     frameNode->SetAllowDrop(allowDropSet);
235     std::set<std::string> allowDropGet = frameNode->GetAllowDrop();
236     EXPECT_EQ(allowDropGet, allowDropSet);
237 
238     /**
239      * @tc.steps: step4. Set an isDisallowDropForcedly in the frameNode and then get an isDisallowDropForcedly.
240      * @tc.expected: The set isDisallowDropForcedly is the same as the get isDisallowDropForcedly.
241      */
242     bool isDisallowDropForcedly = frameNode->GetDisallowDropForcedly();
243     ASSERT_FALSE(isDisallowDropForcedly);
244 }
245 
246 /**
247  * @tc.name: FrameNodeDropTestNg005
248  * @tc.desc: Test frame node method
249  * @tc.type: FUNC
250  */
251 HWTEST_F(FrameNodeDropTestNg, FrameNodeDropTestNg005, TestSize.Level1)
252 {
253     /**
254      * @tc.steps: step1. construct a frameNode.
255      * @tc.expected: frameNode is not null.
256      */
257     auto frameNode = FrameNode::CreateFrameNode("main", 1, AceType::MakeRefPtr<Pattern>(), true);
258     ASSERT_NE(frameNode, nullptr);
259 
260     /**
261      * @tc.steps: step2. construct a allowDropSet.
262      * @tc.expected: allowDropSet is not null.
263      */
264     std::set<std::string> allowDropSet;
265 
266     /**
267      * @tc.steps: step3. Set an allowDrop in the frameNode and then get an allowDrop.
268      * @tc.expected: The set allowDrop is the same as the get allowDrop.
269      */
270     frameNode->SetAllowDrop(allowDropSet);
271     std::set<std::string> allowDropGet = frameNode->GetAllowDrop();
272     EXPECT_EQ(allowDropGet, allowDropSet);
273 
274     /**
275      * @tc.steps: step4. Set an isDisallowDropForcedly in the frameNode and then get an isDisallowDropForcedly.
276      * @tc.expected: The set isDisallowDropForcedly is the same as the get isDisallowDropForcedly.
277      */
278     bool isDisallowDropForcedly = frameNode->GetDisallowDropForcedly();
279     ASSERT_FALSE(isDisallowDropForcedly);
280 }
281 
282 /**
283  * @tc.name: FrameNodeDropTestNg006
284  * @tc.desc: Test frame node method
285  * @tc.type: FUNC
286  */
287 HWTEST_F(FrameNodeDropTestNg, FrameNodeDropTestNg006, TestSize.Level1)
288 {
289     /**
290      * @tc.steps: step1. construct a frameNode.
291      * @tc.expected: frameNode is not null.
292      */
293     auto frameNodeNullId = ElementRegister::GetInstance()->MakeUniqueId();
294     auto frameNode = AceType::MakeRefPtr<FrameNode>(NODE_TAG_EMPTY, frameNodeNullId, AceType::MakeRefPtr<Pattern>());
295     ASSERT_NE(frameNode, nullptr);
296 
297     /**
298      * @tc.steps: step2. construct a allowDropSet.
299      * @tc.expected: allowDropSet is not null.
300      */
301     std::set<std::string> allowDropSet = { NODE_TAG_EMPTY };
302 
303     /**
304      * @tc.steps: step3. Set an allowDrop in the frameNode and then get an allowDrop.
305      * @tc.expected: The set allowDrop is the same as the get allowDrop.
306      */
307     frameNode->SetAllowDrop(allowDropSet);
308     std::set<std::string> allowDropGet = frameNode->GetAllowDrop();
309     EXPECT_EQ(allowDropGet, allowDropSet);
310 
311     /**
312      * @tc.steps: step4. Set an isDisallowDropForcedly in the frameNode and then get an isDisallowDropForcedly.
313      * @tc.expected: The set isDisallowDropForcedly is the same as the get isDisallowDropForcedly.
314      */
315     bool isDisallowDrop = true;
316     ASSERT_TRUE(isDisallowDrop);
317     frameNode->SetDisallowDropForcedly(isDisallowDrop);
318     bool isDisallowDropForcedly = frameNode->GetDisallowDropForcedly();
319     ASSERT_TRUE(isDisallowDropForcedly);
320 }
321 
322 /**
323  * @tc.name: FrameNodeDropTestNg007
324  * @tc.desc: Test frame node method
325  * @tc.type: FUNC
326  */
327 HWTEST_F(FrameNodeDropTestNg, FrameNodeDropTestNg007, TestSize.Level1)
328 {
329     /**
330      * @tc.steps: step1. construct a frameNode.
331      * @tc.expected: frameNode is not null.
332      */
333     auto frameNodeNullId = ElementRegister::GetInstance()->MakeUniqueId();
334     auto frameNode = AceType::MakeRefPtr<FrameNode>(NODE_TAG_ONE, frameNodeNullId, AceType::MakeRefPtr<Pattern>());
335     ASSERT_NE(frameNode, nullptr);
336 
337     /**
338      * @tc.steps: step2. construct a allowDropSet.
339      * @tc.expected: allowDropSet is not null.
340      */
341     std::set<std::string> allowDropSet = { NODE_TAG_ONE };
342 
343     /**
344      * @tc.steps: step3. Set an allowDrop in the frameNode and then get an allowDrop.
345      * @tc.expected: The set allowDrop is the same as the get allowDrop.
346      */
347     frameNode->SetAllowDrop(allowDropSet);
348     std::set<std::string> allowDropGet = frameNode->GetAllowDrop();
349     EXPECT_EQ(allowDropGet, allowDropSet);
350 
351     /**
352      * @tc.steps: step4. Set an isDisallowDropForcedly in the frameNode and then get an isDisallowDropForcedly.
353      * @tc.expected: The set isDisallowDropForcedly is the same as the get isDisallowDropForcedly.
354      */
355     bool isDisallowDrop = true;
356     ASSERT_TRUE(isDisallowDrop);
357     frameNode->SetDisallowDropForcedly(isDisallowDrop);
358     bool isDisallowDropForcedly = frameNode->GetDisallowDropForcedly();
359     ASSERT_TRUE(isDisallowDropForcedly);
360 }
361 
362 /**
363  * @tc.name: FrameNodeDropTestNg008
364  * @tc.desc: Test frame node method
365  * @tc.type: FUNC
366  */
367 HWTEST_F(FrameNodeDropTestNg, FrameNodeDropTestNg008, TestSize.Level1)
368 {
369     /**
370      * @tc.steps: step1. construct a frameNode.
371      * @tc.expected: frameNode is not null.
372      */
373     auto frameNodeNullId = ElementRegister::GetInstance()->MakeUniqueId();
374     auto frameNode = AceType::MakeRefPtr<FrameNode>(NODE_TAG_SPOT, frameNodeNullId, AceType::MakeRefPtr<Pattern>());
375     ASSERT_NE(frameNode, nullptr);
376 
377     /**
378      * @tc.steps: step2. construct a allowDropSet.
379      * @tc.expected: allowDropSet is not null.
380      */
381     std::set<std::string> allowDropSet = { NODE_TAG_SPOT };
382 
383     /**
384      * @tc.steps: step3. Set an allowDrop in the frameNode and then get an allowDrop.
385      * @tc.expected: The set allowDrop is the same as the get allowDrop.
386      */
387     frameNode->SetAllowDrop(allowDropSet);
388     std::set<std::string> allowDropGet = frameNode->GetAllowDrop();
389     EXPECT_EQ(allowDropGet, allowDropSet);
390 
391     /**
392      * @tc.steps: step4. Set an isDisallowDropForcedly in the frameNode and then get an isDisallowDropForcedly.
393      * @tc.expected: The set isDisallowDropForcedly is the same as the get isDisallowDropForcedly.
394      */
395     bool isDisallowDrop = true;
396     ASSERT_TRUE(isDisallowDrop);
397     frameNode->SetDisallowDropForcedly(isDisallowDrop);
398     bool isDisallowDropForcedly = frameNode->GetDisallowDropForcedly();
399     ASSERT_TRUE(isDisallowDropForcedly);
400 }
401 
402 /**
403  * @tc.name: FrameNodeDropTestNg009
404  * @tc.desc: Test frame node method
405  * @tc.type: FUNC
406  */
407 HWTEST_F(FrameNodeDropTestNg, FrameNodeDropTestNg009, TestSize.Level1)
408 {
409     /**
410      * @tc.steps: step1. construct a frameNode.
411      * @tc.expected: frameNode is not null.
412      */
413     auto frameNodeNullId = ElementRegister::GetInstance()->MakeUniqueId();
414     auto frameNode = AceType::MakeRefPtr<FrameNode>(NODE_TAG_A, frameNodeNullId, AceType::MakeRefPtr<Pattern>());
415     ASSERT_NE(frameNode, nullptr);
416 
417     /**
418      * @tc.steps: step2. construct a allowDropSet.
419      * @tc.expected: allowDropSet is not null.
420      */
421     std::set<std::string> allowDropSet = { NODE_TAG_A };
422 
423     /**
424      * @tc.steps: step3. Set an allowDrop in the frameNode and then get an allowDrop.
425      * @tc.expected: The set allowDrop is the same as the get allowDrop.
426      */
427     frameNode->SetAllowDrop(allowDropSet);
428     std::set<std::string> allowDropGet = frameNode->GetAllowDrop();
429     EXPECT_EQ(allowDropGet, allowDropSet);
430 
431     /**
432      * @tc.steps: step4. Set an isDisallowDropForcedly in the frameNode and then get an isDisallowDropForcedly.
433      * @tc.expected: The set isDisallowDropForcedly is the same as the get isDisallowDropForcedly.
434      */
435     bool isDisallowDrop = true;
436     ASSERT_TRUE(isDisallowDrop);
437     frameNode->SetDisallowDropForcedly(isDisallowDrop);
438     bool isDisallowDropForcedly = frameNode->GetDisallowDropForcedly();
439     ASSERT_TRUE(isDisallowDropForcedly);
440 }
441 
442 /**
443  * @tc.name: FrameNodeDropTestNg010
444  * @tc.desc: Test frame node method
445  * @tc.type: FUNC
446  */
447 HWTEST_F(FrameNodeDropTestNg, FrameNodeDropTestNg010, TestSize.Level1)
448 {
449     /**
450      * @tc.steps: step1. construct a frameNode.
451      * @tc.expected: frameNode is not null.
452      */
453     auto frameNode = FrameNode::CreateFrameNode("main", 1, AceType::MakeRefPtr<Pattern>(), true);
454     ASSERT_NE(frameNode, nullptr);
455 
456     /**
457      * @tc.steps: step2. construct a allowDropSet.
458      * @tc.expected: allowDropSet is not null.
459      */
460     std::set<std::string> allowDropSet;
461 
462     /**
463      * @tc.steps: step3. Set an allowDrop in the frameNode and then get an allowDrop.
464      * @tc.expected: The set allowDrop is the same as the get allowDrop.
465      */
466     frameNode->SetAllowDrop(allowDropSet);
467     std::set<std::string> allowDropGet = frameNode->GetAllowDrop();
468     EXPECT_EQ(allowDropGet, allowDropSet);
469 
470     /**
471      * @tc.steps: step4. Set an isDisallowDropForcedly in the frameNode and then get an isDisallowDropForcedly.
472      * @tc.expected: The set isDisallowDropForcedly is the same as the get isDisallowDropForcedly.
473      */
474     bool isDisallowDrop = true;
475     ASSERT_TRUE(isDisallowDrop);
476     frameNode->SetDisallowDropForcedly(isDisallowDrop);
477     bool isDisallowDropForcedly = frameNode->GetDisallowDropForcedly();
478     ASSERT_TRUE(isDisallowDropForcedly);
479 }
480 
481 /**
482  * @tc.name: FrameNodeDropTestNg011
483  * @tc.desc: Test frame node method
484  * @tc.type: FUNC
485  */
486 HWTEST_F(FrameNodeDropTestNg, FrameNodeDropTestNg011, TestSize.Level1)
487 {
488     /**
489      * @tc.steps: step1. construct a frameNode.
490      * @tc.expected: frameNode is not null.
491      */
492     auto frameNodeNullId = ElementRegister::GetInstance()->MakeUniqueId();
493     auto frameNode = AceType::MakeRefPtr<FrameNode>(NODE_TAG_EMPTY, frameNodeNullId, AceType::MakeRefPtr<Pattern>());
494     ASSERT_NE(frameNode, nullptr);
495 
496     /**
497      * @tc.steps: step2. construct a allowDropSet.
498      * @tc.expected: allowDropSet is not null.
499      */
500     std::set<std::string> allowDropSet = { NODE_TAG_EMPTY };
501 
502     /**
503      * @tc.steps: step3. Set an allowDrop in the frameNode and then get an allowDrop.
504      * @tc.expected: The set allowDrop is the same as the get allowDrop.
505      */
506     frameNode->SetAllowDrop(allowDropSet);
507     std::set<std::string> allowDropGet = frameNode->GetAllowDrop();
508     EXPECT_EQ(allowDropGet, allowDropSet);
509 
510     /**
511      * @tc.steps: step4. Set an isDisallowDropForcedly in the frameNode and then get an isDisallowDropForcedly.
512      * @tc.expected: The set isDisallowDropForcedly is the same as the get isDisallowDropForcedly.
513      */
514     bool isDisallowDrop = false;
515     ASSERT_FALSE(isDisallowDrop);
516     frameNode->SetDisallowDropForcedly(isDisallowDrop);
517     bool isDisallowDropForcedly = frameNode->GetDisallowDropForcedly();
518     ASSERT_FALSE(isDisallowDropForcedly);
519 }
520 
521 /**
522  * @tc.name: FrameNodeDropTestNg012
523  * @tc.desc: Test frame node method
524  * @tc.type: FUNC
525  */
526 HWTEST_F(FrameNodeDropTestNg, FrameNodeDropTestNg012, TestSize.Level1)
527 {
528     /**
529      * @tc.steps: step1. construct a frameNode.
530      * @tc.expected: frameNode is not null.
531      */
532     auto frameNodeNullId = ElementRegister::GetInstance()->MakeUniqueId();
533     auto frameNode = AceType::MakeRefPtr<FrameNode>(NODE_TAG_ONE, frameNodeNullId, AceType::MakeRefPtr<Pattern>());
534     ASSERT_NE(frameNode, nullptr);
535 
536     /**
537      * @tc.steps: step2. construct a allowDropSet.
538      * @tc.expected: allowDropSet is not null.
539      */
540     std::set<std::string> allowDropSet = { NODE_TAG_ONE };
541 
542     /**
543      * @tc.steps: step3. Set an allowDrop in the frameNode and then get an allowDrop.
544      * @tc.expected: The set allowDrop is the same as the get allowDrop.
545      */
546     frameNode->SetAllowDrop(allowDropSet);
547     std::set<std::string> allowDropGet = frameNode->GetAllowDrop();
548     EXPECT_EQ(allowDropGet, allowDropSet);
549 
550     /**
551      * @tc.steps: step4. Set an isDisallowDropForcedly in the frameNode and then get an isDisallowDropForcedly.
552      * @tc.expected: The set isDisallowDropForcedly is the same as the get isDisallowDropForcedly.
553      */
554     bool isDisallowDrop = false;
555     ASSERT_FALSE(isDisallowDrop);
556     frameNode->SetDisallowDropForcedly(isDisallowDrop);
557     bool isDisallowDropForcedly = frameNode->GetDisallowDropForcedly();
558     ASSERT_FALSE(isDisallowDropForcedly);
559 }
560 
561 /**
562  * @tc.name: FrameNodeDropTestNg013
563  * @tc.desc: Test frame node method
564  * @tc.type: FUNC
565  */
566 HWTEST_F(FrameNodeDropTestNg, FrameNodeDropTestNg013, TestSize.Level1)
567 {
568     /**
569      * @tc.steps: step1. construct a frameNode.
570      * @tc.expected: frameNode is not null.
571      */
572     auto frameNodeNullId = ElementRegister::GetInstance()->MakeUniqueId();
573     auto frameNode = AceType::MakeRefPtr<FrameNode>(NODE_TAG_SPOT, frameNodeNullId, AceType::MakeRefPtr<Pattern>());
574     ASSERT_NE(frameNode, nullptr);
575 
576     /**
577      * @tc.steps: step2. construct a allowDropSet.
578      * @tc.expected: allowDropSet is not null.
579      */
580     std::set<std::string> allowDropSet = { NODE_TAG_SPOT };
581 
582     /**
583      * @tc.steps: step3. Set an allowDrop in the frameNode and then get an allowDrop.
584      * @tc.expected: The set allowDrop is the same as the get allowDrop.
585      */
586     frameNode->SetAllowDrop(allowDropSet);
587     std::set<std::string> allowDropGet = frameNode->GetAllowDrop();
588     EXPECT_EQ(allowDropGet, allowDropSet);
589 
590     /**
591      * @tc.steps: step4. Set an isDisallowDropForcedly in the frameNode and then get an isDisallowDropForcedly.
592      * @tc.expected: The set isDisallowDropForcedly is the same as the get isDisallowDropForcedly.
593      */
594     bool isDisallowDrop = false;
595     ASSERT_FALSE(isDisallowDrop);
596     frameNode->SetDisallowDropForcedly(isDisallowDrop);
597     bool isDisallowDropForcedly = frameNode->GetDisallowDropForcedly();
598     ASSERT_FALSE(isDisallowDropForcedly);
599 }
600 
601 /**
602  * @tc.name: FrameNodeDropTestNg014
603  * @tc.desc: Test frame node method
604  * @tc.type: FUNC
605  */
606 HWTEST_F(FrameNodeDropTestNg, FrameNodeDropTestNg014, TestSize.Level1)
607 {
608     /**
609      * @tc.steps: step1. construct a frameNode.
610      * @tc.expected: frameNode is not null.
611      */
612     auto frameNodeNullId = ElementRegister::GetInstance()->MakeUniqueId();
613     auto frameNode = AceType::MakeRefPtr<FrameNode>(NODE_TAG_A, frameNodeNullId, AceType::MakeRefPtr<Pattern>());
614     ASSERT_NE(frameNode, nullptr);
615 
616     /**
617      * @tc.steps: step2. construct a allowDropSet.
618      * @tc.expected: allowDropSet is not null.
619      */
620     std::set<std::string> allowDropSet = { NODE_TAG_A };
621 
622     /**
623      * @tc.steps: step3. Set an allowDrop in the frameNode and then get an allowDrop.
624      * @tc.expected: The set allowDrop is the same as the get allowDrop.
625      */
626     frameNode->SetAllowDrop(allowDropSet);
627     std::set<std::string> allowDropGet = frameNode->GetAllowDrop();
628     EXPECT_EQ(allowDropGet, allowDropSet);
629 
630     /**
631      * @tc.steps: step4. Set an isDisallowDropForcedly in the frameNode and then get an isDisallowDropForcedly.
632      * @tc.expected: The set isDisallowDropForcedly is the same as the get isDisallowDropForcedly.
633      */
634     bool isDisallowDrop = false;
635     ASSERT_FALSE(isDisallowDrop);
636     frameNode->SetDisallowDropForcedly(isDisallowDrop);
637     bool isDisallowDropForcedly = frameNode->GetDisallowDropForcedly();
638     ASSERT_FALSE(isDisallowDropForcedly);
639 }
640 
641 /**
642  * @tc.name: FrameNodeDropTestNg015
643  * @tc.desc: Test frame node method
644  * @tc.type: FUNC
645  */
646 HWTEST_F(FrameNodeDropTestNg, FrameNodeDropTestNg015, TestSize.Level1)
647 {
648     /**
649      * @tc.steps: step1. construct a frameNode.
650      * @tc.expected: frameNode is not null.
651      */
652     auto frameNode = FrameNode::CreateFrameNode("main", 1, AceType::MakeRefPtr<Pattern>(), true);
653     ASSERT_NE(frameNode, nullptr);
654 
655     /**
656      * @tc.steps: step2. construct a allowDropSet.
657      * @tc.expected: allowDropSet is not null.
658      */
659     std::set<std::string> allowDropSet;
660 
661     /**
662      * @tc.steps: step3. Set an allowDrop in the frameNode and then get an allowDrop.
663      * @tc.expected: The set allowDrop is the same as the get allowDrop.
664      */
665     frameNode->SetAllowDrop(allowDropSet);
666     std::set<std::string> allowDropGet = frameNode->GetAllowDrop();
667     EXPECT_EQ(allowDropGet, allowDropSet);
668 
669     /**
670      * @tc.steps: step4. Set an isDisallowDropForcedly in the frameNode and then get an isDisallowDropForcedly.
671      * @tc.expected: The set isDisallowDropForcedly is the same as the get isDisallowDropForcedly.
672      */
673     bool isDisallowDrop = false;
674     ASSERT_FALSE(isDisallowDrop);
675     frameNode->SetDisallowDropForcedly(isDisallowDrop);
676     bool isDisallowDropForcedly = frameNode->GetDisallowDropForcedly();
677     ASSERT_FALSE(isDisallowDropForcedly);
678 }
679 
680 /**
681  * @tc.name: FrameNodeDropTestNg016
682  * @tc.desc: Test frame node method
683  * @tc.type: FUNC
684  */
685 HWTEST_F(FrameNodeDropTestNg, FrameNodeDropTestNg016, TestSize.Level1)
686 {
687     /**
688      * @tc.steps: step1. construct a DragDropManager.
689      * @tc.expected: dragDropManager is not null.
690      */
691     auto dragDropManager = AceType::MakeRefPtr<DragDropManager>();
692     ASSERT_NE(dragDropManager, nullptr);
693 
694     /**
695      * @tc.steps: step2. construct frameNode and update the properties.
696      * @tc.expected: frameNode is not null.
697      */
698     const std::string allowTag(NODE_TAG_SPOT);
699     auto frameNodeNullId = ElementRegister::GetInstance()->MakeUniqueId();
700     auto frameNode = AceType::MakeRefPtr<FrameNode>(allowTag, frameNodeNullId, AceType::MakeRefPtr<Pattern>());
701     ASSERT_NE(frameNode, nullptr);
702     std::set<std::string> allowDrop = { allowTag };
703     frameNode->SetAllowDrop(allowDrop);
704     ASSERT_NE(frameNode, nullptr);
705 
706     /**
707      * @tc.steps: step3. construct summaryMap for dragDropManager.
708      * @tc.expected: dragDropManager is not null.
709      */
710     const std::string summary_TAG(NODE_TAG_SPOT);
711     dragDropManager->summaryMap_.clear();
712     dragDropManager->summaryMap_.insert(make_pair(summary_TAG, frameNodeNullId));
713     ASSERT_NE(dragDropManager, nullptr);
714 
715     /**
716      * @tc.steps: step4. Set an isDisallowDropForcedly in the frameNode and then get an isDisallowDropForcedly.
717      * @tc.expected: The set isDisallowDropForcedly is the same as the get isDisallowDropForcedly.
718      */
719     bool isDisallowDrop = false;
720     ASSERT_FALSE(isDisallowDrop);
721     frameNode->SetDisallowDropForcedly(isDisallowDrop);
722     bool isDisallowDropForcedly = frameNode->GetDisallowDropForcedly();
723     ASSERT_FALSE(isDisallowDropForcedly);
724 
725     /**
726      * @tc.steps: step5. ReportingSupported is set to false.
727      * @tc.expected: reportingEnabledFalse is false.
728      */
729     auto mockUdmfClient = static_cast<MockUdmfClient*>(UdmfClient::GetInstance());
730     EXPECT_CALL(*mockUdmfClient, IsAppropriateType(_, _))
731         .WillOnce(testing::Return(true))
732         .WillRepeatedly(testing::Return(false));
733     ASSERT_TRUE(dragDropManager->IsDropAllowed(frameNode));
734 }
735 
736 /**
737  * @tc.name: FrameNodeDropTestNg017
738  * @tc.desc: Test frame node method
739  * @tc.type: FUNC
740  */
741 HWTEST_F(FrameNodeDropTestNg, FrameNodeDropTestNg017, TestSize.Level1)
742 {
743     /**
744      * @tc.steps: step1. construct a DragDropManager.
745      * @tc.expected: dragDropManager is not null.
746      */
747     auto dragDropManager = AceType::MakeRefPtr<DragDropManager>();
748     ASSERT_NE(dragDropManager, nullptr);
749 
750     /**
751      * @tc.steps: step2. construct frameNode and update the properties.
752      * @tc.expected: frameNode is not null.
753      */
754     const std::string allowTag(NODE_TAG_SPOT);
755     auto frameNodeNullId = ElementRegister::GetInstance()->MakeUniqueId();
756     auto frameNode = AceType::MakeRefPtr<FrameNode>(allowTag, frameNodeNullId, AceType::MakeRefPtr<Pattern>());
757     ASSERT_NE(frameNode, nullptr);
758     std::set<std::string> allowDrop = { allowTag };
759     frameNode->SetAllowDrop(allowDrop);
760     ASSERT_NE(frameNode, nullptr);
761 
762     /**
763      * @tc.steps: step3. construct summaryMap for dragDropManager.
764      * @tc.expected: dragDropManager is not null.
765      */
766     const std::string summary_TAG(NODE_TAG_ONE);
767     dragDropManager->summaryMap_.clear();
768     dragDropManager->summaryMap_.insert(make_pair(summary_TAG, frameNodeNullId));
769     ASSERT_NE(dragDropManager, nullptr);
770 
771     /**
772      * @tc.steps: step4. Set an isDisallowDropForcedly in the frameNode and then get an isDisallowDropForcedly.
773      * @tc.expected: The set isDisallowDropForcedly is the same as the get isDisallowDropForcedly.
774      */
775     bool isDisallowDrop = false;
776     ASSERT_FALSE(isDisallowDrop);
777     frameNode->SetDisallowDropForcedly(isDisallowDrop);
778     bool isDisallowDropForcedly = frameNode->GetDisallowDropForcedly();
779     ASSERT_FALSE(isDisallowDropForcedly);
780 
781     /**
782      * @tc.steps: step5. ReportingSupported is set to false.
783      * @tc.expected: reportingEnabledFalse is false.
784      */
785     ASSERT_FALSE(dragDropManager->IsDropAllowed(frameNode));
786 }
787 
788 /**
789  * @tc.name: FrameNodeDropTestNg018
790  * @tc.desc: Test frame node method
791  * @tc.type: FUNC
792  */
793 HWTEST_F(FrameNodeDropTestNg, FrameNodeDropTestNg018, TestSize.Level1)
794 {
795     /**
796      * @tc.steps: step1. construct a DragDropManager.
797      * @tc.expected: dragDropManager is not null.
798      */
799     auto dragDropManager = AceType::MakeRefPtr<DragDropManager>();
800     ASSERT_NE(dragDropManager, nullptr);
801 
802     /**
803      * @tc.steps: step2. construct frameNode and update the properties.
804      * @tc.expected: frameNode is not null.
805      */
806     const std::string allowTag(NODE_TAG_SPOT);
807     auto frameNodeNullId = ElementRegister::GetInstance()->MakeUniqueId();
808     auto frameNode = AceType::MakeRefPtr<FrameNode>(allowTag, frameNodeNullId, AceType::MakeRefPtr<Pattern>());
809     ASSERT_NE(frameNode, nullptr);
810     std::set<std::string> allowDrop = { allowTag };
811     frameNode->SetAllowDrop(allowDrop);
812     ASSERT_NE(frameNode, nullptr);
813 
814     /**
815      * @tc.steps: step3. construct summaryMap for dragDropManager.
816      * @tc.expected: dragDropManager is not null.
817      */
818     const std::string summary_TAG(NODE_TAG_A);
819     dragDropManager->summaryMap_.clear();
820     dragDropManager->summaryMap_.insert(make_pair(summary_TAG, frameNodeNullId));
821     ASSERT_NE(dragDropManager, nullptr);
822 
823     /**
824      * @tc.steps: step4. Set an isDisallowDropForcedly in the frameNode and then get an isDisallowDropForcedly.
825      * @tc.expected: The set isDisallowDropForcedly is the same as the get isDisallowDropForcedly.
826      */
827     bool isDisallowDrop = false;
828     ASSERT_FALSE(isDisallowDrop);
829     frameNode->SetDisallowDropForcedly(isDisallowDrop);
830     bool isDisallowDropForcedly = frameNode->GetDisallowDropForcedly();
831     ASSERT_FALSE(isDisallowDropForcedly);
832 
833     /**
834      * @tc.steps: step5. ReportingSupported is set to false.
835      * @tc.expected: reportingEnabledFalse is false.
836      */
837     ASSERT_FALSE(dragDropManager->IsDropAllowed(frameNode));
838 }
839 
840 /**
841  * @tc.name: FrameNodeDropTestNg019
842  * @tc.desc: Test frame node method
843  * @tc.type: FUNC
844  */
845 HWTEST_F(FrameNodeDropTestNg, FrameNodeDropTestNg019, TestSize.Level1)
846 {
847     /**
848      * @tc.steps: step1. construct a DragDropManager.
849      * @tc.expected: dragDropManager is not null.
850      */
851     auto dragDropManager = AceType::MakeRefPtr<DragDropManager>();
852     ASSERT_NE(dragDropManager, nullptr);
853 
854     /**
855      * @tc.steps: step2. construct frameNode and update the properties.
856      * @tc.expected: frameNode is not null.
857      */
858     const std::string allowTag(NODE_TAG_ONE);
859     auto frameNodeNullId = ElementRegister::GetInstance()->MakeUniqueId();
860     auto frameNode = AceType::MakeRefPtr<FrameNode>(allowTag, frameNodeNullId, AceType::MakeRefPtr<Pattern>());
861     ASSERT_NE(frameNode, nullptr);
862     std::set<std::string> allowDrop = { allowTag };
863     frameNode->SetAllowDrop(allowDrop);
864     ASSERT_NE(frameNode, nullptr);
865 
866     /**
867      * @tc.steps: step3. construct summaryMap for dragDropManager.
868      * @tc.expected: dragDropManager is not null.
869      */
870     const std::string summary_TAG(NODE_TAG_SPOT);
871     dragDropManager->summaryMap_.clear();
872     dragDropManager->summaryMap_.insert(make_pair(summary_TAG, frameNodeNullId));
873     ASSERT_NE(dragDropManager, nullptr);
874 
875     /**
876      * @tc.steps: step4. Set an isDisallowDropForcedly in the frameNode and then get an isDisallowDropForcedly.
877      * @tc.expected: The set isDisallowDropForcedly is the same as the get isDisallowDropForcedly.
878      */
879     bool isDisallowDrop = false;
880     ASSERT_FALSE(isDisallowDrop);
881     frameNode->SetDisallowDropForcedly(isDisallowDrop);
882     bool isDisallowDropForcedly = frameNode->GetDisallowDropForcedly();
883     ASSERT_FALSE(isDisallowDropForcedly);
884 
885     /**
886      * @tc.steps: step5. ReportingSupported is set to false.
887      * @tc.expected: reportingEnabledFalse is false.
888      */
889     ASSERT_FALSE(dragDropManager->IsDropAllowed(frameNode));
890 }
891 
892 /**
893  * @tc.name: FrameNodeDropTestNg020
894  * @tc.desc: Test frame node method
895  * @tc.type: FUNC
896  */
897 HWTEST_F(FrameNodeDropTestNg, FrameNodeDropTestNg020, TestSize.Level1)
898 {
899     /**
900      * @tc.steps: step1. construct a DragDropManager.
901      * @tc.expected: dragDropManager is not null.
902      */
903     auto dragDropManager = AceType::MakeRefPtr<DragDropManager>();
904     ASSERT_NE(dragDropManager, nullptr);
905 
906     /**
907      * @tc.steps: step2. construct frameNode and update the properties.
908      * @tc.expected: frameNode is not null.
909      */
910     const std::string allowTag(NODE_TAG_ONE);
911     auto frameNodeNullId = ElementRegister::GetInstance()->MakeUniqueId();
912     auto frameNode = AceType::MakeRefPtr<FrameNode>(allowTag, frameNodeNullId, AceType::MakeRefPtr<Pattern>());
913     ASSERT_NE(frameNode, nullptr);
914     std::set<std::string> allowDrop = { allowTag };
915     frameNode->SetAllowDrop(allowDrop);
916     ASSERT_NE(frameNode, nullptr);
917 
918     /**
919      * @tc.steps: step3. construct summaryMap for dragDropManager.
920      * @tc.expected: dragDropManager is not null.
921      */
922     const std::string summary_TAG(NODE_TAG_ONE);
923     dragDropManager->summaryMap_.clear();
924     dragDropManager->summaryMap_.insert(make_pair(summary_TAG, frameNodeNullId));
925     ASSERT_NE(dragDropManager, nullptr);
926 
927     /**
928      * @tc.steps: step4. Set an isDisallowDropForcedly in the frameNode and then get an isDisallowDropForcedly.
929      * @tc.expected: The set isDisallowDropForcedly is the same as the get isDisallowDropForcedly.
930      */
931     bool isDisallowDrop = false;
932     ASSERT_FALSE(isDisallowDrop);
933     frameNode->SetDisallowDropForcedly(isDisallowDrop);
934     bool isDisallowDropForcedly = frameNode->GetDisallowDropForcedly();
935     ASSERT_FALSE(isDisallowDropForcedly);
936 
937     /**
938      * @tc.steps: step5. ReportingSupported is set to false.
939      * @tc.expected: reportingEnabledFalse is false.
940      */
941     auto mockUdmfClient = static_cast<MockUdmfClient*>(UdmfClient::GetInstance());
942     EXPECT_CALL(*mockUdmfClient, IsAppropriateType(_, _))
943         .WillOnce(testing::Return(true))
944         .WillRepeatedly(testing::Return(false));
945     ASSERT_TRUE(dragDropManager->IsDropAllowed(frameNode));
946 }
947 
948 /**
949  * @tc.name: FrameNodeDropTestNg021
950  * @tc.desc: Test frame node method
951  * @tc.type: FUNC
952  */
953 HWTEST_F(FrameNodeDropTestNg, FrameNodeDropTestNg021, TestSize.Level1)
954 {
955     /**
956      * @tc.steps: step1. construct a DragDropManager.
957      * @tc.expected: dragDropManager is not null.
958      */
959     auto dragDropManager = AceType::MakeRefPtr<DragDropManager>();
960     ASSERT_NE(dragDropManager, nullptr);
961 
962     /**
963      * @tc.steps: step2. construct frameNode and update the properties.
964      * @tc.expected: frameNode is not null.
965      */
966     const std::string allowTag(NODE_TAG_ONE);
967     auto frameNodeNullId = ElementRegister::GetInstance()->MakeUniqueId();
968     auto frameNode = AceType::MakeRefPtr<FrameNode>(allowTag, frameNodeNullId, AceType::MakeRefPtr<Pattern>());
969     ASSERT_NE(frameNode, nullptr);
970     std::set<std::string> allowDrop = { allowTag };
971     frameNode->SetAllowDrop(allowDrop);
972     ASSERT_NE(frameNode, nullptr);
973 
974     /**
975      * @tc.steps: step3. construct summaryMap for dragDropManager.
976      * @tc.expected: dragDropManager is not null.
977      */
978     const std::string summary_TAG(NODE_TAG_A);
979     dragDropManager->summaryMap_.clear();
980     dragDropManager->summaryMap_.insert(make_pair(summary_TAG, frameNodeNullId));
981     ASSERT_NE(dragDropManager, nullptr);
982 
983     /**
984      * @tc.steps: step4. Set an isDisallowDropForcedly in the frameNode and then get an isDisallowDropForcedly.
985      * @tc.expected: The set isDisallowDropForcedly is the same as the get isDisallowDropForcedly.
986      */
987     bool isDisallowDrop = false;
988     ASSERT_FALSE(isDisallowDrop);
989     frameNode->SetDisallowDropForcedly(isDisallowDrop);
990     bool isDisallowDropForcedly = frameNode->GetDisallowDropForcedly();
991     ASSERT_FALSE(isDisallowDropForcedly);
992 
993     /**
994      * @tc.steps: step5. ReportingSupported is set to false.
995      * @tc.expected: reportingEnabledFalse is false.
996      */
997     ASSERT_FALSE(dragDropManager->IsDropAllowed(frameNode));
998 }
999 
1000 /**
1001  * @tc.name: FrameNodeDropTestNg022
1002  * @tc.desc: Test frame node method
1003  * @tc.type: FUNC
1004  */
1005 HWTEST_F(FrameNodeDropTestNg, FrameNodeDropTestNg022, TestSize.Level1)
1006 {
1007     /**
1008      * @tc.steps: step1. construct a DragDropManager.
1009      * @tc.expected: dragDropManager is not null.
1010      */
1011     auto dragDropManager = AceType::MakeRefPtr<DragDropManager>();
1012     ASSERT_NE(dragDropManager, nullptr);
1013 
1014     /**
1015      * @tc.steps: step2. construct frameNode and update the properties.
1016      * @tc.expected: frameNode is not null.
1017      */
1018     const std::string allowTag(NODE_TAG_A);
1019     auto frameNodeNullId = ElementRegister::GetInstance()->MakeUniqueId();
1020     auto frameNode = AceType::MakeRefPtr<FrameNode>(allowTag, frameNodeNullId, AceType::MakeRefPtr<Pattern>());
1021     ASSERT_NE(frameNode, nullptr);
1022     std::set<std::string> allowDrop = { allowTag };
1023     frameNode->SetAllowDrop(allowDrop);
1024     ASSERT_NE(frameNode, nullptr);
1025 
1026     /**
1027      * @tc.steps: step3. construct summaryMap for dragDropManager.
1028      * @tc.expected: dragDropManager is not null.
1029      */
1030     const std::string summary_TAG(NODE_TAG_SPOT);
1031     dragDropManager->summaryMap_.clear();
1032     dragDropManager->summaryMap_.insert(make_pair(summary_TAG, frameNodeNullId));
1033     ASSERT_NE(dragDropManager, nullptr);
1034 
1035     /**
1036      * @tc.steps: step4. Set an isDisallowDropForcedly in the frameNode and then get an isDisallowDropForcedly.
1037      * @tc.expected: The set isDisallowDropForcedly is the same as the get isDisallowDropForcedly.
1038      */
1039     bool isDisallowDrop = false;
1040     ASSERT_FALSE(isDisallowDrop);
1041     frameNode->SetDisallowDropForcedly(isDisallowDrop);
1042     bool isDisallowDropForcedly = frameNode->GetDisallowDropForcedly();
1043     ASSERT_FALSE(isDisallowDropForcedly);
1044 
1045     /**
1046      * @tc.steps: step5. ReportingSupported is set to false.
1047      * @tc.expected: reportingEnabledFalse is false.
1048      */
1049     ASSERT_FALSE(dragDropManager->IsDropAllowed(frameNode));
1050 }
1051 
1052 /**
1053  * @tc.name: FrameNodeDropTestNg023
1054  * @tc.desc: Test frame node method
1055  * @tc.type: FUNC
1056  */
1057 HWTEST_F(FrameNodeDropTestNg, FrameNodeDropTestNg023, TestSize.Level1)
1058 {
1059     /**
1060      * @tc.steps: step1. construct a DragDropManager.
1061      * @tc.expected: dragDropManager is not null.
1062      */
1063     auto dragDropManager = AceType::MakeRefPtr<DragDropManager>();
1064     ASSERT_NE(dragDropManager, nullptr);
1065 
1066     /**
1067      * @tc.steps: step2. construct frameNode and update the properties.
1068      * @tc.expected: frameNode is not null.
1069      */
1070     const std::string allowTag(NODE_TAG_A);
1071     auto frameNodeNullId = ElementRegister::GetInstance()->MakeUniqueId();
1072     auto frameNode = AceType::MakeRefPtr<FrameNode>(allowTag, frameNodeNullId, AceType::MakeRefPtr<Pattern>());
1073     ASSERT_NE(frameNode, nullptr);
1074     std::set<std::string> allowDrop = { allowTag };
1075     frameNode->SetAllowDrop(allowDrop);
1076     ASSERT_NE(frameNode, nullptr);
1077 
1078     /**
1079      * @tc.steps: step3. construct summaryMap for dragDropManager.
1080      * @tc.expected: dragDropManager is not null.
1081      */
1082     const std::string summary_TAG(NODE_TAG_ONE);
1083     dragDropManager->summaryMap_.clear();
1084     dragDropManager->summaryMap_.insert(make_pair(summary_TAG, frameNodeNullId));
1085     ASSERT_NE(dragDropManager, nullptr);
1086 
1087     /**
1088      * @tc.steps: step4. Set an isDisallowDropForcedly in the frameNode and then get an isDisallowDropForcedly.
1089      * @tc.expected: The set isDisallowDropForcedly is the same as the get isDisallowDropForcedly.
1090      */
1091     bool isDisallowDrop = false;
1092     ASSERT_FALSE(isDisallowDrop);
1093     frameNode->SetDisallowDropForcedly(isDisallowDrop);
1094     bool isDisallowDropForcedly = frameNode->GetDisallowDropForcedly();
1095     ASSERT_FALSE(isDisallowDropForcedly);
1096 
1097     /**
1098      * @tc.steps: step5. ReportingSupported is set to false.
1099      * @tc.expected: reportingEnabledFalse is false.
1100      */
1101     ASSERT_FALSE(dragDropManager->IsDropAllowed(frameNode));
1102 }
1103 
1104 /**
1105  * @tc.name: FrameNodeDropTestNg024
1106  * @tc.desc: Test frame node method
1107  * @tc.type: FUNC
1108  */
1109 HWTEST_F(FrameNodeDropTestNg, FrameNodeDropTestNg024, TestSize.Level1)
1110 {
1111     /**
1112      * @tc.steps: step1. construct a DragDropManager.
1113      * @tc.expected: dragDropManager is not null.
1114      */
1115     auto dragDropManager = AceType::MakeRefPtr<DragDropManager>();
1116     ASSERT_NE(dragDropManager, nullptr);
1117 
1118     /**
1119      * @tc.steps: step2. construct frameNode and update the properties.
1120      * @tc.expected: frameNode is not null.
1121      */
1122     const std::string allowTag(NODE_TAG_A);
1123     auto frameNodeNullId = ElementRegister::GetInstance()->MakeUniqueId();
1124     auto frameNode = AceType::MakeRefPtr<FrameNode>(allowTag, frameNodeNullId, AceType::MakeRefPtr<Pattern>());
1125     ASSERT_NE(frameNode, nullptr);
1126     std::set<std::string> allowDrop = { allowTag };
1127     frameNode->SetAllowDrop(allowDrop);
1128     ASSERT_NE(frameNode, nullptr);
1129 
1130     /**
1131      * @tc.steps: step3. construct summaryMap for dragDropManager.
1132      * @tc.expected: dragDropManager is not null.
1133      */
1134     const std::string summary_TAG(NODE_TAG_A);
1135     dragDropManager->summaryMap_.clear();
1136     dragDropManager->summaryMap_.insert(make_pair(summary_TAG, frameNodeNullId));
1137     ASSERT_NE(dragDropManager, nullptr);
1138 
1139     /**
1140      * @tc.steps: step4. Set an isDisallowDropForcedly in the frameNode and then get an isDisallowDropForcedly.
1141      * @tc.expected: The set isDisallowDropForcedly is the same as the get isDisallowDropForcedly.
1142      */
1143     bool isDisallowDrop = false;
1144     ASSERT_FALSE(isDisallowDrop);
1145     frameNode->SetDisallowDropForcedly(isDisallowDrop);
1146     bool isDisallowDropForcedly = frameNode->GetDisallowDropForcedly();
1147     ASSERT_FALSE(isDisallowDropForcedly);
1148 
1149     /**
1150      * @tc.steps: step5. ReportingSupported is set to false.
1151      * @tc.expected: reportingEnabledFalse is false.
1152      */
1153     auto mockUdmfClient = static_cast<MockUdmfClient*>(UdmfClient::GetInstance());
1154     EXPECT_CALL(*mockUdmfClient, IsAppropriateType(_, _))
1155         .WillOnce(testing::Return(true))
1156         .WillRepeatedly(testing::Return(false));
1157     ASSERT_TRUE(dragDropManager->IsDropAllowed(frameNode));
1158 }
1159 
1160 /**
1161  * @tc.name: FrameNodeDropTestNg025
1162  * @tc.desc: Test frame node method
1163  * @tc.type: FUNC
1164  */
1165 HWTEST_F(FrameNodeDropTestNg, FrameNodeDropTestNg025, TestSize.Level1)
1166 {
1167     /**
1168      * @tc.steps: step1. construct a DragDropManager.
1169      * @tc.expected: dragDropManager is not null.
1170      */
1171     auto dragDropManager = AceType::MakeRefPtr<DragDropManager>();
1172     ASSERT_NE(dragDropManager, nullptr);
1173 
1174     /**
1175      * @tc.steps: step2. construct frameNode and update the properties.
1176      * @tc.expected: frameNode is not null.
1177      */
1178     const std::string allowTag(NODE_TAG_EMPTY);
1179     auto frameNodeNullId = ElementRegister::GetInstance()->MakeUniqueId();
1180     auto frameNode = AceType::MakeRefPtr<FrameNode>(allowTag, frameNodeNullId, AceType::MakeRefPtr<Pattern>());
1181     ASSERT_NE(frameNode, nullptr);
1182     std::set<std::string> allowDrop;
1183     frameNode->SetAllowDrop(allowDrop);
1184     ASSERT_NE(frameNode, nullptr);
1185 
1186     /**
1187      * @tc.steps: step3. construct summaryMap for dragDropManager.
1188      * @tc.expected: dragDropManager is not null.
1189      */
1190     const std::string summary_TAG(NODE_TAG_SPOT);
1191     dragDropManager->summaryMap_.clear();
1192     dragDropManager->summaryMap_.insert(make_pair(summary_TAG, frameNodeNullId));
1193     ASSERT_NE(dragDropManager, nullptr);
1194 
1195     /**
1196      * @tc.steps: step4. Set an isDisallowDropForcedly in the frameNode and then get an isDisallowDropForcedly.
1197      * @tc.expected: The set isDisallowDropForcedly is the same as the get isDisallowDropForcedly.
1198      */
1199     bool isDisallowDrop = false;
1200     ASSERT_FALSE(isDisallowDrop);
1201     frameNode->SetDisallowDropForcedly(isDisallowDrop);
1202     bool isDisallowDropForcedly = frameNode->GetDisallowDropForcedly();
1203     ASSERT_FALSE(isDisallowDropForcedly);
1204 
1205     /**
1206      * @tc.steps: step5. ReportingSupported is set to false.
1207      * @tc.expected: reportingEnabledFalse is false.
1208      */
1209     ASSERT_TRUE(dragDropManager->IsDropAllowed(frameNode));
1210 }
1211 
1212 /**
1213  * @tc.name: FrameNodeDropTestNg026
1214  * @tc.desc: Test frame node method
1215  * @tc.type: FUNC
1216  */
1217 HWTEST_F(FrameNodeDropTestNg, FrameNodeDropTestNg026, TestSize.Level1)
1218 {
1219     /**
1220      * @tc.steps: step1. construct a DragDropManager.
1221      * @tc.expected: dragDropManager is not null.
1222      */
1223     auto dragDropManager = AceType::MakeRefPtr<DragDropManager>();
1224     ASSERT_NE(dragDropManager, nullptr);
1225 
1226     /**
1227      * @tc.steps: step2. construct frameNode and update the properties.
1228      * @tc.expected: frameNode is not null.
1229      */
1230     const std::string allowTag(NODE_TAG_EMPTY);
1231     auto frameNodeNullId = ElementRegister::GetInstance()->MakeUniqueId();
1232     auto frameNode = AceType::MakeRefPtr<FrameNode>(allowTag, frameNodeNullId, AceType::MakeRefPtr<Pattern>());
1233     ASSERT_NE(frameNode, nullptr);
1234     std::set<std::string> allowDrop;
1235     frameNode->SetAllowDrop(allowDrop);
1236     ASSERT_NE(frameNode, nullptr);
1237 
1238     /**
1239      * @tc.steps: step3. construct summaryMap for dragDropManager.
1240      * @tc.expected: dragDropManager is not null.
1241      */
1242     const std::string summary_TAG(NODE_TAG_ONE);
1243     dragDropManager->summaryMap_.clear();
1244     dragDropManager->summaryMap_.insert(make_pair(summary_TAG, frameNodeNullId));
1245     ASSERT_NE(dragDropManager, nullptr);
1246 
1247     /**
1248      * @tc.steps: step4. Set an isDisallowDropForcedly in the frameNode and then get an isDisallowDropForcedly.
1249      * @tc.expected: The set isDisallowDropForcedly is the same as the get isDisallowDropForcedly.
1250      */
1251     bool isDisallowDrop = false;
1252     ASSERT_FALSE(isDisallowDrop);
1253     frameNode->SetDisallowDropForcedly(isDisallowDrop);
1254     bool isDisallowDropForcedly = frameNode->GetDisallowDropForcedly();
1255     ASSERT_FALSE(isDisallowDropForcedly);
1256 
1257     /**
1258      * @tc.steps: step5. ReportingSupported is set to false.
1259      * @tc.expected: reportingEnabledFalse is false.
1260      */
1261     ASSERT_TRUE(dragDropManager->IsDropAllowed(frameNode));
1262 }
1263 
1264 /**
1265  * @tc.name: FrameNodeDropTestNg027
1266  * @tc.desc: Test frame node method
1267  * @tc.type: FUNC
1268  */
1269 HWTEST_F(FrameNodeDropTestNg, FrameNodeDropTestNg027, TestSize.Level1)
1270 {
1271     /**
1272      * @tc.steps: step1. construct a DragDropManager.
1273      * @tc.expected: dragDropManager is not null.
1274      */
1275     auto dragDropManager = AceType::MakeRefPtr<DragDropManager>();
1276     ASSERT_NE(dragDropManager, nullptr);
1277 
1278     /**
1279      * @tc.steps: step2. construct frameNode and update the properties.
1280      * @tc.expected: frameNode is not null.
1281      */
1282     const std::string allowTag(NODE_TAG_EMPTY);
1283     auto frameNodeNullId = ElementRegister::GetInstance()->MakeUniqueId();
1284     auto frameNode = AceType::MakeRefPtr<FrameNode>(allowTag, frameNodeNullId, AceType::MakeRefPtr<Pattern>());
1285     ASSERT_NE(frameNode, nullptr);
1286     std::set<std::string> allowDrop;
1287     frameNode->SetAllowDrop(allowDrop);
1288     ASSERT_NE(frameNode, nullptr);
1289 
1290     /**
1291      * @tc.steps: step3. construct summaryMap for dragDropManager.
1292      * @tc.expected: dragDropManager is not null.
1293      */
1294     const std::string summary_TAG(NODE_TAG_A);
1295     dragDropManager->summaryMap_.clear();
1296     dragDropManager->summaryMap_.insert(make_pair(summary_TAG, frameNodeNullId));
1297     ASSERT_NE(dragDropManager, nullptr);
1298 
1299     /**
1300      * @tc.steps: step4. Set an isDisallowDropForcedly in the frameNode and then get an isDisallowDropForcedly.
1301      * @tc.expected: The set isDisallowDropForcedly is the same as the get isDisallowDropForcedly.
1302      */
1303     bool isDisallowDrop = false;
1304     ASSERT_FALSE(isDisallowDrop);
1305     frameNode->SetDisallowDropForcedly(isDisallowDrop);
1306     bool isDisallowDropForcedly = frameNode->GetDisallowDropForcedly();
1307     ASSERT_FALSE(isDisallowDropForcedly);
1308 
1309     /**
1310      * @tc.steps: step5. ReportingSupported is set to false.
1311      * @tc.expected: reportingEnabledFalse is false.
1312      */
1313     ASSERT_TRUE(dragDropManager->IsDropAllowed(frameNode));
1314 }
1315 
1316 /**
1317  * @tc.name: FrameNodeDropTestNg028
1318  * @tc.desc: Test frame node method
1319  * @tc.type: FUNC
1320  */
1321 HWTEST_F(FrameNodeDropTestNg, FrameNodeDropTestNg028, TestSize.Level1)
1322 {
1323     /**
1324      * @tc.steps: step1. construct a DragDropManager.
1325      * @tc.expected: dragDropManager is not null.
1326      */
1327     auto dragDropManager = AceType::MakeRefPtr<DragDropManager>();
1328     ASSERT_NE(dragDropManager, nullptr);
1329 
1330     /**
1331      * @tc.steps: step2. construct frameNode and update the properties.
1332      * @tc.expected: frameNode is not null.
1333      */
1334     const std::string allowTag(NODE_TAG_SPOT);
1335     auto frameNodeNullId = ElementRegister::GetInstance()->MakeUniqueId();
1336     auto frameNode = AceType::MakeRefPtr<FrameNode>(allowTag, frameNodeNullId, AceType::MakeRefPtr<Pattern>());
1337     ASSERT_NE(frameNode, nullptr);
1338     std::set<std::string> allowDrop = { allowTag };
1339     frameNode->SetAllowDrop(allowDrop);
1340     ASSERT_NE(frameNode, nullptr);
1341 
1342     /**
1343      * @tc.steps: step3. construct summaryMap for dragDropManager.
1344      * @tc.expected: dragDropManager is not null.
1345      */
1346     dragDropManager->summaryMap_.clear();
1347     ASSERT_NE(dragDropManager, nullptr);
1348 
1349     /**
1350      * @tc.steps: step4. Set an isDisallowDropForcedly in the frameNode and then get an isDisallowDropForcedly.
1351      * @tc.expected: The set isDisallowDropForcedly is the same as the get isDisallowDropForcedly.
1352      */
1353     bool isDisallowDrop = false;
1354     ASSERT_FALSE(isDisallowDrop);
1355     frameNode->SetDisallowDropForcedly(isDisallowDrop);
1356     bool isDisallowDropForcedly = frameNode->GetDisallowDropForcedly();
1357     ASSERT_FALSE(isDisallowDropForcedly);
1358 
1359     /**
1360      * @tc.steps: step5. ReportingSupported is set to false.
1361      * @tc.expected: reportingEnabledFalse is false.
1362      */
1363     ASSERT_TRUE(dragDropManager->IsDropAllowed(frameNode));
1364 }
1365 
1366 /**
1367  * @tc.name: FrameNodeDropTestNg029
1368  * @tc.desc: Test frame node method
1369  * @tc.type: FUNC
1370  */
1371 HWTEST_F(FrameNodeDropTestNg, FrameNodeDropTestNg029, TestSize.Level1)
1372 {
1373     /**
1374      * @tc.steps: step1. construct a DragDropManager.
1375      * @tc.expected: dragDropManager is not null.
1376      */
1377     auto dragDropManager = AceType::MakeRefPtr<DragDropManager>();
1378     ASSERT_NE(dragDropManager, nullptr);
1379 
1380     /**
1381      * @tc.steps: step2. construct frameNode and update the properties.
1382      * @tc.expected: frameNode is not null.
1383      */
1384     const std::string allowTag(NODE_TAG_ONE);
1385     auto frameNodeNullId = ElementRegister::GetInstance()->MakeUniqueId();
1386     auto frameNode = AceType::MakeRefPtr<FrameNode>(allowTag, frameNodeNullId, AceType::MakeRefPtr<Pattern>());
1387     ASSERT_NE(frameNode, nullptr);
1388     std::set<std::string> allowDrop = { allowTag };
1389     frameNode->SetAllowDrop(allowDrop);
1390     ASSERT_NE(frameNode, nullptr);
1391 
1392     /**
1393      * @tc.steps: step3. construct summaryMap for dragDropManager.
1394      * @tc.expected: dragDropManager is not null.
1395      */
1396     dragDropManager->summaryMap_.clear();
1397     ASSERT_NE(dragDropManager, nullptr);
1398 
1399     /**
1400      * @tc.steps: step4. Set an isDisallowDropForcedly in the frameNode and then get an isDisallowDropForcedly.
1401      * @tc.expected: The set isDisallowDropForcedly is the same as the get isDisallowDropForcedly.
1402      */
1403     bool isDisallowDrop = false;
1404     ASSERT_FALSE(isDisallowDrop);
1405     frameNode->SetDisallowDropForcedly(isDisallowDrop);
1406     bool isDisallowDropForcedly = frameNode->GetDisallowDropForcedly();
1407     ASSERT_FALSE(isDisallowDropForcedly);
1408 
1409     /**
1410      * @tc.steps: step5. ReportingSupported is set to false.
1411      * @tc.expected: reportingEnabledFalse is false.
1412      */
1413     ASSERT_TRUE(dragDropManager->IsDropAllowed(frameNode));
1414 }
1415 
1416 /**
1417  * @tc.name: FrameNodeDropTestNg030
1418  * @tc.desc: Test frame node method
1419  * @tc.type: FUNC
1420  */
1421 HWTEST_F(FrameNodeDropTestNg, FrameNodeDropTestNg030, TestSize.Level1)
1422 {
1423     /**
1424      * @tc.steps: step1. construct a DragDropManager.
1425      * @tc.expected: dragDropManager is not null.
1426      */
1427     auto dragDropManager = AceType::MakeRefPtr<DragDropManager>();
1428     ASSERT_NE(dragDropManager, nullptr);
1429 
1430     /**
1431      * @tc.steps: step2. construct frameNode and update the properties.
1432      * @tc.expected: frameNode is not null.
1433      */
1434     const std::string allowTag(NODE_TAG_A);
1435     auto frameNodeNullId = ElementRegister::GetInstance()->MakeUniqueId();
1436     auto frameNode = AceType::MakeRefPtr<FrameNode>(allowTag, frameNodeNullId, AceType::MakeRefPtr<Pattern>());
1437     ASSERT_NE(frameNode, nullptr);
1438     std::set<std::string> allowDrop = { allowTag };
1439     frameNode->SetAllowDrop(allowDrop);
1440     ASSERT_NE(frameNode, nullptr);
1441 
1442     /**
1443      * @tc.steps: step3. construct summaryMap for dragDropManager.
1444      * @tc.expected: dragDropManager is not null.
1445      */
1446     dragDropManager->summaryMap_.clear();
1447     ASSERT_NE(dragDropManager, nullptr);
1448 
1449     /**
1450      * @tc.steps: step4. Set an isDisallowDropForcedly in the frameNode and then get an isDisallowDropForcedly.
1451      * @tc.expected: The set isDisallowDropForcedly is the same as the get isDisallowDropForcedly.
1452      */
1453     bool isDisallowDrop = false;
1454     ASSERT_FALSE(isDisallowDrop);
1455     frameNode->SetDisallowDropForcedly(isDisallowDrop);
1456     bool isDisallowDropForcedly = frameNode->GetDisallowDropForcedly();
1457     ASSERT_FALSE(isDisallowDropForcedly);
1458 
1459     /**
1460      * @tc.steps: step5. ReportingSupported is set to false.
1461      * @tc.expected: reportingEnabledFalse is false.
1462      */
1463     ASSERT_TRUE(dragDropManager->IsDropAllowed(frameNode));
1464 }
1465 
1466 /**
1467  * @tc.name: FrameNodeDropTestNg031
1468  * @tc.desc: Test frame node method
1469  * @tc.type: FUNC
1470  */
1471 HWTEST_F(FrameNodeDropTestNg, FrameNodeDropTestNg031, TestSize.Level1)
1472 {
1473     /**
1474      * @tc.steps: step1. construct a DragDropManager.
1475      * @tc.expected: dragDropManager is not null.
1476      */
1477     auto dragDropManager = AceType::MakeRefPtr<DragDropManager>();
1478     ASSERT_NE(dragDropManager, nullptr);
1479 
1480     /**
1481      * @tc.steps: step2. construct frameNode and update the properties.
1482      * @tc.expected: frameNode is not null.
1483      */
1484     const std::string allowTag(NODE_TAG_SPOT);
1485     auto frameNodeNullId = ElementRegister::GetInstance()->MakeUniqueId();
1486     auto frameNode = AceType::MakeRefPtr<FrameNode>(allowTag, frameNodeNullId, AceType::MakeRefPtr<Pattern>());
1487     ASSERT_NE(frameNode, nullptr);
1488     std::set<std::string> allowDrop = { allowTag };
1489     frameNode->SetAllowDrop(allowDrop);
1490     ASSERT_NE(frameNode, nullptr);
1491 
1492     /**
1493      * @tc.steps: step3. construct summaryMap for dragDropManager.
1494      * @tc.expected: dragDropManager is not null.
1495      */
1496     const std::string summary_TAG(NODE_TAG_SPOT);
1497     dragDropManager->summaryMap_.clear();
1498     dragDropManager->summaryMap_.insert(make_pair(summary_TAG, frameNodeNullId));
1499     ASSERT_NE(dragDropManager, nullptr);
1500 
1501     /**
1502      * @tc.steps: step4. Set an isDisallowDropForcedly in the frameNode and then get an isDisallowDropForcedly.
1503      * @tc.expected: The set isDisallowDropForcedly is the same as the get isDisallowDropForcedly.
1504      */
1505     bool isDisallowDrop = true;
1506     ASSERT_TRUE(isDisallowDrop);
1507     frameNode->SetDisallowDropForcedly(isDisallowDrop);
1508     bool isDisallowDropForcedly = frameNode->GetDisallowDropForcedly();
1509     ASSERT_TRUE(isDisallowDropForcedly);
1510 
1511     /**
1512      * @tc.steps: step5. ReportingSupported is set to false.
1513      * @tc.expected: reportingEnabledFalse is false.
1514      */
1515     ASSERT_FALSE(dragDropManager->IsDropAllowed(frameNode));
1516 }
1517 
1518 /**
1519  * @tc.name: FrameNodeDropTestNg032
1520  * @tc.desc: Test frame node method
1521  * @tc.type: FUNC
1522  */
1523 HWTEST_F(FrameNodeDropTestNg, FrameNodeDropTestNg032, TestSize.Level1)
1524 {
1525     /**
1526      * @tc.steps: step1. construct a DragDropManager.
1527      * @tc.expected: dragDropManager is not null.
1528      */
1529     auto dragDropManager = AceType::MakeRefPtr<DragDropManager>();
1530     ASSERT_NE(dragDropManager, nullptr);
1531 
1532     /**
1533      * @tc.steps: step2. construct frameNode and update the properties.
1534      * @tc.expected: frameNode is not null.
1535      */
1536     const std::string allowTag(NODE_TAG_SPOT);
1537     auto frameNodeNullId = ElementRegister::GetInstance()->MakeUniqueId();
1538     auto frameNode = AceType::MakeRefPtr<FrameNode>(allowTag, frameNodeNullId, AceType::MakeRefPtr<Pattern>());
1539     ASSERT_NE(frameNode, nullptr);
1540     std::set<std::string> allowDrop = { allowTag };
1541     frameNode->SetAllowDrop(allowDrop);
1542     ASSERT_NE(frameNode, nullptr);
1543 
1544     /**
1545      * @tc.steps: step3. construct summaryMap for dragDropManager.
1546      * @tc.expected: dragDropManager is not null.
1547      */
1548     const std::string summary_TAG(NODE_TAG_ONE);
1549     dragDropManager->summaryMap_.clear();
1550     dragDropManager->summaryMap_.insert(make_pair(summary_TAG, frameNodeNullId));
1551     ASSERT_NE(dragDropManager, nullptr);
1552 
1553     /**
1554      * @tc.steps: step4. Set an isDisallowDropForcedly in the frameNode and then get an isDisallowDropForcedly.
1555      * @tc.expected: The set isDisallowDropForcedly is the same as the get isDisallowDropForcedly.
1556      */
1557     bool isDisallowDrop = true;
1558     ASSERT_TRUE(isDisallowDrop);
1559     frameNode->SetDisallowDropForcedly(isDisallowDrop);
1560     bool isDisallowDropForcedly = frameNode->GetDisallowDropForcedly();
1561     ASSERT_TRUE(isDisallowDropForcedly);
1562 
1563     /**
1564      * @tc.steps: step5. ReportingSupported is set to false.
1565      * @tc.expected: reportingEnabledFalse is false.
1566      */
1567     ASSERT_FALSE(dragDropManager->IsDropAllowed(frameNode));
1568 }
1569 
1570 /**
1571  * @tc.name: FrameNodeDropTestNg033
1572  * @tc.desc: Test frame node method
1573  * @tc.type: FUNC
1574  */
1575 HWTEST_F(FrameNodeDropTestNg, FrameNodeDropTestNg033, TestSize.Level1)
1576 {
1577     /**
1578      * @tc.steps: step1. construct a DragDropManager.
1579      * @tc.expected: dragDropManager is not null.
1580      */
1581     auto dragDropManager = AceType::MakeRefPtr<DragDropManager>();
1582     ASSERT_NE(dragDropManager, nullptr);
1583 
1584     /**
1585      * @tc.steps: step2. construct frameNode and update the properties.
1586      * @tc.expected: frameNode is not null.
1587      */
1588     const std::string allowTag(NODE_TAG_SPOT);
1589     auto frameNodeNullId = ElementRegister::GetInstance()->MakeUniqueId();
1590     auto frameNode = AceType::MakeRefPtr<FrameNode>(allowTag, frameNodeNullId, AceType::MakeRefPtr<Pattern>());
1591     ASSERT_NE(frameNode, nullptr);
1592     std::set<std::string> allowDrop = { allowTag };
1593     frameNode->SetAllowDrop(allowDrop);
1594     ASSERT_NE(frameNode, nullptr);
1595 
1596     /**
1597      * @tc.steps: step3. construct summaryMap for dragDropManager.
1598      * @tc.expected: dragDropManager is not null.
1599      */
1600     const std::string summary_TAG(NODE_TAG_A);
1601     dragDropManager->summaryMap_.clear();
1602     dragDropManager->summaryMap_.insert(make_pair(summary_TAG, frameNodeNullId));
1603     ASSERT_NE(dragDropManager, nullptr);
1604 
1605     /**
1606      * @tc.steps: step4. Set an isDisallowDropForcedly in the frameNode and then get an isDisallowDropForcedly.
1607      * @tc.expected: The set isDisallowDropForcedly is the same as the get isDisallowDropForcedly.
1608      */
1609     bool isDisallowDrop = true;
1610     ASSERT_TRUE(isDisallowDrop);
1611     frameNode->SetDisallowDropForcedly(isDisallowDrop);
1612     bool isDisallowDropForcedly = frameNode->GetDisallowDropForcedly();
1613     ASSERT_TRUE(isDisallowDropForcedly);
1614 
1615     /**
1616      * @tc.steps: step5. ReportingSupported is set to false.
1617      * @tc.expected: reportingEnabledFalse is false.
1618      */
1619     ASSERT_FALSE(dragDropManager->IsDropAllowed(frameNode));
1620 }
1621 
1622 /**
1623  * @tc.name: FrameNodeDropTestNg034
1624  * @tc.desc: Test frame node method
1625  * @tc.type: FUNC
1626  */
1627 HWTEST_F(FrameNodeDropTestNg, FrameNodeDropTestNg034, TestSize.Level1)
1628 {
1629     /**
1630      * @tc.steps: step1. construct a DragDropManager.
1631      * @tc.expected: dragDropManager is not null.
1632      */
1633     auto dragDropManager = AceType::MakeRefPtr<DragDropManager>();
1634     ASSERT_NE(dragDropManager, nullptr);
1635 
1636     /**
1637      * @tc.steps: step2. construct frameNode and update the properties.
1638      * @tc.expected: frameNode is not null.
1639      */
1640     const std::string allowTag(NODE_TAG_ONE);
1641     auto frameNodeNullId = ElementRegister::GetInstance()->MakeUniqueId();
1642     auto frameNode = AceType::MakeRefPtr<FrameNode>(allowTag, frameNodeNullId, AceType::MakeRefPtr<Pattern>());
1643     ASSERT_NE(frameNode, nullptr);
1644     std::set<std::string> allowDrop = { allowTag };
1645     frameNode->SetAllowDrop(allowDrop);
1646     ASSERT_NE(frameNode, nullptr);
1647 
1648     /**
1649      * @tc.steps: step3. construct summaryMap for dragDropManager.
1650      * @tc.expected: dragDropManager is not null.
1651      */
1652     const std::string summary_TAG(NODE_TAG_SPOT);
1653     dragDropManager->summaryMap_.clear();
1654     dragDropManager->summaryMap_.insert(make_pair(summary_TAG, frameNodeNullId));
1655     ASSERT_NE(dragDropManager, nullptr);
1656 
1657     /**
1658      * @tc.steps: step4. Set an isDisallowDropForcedly in the frameNode and then get an isDisallowDropForcedly.
1659      * @tc.expected: The set isDisallowDropForcedly is the same as the get isDisallowDropForcedly.
1660      */
1661     bool isDisallowDrop = true;
1662     ASSERT_TRUE(isDisallowDrop);
1663     frameNode->SetDisallowDropForcedly(isDisallowDrop);
1664     bool isDisallowDropForcedly = frameNode->GetDisallowDropForcedly();
1665     ASSERT_TRUE(isDisallowDropForcedly);
1666 
1667     /**
1668      * @tc.steps: step5. ReportingSupported is set to false.
1669      * @tc.expected: reportingEnabledFalse is false.
1670      */
1671     ASSERT_FALSE(dragDropManager->IsDropAllowed(frameNode));
1672 }
1673 
1674 /**
1675  * @tc.name: FrameNodeDropTestNg035
1676  * @tc.desc: Test frame node method
1677  * @tc.type: FUNC
1678  */
1679 HWTEST_F(FrameNodeDropTestNg, FrameNodeDropTestNg035, TestSize.Level1)
1680 {
1681     /**
1682      * @tc.steps: step1. construct a DragDropManager.
1683      * @tc.expected: dragDropManager is not null.
1684      */
1685     auto dragDropManager = AceType::MakeRefPtr<DragDropManager>();
1686     ASSERT_NE(dragDropManager, nullptr);
1687 
1688     /**
1689      * @tc.steps: step2. construct frameNode and update the properties.
1690      * @tc.expected: frameNode is not null.
1691      */
1692     const std::string allowTag(NODE_TAG_ONE);
1693     auto frameNodeNullId = ElementRegister::GetInstance()->MakeUniqueId();
1694     auto frameNode = AceType::MakeRefPtr<FrameNode>(allowTag, frameNodeNullId, AceType::MakeRefPtr<Pattern>());
1695     ASSERT_NE(frameNode, nullptr);
1696     std::set<std::string> allowDrop = { allowTag };
1697     frameNode->SetAllowDrop(allowDrop);
1698     ASSERT_NE(frameNode, nullptr);
1699 
1700     /**
1701      * @tc.steps: step3. construct summaryMap for dragDropManager.
1702      * @tc.expected: dragDropManager is not null.
1703      */
1704     const std::string summary_TAG(NODE_TAG_ONE);
1705     dragDropManager->summaryMap_.clear();
1706     dragDropManager->summaryMap_.insert(make_pair(summary_TAG, frameNodeNullId));
1707     ASSERT_NE(dragDropManager, nullptr);
1708 
1709     /**
1710      * @tc.steps: step4. Set an isDisallowDropForcedly in the frameNode and then get an isDisallowDropForcedly.
1711      * @tc.expected: The set isDisallowDropForcedly is the same as the get isDisallowDropForcedly.
1712      */
1713     bool isDisallowDrop = true;
1714     ASSERT_TRUE(isDisallowDrop);
1715     frameNode->SetDisallowDropForcedly(isDisallowDrop);
1716     bool isDisallowDropForcedly = frameNode->GetDisallowDropForcedly();
1717     ASSERT_TRUE(isDisallowDropForcedly);
1718 
1719     /**
1720      * @tc.steps: step5. ReportingSupported is set to false.
1721      * @tc.expected: reportingEnabledFalse is false.
1722      */
1723     ASSERT_FALSE(dragDropManager->IsDropAllowed(frameNode));
1724 }
1725 
1726 /**
1727  * @tc.name: FrameNodeDropTestNg036
1728  * @tc.desc: Test frame node method
1729  * @tc.type: FUNC
1730  */
1731 HWTEST_F(FrameNodeDropTestNg, FrameNodeDropTestNg036, TestSize.Level1)
1732 {
1733     /**
1734      * @tc.steps: step1. construct a DragDropManager.
1735      * @tc.expected: dragDropManager is not null.
1736      */
1737     auto dragDropManager = AceType::MakeRefPtr<DragDropManager>();
1738     ASSERT_NE(dragDropManager, nullptr);
1739 
1740     /**
1741      * @tc.steps: step2. construct frameNode and update the properties.
1742      * @tc.expected: frameNode is not null.
1743      */
1744     const std::string allowTag(NODE_TAG_ONE);
1745     auto frameNodeNullId = ElementRegister::GetInstance()->MakeUniqueId();
1746     auto frameNode = AceType::MakeRefPtr<FrameNode>(allowTag, frameNodeNullId, AceType::MakeRefPtr<Pattern>());
1747     ASSERT_NE(frameNode, nullptr);
1748     std::set<std::string> allowDrop = { allowTag };
1749     frameNode->SetAllowDrop(allowDrop);
1750     ASSERT_NE(frameNode, nullptr);
1751 
1752     /**
1753      * @tc.steps: step3. construct summaryMap for dragDropManager.
1754      * @tc.expected: dragDropManager is not null.
1755      */
1756     const std::string summary_TAG(NODE_TAG_A);
1757     dragDropManager->summaryMap_.clear();
1758     dragDropManager->summaryMap_.insert(make_pair(summary_TAG, frameNodeNullId));
1759     ASSERT_NE(dragDropManager, nullptr);
1760 
1761     /**
1762      * @tc.steps: step4. Set an isDisallowDropForcedly in the frameNode and then get an isDisallowDropForcedly.
1763      * @tc.expected: The set isDisallowDropForcedly is the same as the get isDisallowDropForcedly.
1764      */
1765     bool isDisallowDrop = true;
1766     ASSERT_TRUE(isDisallowDrop);
1767     frameNode->SetDisallowDropForcedly(isDisallowDrop);
1768     bool isDisallowDropForcedly = frameNode->GetDisallowDropForcedly();
1769     ASSERT_TRUE(isDisallowDropForcedly);
1770 
1771     /**
1772      * @tc.steps: step5. ReportingSupported is set to false.
1773      * @tc.expected: reportingEnabledFalse is false.
1774      */
1775     ASSERT_FALSE(dragDropManager->IsDropAllowed(frameNode));
1776 }
1777 
1778 /**
1779  * @tc.name: FrameNodeDropTestNg037
1780  * @tc.desc: Test frame node method
1781  * @tc.type: FUNC
1782  */
1783 HWTEST_F(FrameNodeDropTestNg, FrameNodeDropTestNg037, TestSize.Level1)
1784 {
1785     /**
1786      * @tc.steps: step1. construct a DragDropManager.
1787      * @tc.expected: dragDropManager is not null.
1788      */
1789     auto dragDropManager = AceType::MakeRefPtr<DragDropManager>();
1790     ASSERT_NE(dragDropManager, nullptr);
1791 
1792     /**
1793      * @tc.steps: step2. construct frameNode and update the properties.
1794      * @tc.expected: frameNode is not null.
1795      */
1796     const std::string allowTag(NODE_TAG_A);
1797     auto frameNodeNullId = ElementRegister::GetInstance()->MakeUniqueId();
1798     auto frameNode = AceType::MakeRefPtr<FrameNode>(allowTag, frameNodeNullId, AceType::MakeRefPtr<Pattern>());
1799     ASSERT_NE(frameNode, nullptr);
1800     std::set<std::string> allowDrop = { allowTag };
1801     frameNode->SetAllowDrop(allowDrop);
1802     ASSERT_NE(frameNode, nullptr);
1803 
1804     /**
1805      * @tc.steps: step3. construct summaryMap for dragDropManager.
1806      * @tc.expected: dragDropManager is not null.
1807      */
1808     const std::string summary_TAG(NODE_TAG_SPOT);
1809     dragDropManager->summaryMap_.clear();
1810     dragDropManager->summaryMap_.insert(make_pair(summary_TAG, frameNodeNullId));
1811     ASSERT_NE(dragDropManager, nullptr);
1812 
1813     /**
1814      * @tc.steps: step4. Set an isDisallowDropForcedly in the frameNode and then get an isDisallowDropForcedly.
1815      * @tc.expected: The set isDisallowDropForcedly is the same as the get isDisallowDropForcedly.
1816      */
1817     bool isDisallowDrop = true;
1818     ASSERT_TRUE(isDisallowDrop);
1819     frameNode->SetDisallowDropForcedly(isDisallowDrop);
1820     bool isDisallowDropForcedly = frameNode->GetDisallowDropForcedly();
1821     ASSERT_TRUE(isDisallowDropForcedly);
1822 
1823     /**
1824      * @tc.steps: step5. ReportingSupported is set to false.
1825      * @tc.expected: reportingEnabledFalse is false.
1826      */
1827     ASSERT_FALSE(dragDropManager->IsDropAllowed(frameNode));
1828 }
1829 
1830 /**
1831  * @tc.name: FrameNodeDropTestNg038
1832  * @tc.desc: Test frame node method
1833  * @tc.type: FUNC
1834  */
1835 HWTEST_F(FrameNodeDropTestNg, FrameNodeDropTestNg038, TestSize.Level1)
1836 {
1837     /**
1838      * @tc.steps: step1. construct a DragDropManager.
1839      * @tc.expected: dragDropManager is not null.
1840      */
1841     auto dragDropManager = AceType::MakeRefPtr<DragDropManager>();
1842     ASSERT_NE(dragDropManager, nullptr);
1843 
1844     /**
1845      * @tc.steps: step2. construct frameNode and update the properties.
1846      * @tc.expected: frameNode is not null.
1847      */
1848     const std::string allowTag(NODE_TAG_A);
1849     auto frameNodeNullId = ElementRegister::GetInstance()->MakeUniqueId();
1850     auto frameNode = AceType::MakeRefPtr<FrameNode>(allowTag, frameNodeNullId, AceType::MakeRefPtr<Pattern>());
1851     ASSERT_NE(frameNode, nullptr);
1852     std::set<std::string> allowDrop = { allowTag };
1853     frameNode->SetAllowDrop(allowDrop);
1854     ASSERT_NE(frameNode, nullptr);
1855 
1856     /**
1857      * @tc.steps: step3. construct summaryMap for dragDropManager.
1858      * @tc.expected: dragDropManager is not null.
1859      */
1860     const std::string summary_TAG(NODE_TAG_ONE);
1861     dragDropManager->summaryMap_.clear();
1862     dragDropManager->summaryMap_.insert(make_pair(summary_TAG, frameNodeNullId));
1863     ASSERT_NE(dragDropManager, nullptr);
1864 
1865     /**
1866      * @tc.steps: step4. Set an isDisallowDropForcedly in the frameNode and then get an isDisallowDropForcedly.
1867      * @tc.expected: The set isDisallowDropForcedly is the same as the get isDisallowDropForcedly.
1868      */
1869     bool isDisallowDrop = true;
1870     ASSERT_TRUE(isDisallowDrop);
1871     frameNode->SetDisallowDropForcedly(isDisallowDrop);
1872     bool isDisallowDropForcedly = frameNode->GetDisallowDropForcedly();
1873     ASSERT_TRUE(isDisallowDropForcedly);
1874 
1875     /**
1876      * @tc.steps: step5. ReportingSupported is set to false.
1877      * @tc.expected: reportingEnabledFalse is false.
1878      */
1879     ASSERT_FALSE(dragDropManager->IsDropAllowed(frameNode));
1880 }
1881 
1882 /**
1883  * @tc.name: FrameNodeDropTestNg039
1884  * @tc.desc: Test frame node method
1885  * @tc.type: FUNC
1886  */
1887 HWTEST_F(FrameNodeDropTestNg, FrameNodeDropTestNg039, TestSize.Level1)
1888 {
1889     /**
1890      * @tc.steps: step1. construct a DragDropManager.
1891      * @tc.expected: dragDropManager is not null.
1892      */
1893     auto dragDropManager = AceType::MakeRefPtr<DragDropManager>();
1894     ASSERT_NE(dragDropManager, nullptr);
1895 
1896     /**
1897      * @tc.steps: step2. construct frameNode and update the properties.
1898      * @tc.expected: frameNode is not null.
1899      */
1900     const std::string allowTag(NODE_TAG_A);
1901     auto frameNodeNullId = ElementRegister::GetInstance()->MakeUniqueId();
1902     auto frameNode = AceType::MakeRefPtr<FrameNode>(allowTag, frameNodeNullId, AceType::MakeRefPtr<Pattern>());
1903     ASSERT_NE(frameNode, nullptr);
1904     std::set<std::string> allowDrop = { allowTag };
1905     frameNode->SetAllowDrop(allowDrop);
1906     ASSERT_NE(frameNode, nullptr);
1907 
1908     /**
1909      * @tc.steps: step3. construct summaryMap for dragDropManager.
1910      * @tc.expected: dragDropManager is not null.
1911      */
1912     const std::string summary_TAG(NODE_TAG_A);
1913     dragDropManager->summaryMap_.clear();
1914     dragDropManager->summaryMap_.insert(make_pair(summary_TAG, frameNodeNullId));
1915     ASSERT_NE(dragDropManager, nullptr);
1916 
1917     /**
1918      * @tc.steps: step4. Set an isDisallowDropForcedly in the frameNode and then get an isDisallowDropForcedly.
1919      * @tc.expected: The set isDisallowDropForcedly is the same as the get isDisallowDropForcedly.
1920      */
1921     bool isDisallowDrop = true;
1922     ASSERT_TRUE(isDisallowDrop);
1923     frameNode->SetDisallowDropForcedly(isDisallowDrop);
1924     bool isDisallowDropForcedly = frameNode->GetDisallowDropForcedly();
1925     ASSERT_TRUE(isDisallowDropForcedly);
1926 
1927     /**
1928      * @tc.steps: step5. ReportingSupported is set to false.
1929      * @tc.expected: reportingEnabledFalse is false.
1930      */
1931     ASSERT_FALSE(dragDropManager->IsDropAllowed(frameNode));
1932 }
1933 
1934 /**
1935  * @tc.name: FrameNodeDropTestNg040
1936  * @tc.desc: Test frame node method
1937  * @tc.type: FUNC
1938  */
1939 HWTEST_F(FrameNodeDropTestNg, FrameNodeDropTestNg040, TestSize.Level1)
1940 {
1941     /**
1942      * @tc.steps: step1. construct a DragDropManager.
1943      * @tc.expected: dragDropManager is not null.
1944      */
1945     auto dragDropManager = AceType::MakeRefPtr<DragDropManager>();
1946     ASSERT_NE(dragDropManager, nullptr);
1947 
1948     /**
1949      * @tc.steps: step2. construct frameNode and update the properties.
1950      * @tc.expected: frameNode is not null.
1951      */
1952     const std::string allowTag(NODE_TAG_EMPTY);
1953     auto frameNodeNullId = ElementRegister::GetInstance()->MakeUniqueId();
1954     auto frameNode = AceType::MakeRefPtr<FrameNode>(allowTag, frameNodeNullId, AceType::MakeRefPtr<Pattern>());
1955     ASSERT_NE(frameNode, nullptr);
1956     std::set<std::string> allowDrop;
1957     frameNode->SetAllowDrop(allowDrop);
1958     ASSERT_NE(frameNode, nullptr);
1959 
1960     /**
1961      * @tc.steps: step3. construct summaryMap for dragDropManager.
1962      * @tc.expected: dragDropManager is not null.
1963      */
1964     const std::string summary_TAG(NODE_TAG_SPOT);
1965     dragDropManager->summaryMap_.clear();
1966     dragDropManager->summaryMap_.insert(make_pair(summary_TAG, frameNodeNullId));
1967     ASSERT_NE(dragDropManager, nullptr);
1968 
1969     /**
1970      * @tc.steps: step4. Set an isDisallowDropForcedly in the frameNode and then get an isDisallowDropForcedly.
1971      * @tc.expected: The set isDisallowDropForcedly is the same as the get isDisallowDropForcedly.
1972      */
1973     bool isDisallowDrop = true;
1974     ASSERT_TRUE(isDisallowDrop);
1975     frameNode->SetDisallowDropForcedly(isDisallowDrop);
1976     bool isDisallowDropForcedly = frameNode->GetDisallowDropForcedly();
1977     ASSERT_TRUE(isDisallowDropForcedly);
1978 
1979     /**
1980      * @tc.steps: step5. ReportingSupported is set to false.
1981      * @tc.expected: reportingEnabledFalse is false.
1982      */
1983     ASSERT_FALSE(dragDropManager->IsDropAllowed(frameNode));
1984 }
1985 
1986 /**
1987  * @tc.name: FrameNodeDropTestNg041
1988  * @tc.desc: Test frame node method
1989  * @tc.type: FUNC
1990  */
1991 HWTEST_F(FrameNodeDropTestNg, FrameNodeDropTestNg041, TestSize.Level1)
1992 {
1993     /**
1994      * @tc.steps: step1. construct a DragDropManager.
1995      * @tc.expected: dragDropManager is not null.
1996      */
1997     auto dragDropManager = AceType::MakeRefPtr<DragDropManager>();
1998     ASSERT_NE(dragDropManager, nullptr);
1999 
2000     /**
2001      * @tc.steps: step2. construct frameNode and update the properties.
2002      * @tc.expected: frameNode is not null.
2003      */
2004     const std::string allowTag(NODE_TAG_EMPTY);
2005     auto frameNodeNullId = ElementRegister::GetInstance()->MakeUniqueId();
2006     auto frameNode = AceType::MakeRefPtr<FrameNode>(allowTag, frameNodeNullId, AceType::MakeRefPtr<Pattern>());
2007     ASSERT_NE(frameNode, nullptr);
2008     std::set<std::string> allowDrop;
2009     frameNode->SetAllowDrop(allowDrop);
2010     ASSERT_NE(frameNode, nullptr);
2011 
2012     /**
2013      * @tc.steps: step3. construct summaryMap for dragDropManager.
2014      * @tc.expected: dragDropManager is not null.
2015      */
2016     const std::string summary_TAG(NODE_TAG_ONE);
2017     dragDropManager->summaryMap_.clear();
2018     dragDropManager->summaryMap_.insert(make_pair(summary_TAG, frameNodeNullId));
2019     ASSERT_NE(dragDropManager, nullptr);
2020 
2021     /**
2022      * @tc.steps: step4. Set an isDisallowDropForcedly in the frameNode and then get an isDisallowDropForcedly.
2023      * @tc.expected: The set isDisallowDropForcedly is the same as the get isDisallowDropForcedly.
2024      */
2025     bool isDisallowDrop = true;
2026     ASSERT_TRUE(isDisallowDrop);
2027     frameNode->SetDisallowDropForcedly(isDisallowDrop);
2028     bool isDisallowDropForcedly = frameNode->GetDisallowDropForcedly();
2029     ASSERT_TRUE(isDisallowDropForcedly);
2030 
2031     /**
2032      * @tc.steps: step5. ReportingSupported is set to false.
2033      * @tc.expected: reportingEnabledFalse is false.
2034      */
2035     ASSERT_FALSE(dragDropManager->IsDropAllowed(frameNode));
2036 }
2037 
2038 /**
2039  * @tc.name: FrameNodeDropTestNg042
2040  * @tc.desc: Test frame node method
2041  * @tc.type: FUNC
2042  */
2043 HWTEST_F(FrameNodeDropTestNg, FrameNodeDropTestNg042, TestSize.Level1)
2044 {
2045     /**
2046      * @tc.steps: step1. construct a DragDropManager.
2047      * @tc.expected: dragDropManager is not null.
2048      */
2049     auto dragDropManager = AceType::MakeRefPtr<DragDropManager>();
2050     ASSERT_NE(dragDropManager, nullptr);
2051 
2052     /**
2053      * @tc.steps: step2. construct frameNode and update the properties.
2054      * @tc.expected: frameNode is not null.
2055      */
2056     const std::string allowTag(NODE_TAG_EMPTY);
2057     auto frameNodeNullId = ElementRegister::GetInstance()->MakeUniqueId();
2058     auto frameNode = AceType::MakeRefPtr<FrameNode>(allowTag, frameNodeNullId, AceType::MakeRefPtr<Pattern>());
2059     ASSERT_NE(frameNode, nullptr);
2060     std::set<std::string> allowDrop;
2061     frameNode->SetAllowDrop(allowDrop);
2062     ASSERT_NE(frameNode, nullptr);
2063 
2064     /**
2065      * @tc.steps: step3. construct summaryMap for dragDropManager.
2066      * @tc.expected: dragDropManager is not null.
2067      */
2068     const std::string summary_TAG(NODE_TAG_A);
2069     dragDropManager->summaryMap_.clear();
2070     dragDropManager->summaryMap_.insert(make_pair(summary_TAG, frameNodeNullId));
2071     ASSERT_NE(dragDropManager, nullptr);
2072 
2073     /**
2074      * @tc.steps: step4. Set an isDisallowDropForcedly in the frameNode and then get an isDisallowDropForcedly.
2075      * @tc.expected: The set isDisallowDropForcedly is the same as the get isDisallowDropForcedly.
2076      */
2077     bool isDisallowDrop = true;
2078     ASSERT_TRUE(isDisallowDrop);
2079     frameNode->SetDisallowDropForcedly(isDisallowDrop);
2080     bool isDisallowDropForcedly = frameNode->GetDisallowDropForcedly();
2081     ASSERT_TRUE(isDisallowDropForcedly);
2082 
2083     /**
2084      * @tc.steps: step5. ReportingSupported is set to false.
2085      * @tc.expected: reportingEnabledFalse is false.
2086      */
2087     ASSERT_FALSE(dragDropManager->IsDropAllowed(frameNode));
2088 }
2089 
2090 /**
2091  * @tc.name: FrameNodeDropTestNg043
2092  * @tc.desc: Test frame node method
2093  * @tc.type: FUNC
2094  */
2095 HWTEST_F(FrameNodeDropTestNg, FrameNodeDropTestNg043, TestSize.Level1)
2096 {
2097     /**
2098      * @tc.steps: step1. construct a DragDropManager.
2099      * @tc.expected: dragDropManager is not null.
2100      */
2101     auto dragDropManager = AceType::MakeRefPtr<DragDropManager>();
2102     ASSERT_NE(dragDropManager, nullptr);
2103 
2104     /**
2105      * @tc.steps: step2. construct frameNode and update the properties.
2106      * @tc.expected: frameNode is not null.
2107      */
2108     const std::string allowTag(NODE_TAG_SPOT);
2109     auto frameNodeNullId = ElementRegister::GetInstance()->MakeUniqueId();
2110     auto frameNode = AceType::MakeRefPtr<FrameNode>(allowTag, frameNodeNullId, AceType::MakeRefPtr<Pattern>());
2111     ASSERT_NE(frameNode, nullptr);
2112     std::set<std::string> allowDrop = { allowTag };
2113     frameNode->SetAllowDrop(allowDrop);
2114     ASSERT_NE(frameNode, nullptr);
2115 
2116     /**
2117      * @tc.steps: step3. construct summaryMap for dragDropManager.
2118      * @tc.expected: dragDropManager is not null.
2119      */
2120     const std::string summary_TAG(NODE_TAG_EMPTY);
2121     dragDropManager->summaryMap_.clear();
2122     ASSERT_NE(dragDropManager, nullptr);
2123 
2124     /**
2125      * @tc.steps: step4. Set an isDisallowDropForcedly in the frameNode and then get an isDisallowDropForcedly.
2126      * @tc.expected: The set isDisallowDropForcedly is the same as the get isDisallowDropForcedly.
2127      */
2128     bool isDisallowDrop = true;
2129     ASSERT_TRUE(isDisallowDrop);
2130     frameNode->SetDisallowDropForcedly(isDisallowDrop);
2131     bool isDisallowDropForcedly = frameNode->GetDisallowDropForcedly();
2132     ASSERT_TRUE(isDisallowDropForcedly);
2133 
2134     /**
2135      * @tc.steps: step5. ReportingSupported is set to false.
2136      * @tc.expected: reportingEnabledFalse is false.
2137      */
2138     ASSERT_FALSE(dragDropManager->IsDropAllowed(frameNode));
2139 }
2140 
2141 /**
2142  * @tc.name: FrameNodeDropTestNg044
2143  * @tc.desc: Test frame node method
2144  * @tc.type: FUNC
2145  */
2146 HWTEST_F(FrameNodeDropTestNg, FrameNodeDropTestNg044, TestSize.Level1)
2147 {
2148     /**
2149      * @tc.steps: step1. construct a DragDropManager.
2150      * @tc.expected: dragDropManager is not null.
2151      */
2152     auto dragDropManager = AceType::MakeRefPtr<DragDropManager>();
2153     ASSERT_NE(dragDropManager, nullptr);
2154 
2155     /**
2156      * @tc.steps: step2. construct frameNode and update the properties.
2157      * @tc.expected: frameNode is not null.
2158      */
2159     const std::string allowTag(NODE_TAG_ONE);
2160     auto frameNodeNullId = ElementRegister::GetInstance()->MakeUniqueId();
2161     auto frameNode = AceType::MakeRefPtr<FrameNode>(allowTag, frameNodeNullId, AceType::MakeRefPtr<Pattern>());
2162     ASSERT_NE(frameNode, nullptr);
2163     std::set<std::string> allowDrop = { allowTag };
2164     frameNode->SetAllowDrop(allowDrop);
2165     ASSERT_NE(frameNode, nullptr);
2166 
2167     /**
2168      * @tc.steps: step3. construct summaryMap for dragDropManager.
2169      * @tc.expected: dragDropManager is not null.
2170      */
2171     const std::string summary_TAG(NODE_TAG_EMPTY);
2172     dragDropManager->summaryMap_.clear();
2173     ASSERT_NE(dragDropManager, nullptr);
2174 
2175     /**
2176      * @tc.steps: step4. Set an isDisallowDropForcedly in the frameNode and then get an isDisallowDropForcedly.
2177      * @tc.expected: The set isDisallowDropForcedly is the same as the get isDisallowDropForcedly.
2178      */
2179     bool isDisallowDrop = true;
2180     ASSERT_TRUE(isDisallowDrop);
2181     frameNode->SetDisallowDropForcedly(isDisallowDrop);
2182     bool isDisallowDropForcedly = frameNode->GetDisallowDropForcedly();
2183     ASSERT_TRUE(isDisallowDropForcedly);
2184 
2185     /**
2186      * @tc.steps: step5. ReportingSupported is set to false.
2187      * @tc.expected: reportingEnabledFalse is false.
2188      */
2189     ASSERT_FALSE(dragDropManager->IsDropAllowed(frameNode));
2190 }
2191 
2192 /**
2193  * @tc.name: FrameNodeDropTestNg045
2194  * @tc.desc: Test frame node method
2195  * @tc.type: FUNC
2196  */
2197 HWTEST_F(FrameNodeDropTestNg, FrameNodeDropTestNg045, TestSize.Level1)
2198 {
2199     /**
2200      * @tc.steps: step1. construct a DragDropManager.
2201      * @tc.expected: dragDropManager is not null.
2202      */
2203     auto dragDropManager = AceType::MakeRefPtr<DragDropManager>();
2204     ASSERT_NE(dragDropManager, nullptr);
2205 
2206     /**
2207      * @tc.steps: step2. construct frameNode and update the properties.
2208      * @tc.expected: frameNode is not null.
2209      */
2210     const std::string allowTag(NODE_TAG_A);
2211     auto frameNodeNullId = ElementRegister::GetInstance()->MakeUniqueId();
2212     auto frameNode = AceType::MakeRefPtr<FrameNode>(allowTag, frameNodeNullId, AceType::MakeRefPtr<Pattern>());
2213     ASSERT_NE(frameNode, nullptr);
2214     std::set<std::string> allowDrop = { allowTag };
2215     frameNode->SetAllowDrop(allowDrop);
2216     ASSERT_NE(frameNode, nullptr);
2217 
2218     /**
2219      * @tc.steps: step3. construct summaryMap for dragDropManager.
2220      * @tc.expected: dragDropManager is not null.
2221      */
2222     const std::string summary_TAG(NODE_TAG_EMPTY);
2223     dragDropManager->summaryMap_.clear();
2224     ASSERT_NE(dragDropManager, nullptr);
2225 
2226     /**
2227      * @tc.steps: step4. Set an isDisallowDropForcedly in the frameNode and then get an isDisallowDropForcedly.
2228      * @tc.expected: The set isDisallowDropForcedly is the same as the get isDisallowDropForcedly.
2229      */
2230     bool isDisallowDrop = true;
2231     ASSERT_TRUE(isDisallowDrop);
2232     frameNode->SetDisallowDropForcedly(isDisallowDrop);
2233     bool isDisallowDropForcedly = frameNode->GetDisallowDropForcedly();
2234     ASSERT_TRUE(isDisallowDropForcedly);
2235 
2236     /**
2237      * @tc.steps: step5. ReportingSupported is set to false.
2238      * @tc.expected: reportingEnabledFalse is false.
2239      */
2240     ASSERT_FALSE(dragDropManager->IsDropAllowed(frameNode));
2241 }
2242 
2243 /**
2244  * @tc.name: FrameNodeDropTestNg046
2245  * @tc.desc: Test frame node method
2246  * @tc.type: FUNC
2247  */
2248 HWTEST_F(FrameNodeDropTestNg, FrameNodeDropTestNg046, TestSize.Level1)
2249 {
2250     /**
2251      * @tc.steps: step1. construct a DragDropManager.
2252      * @tc.expected: dragDropManager is not null.
2253      */
2254     auto dragDropManager = AceType::MakeRefPtr<DragDropManager>();
2255     ASSERT_NE(dragDropManager, nullptr);
2256 
2257     /**
2258      * @tc.steps: step2. construct frameNode and update the properties.
2259      * @tc.expected: frameNode is not null.
2260      */
2261     const std::string allowTag(NODE_TAG_EMPTY);
2262     auto frameNodeNullId = ElementRegister::GetInstance()->MakeUniqueId();
2263     auto frameNode = AceType::MakeRefPtr<FrameNode>(allowTag, frameNodeNullId, AceType::MakeRefPtr<Pattern>());
2264     ASSERT_NE(frameNode, nullptr);
2265     std::set<std::string> allowDrop = { allowTag };
2266     frameNode->SetAllowDrop(allowDrop);
2267     ASSERT_NE(frameNode, nullptr);
2268 
2269     /**
2270      * @tc.steps: step3. construct summaryMap for dragDropManager.
2271      * @tc.expected: dragDropManager is not null.
2272      */
2273     const std::string summary_TAG(NODE_TAG_EMPTY);
2274     dragDropManager->summaryMap_.clear();
2275     dragDropManager->summaryMap_.insert(make_pair(summary_TAG, frameNodeNullId));
2276     ASSERT_NE(dragDropManager, nullptr);
2277 
2278     /**
2279      * @tc.steps: step4. Set an isDisallowDropForcedly in the frameNode and then get an isDisallowDropForcedly.
2280      * @tc.expected: The set isDisallowDropForcedly is the same as the get isDisallowDropForcedly.
2281      */
2282     bool isDisallowDrop = false;
2283     ASSERT_FALSE(isDisallowDrop);
2284     frameNode->SetDisallowDropForcedly(isDisallowDrop);
2285     bool isDisallowDropForcedly = frameNode->GetDisallowDropForcedly();
2286     ASSERT_FALSE(isDisallowDropForcedly);
2287 
2288     /**
2289      * @tc.steps: step5. ReportingSupported is set to false.
2290      * @tc.expected: reportingEnabledFalse is false.
2291      */
2292     auto mockUdmfClient = static_cast<MockUdmfClient*>(UdmfClient::GetInstance());
2293     EXPECT_CALL(*mockUdmfClient, IsAppropriateType(_, _))
2294         .WillOnce(testing::Return(true))
2295         .WillRepeatedly(testing::Return(false));
2296     ASSERT_TRUE(dragDropManager->IsDropAllowed(frameNode));
2297 }
2298 
2299 /**
2300  * @tc.name: FrameNodeDropTestNg047
2301  * @tc.desc: Test frame node method
2302  * @tc.type: FUNC
2303  */
2304 HWTEST_F(FrameNodeDropTestNg, FrameNodeDropTestNg047, TestSize.Level1)
2305 {
2306     /**
2307      * @tc.steps: step1. construct a DragDropManager.
2308      * @tc.expected: dragDropManager is not null.
2309      */
2310     auto dragDropManager = AceType::MakeRefPtr<DragDropManager>();
2311     ASSERT_NE(dragDropManager, nullptr);
2312 
2313     /**
2314      * @tc.steps: step2. construct frameNode and update the properties.
2315      * @tc.expected: frameNode is not null.
2316      */
2317     const std::string allowTag(NODE_TAG_EMPTY);
2318     auto frameNodeNullId = ElementRegister::GetInstance()->MakeUniqueId();
2319     auto frameNode = AceType::MakeRefPtr<FrameNode>(allowTag, frameNodeNullId, AceType::MakeRefPtr<Pattern>());
2320     ASSERT_NE(frameNode, nullptr);
2321     std::set<std::string> allowDrop = { allowTag };
2322     frameNode->SetAllowDrop(allowDrop);
2323     ASSERT_NE(frameNode, nullptr);
2324 
2325     /**
2326      * @tc.steps: step3. construct summaryMap for dragDropManager.
2327      * @tc.expected: dragDropManager is not null.
2328      */
2329     const std::string summary_TAG(NODE_TAG_EMPTY);
2330     dragDropManager->summaryMap_.clear();
2331     ASSERT_NE(dragDropManager, nullptr);
2332 
2333     /**
2334      * @tc.steps: step4. Set an isDisallowDropForcedly in the frameNode and then get an isDisallowDropForcedly.
2335      * @tc.expected: The set isDisallowDropForcedly is the same as the get isDisallowDropForcedly.
2336      */
2337     bool isDisallowDrop = true;
2338     ASSERT_TRUE(isDisallowDrop);
2339     frameNode->SetDisallowDropForcedly(isDisallowDrop);
2340     bool isDisallowDropForcedly = frameNode->GetDisallowDropForcedly();
2341     ASSERT_TRUE(isDisallowDropForcedly);
2342 
2343     /**
2344      * @tc.steps: step5. ReportingSupported is set to false.
2345      * @tc.expected: reportingEnabledFalse is false.
2346      */
2347     ASSERT_FALSE(dragDropManager->IsDropAllowed(frameNode));
2348 }
2349 
2350 /**
2351  * @tc.name: FrameNodeDropTestNg048
2352  * @tc.desc: Test frame node method
2353  * @tc.type: FUNC
2354  */
2355 HWTEST_F(FrameNodeDropTestNg, FrameNodeDropTestNg048, TestSize.Level1)
2356 {
2357     /**
2358      * @tc.steps: step1. construct a DragDropManager.
2359      * @tc.expected: dragDropManager is not null.
2360      */
2361     auto dragDropManager = AceType::MakeRefPtr<DragDropManager>();
2362     ASSERT_NE(dragDropManager, nullptr);
2363 
2364     /**
2365      * @tc.steps: step2. construct frameNode and update the properties.
2366      * @tc.expected: frameNode is not null.
2367      */
2368     const std::string allowTag(NODE_TAG_SPOT);
2369     auto frameNodeNullId = ElementRegister::GetInstance()->MakeUniqueId();
2370     auto frameNode = AceType::MakeRefPtr<FrameNode>(allowTag, frameNodeNullId, AceType::MakeRefPtr<Pattern>());
2371     ASSERT_NE(frameNode, nullptr);
2372     std::set<std::string> allowDrop = { allowTag };
2373     frameNode->SetAllowDrop(allowDrop);
2374     ASSERT_NE(frameNode, nullptr);
2375 
2376     /**
2377      * @tc.steps: step3. construct summaryMap for dragDropManager.
2378      * @tc.expected: dragDropManager is not null.
2379      */
2380     const std::string summary_TAG(NODE_TAG_EMPTY);
2381     dragDropManager->summaryMap_.clear();
2382     ASSERT_NE(dragDropManager, nullptr);
2383 
2384     /**
2385      * @tc.steps: step4. Set an isDisallowDropForcedly in the frameNode and then get an isDisallowDropForcedly.
2386      * @tc.expected: The set isDisallowDropForcedly is the same as the get isDisallowDropForcedly.
2387      */
2388     bool isDisallowDrop = false;
2389     ASSERT_FALSE(isDisallowDrop);
2390     frameNode->SetDisallowDropForcedly(isDisallowDrop);
2391     bool isDisallowDropForcedly = frameNode->GetDisallowDropForcedly();
2392     ASSERT_FALSE(isDisallowDropForcedly);
2393 
2394     /**
2395      * @tc.steps: step5. ReportingSupported is set to false.
2396      * @tc.expected: reportingEnabledFalse is false.
2397      */
2398     ASSERT_TRUE(dragDropManager->IsDropAllowed(frameNode));
2399 }
2400 
2401 /**
2402  * @tc.name: FrameNodeDropTestNg049
2403  * @tc.desc: Test frame node method
2404  * @tc.type: FUNC
2405  */
2406 HWTEST_F(FrameNodeDropTestNg, FrameNodeDropTestNg049, TestSize.Level1)
2407 {
2408     /**
2409      * @tc.steps: step1. construct a DragDropManager.
2410      * @tc.expected: dragDropManager is not null.
2411      */
2412     auto dragDropManager = AceType::MakeRefPtr<DragDropManager>();
2413     ASSERT_NE(dragDropManager, nullptr);
2414 
2415     /**
2416      * @tc.steps: step2. construct frameNode and update the properties.
2417      * @tc.expected: frameNode is not null.
2418      */
2419     const std::string allowTag(NODE_TAG_ONE);
2420     auto frameNodeNullId = ElementRegister::GetInstance()->MakeUniqueId();
2421     auto frameNode = AceType::MakeRefPtr<FrameNode>(allowTag, frameNodeNullId, AceType::MakeRefPtr<Pattern>());
2422     ASSERT_NE(frameNode, nullptr);
2423     std::set<std::string> allowDrop = { allowTag };
2424     frameNode->SetAllowDrop(allowDrop);
2425     ASSERT_NE(frameNode, nullptr);
2426 
2427     /**
2428      * @tc.steps: step3. construct summaryMap for dragDropManager.
2429      * @tc.expected: dragDropManager is not null.
2430      */
2431     const std::string summary_TAG(NODE_TAG_EMPTY);
2432     dragDropManager->summaryMap_.clear();
2433     ASSERT_NE(dragDropManager, nullptr);
2434 
2435     /**
2436      * @tc.steps: step4. Set an isDisallowDropForcedly in the frameNode and then get an isDisallowDropForcedly.
2437      * @tc.expected: The set isDisallowDropForcedly is the same as the get isDisallowDropForcedly.
2438      */
2439     bool isDisallowDrop = false;
2440     ASSERT_FALSE(isDisallowDrop);
2441     frameNode->SetDisallowDropForcedly(isDisallowDrop);
2442     bool isDisallowDropForcedly = frameNode->GetDisallowDropForcedly();
2443     ASSERT_FALSE(isDisallowDropForcedly);
2444 
2445     /**
2446      * @tc.steps: step5. ReportingSupported is set to false.
2447      * @tc.expected: reportingEnabledFalse is false.
2448      */
2449     ASSERT_TRUE(dragDropManager->IsDropAllowed(frameNode));
2450 }
2451 
2452 /**
2453  * @tc.name: FrameNodeDropTestNg050
2454  * @tc.desc: Test frame node method
2455  * @tc.type: FUNC
2456  */
2457 HWTEST_F(FrameNodeDropTestNg, FrameNodeDropTestNg050, TestSize.Level1)
2458 {
2459     /**
2460      * @tc.steps: step1. construct a DragDropManager.
2461      * @tc.expected: dragDropManager is not null.
2462      */
2463     auto dragDropManager = AceType::MakeRefPtr<DragDropManager>();
2464     ASSERT_NE(dragDropManager, nullptr);
2465 
2466     /**
2467      * @tc.steps: step2. construct frameNode and update the properties.
2468      * @tc.expected: frameNode is not null.
2469      */
2470     const std::string allowTag(NODE_TAG_A);
2471     auto frameNodeNullId = ElementRegister::GetInstance()->MakeUniqueId();
2472     auto frameNode = AceType::MakeRefPtr<FrameNode>(allowTag, frameNodeNullId, AceType::MakeRefPtr<Pattern>());
2473     ASSERT_NE(frameNode, nullptr);
2474     std::set<std::string> allowDrop = { allowTag };
2475     frameNode->SetAllowDrop(allowDrop);
2476     ASSERT_NE(frameNode, nullptr);
2477 
2478     /**
2479      * @tc.steps: step3. construct summaryMap for dragDropManager.
2480      * @tc.expected: dragDropManager is not null.
2481      */
2482     const std::string summary_TAG(NODE_TAG_EMPTY);
2483     dragDropManager->summaryMap_.clear();
2484     ASSERT_NE(dragDropManager, nullptr);
2485 
2486     /**
2487      * @tc.steps: step4. Set an isDisallowDropForcedly in the frameNode and then get an isDisallowDropForcedly.
2488      * @tc.expected: The set isDisallowDropForcedly is the same as the get isDisallowDropForcedly.
2489      */
2490     bool isDisallowDrop = false;
2491     ASSERT_FALSE(isDisallowDrop);
2492     frameNode->SetDisallowDropForcedly(isDisallowDrop);
2493     bool isDisallowDropForcedly = frameNode->GetDisallowDropForcedly();
2494     ASSERT_FALSE(isDisallowDropForcedly);
2495 
2496     /**
2497      * @tc.steps: step5. ReportingSupported is set to false.
2498      * @tc.expected: reportingEnabledFalse is false.
2499      */
2500     ASSERT_TRUE(dragDropManager->IsDropAllowed(frameNode));
2501 }
2502 
2503 /**
2504  * @tc.name: FrameNodeDropTestNg051
2505  * @tc.desc: Test frame node method
2506  * @tc.type: FUNC
2507  */
2508 HWTEST_F(FrameNodeDropTestNg, FrameNodeDropTestNg051, TestSize.Level1)
2509 {
2510     /**
2511      * @tc.steps: step1. construct a DragDropManager.
2512      * @tc.expected: dragDropManager is not null.
2513      */
2514     auto dragDropManager = AceType::MakeRefPtr<DragDropManager>();
2515     ASSERT_NE(dragDropManager, nullptr);
2516 
2517     /**
2518      * @tc.steps: step2. construct frameNode and update the properties.
2519      * @tc.expected: frameNode is not null.
2520      */
2521     const std::string allowTag(NODE_TAG_EMPTY);
2522     auto frameNodeNullId = ElementRegister::GetInstance()->MakeUniqueId();
2523     auto frameNode = AceType::MakeRefPtr<FrameNode>(allowTag, frameNodeNullId, AceType::MakeRefPtr<Pattern>());
2524     ASSERT_NE(frameNode, nullptr);
2525     std::set<std::string> allowDrop = { allowTag };
2526     frameNode->SetAllowDrop(allowDrop);
2527     ASSERT_NE(frameNode, nullptr);
2528 
2529     /**
2530      * @tc.steps: step3. construct summaryMap for dragDropManager.
2531      * @tc.expected: dragDropManager is not null.
2532      */
2533     const std::string summary_TAG(NODE_TAG_EMPTY);
2534     dragDropManager->summaryMap_.clear();
2535     ASSERT_NE(dragDropManager, nullptr);
2536 
2537     /**
2538      * @tc.steps: step4. Set an isDisallowDropForcedly in the frameNode and then get an isDisallowDropForcedly.
2539      * @tc.expected: The set isDisallowDropForcedly is the same as the get isDisallowDropForcedly.
2540      */
2541     bool isDisallowDrop = false;
2542     ASSERT_FALSE(isDisallowDrop);
2543     frameNode->SetDisallowDropForcedly(isDisallowDrop);
2544     bool isDisallowDropForcedly = frameNode->GetDisallowDropForcedly();
2545     ASSERT_FALSE(isDisallowDropForcedly);
2546 
2547     /**
2548      * @tc.steps: step5. ReportingSupported is set to false.
2549      * @tc.expected: reportingEnabledFalse is false.
2550      */
2551     ASSERT_TRUE(dragDropManager->IsDropAllowed(frameNode));
2552 }
2553 
2554 /**
2555  * @tc.name: FrameNodeDropTestNg048
2556  * @tc.desc: Test frame node method
2557  * @tc.type: FUNC
2558  */
2559 HWTEST_F(FrameNodeDropTestNg, FrameNodeDropTestNg052, TestSize.Level1)
2560 {
2561     /**
2562      * @tc.steps: step1. construct a DragDropManager.
2563      * @tc.expected: dragDropManager is not null.
2564      */
2565     auto dragDropManager = AceType::MakeRefPtr<DragDropManager>();
2566     ASSERT_NE(dragDropManager, nullptr);
2567 
2568     /**
2569      * @tc.steps: step2. construct frameNode and update the properties.
2570      * @tc.expected: frameNode is not null.
2571      */
2572     const std::string allowTag(NODE_TAG_SPOT);
2573     auto frameNodeNullId = ElementRegister::GetInstance()->MakeUniqueId();
2574     auto frameNode = AceType::MakeRefPtr<FrameNode>(allowTag, frameNodeNullId, AceType::MakeRefPtr<Pattern>());
2575     ASSERT_NE(frameNode, nullptr);
2576     std::set<std::string> allowDrop = { allowTag };
2577     frameNode->SetAllowDrop(allowDrop);
2578     ASSERT_NE(frameNode, nullptr);
2579 
2580     /**
2581      * @tc.steps: step3. construct summaryMap for dragDropManager.
2582      * @tc.expected: dragDropManager is not null.
2583      */
2584     const std::string summary_TAG(NODE_TAG_EMPTY);
2585     dragDropManager->summaryMap_.clear();
2586     ASSERT_NE(dragDropManager, nullptr);
2587 
2588     /**
2589      * @tc.steps: step4. Set an isDisallowDropForcedly in the frameNode and then get an isDisallowDropForcedly.
2590      * @tc.expected: The set isDisallowDropForcedly is the same as the get isDisallowDropForcedly.
2591      */
2592     bool isDisallowDrop = true;
2593     ASSERT_TRUE(isDisallowDrop);
2594     frameNode->SetDisallowDropForcedly(isDisallowDrop);
2595     bool isDisallowDropForcedly = frameNode->GetDisallowDropForcedly();
2596     ASSERT_TRUE(isDisallowDropForcedly);
2597 
2598     /**
2599      * @tc.steps: step5. ReportingSupported is set to false.
2600      * @tc.expected: reportingEnabledFalse is false.
2601      */
2602     ASSERT_FALSE(dragDropManager->IsDropAllowed(frameNode));
2603 }
2604 
2605 /**
2606  * @tc.name: FrameNodeDropTestNg049
2607  * @tc.desc: Test frame node method
2608  * @tc.type: FUNC
2609  */
2610 HWTEST_F(FrameNodeDropTestNg, FrameNodeDropTestNg053, TestSize.Level1)
2611 {
2612     /**
2613      * @tc.steps: step1. construct a DragDropManager.
2614      * @tc.expected: dragDropManager is not null.
2615      */
2616     auto dragDropManager = AceType::MakeRefPtr<DragDropManager>();
2617     ASSERT_NE(dragDropManager, nullptr);
2618 
2619     /**
2620      * @tc.steps: step2. construct frameNode and update the properties.
2621      * @tc.expected: frameNode is not null.
2622      */
2623     const std::string allowTag(NODE_TAG_ONE);
2624     auto frameNodeNullId = ElementRegister::GetInstance()->MakeUniqueId();
2625     auto frameNode = AceType::MakeRefPtr<FrameNode>(allowTag, frameNodeNullId, AceType::MakeRefPtr<Pattern>());
2626     ASSERT_NE(frameNode, nullptr);
2627     std::set<std::string> allowDrop = { allowTag };
2628     frameNode->SetAllowDrop(allowDrop);
2629     ASSERT_NE(frameNode, nullptr);
2630 
2631     /**
2632      * @tc.steps: step3. construct summaryMap for dragDropManager.
2633      * @tc.expected: dragDropManager is not null.
2634      */
2635     const std::string summary_TAG(NODE_TAG_EMPTY);
2636     dragDropManager->summaryMap_.clear();
2637     ASSERT_NE(dragDropManager, nullptr);
2638 
2639     /**
2640      * @tc.steps: step4. Set an isDisallowDropForcedly in the frameNode and then get an isDisallowDropForcedly.
2641      * @tc.expected: The set isDisallowDropForcedly is the same as the get isDisallowDropForcedly.
2642      */
2643     bool isDisallowDrop = true;
2644     ASSERT_TRUE(isDisallowDrop);
2645     frameNode->SetDisallowDropForcedly(isDisallowDrop);
2646     bool isDisallowDropForcedly = frameNode->GetDisallowDropForcedly();
2647     ASSERT_TRUE(isDisallowDropForcedly);
2648 
2649     /**
2650      * @tc.steps: step5. ReportingSupported is set to false.
2651      * @tc.expected: reportingEnabledFalse is false.
2652      */
2653     ASSERT_FALSE(dragDropManager->IsDropAllowed(frameNode));
2654 }
2655 
2656 /**
2657  * @tc.name: FrameNodeDropTestNg050
2658  * @tc.desc: Test frame node method
2659  * @tc.type: FUNC
2660  */
2661 HWTEST_F(FrameNodeDropTestNg, FrameNodeDropTestNg054, TestSize.Level1)
2662 {
2663     /**
2664      * @tc.steps: step1. construct a DragDropManager.
2665      * @tc.expected: dragDropManager is not null.
2666      */
2667     auto dragDropManager = AceType::MakeRefPtr<DragDropManager>();
2668     ASSERT_NE(dragDropManager, nullptr);
2669 
2670     /**
2671      * @tc.steps: step2. construct frameNode and update the properties.
2672      * @tc.expected: frameNode is not null.
2673      */
2674     const std::string allowTag(NODE_TAG_A);
2675     auto frameNodeNullId = ElementRegister::GetInstance()->MakeUniqueId();
2676     auto frameNode = AceType::MakeRefPtr<FrameNode>(allowTag, frameNodeNullId, AceType::MakeRefPtr<Pattern>());
2677     ASSERT_NE(frameNode, nullptr);
2678     std::set<std::string> allowDrop = { allowTag };
2679     frameNode->SetAllowDrop(allowDrop);
2680     ASSERT_NE(frameNode, nullptr);
2681 
2682     /**
2683      * @tc.steps: step3. construct summaryMap for dragDropManager.
2684      * @tc.expected: dragDropManager is not null.
2685      */
2686     const std::string summary_TAG(NODE_TAG_EMPTY);
2687     dragDropManager->summaryMap_.clear();
2688     ASSERT_NE(dragDropManager, nullptr);
2689 
2690     /**
2691      * @tc.steps: step4. Set an isDisallowDropForcedly in the frameNode and then get an isDisallowDropForcedly.
2692      * @tc.expected: The set isDisallowDropForcedly is the same as the get isDisallowDropForcedly.
2693      */
2694     bool isDisallowDrop = true;
2695     ASSERT_TRUE(isDisallowDrop);
2696     frameNode->SetDisallowDropForcedly(isDisallowDrop);
2697     bool isDisallowDropForcedly = frameNode->GetDisallowDropForcedly();
2698     ASSERT_TRUE(isDisallowDropForcedly);
2699 
2700     /**
2701      * @tc.steps: step5. ReportingSupported is set to false.
2702      * @tc.expected: reportingEnabledFalse is false.
2703      */
2704     ASSERT_FALSE(dragDropManager->IsDropAllowed(frameNode));
2705 }
2706 
2707 /**
2708  * @tc.name: FrameNodeDropTestNg051
2709  * @tc.desc: Test frame node method
2710  * @tc.type: FUNC
2711  */
2712 HWTEST_F(FrameNodeDropTestNg, FrameNodeDropTestNg055, TestSize.Level1)
2713 {
2714     /**
2715      * @tc.steps: step1. construct a DragDropManager.
2716      * @tc.expected: dragDropManager is not null.
2717      */
2718     auto dragDropManager = AceType::MakeRefPtr<DragDropManager>();
2719     ASSERT_NE(dragDropManager, nullptr);
2720 
2721     /**
2722      * @tc.steps: step2. construct frameNode and update the properties.
2723      * @tc.expected: frameNode is not null.
2724      */
2725     const std::string allowTag(NODE_TAG_EMPTY);
2726     auto frameNodeNullId = ElementRegister::GetInstance()->MakeUniqueId();
2727     auto frameNode = AceType::MakeRefPtr<FrameNode>(allowTag, frameNodeNullId, AceType::MakeRefPtr<Pattern>());
2728     ASSERT_NE(frameNode, nullptr);
2729     std::set<std::string> allowDrop = { allowTag };
2730     frameNode->SetAllowDrop(allowDrop);
2731     ASSERT_NE(frameNode, nullptr);
2732 
2733     /**
2734      * @tc.steps: step3. construct summaryMap for dragDropManager.
2735      * @tc.expected: dragDropManager is not null.
2736      */
2737     const std::string summary_TAG(NODE_TAG_EMPTY);
2738     dragDropManager->summaryMap_.clear();
2739     ASSERT_NE(dragDropManager, nullptr);
2740 
2741     /**
2742      * @tc.steps: step4. Set an isDisallowDropForcedly in the frameNode and then get an isDisallowDropForcedly.
2743      * @tc.expected: The set isDisallowDropForcedly is the same as the get isDisallowDropForcedly.
2744      */
2745     bool isDisallowDrop = true;
2746     ASSERT_TRUE(isDisallowDrop);
2747     frameNode->SetDisallowDropForcedly(isDisallowDrop);
2748     bool isDisallowDropForcedly = frameNode->GetDisallowDropForcedly();
2749     ASSERT_TRUE(isDisallowDropForcedly);
2750 
2751     /**
2752      * @tc.steps: step5. ReportingSupported is set to false.
2753      * @tc.expected: reportingEnabledFalse is false.
2754      */
2755     ASSERT_FALSE(dragDropManager->IsDropAllowed(frameNode));
2756 }
2757 } // namespace OHOS::Ace::NG