123b3eb3cSopenharmony_ci/*
223b3eb3cSopenharmony_ci * Copyright (c) 2024 Huawei Device Co., Ltd.
323b3eb3cSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
423b3eb3cSopenharmony_ci * you may not use this file except in compliance with the License.
523b3eb3cSopenharmony_ci * You may obtain a copy of the License at
623b3eb3cSopenharmony_ci *
723b3eb3cSopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
823b3eb3cSopenharmony_ci *
923b3eb3cSopenharmony_ci * Unless required by applicable law or agreed to in writing, software
1023b3eb3cSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
1123b3eb3cSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1223b3eb3cSopenharmony_ci * See the License for the specific language governing permissions and
1323b3eb3cSopenharmony_ci * limitations under the License.
1423b3eb3cSopenharmony_ci */
1523b3eb3cSopenharmony_ci
1623b3eb3cSopenharmony_ci#include <cstdint>
1723b3eb3cSopenharmony_ci#include "gtest/gtest.h"
1823b3eb3cSopenharmony_ci#define private public
1923b3eb3cSopenharmony_ci#define protected public
2023b3eb3cSopenharmony_ci#include "native_interface.h"
2123b3eb3cSopenharmony_ci#include "native_node.h"
2223b3eb3cSopenharmony_ci#include "native_type.h"
2323b3eb3cSopenharmony_ci#include "event_converter.h"
2423b3eb3cSopenharmony_ci#include "interfaces/native/node/node_model.h"
2523b3eb3cSopenharmony_ci#include "test/mock/base/mock_task_executor.h"
2623b3eb3cSopenharmony_ci#include "test/mock/core/common/mock_container.h"
2723b3eb3cSopenharmony_ci#include "test/mock/core/common/mock_theme_manager.h"
2823b3eb3cSopenharmony_ci#include "test/mock/core/pipeline/mock_pipeline_context.h"
2923b3eb3cSopenharmony_ci
3023b3eb3cSopenharmony_ciusing namespace testing;
3123b3eb3cSopenharmony_ciusing namespace testing::ext;
3223b3eb3cSopenharmony_cinamespace OHOS::Ace {
3323b3eb3cSopenharmony_ciclass NativeNodeTest : public testing::Test {
3423b3eb3cSopenharmony_cipublic:
3523b3eb3cSopenharmony_ci    static void SetUpTestSuite()
3623b3eb3cSopenharmony_ci    {
3723b3eb3cSopenharmony_ci        NG::MockPipelineContext::SetUp();
3823b3eb3cSopenharmony_ci        MockContainer::SetUp();
3923b3eb3cSopenharmony_ci        MockContainer::Current()->pipelineContext_ = NG::MockPipelineContext::GetCurrent();
4023b3eb3cSopenharmony_ci        MockContainer::Current()->taskExecutor_ = AceType::MakeRefPtr<MockTaskExecutor>();
4123b3eb3cSopenharmony_ci        MockContainer::Current()->pipelineContext_->taskExecutor_ = MockContainer::Current()->taskExecutor_;
4223b3eb3cSopenharmony_ci        auto themeManager = AceType::MakeRefPtr<MockThemeManager>();
4323b3eb3cSopenharmony_ci        PipelineBase::GetCurrentContext()->SetThemeManager(themeManager);
4423b3eb3cSopenharmony_ci    }
4523b3eb3cSopenharmony_ci    static void TearDownTestSuite()
4623b3eb3cSopenharmony_ci    {
4723b3eb3cSopenharmony_ci        NG::MockPipelineContext::TearDown();
4823b3eb3cSopenharmony_ci        MockContainer::TearDown();
4923b3eb3cSopenharmony_ci    }
5023b3eb3cSopenharmony_ci    void SetUp() {}
5123b3eb3cSopenharmony_ci    void TearDown() {}
5223b3eb3cSopenharmony_ci};
5323b3eb3cSopenharmony_ci
5423b3eb3cSopenharmony_ci/**
5523b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest001
5623b3eb3cSopenharmony_ci * @tc.desc: Test OH_ArkUI_NodeEvent_GetEventType function.
5723b3eb3cSopenharmony_ci * @tc.type: FUNC
5823b3eb3cSopenharmony_ci */
5923b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest001, TestSize.Level1)
6023b3eb3cSopenharmony_ci{
6123b3eb3cSopenharmony_ci    ArkUI_NodeEvent event = { 0, -1 };
6223b3eb3cSopenharmony_ci    auto eventType = OH_ArkUI_NodeEvent_GetEventType(&event);
6323b3eb3cSopenharmony_ci    EXPECT_EQ(eventType, ArkUI_NodeEventType::NODE_TOUCH_EVENT);
6423b3eb3cSopenharmony_ci    event.kind = 0;
6523b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_NodeEvent_GetEventType(&event), ArkUI_NodeEventType::NODE_TOUCH_EVENT);
6623b3eb3cSopenharmony_ci}
6723b3eb3cSopenharmony_ci
6823b3eb3cSopenharmony_ci/**
6923b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest002
7023b3eb3cSopenharmony_ci * @tc.desc: Test OH_ArkUI_NodeEvent_GetEventType function.
7123b3eb3cSopenharmony_ci * @tc.type: FUNC
7223b3eb3cSopenharmony_ci */
7323b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest002, TestSize.Level1)
7423b3eb3cSopenharmony_ci{
7523b3eb3cSopenharmony_ci    auto eventType = OH_ArkUI_NodeEvent_GetEventType(nullptr);
7623b3eb3cSopenharmony_ci    EXPECT_EQ(eventType, ArkUI_NodeEventType::NODE_TOUCH_EVENT);
7723b3eb3cSopenharmony_ci}
7823b3eb3cSopenharmony_ci
7923b3eb3cSopenharmony_ci/**
8023b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest003
8123b3eb3cSopenharmony_ci * @tc.desc: Test OH_ArkUI_NodeEvent_GetTargetId function.
8223b3eb3cSopenharmony_ci * @tc.type: FUNC
8323b3eb3cSopenharmony_ci */
8423b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest003, TestSize.Level1)
8523b3eb3cSopenharmony_ci{
8623b3eb3cSopenharmony_ci    auto targetId = OH_ArkUI_NodeEvent_GetTargetId(nullptr);
8723b3eb3cSopenharmony_ci    EXPECT_EQ(targetId, -1);
8823b3eb3cSopenharmony_ci    ArkUI_NodeEvent event = { 0, 0 };
8923b3eb3cSopenharmony_ci    event.eventId = 0;
9023b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_NodeEvent_GetTargetId(&event), 0);
9123b3eb3cSopenharmony_ci}
9223b3eb3cSopenharmony_ci
9323b3eb3cSopenharmony_ci/**
9423b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest004
9523b3eb3cSopenharmony_ci * @tc.desc: Test OH_ArkUI_NodeEvent_GetNodeHandle function.
9623b3eb3cSopenharmony_ci * @tc.type: FUNC
9723b3eb3cSopenharmony_ci */
9823b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest004, TestSize.Level1)
9923b3eb3cSopenharmony_ci{
10023b3eb3cSopenharmony_ci    auto handle = OH_ArkUI_NodeEvent_GetNodeHandle(nullptr);
10123b3eb3cSopenharmony_ci    EXPECT_EQ(handle, nullptr);
10223b3eb3cSopenharmony_ci    ArkUI_NodeEvent event = { 0, 0 };
10323b3eb3cSopenharmony_ci    event.node = nullptr;
10423b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_NodeEvent_GetNodeHandle(&event), nullptr);
10523b3eb3cSopenharmony_ci}
10623b3eb3cSopenharmony_ci
10723b3eb3cSopenharmony_ci/**
10823b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest005
10923b3eb3cSopenharmony_ci * @tc.desc: Test customNode function.
11023b3eb3cSopenharmony_ci * @tc.type: FUNC
11123b3eb3cSopenharmony_ci */
11223b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest005, TestSize.Level1)
11323b3eb3cSopenharmony_ci{
11423b3eb3cSopenharmony_ci    auto nodeAPI = reinterpret_cast<ArkUI_NativeNodeAPI_1*>(
11523b3eb3cSopenharmony_ci        OH_ArkUI_QueryModuleInterfaceByName(ARKUI_NATIVE_NODE, "ArkUI_NativeNodeAPI_1"));
11623b3eb3cSopenharmony_ci    auto rootNode = nodeAPI->createNode(ARKUI_NODE_STACK);
11723b3eb3cSopenharmony_ci    auto childNode = nodeAPI->createNode(ARKUI_NODE_STACK);
11823b3eb3cSopenharmony_ci    ASSERT_NE(rootNode, nullptr);
11923b3eb3cSopenharmony_ci    int32_t ret1 = nodeAPI->addChild(rootNode, childNode);
12023b3eb3cSopenharmony_ci    EXPECT_EQ(ret1, ARKUI_ERROR_CODE_NO_ERROR);
12123b3eb3cSopenharmony_ci    float size = 100.0f;
12223b3eb3cSopenharmony_ci    float padding = 10.0f;
12323b3eb3cSopenharmony_ci    float val0 = 0.0f;
12423b3eb3cSopenharmony_ci    float val01 = 0.1f;
12523b3eb3cSopenharmony_ci    float val05 = 0.5f;
12623b3eb3cSopenharmony_ci    float val1 = 1.0f;
12723b3eb3cSopenharmony_ci    float val10 = 10.0f;
12823b3eb3cSopenharmony_ci    float val100 = 100.0f;
12923b3eb3cSopenharmony_ci    float negativeFloat = -1.0f;
13023b3eb3cSopenharmony_ci    uint32_t color = 0xFFFF0000;
13123b3eb3cSopenharmony_ci    const char* pathCommands = "M100 0 L200 240 L0 240 Z";
13223b3eb3cSopenharmony_ci
13323b3eb3cSopenharmony_ci    ArkUI_NumberValue value[] = {{.f32 = size}};
13423b3eb3cSopenharmony_ci    ArkUI_AttributeItem item = {value, sizeof(value) / sizeof(ArkUI_NumberValue)};
13523b3eb3cSopenharmony_ci    ArkUI_NumberValue value2[] = {{.f32 = val1}, {.f32 = val1}};
13623b3eb3cSopenharmony_ci    ArkUI_AttributeItem item2 = {value2, sizeof(value2) / sizeof(ArkUI_NumberValue)};
13723b3eb3cSopenharmony_ci    ArkUI_NumberValue value3[] = {{.f32 = val0}, {.f32 = val0}, {.f32 = val0}};
13823b3eb3cSopenharmony_ci    ArkUI_AttributeItem item3 = {value3, sizeof(value3) / sizeof(ArkUI_NumberValue)};
13923b3eb3cSopenharmony_ci    ArkUI_NumberValue value4[] = {{.f32 = padding}, {.f32 = padding}, {.f32 = padding}, {.f32 = padding}};
14023b3eb3cSopenharmony_ci    ArkUI_AttributeItem item4 = {value4, sizeof(value4) / sizeof(ArkUI_NumberValue)};
14123b3eb3cSopenharmony_ci    ArkUI_NumberValue value5[] = {{.f32 = val0}, {.f32 = val0}, {.f32 = val0}, {.f32 = val0}, {.f32 = val0}};
14223b3eb3cSopenharmony_ci    ArkUI_AttributeItem item5 = {value5, sizeof(value5) / sizeof(ArkUI_NumberValue)};
14323b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_WIDTH, &item);
14423b3eb3cSopenharmony_ci    auto widthVal = nodeAPI->getAttribute(rootNode, NODE_WIDTH);
14523b3eb3cSopenharmony_ci    EXPECT_EQ(widthVal->value[0].f32, size);
14623b3eb3cSopenharmony_ci
14723b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_HEIGHT, &item);
14823b3eb3cSopenharmony_ci    auto heightVal = nodeAPI->getAttribute(rootNode, NODE_HEIGHT);
14923b3eb3cSopenharmony_ci    EXPECT_EQ(heightVal->value[0].f32, size);
15023b3eb3cSopenharmony_ci
15123b3eb3cSopenharmony_ci    value[0].u32 = color;
15223b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_BACKGROUND_COLOR, &item);
15323b3eb3cSopenharmony_ci    auto colorVal = nodeAPI->getAttribute(rootNode, NODE_BACKGROUND_COLOR);
15423b3eb3cSopenharmony_ci    EXPECT_EQ(colorVal->value[0].u32, color);
15523b3eb3cSopenharmony_ci
15623b3eb3cSopenharmony_ci    item.string = "test";
15723b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_IMAGE_REPEAT_X;
15823b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_BACKGROUND_IMAGE, &item);
15923b3eb3cSopenharmony_ci    nodeAPI->getAttribute(rootNode, NODE_BACKGROUND_IMAGE);
16023b3eb3cSopenharmony_ci
16123b3eb3cSopenharmony_ci    value[0].f32 = padding;
16223b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_PADDING, &item);
16323b3eb3cSopenharmony_ci    auto paddingVal = nodeAPI->getAttribute(rootNode, NODE_PADDING);
16423b3eb3cSopenharmony_ci    EXPECT_EQ(paddingVal->value[0].f32, padding);
16523b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_PADDING, &item4);
16623b3eb3cSopenharmony_ci    auto paddingVal4 = nodeAPI->getAttribute(rootNode, NODE_PADDING);
16723b3eb3cSopenharmony_ci    EXPECT_EQ(paddingVal4->value[0].f32, padding);
16823b3eb3cSopenharmony_ci
16923b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_MARGIN, &item);
17023b3eb3cSopenharmony_ci    auto marginVal = nodeAPI->getAttribute(rootNode, NODE_MARGIN);
17123b3eb3cSopenharmony_ci    EXPECT_EQ(marginVal->value[0].f32, padding);
17223b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_MARGIN, &item4);
17323b3eb3cSopenharmony_ci    auto marginVal4 = nodeAPI->getAttribute(rootNode, NODE_MARGIN);
17423b3eb3cSopenharmony_ci    EXPECT_EQ(marginVal4->value[0].f32, padding);
17523b3eb3cSopenharmony_ci
17623b3eb3cSopenharmony_ci    item.string = "test";
17723b3eb3cSopenharmony_ci    ret1 = nodeAPI->setAttribute(rootNode, NODE_ID, &item);
17823b3eb3cSopenharmony_ci    EXPECT_EQ(ret1, ARKUI_ERROR_CODE_NO_ERROR);
17923b3eb3cSopenharmony_ci    auto keyVal = nodeAPI->getAttribute(rootNode, NODE_ID);
18023b3eb3cSopenharmony_ci    EXPECT_NE(keyVal, nullptr);
18123b3eb3cSopenharmony_ci
18223b3eb3cSopenharmony_ci    value[0].i32 = true;
18323b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_ENABLED, &item);
18423b3eb3cSopenharmony_ci    auto enableVal = nodeAPI->getAttribute(rootNode, NODE_ENABLED);
18523b3eb3cSopenharmony_ci    EXPECT_EQ(enableVal->value[0].i32, 1);
18623b3eb3cSopenharmony_ci
18723b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TRANSLATE, &item3);
18823b3eb3cSopenharmony_ci    auto translateVal = nodeAPI->getAttribute(rootNode, NODE_TRANSLATE);
18923b3eb3cSopenharmony_ci    EXPECT_EQ(translateVal->value[0].f32, val0);
19023b3eb3cSopenharmony_ci
19123b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SCALE, &item2);
19223b3eb3cSopenharmony_ci    auto scaleVal = nodeAPI->getAttribute(rootNode, NODE_SCALE);
19323b3eb3cSopenharmony_ci    EXPECT_EQ(scaleVal->value[0].f32, val1);
19423b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SCALE, &item5);
19523b3eb3cSopenharmony_ci
19623b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_ROTATE, &item5);
19723b3eb3cSopenharmony_ci    auto rotateVal = nodeAPI->getAttribute(rootNode, NODE_ROTATE);
19823b3eb3cSopenharmony_ci    EXPECT_EQ(rotateVal->value[0].f32, val0);
19923b3eb3cSopenharmony_ci
20023b3eb3cSopenharmony_ci    value[0].f32 = val0;
20123b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_BLUR, &item);
20223b3eb3cSopenharmony_ci    auto blurVal = nodeAPI->getAttribute(rootNode, NODE_BLUR);
20323b3eb3cSopenharmony_ci    EXPECT_EQ(blurVal->value[0].f32, val0);
20423b3eb3cSopenharmony_ci
20523b3eb3cSopenharmony_ci    value[0].f32 = val0;
20623b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SATURATION, &item);
20723b3eb3cSopenharmony_ci    auto saturationVal = nodeAPI->getAttribute(rootNode, NODE_SATURATION);
20823b3eb3cSopenharmony_ci    EXPECT_EQ(saturationVal->value[0].f32, val0);
20923b3eb3cSopenharmony_ci
21023b3eb3cSopenharmony_ci    value[0].f32 = val0;
21123b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_BRIGHTNESS, &item);
21223b3eb3cSopenharmony_ci    auto brightnessVal = nodeAPI->getAttribute(rootNode, NODE_BRIGHTNESS);
21323b3eb3cSopenharmony_ci    EXPECT_EQ(brightnessVal->value[0].f32, val0);
21423b3eb3cSopenharmony_ci
21523b3eb3cSopenharmony_ci    value3[0].f32 = val0;
21623b3eb3cSopenharmony_ci    value3[1].i32 = ARKUI_LINEAR_GRADIENT_DIRECTION_LEFT;
21723b3eb3cSopenharmony_ci    value3[2].i32 = false;
21823b3eb3cSopenharmony_ci    uint32_t colors[] = {color, color};
21923b3eb3cSopenharmony_ci    float stops[] = {val0, val05};
22023b3eb3cSopenharmony_ci    ArkUI_ColorStop colorStop = {colors, stops, 2};
22123b3eb3cSopenharmony_ci    ArkUI_ColorStop* colorStopPtr = &colorStop;
22223b3eb3cSopenharmony_ci    item3.object = reinterpret_cast<void*>(colorStopPtr);
22323b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_LINEAR_GRADIENT, &item3);
22423b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_LINEAR_GRADIENT), nullptr);
22523b3eb3cSopenharmony_ci
22623b3eb3cSopenharmony_ci    ArkUI_NumberValue sweepGradient[] = {{.f32 = val0}, {.f32 = val0}, {.f32 = val0}, {.f32 = val0}, {.f32 = val0},
22723b3eb3cSopenharmony_ci        {.i32 = true}};
22823b3eb3cSopenharmony_ci    ArkUI_AttributeItem sweepGradientItem = {sweepGradient, sizeof(sweepGradient) / sizeof(ArkUI_NumberValue)};
22923b3eb3cSopenharmony_ci    sweepGradientItem.object = reinterpret_cast<void*>(colorStopPtr);
23023b3eb3cSopenharmony_ci    sweepGradientItem.size = -1;
23123b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SWEEP_GRADIENT, &sweepGradientItem);
23223b3eb3cSopenharmony_ci    sweepGradientItem.size = 1;
23323b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SWEEP_GRADIENT, &sweepGradientItem);
23423b3eb3cSopenharmony_ci    sweepGradientItem.size = 2;
23523b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SWEEP_GRADIENT, &sweepGradientItem);
23623b3eb3cSopenharmony_ci    sweepGradientItem.size = 3;
23723b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SWEEP_GRADIENT, &sweepGradientItem);
23823b3eb3cSopenharmony_ci    sweepGradientItem.size = 4;
23923b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SWEEP_GRADIENT, &sweepGradientItem);
24023b3eb3cSopenharmony_ci    sweepGradientItem.size = sizeof(sweepGradient) / sizeof(ArkUI_NumberValue);
24123b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SWEEP_GRADIENT, &sweepGradientItem);
24223b3eb3cSopenharmony_ci    auto sweepGradientVal = nodeAPI->getAttribute(rootNode, NODE_SWEEP_GRADIENT);
24323b3eb3cSopenharmony_ci    EXPECT_EQ(sweepGradientVal->value[0].f32, val0);
24423b3eb3cSopenharmony_ci
24523b3eb3cSopenharmony_ci    ArkUI_NumberValue radialGradient[] = {{.f32 = val0}, {.f32 = val0}, {.f32 = val0}, {.i32 = true}};
24623b3eb3cSopenharmony_ci    ArkUI_AttributeItem radialGradientItem = {radialGradient, sizeof(radialGradient) / sizeof(ArkUI_NumberValue)};
24723b3eb3cSopenharmony_ci    radialGradientItem.object = reinterpret_cast<void*>(colorStopPtr);
24823b3eb3cSopenharmony_ci    radialGradientItem.size = -1;
24923b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_RADIAL_GRADIENT, &radialGradientItem);
25023b3eb3cSopenharmony_ci    radialGradientItem.size = 1;
25123b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_RADIAL_GRADIENT, &radialGradientItem);
25223b3eb3cSopenharmony_ci    radialGradientItem.size = 2;
25323b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_RADIAL_GRADIENT, &radialGradientItem);
25423b3eb3cSopenharmony_ci    radialGradientItem.size = sizeof(radialGradient) / sizeof(ArkUI_NumberValue);
25523b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_RADIAL_GRADIENT, &radialGradientItem);
25623b3eb3cSopenharmony_ci    auto radialGradientVal = nodeAPI->getAttribute(rootNode, NODE_RADIAL_GRADIENT);
25723b3eb3cSopenharmony_ci    EXPECT_EQ(radialGradientVal->value[0].f32, val0);
25823b3eb3cSopenharmony_ci
25923b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_ALIGNMENT_CENTER;
26023b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_ALIGNMENT, &item);
26123b3eb3cSopenharmony_ci    auto alignVal = nodeAPI->getAttribute(rootNode, NODE_ALIGNMENT);
26223b3eb3cSopenharmony_ci    EXPECT_EQ(alignVal->value[0].i32, static_cast<int32_t>(ARKUI_ALIGNMENT_CENTER));
26323b3eb3cSopenharmony_ci
26423b3eb3cSopenharmony_ci    value[0].f32 = val0;
26523b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_OPACITY, &item);
26623b3eb3cSopenharmony_ci    auto opacityVal = nodeAPI->getAttribute(rootNode, NODE_OPACITY);
26723b3eb3cSopenharmony_ci    EXPECT_EQ(opacityVal->value[0].f32, val0);
26823b3eb3cSopenharmony_ci
26923b3eb3cSopenharmony_ci    value[0].f32 = val10;
27023b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_BORDER_WIDTH, &item);
27123b3eb3cSopenharmony_ci    auto borderWidthVal = nodeAPI->getAttribute(rootNode, NODE_BORDER_WIDTH);
27223b3eb3cSopenharmony_ci    EXPECT_EQ(borderWidthVal->value[0].f32, val10);
27323b3eb3cSopenharmony_ci    value4[0].f32 = val10;
27423b3eb3cSopenharmony_ci    value4[1].f32 = val10;
27523b3eb3cSopenharmony_ci    value4[2].f32 = val10;
27623b3eb3cSopenharmony_ci    value4[3].f32 = val10;
27723b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_BORDER_WIDTH, &item4);
27823b3eb3cSopenharmony_ci    auto borderWidthVal4 = nodeAPI->getAttribute(rootNode, NODE_BORDER_WIDTH);
27923b3eb3cSopenharmony_ci    EXPECT_EQ(borderWidthVal4->value[0].f32, val10);
28023b3eb3cSopenharmony_ci
28123b3eb3cSopenharmony_ci    value[0].f32 = val01;
28223b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_BORDER_WIDTH_PERCENT, &item);
28323b3eb3cSopenharmony_ci    borderWidthVal = nodeAPI->getAttribute(rootNode, NODE_BORDER_WIDTH_PERCENT);
28423b3eb3cSopenharmony_ci    EXPECT_EQ(borderWidthVal->value[0].f32, val01);
28523b3eb3cSopenharmony_ci    value4[0].f32 = val01;
28623b3eb3cSopenharmony_ci    value4[1].f32 = val01;
28723b3eb3cSopenharmony_ci    value4[2].f32 = val01;
28823b3eb3cSopenharmony_ci    value4[3].f32 = val01;
28923b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_BORDER_WIDTH_PERCENT, &item4);
29023b3eb3cSopenharmony_ci    borderWidthVal4 = nodeAPI->getAttribute(rootNode, NODE_BORDER_WIDTH_PERCENT);
29123b3eb3cSopenharmony_ci    EXPECT_EQ(borderWidthVal4->value[0].f32, val01);
29223b3eb3cSopenharmony_ci
29323b3eb3cSopenharmony_ci    value[0].f32 = val10;
29423b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_BORDER_RADIUS, &item);
29523b3eb3cSopenharmony_ci    auto borderRadiusVal = nodeAPI->getAttribute(rootNode, NODE_BORDER_RADIUS);
29623b3eb3cSopenharmony_ci    EXPECT_EQ(borderRadiusVal->value[0].f32, val10);
29723b3eb3cSopenharmony_ci    value4[0].f32 = val10;
29823b3eb3cSopenharmony_ci    value4[1].f32 = val10;
29923b3eb3cSopenharmony_ci    value4[2].f32 = val10;
30023b3eb3cSopenharmony_ci    value4[3].f32 = val10;
30123b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_BORDER_RADIUS, &item4);
30223b3eb3cSopenharmony_ci    auto borderRadiusVal4 = nodeAPI->getAttribute(rootNode, NODE_BORDER_RADIUS);
30323b3eb3cSopenharmony_ci    EXPECT_EQ(borderRadiusVal4->value[0].f32, val10);
30423b3eb3cSopenharmony_ci    value[0].f32 = val01;
30523b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_BORDER_RADIUS_PERCENT, &item);
30623b3eb3cSopenharmony_ci    borderRadiusVal = nodeAPI->getAttribute(rootNode, NODE_BORDER_RADIUS_PERCENT);
30723b3eb3cSopenharmony_ci    EXPECT_EQ(borderRadiusVal->value[0].f32, val01);
30823b3eb3cSopenharmony_ci    value4[0].f32 = val01;
30923b3eb3cSopenharmony_ci    value4[1].f32 = val01;
31023b3eb3cSopenharmony_ci    value4[2].f32 = val01;
31123b3eb3cSopenharmony_ci    value4[3].f32 = val01;
31223b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_BORDER_RADIUS_PERCENT, &item4);
31323b3eb3cSopenharmony_ci    borderRadiusVal4 = nodeAPI->getAttribute(rootNode, NODE_BORDER_RADIUS_PERCENT);
31423b3eb3cSopenharmony_ci    EXPECT_EQ(borderRadiusVal4->value[0].f32, val01);
31523b3eb3cSopenharmony_ci
31623b3eb3cSopenharmony_ci    value[0].u32 = color;
31723b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_BORDER_COLOR, &item);
31823b3eb3cSopenharmony_ci    auto borderColorVal = nodeAPI->getAttribute(rootNode, NODE_BORDER_COLOR);
31923b3eb3cSopenharmony_ci    EXPECT_EQ(borderColorVal->value[0].u32, color);
32023b3eb3cSopenharmony_ci    value4[0].u32 = color;
32123b3eb3cSopenharmony_ci    value4[1].u32 = color;
32223b3eb3cSopenharmony_ci    value4[2].u32 = color;
32323b3eb3cSopenharmony_ci    value4[3].u32 = color;
32423b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_BORDER_COLOR, &item4);
32523b3eb3cSopenharmony_ci    auto borderColorVal4 = nodeAPI->getAttribute(rootNode, NODE_BORDER_COLOR);
32623b3eb3cSopenharmony_ci    EXPECT_EQ(borderColorVal4->value[0].u32, color);
32723b3eb3cSopenharmony_ci
32823b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_BORDER_STYLE_SOLID;
32923b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_BORDER_STYLE, &item);
33023b3eb3cSopenharmony_ci    auto borderStyleVal = nodeAPI->getAttribute(rootNode, NODE_BORDER_STYLE);
33123b3eb3cSopenharmony_ci    EXPECT_EQ(borderStyleVal->value[0].i32, static_cast<int32_t>(ARKUI_BORDER_STYLE_SOLID));
33223b3eb3cSopenharmony_ci    value4[0].i32 = ARKUI_BORDER_STYLE_SOLID;
33323b3eb3cSopenharmony_ci    value4[1].i32 = ARKUI_BORDER_STYLE_SOLID;
33423b3eb3cSopenharmony_ci    value4[2].i32 = ARKUI_BORDER_STYLE_SOLID;
33523b3eb3cSopenharmony_ci    value4[3].i32 = ARKUI_BORDER_STYLE_SOLID;
33623b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_BORDER_STYLE, &item4);
33723b3eb3cSopenharmony_ci    auto borderStyleVal4 = nodeAPI->getAttribute(rootNode, NODE_BORDER_STYLE);
33823b3eb3cSopenharmony_ci    EXPECT_EQ(borderStyleVal4->value[0].i32, ARKUI_BORDER_STYLE_SOLID);
33923b3eb3cSopenharmony_ci
34023b3eb3cSopenharmony_ci    value[0].f32 = val1;
34123b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_Z_INDEX, &item);
34223b3eb3cSopenharmony_ci    auto zIndexVal = nodeAPI->getAttribute(rootNode, NODE_Z_INDEX);
34323b3eb3cSopenharmony_ci    EXPECT_EQ(zIndexVal->value[0].f32, val1);
34423b3eb3cSopenharmony_ci
34523b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_VISIBILITY_VISIBLE;
34623b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_VISIBILITY, &item);
34723b3eb3cSopenharmony_ci    auto visibilityVal = nodeAPI->getAttribute(rootNode, NODE_VISIBILITY);
34823b3eb3cSopenharmony_ci    EXPECT_EQ(visibilityVal->value[0].i32, static_cast<int32_t>(ARKUI_VISIBILITY_VISIBLE));
34923b3eb3cSopenharmony_ci
35023b3eb3cSopenharmony_ci    value[0].i32 = true;
35123b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_CLIP, &item);
35223b3eb3cSopenharmony_ci    auto clipVal = nodeAPI->getAttribute(rootNode, NODE_CLIP);
35323b3eb3cSopenharmony_ci    EXPECT_EQ(clipVal->value[0].i32, true);
35423b3eb3cSopenharmony_ci
35523b3eb3cSopenharmony_ci    value5[0].i32 = ARKUI_CLIP_TYPE_RECTANGLE;
35623b3eb3cSopenharmony_ci    value5[1].f32 = size;
35723b3eb3cSopenharmony_ci    value5[2].f32 = size;
35823b3eb3cSopenharmony_ci    value5[3].f32 = val10;
35923b3eb3cSopenharmony_ci    value5[4].f32 = val10;
36023b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_CLIP_SHAPE, &item5);
36123b3eb3cSopenharmony_ci    auto clipShapeVal = nodeAPI->getAttribute(rootNode, NODE_CLIP_SHAPE);
36223b3eb3cSopenharmony_ci    EXPECT_EQ(clipShapeVal->value[0].i32, ARKUI_CLIP_TYPE_RECTANGLE);
36323b3eb3cSopenharmony_ci    value3[0].i32 = ARKUI_CLIP_TYPE_CIRCLE;
36423b3eb3cSopenharmony_ci    value3[1].f32 = size;
36523b3eb3cSopenharmony_ci    value3[2].f32 = size;
36623b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_CLIP_SHAPE, &item3);
36723b3eb3cSopenharmony_ci    clipShapeVal = nodeAPI->getAttribute(rootNode, NODE_CLIP_SHAPE);
36823b3eb3cSopenharmony_ci    EXPECT_EQ(clipShapeVal->value[0].i32, ARKUI_CLIP_TYPE_CIRCLE);
36923b3eb3cSopenharmony_ci    value3[0].i32 = ARKUI_CLIP_TYPE_ELLIPSE;
37023b3eb3cSopenharmony_ci    value3[1].f32 = size;
37123b3eb3cSopenharmony_ci    value3[2].f32 = size;
37223b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_CLIP_SHAPE, &item3);
37323b3eb3cSopenharmony_ci    clipShapeVal = nodeAPI->getAttribute(rootNode, NODE_CLIP_SHAPE);
37423b3eb3cSopenharmony_ci    EXPECT_EQ(clipShapeVal->value[0].i32, ARKUI_CLIP_TYPE_ELLIPSE);
37523b3eb3cSopenharmony_ci    value3[1].f32 = negativeFloat;
37623b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_CLIP_SHAPE, &item3);
37723b3eb3cSopenharmony_ci
37823b3eb3cSopenharmony_ci    value3[0].i32 = ARKUI_CLIP_TYPE_PATH;
37923b3eb3cSopenharmony_ci    value3[1].f32 = size;
38023b3eb3cSopenharmony_ci    value3[2].f32 = size;
38123b3eb3cSopenharmony_ci    item3.string = nullptr;
38223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_CLIP_SHAPE, &item3), ARKUI_ERROR_CODE_PARAM_INVALID);
38323b3eb3cSopenharmony_ci    item3.string = pathCommands;
38423b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_CLIP_SHAPE, &item3);
38523b3eb3cSopenharmony_ci    clipShapeVal = nodeAPI->getAttribute(rootNode, NODE_CLIP_SHAPE);
38623b3eb3cSopenharmony_ci    EXPECT_EQ(clipShapeVal->value[0].i32, ARKUI_CLIP_TYPE_PATH);
38723b3eb3cSopenharmony_ci    value3[2].f32 = negativeFloat;
38823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_CLIP_SHAPE, &item3), ARKUI_ERROR_CODE_PARAM_INVALID);
38923b3eb3cSopenharmony_ci    value3[1].f32 = negativeFloat;
39023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_CLIP_SHAPE, &item3), ARKUI_ERROR_CODE_PARAM_INVALID);
39123b3eb3cSopenharmony_ci
39223b3eb3cSopenharmony_ci    ArkUI_NumberValue transformVal[] =
39323b3eb3cSopenharmony_ci        {{.f32 = val1}, {.f32 = val0}, {.f32 = val0}, {.f32 = val0},
39423b3eb3cSopenharmony_ci        {.f32 = val0}, {.f32 = val1}, {.f32 = val0}, {.f32 = val0},
39523b3eb3cSopenharmony_ci        {.f32 = val0}, {.f32 = val0}, {.f32 = val1}, {.f32 = val0},
39623b3eb3cSopenharmony_ci        {.f32 = val0}, {.f32 = val0}, {.f32 = val0}, {.f32 = val1}};
39723b3eb3cSopenharmony_ci    ArkUI_AttributeItem transformItem = {transformVal, sizeof(transformVal) / sizeof(ArkUI_NumberValue)};
39823b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TRANSFORM, &transformItem);
39923b3eb3cSopenharmony_ci    auto transformResult = nodeAPI->getAttribute(rootNode, NODE_TRANSFORM);
40023b3eb3cSopenharmony_ci    EXPECT_EQ(transformResult->value[0].f32, val1);
40123b3eb3cSopenharmony_ci
40223b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_HIT_TEST_MODE_DEFAULT;
40323b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_HIT_TEST_BEHAVIOR, &item);
40423b3eb3cSopenharmony_ci    auto hitVal = nodeAPI->getAttribute(rootNode, NODE_HIT_TEST_BEHAVIOR);
40523b3eb3cSopenharmony_ci    EXPECT_EQ(hitVal->value[0].i32, static_cast<int32_t>(ARKUI_HIT_TEST_MODE_DEFAULT));
40623b3eb3cSopenharmony_ci
40723b3eb3cSopenharmony_ci    value2[0].f32 = val10;
40823b3eb3cSopenharmony_ci    value2[1].f32 = val10;
40923b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_POSITION, &item2);
41023b3eb3cSopenharmony_ci    auto positionVal = nodeAPI->getAttribute(rootNode, NODE_POSITION);
41123b3eb3cSopenharmony_ci    EXPECT_EQ(positionVal->value[0].f32, val10);
41223b3eb3cSopenharmony_ci
41323b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_SHADOW_STYLE_OUTER_DEFAULT_MD;
41423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SHADOW, &item), ARKUI_ERROR_CODE_NO_ERROR);
41523b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_SHADOW), nullptr);
41623b3eb3cSopenharmony_ci
41723b3eb3cSopenharmony_ci
41823b3eb3cSopenharmony_ci    ArkUI_NumberValue customShadowVal[] = {{.f32 = val10}, {.i32 = false}, {.f32 = val0}, {.f32 = val0},
41923b3eb3cSopenharmony_ci        {.i32 = ARKUI_SHADOW_TYPE_COLOR}, {.u32 = color}, {.u32 = 1}};
42023b3eb3cSopenharmony_ci    ArkUI_AttributeItem customShadowItem = {customShadowVal, sizeof(customShadowVal) / sizeof(ArkUI_NumberValue)};
42123b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_CUSTOM_SHADOW, &customShadowItem);
42223b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_CUSTOM_SHADOW), nullptr);
42323b3eb3cSopenharmony_ci    customShadowItem.size = 1;
42423b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_CUSTOM_SHADOW, &customShadowItem);
42523b3eb3cSopenharmony_ci    customShadowItem.size = 2;
42623b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_CUSTOM_SHADOW, &customShadowItem);
42723b3eb3cSopenharmony_ci    customShadowItem.size = 3;
42823b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_CUSTOM_SHADOW, &customShadowItem);
42923b3eb3cSopenharmony_ci    customShadowItem.size = 4;
43023b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_CUSTOM_SHADOW, &customShadowItem);
43123b3eb3cSopenharmony_ci    customShadowItem.size = 5;
43223b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_CUSTOM_SHADOW, &customShadowItem);
43323b3eb3cSopenharmony_ci    customShadowVal[4].i32 = -1;
43423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_CUSTOM_SHADOW, &customShadowItem), ARKUI_ERROR_CODE_PARAM_INVALID);
43523b3eb3cSopenharmony_ci    customShadowItem.size = 6;
43623b3eb3cSopenharmony_ci    customShadowVal[4].i32 = ARKUI_SHADOW_TYPE_COLOR;
43723b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_CUSTOM_SHADOW, &customShadowItem);
43823b3eb3cSopenharmony_ci    customShadowVal[1].i32 = true;
43923b3eb3cSopenharmony_ci    customShadowVal[5].i32 = -1;
44023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_CUSTOM_SHADOW, &customShadowItem), ARKUI_ERROR_CODE_PARAM_INVALID);
44123b3eb3cSopenharmony_ci    customShadowVal[5].i32 = 0;
44223b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_CUSTOM_SHADOW, &customShadowItem);
44323b3eb3cSopenharmony_ci
44423b3eb3cSopenharmony_ci
44523b3eb3cSopenharmony_ci    value2[0].f32 = size;
44623b3eb3cSopenharmony_ci    value2[1].f32 = size;
44723b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_BACKGROUND_IMAGE_SIZE, &item2);
44823b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_BACKGROUND_IMAGE_SIZE), nullptr);
44923b3eb3cSopenharmony_ci
45023b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_IMAGE_SIZE_COVER;
45123b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_BACKGROUND_IMAGE_SIZE_WITH_STYLE, &item);
45223b3eb3cSopenharmony_ci    auto imagesizeStyleVal = nodeAPI->getAttribute(rootNode, NODE_BACKGROUND_IMAGE_SIZE_WITH_STYLE);
45323b3eb3cSopenharmony_ci    EXPECT_EQ(imagesizeStyleVal->value[0].i32, static_cast<int32_t>(ARKUI_IMAGE_SIZE_COVER));
45423b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_IMAGE_SIZE_AUTO;
45523b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_BACKGROUND_IMAGE_SIZE_WITH_STYLE, &item);
45623b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_IMAGE_SIZE_CONTAIN;
45723b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_BACKGROUND_IMAGE_SIZE_WITH_STYLE, &item);
45823b3eb3cSopenharmony_ci
45923b3eb3cSopenharmony_ci    ArkUI_NumberValue backgroundBlurVal[] = {{.i32 = ARKUI_BLUR_STYLE_THIN}, {.i32 = ARKUI_COLOR_MODE_SYSTEM},
46023b3eb3cSopenharmony_ci        {.i32 = ARKUI_ADAPTIVE_COLOR_DEFAULT}, {.f32 = val05}, {.f32 = val0}, {.f32 = val0}};
46123b3eb3cSopenharmony_ci    ArkUI_AttributeItem backgroundBlurItem = {backgroundBlurVal, sizeof(backgroundBlurVal) / sizeof(ArkUI_NumberValue)};
46223b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_BACKGROUND_BLUR_STYLE, &backgroundBlurItem);
46323b3eb3cSopenharmony_ci    auto backgroundBlurResult = nodeAPI->getAttribute(rootNode, NODE_BACKGROUND_BLUR_STYLE);
46423b3eb3cSopenharmony_ci    EXPECT_NE(backgroundBlurResult, nullptr);
46523b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_FOREGROUND_BLUR_STYLE, &backgroundBlurItem);
46623b3eb3cSopenharmony_ci    auto foregroundBlurStyleVal = nodeAPI->getAttribute(rootNode, NODE_FOREGROUND_BLUR_STYLE);
46723b3eb3cSopenharmony_ci    EXPECT_NE(foregroundBlurStyleVal, nullptr);
46823b3eb3cSopenharmony_ci    backgroundBlurVal[0].i32 = ARKUI_BLUR_STYLE_NONE;
46923b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_BACKGROUND_BLUR_STYLE, &backgroundBlurItem);
47023b3eb3cSopenharmony_ci    nodeAPI->getAttribute(rootNode, NODE_BACKGROUND_BLUR_STYLE);
47123b3eb3cSopenharmony_ci    backgroundBlurVal[0].i32 = ARKUI_BLUR_STYLE_COMPONENT_ULTRA_THIN;
47223b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_BACKGROUND_BLUR_STYLE, &backgroundBlurItem);
47323b3eb3cSopenharmony_ci    nodeAPI->getAttribute(rootNode, NODE_BACKGROUND_BLUR_STYLE);
47423b3eb3cSopenharmony_ci    backgroundBlurItem.size = 1;
47523b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_BACKGROUND_BLUR_STYLE, &backgroundBlurItem);
47623b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_FOREGROUND_BLUR_STYLE, &backgroundBlurItem);
47723b3eb3cSopenharmony_ci
47823b3eb3cSopenharmony_ci
47923b3eb3cSopenharmony_ci    ArkUI_NumberValue transformCenter[] = {{.f32 = val0}, {.i32 = val0}, {.f32 = val0}, {.f32 = val05},
48023b3eb3cSopenharmony_ci        {.f32 = val05}, {.f32 = val0}};
48123b3eb3cSopenharmony_ci    ArkUI_AttributeItem transformCenterItem = {transformCenter, sizeof(transformCenter) / sizeof(ArkUI_NumberValue)};
48223b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TRANSFORM_CENTER, &transformCenterItem);
48323b3eb3cSopenharmony_ci    auto transformCenterVal = nodeAPI->getAttribute(rootNode, NODE_TRANSFORM_CENTER);
48423b3eb3cSopenharmony_ci    EXPECT_EQ(transformCenterVal->value[0].f32, val0);
48523b3eb3cSopenharmony_ci    transformCenterItem.size = 0;
48623b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TRANSFORM_CENTER, &transformCenterItem);
48723b3eb3cSopenharmony_ci    transformCenterItem.size = sizeof(transformCenter) / sizeof(ArkUI_NumberValue);
48823b3eb3cSopenharmony_ci    transformCenter[5].f32 = -1.0f;
48923b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TRANSFORM_CENTER, &transformCenterItem);
49023b3eb3cSopenharmony_ci    transformCenter[5].f32 = 2.0f;
49123b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TRANSFORM_CENTER, &transformCenterItem);
49223b3eb3cSopenharmony_ci    transformCenter[4].f32 = -1.0f;
49323b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TRANSFORM_CENTER, &transformCenterItem);
49423b3eb3cSopenharmony_ci    transformCenter[4].f32 = 2.0f;
49523b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TRANSFORM_CENTER, &transformCenterItem);
49623b3eb3cSopenharmony_ci    transformCenter[3].f32 = -1.0f;
49723b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TRANSFORM_CENTER, &transformCenterItem);
49823b3eb3cSopenharmony_ci    transformCenter[3].f32 = 2.0f;
49923b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TRANSFORM_CENTER, &transformCenterItem);
50023b3eb3cSopenharmony_ci
50123b3eb3cSopenharmony_ci    ArkUI_NumberValue opacityTransition[] = {{.f32 = val0}, {.i32 = 1000}, {.i32 = ARKUI_CURVE_LINEAR}, {.i32 = 1000},
50223b3eb3cSopenharmony_ci        {.i32 = 1}, {.i32 = ARKUI_ANIMATION_PLAY_MODE_NORMAL}, {.f32 = val1}};
50323b3eb3cSopenharmony_ci    ArkUI_AttributeItem opacityTransitionItem =
50423b3eb3cSopenharmony_ci        {opacityTransition, sizeof(opacityTransition) / sizeof(ArkUI_NumberValue)};
50523b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_OPACITY_TRANSITION, &opacityTransitionItem);
50623b3eb3cSopenharmony_ci    auto opacityTransitionVal = nodeAPI->getAttribute(rootNode, NODE_OPACITY_TRANSITION);
50723b3eb3cSopenharmony_ci    EXPECT_EQ(opacityTransitionVal->value[0].f32, val0);
50823b3eb3cSopenharmony_ci    opacityTransition[5].i32 = ARKUI_ANIMATION_PLAY_MODE_REVERSE;
50923b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_OPACITY_TRANSITION, &opacityTransitionItem);
51023b3eb3cSopenharmony_ci    nodeAPI->getAttribute(rootNode, NODE_OPACITY_TRANSITION);
51123b3eb3cSopenharmony_ci    opacityTransition[5].i32 = ARKUI_ANIMATION_PLAY_MODE_ALTERNATE;
51223b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_OPACITY_TRANSITION, &opacityTransitionItem);
51323b3eb3cSopenharmony_ci    nodeAPI->getAttribute(rootNode, NODE_OPACITY_TRANSITION);
51423b3eb3cSopenharmony_ci
51523b3eb3cSopenharmony_ci    ArkUI_NumberValue rotateTransition[] = {{.f32 = val0}, {.f32 = val0}, {.f32 = val0}, {.f32 = val10},
51623b3eb3cSopenharmony_ci        {.f32 = val0}, {.i32 = 1000}, {.i32 = ARKUI_CURVE_LINEAR}, {.i32 = 1000},
51723b3eb3cSopenharmony_ci        {.i32 = 1}, {.i32 = ARKUI_ANIMATION_PLAY_MODE_NORMAL}, {.f32 = val1}};
51823b3eb3cSopenharmony_ci    ArkUI_AttributeItem rotateTransitionItem =
51923b3eb3cSopenharmony_ci        {rotateTransition, sizeof(rotateTransition) / sizeof(ArkUI_NumberValue)};
52023b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_ROTATE_TRANSITION, &rotateTransitionItem);
52123b3eb3cSopenharmony_ci    auto rotateTransitionVal = nodeAPI->getAttribute(rootNode, NODE_ROTATE_TRANSITION);
52223b3eb3cSopenharmony_ci    EXPECT_EQ(rotateTransitionVal->value[0].f32, val0);
52323b3eb3cSopenharmony_ci    rotateTransition[6].i32 = -1;
52423b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_ROTATE_TRANSITION, &rotateTransitionItem);
52523b3eb3cSopenharmony_ci
52623b3eb3cSopenharmony_ci    ArkUI_NumberValue scaleTransition[] = {{.f32 = val0}, {.f32 = val0}, {.f32 = val0},
52723b3eb3cSopenharmony_ci        {.i32 = 1000}, {.i32 = ARKUI_CURVE_LINEAR}, {.i32 = 1000},
52823b3eb3cSopenharmony_ci        {.i32 = 1}, {.i32 = ARKUI_ANIMATION_PLAY_MODE_NORMAL}, {.f32 = val1}};
52923b3eb3cSopenharmony_ci    ArkUI_AttributeItem scaleTransitionItem =
53023b3eb3cSopenharmony_ci        {scaleTransition, sizeof(scaleTransition) / sizeof(ArkUI_NumberValue)};
53123b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SCALE_TRANSITION, &scaleTransitionItem);
53223b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_SCALE_TRANSITION), nullptr);
53323b3eb3cSopenharmony_ci    scaleTransition[4].i32 = -1;
53423b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SCALE_TRANSITION, &scaleTransitionItem);
53523b3eb3cSopenharmony_ci
53623b3eb3cSopenharmony_ci    ArkUI_NumberValue translateTransition[] = {{.f32 = val0}, {.f32 = val0}, {.f32 = val0},
53723b3eb3cSopenharmony_ci        {.i32 = 1000}, {.i32 = ARKUI_CURVE_LINEAR}, {.i32 = 1000},
53823b3eb3cSopenharmony_ci        {.i32 = 1}, {.i32 = ARKUI_ANIMATION_PLAY_MODE_NORMAL}, {.f32 = val1}};
53923b3eb3cSopenharmony_ci    ArkUI_AttributeItem translateTransitionItem =
54023b3eb3cSopenharmony_ci        {translateTransition, sizeof(translateTransition) / sizeof(ArkUI_NumberValue)};
54123b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TRANSLATE_TRANSITION, &translateTransitionItem);
54223b3eb3cSopenharmony_ci    auto translateTransitionVal = nodeAPI->getAttribute(rootNode, NODE_TRANSLATE_TRANSITION);
54323b3eb3cSopenharmony_ci    EXPECT_EQ(translateTransitionVal->value[0].f32, val0);
54423b3eb3cSopenharmony_ci    translateTransition[4].i32 = -1;
54523b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TRANSLATE_TRANSITION, &translateTransitionItem);
54623b3eb3cSopenharmony_ci
54723b3eb3cSopenharmony_ci    ArkUI_NumberValue moveTransition[] = {{.i32 = ARKUI_TRANSITION_EDGE_TOP},
54823b3eb3cSopenharmony_ci        {.i32 = 1000}, {.i32 = ARKUI_CURVE_LINEAR}, {.i32 = 1000},
54923b3eb3cSopenharmony_ci        {.i32 = 1}, {.i32 = ARKUI_ANIMATION_PLAY_MODE_NORMAL}, {.f32 = val1}};
55023b3eb3cSopenharmony_ci    ArkUI_AttributeItem moveTransitionItem =
55123b3eb3cSopenharmony_ci        {moveTransition, sizeof(moveTransition) / sizeof(ArkUI_NumberValue)};
55223b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_MOVE_TRANSITION, &moveTransitionItem);
55323b3eb3cSopenharmony_ci    auto moveTransitionVal = nodeAPI->getAttribute(rootNode, NODE_MOVE_TRANSITION);
55423b3eb3cSopenharmony_ci    EXPECT_EQ(moveTransitionVal->value[0].i32, static_cast<int32_t>(ARKUI_TRANSITION_EDGE_TOP));
55523b3eb3cSopenharmony_ci    moveTransition[0].i32 = -1;
55623b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_MOVE_TRANSITION, &moveTransitionItem);
55723b3eb3cSopenharmony_ci    moveTransition[0].i32 = ARKUI_TRANSITION_EDGE_TOP;
55823b3eb3cSopenharmony_ci    moveTransition[2].i32 = -1;
55923b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_MOVE_TRANSITION, &moveTransitionItem);
56023b3eb3cSopenharmony_ci
56123b3eb3cSopenharmony_ci    value[0].i32 = true;
56223b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_FOCUSABLE, &item);
56323b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_FOCUSABLE), nullptr);
56423b3eb3cSopenharmony_ci
56523b3eb3cSopenharmony_ci    value[0].i32 = true;
56623b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_DEFAULT_FOCUS, &item);
56723b3eb3cSopenharmony_ci    auto defaultFocusVal = nodeAPI->getAttribute(rootNode, NODE_DEFAULT_FOCUS);
56823b3eb3cSopenharmony_ci    EXPECT_EQ(defaultFocusVal->value[0].i32, true);
56923b3eb3cSopenharmony_ci
57023b3eb3cSopenharmony_ci    value4[0].f32 = val0;
57123b3eb3cSopenharmony_ci    value4[1].f32 = val0;
57223b3eb3cSopenharmony_ci    value4[2].f32 = val100;
57323b3eb3cSopenharmony_ci    value4[3].f32 = val100;
57423b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_RESPONSE_REGION, &item4);
57523b3eb3cSopenharmony_ci    auto responseRegionVal = nodeAPI->getAttribute(rootNode, NODE_RESPONSE_REGION);
57623b3eb3cSopenharmony_ci    EXPECT_EQ(responseRegionVal->value[0].f32, val0);
57723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_RESPONSE_REGION, &item5), ARKUI_ERROR_CODE_PARAM_INVALID);
57823b3eb3cSopenharmony_ci
57923b3eb3cSopenharmony_ci    value3[0].i32 = ARKUI_ALIGNMENT_TOP_START;
58023b3eb3cSopenharmony_ci    value3[1].f32 = val0;
58123b3eb3cSopenharmony_ci    value3[2].f32 = val0;
58223b3eb3cSopenharmony_ci    item3.string = "test";
58323b3eb3cSopenharmony_ci    item3.size = 0;
58423b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_OVERLAY, &item3);
58523b3eb3cSopenharmony_ci    item3.size = 1;
58623b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_OVERLAY, &item3);
58723b3eb3cSopenharmony_ci    item3.size = 2;
58823b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_OVERLAY, &item3);
58923b3eb3cSopenharmony_ci    item3.size = 3;
59023b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_OVERLAY, &item3);
59123b3eb3cSopenharmony_ci    auto overlayVal = nodeAPI->getAttribute(rootNode, NODE_OVERLAY);
59223b3eb3cSopenharmony_ci    EXPECT_EQ(overlayVal->value[0].i32, static_cast<int32_t>(ARKUI_ALIGNMENT_TOP_START));
59323b3eb3cSopenharmony_ci
59423b3eb3cSopenharmony_ci    ArkUI_NumberValue mask[] = {{.u32 = color}, {.u32 = color}, {.f32 = val10}, {.i32 = ARKUI_MASK_TYPE_RECTANGLE},
59523b3eb3cSopenharmony_ci        {.f32 = size}, {.f32 = size}, {.f32 = val10}, {.f32 = val10}};
59623b3eb3cSopenharmony_ci    ArkUI_AttributeItem maskItem = {mask, sizeof(mask) / sizeof(ArkUI_NumberValue)};
59723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_MASK, &maskItem), ARKUI_ERROR_CODE_NO_ERROR);
59823b3eb3cSopenharmony_ci    auto maskVal = nodeAPI->getAttribute(rootNode, NODE_MASK);
59923b3eb3cSopenharmony_ci    EXPECT_NE(maskVal, nullptr);
60023b3eb3cSopenharmony_ci    mask[3].i32 = ARKUI_MASK_TYPE_CIRCLE;
60123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_MASK, &maskItem), ARKUI_ERROR_CODE_NO_ERROR);
60223b3eb3cSopenharmony_ci    maskVal = nodeAPI->getAttribute(rootNode, NODE_MASK);
60323b3eb3cSopenharmony_ci    EXPECT_NE(maskVal, nullptr);
60423b3eb3cSopenharmony_ci    mask[3].i32 = ARKUI_MASK_TYPE_ELLIPSE;
60523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_MASK, &maskItem), ARKUI_ERROR_CODE_NO_ERROR);
60623b3eb3cSopenharmony_ci    maskVal = nodeAPI->getAttribute(rootNode, NODE_MASK);
60723b3eb3cSopenharmony_ci    EXPECT_NE(maskVal, nullptr);
60823b3eb3cSopenharmony_ci    mask[3].i32 = ARKUI_MASK_TYPE_PATH;
60923b3eb3cSopenharmony_ci    maskItem.string = pathCommands;
61023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_MASK, &maskItem), ARKUI_ERROR_CODE_NO_ERROR);
61123b3eb3cSopenharmony_ci    maskVal = nodeAPI->getAttribute(rootNode, NODE_MASK);
61223b3eb3cSopenharmony_ci    EXPECT_NE(maskVal, nullptr);
61323b3eb3cSopenharmony_ci    value4[0].i32 = ARKUI_MASK_TYPE_PROGRESS;
61423b3eb3cSopenharmony_ci    value4[1].f32 = val10;
61523b3eb3cSopenharmony_ci    value4[2].f32 = val100;
61623b3eb3cSopenharmony_ci    value4[3].u32 = color;
61723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_MASK, &item4), ARKUI_ERROR_CODE_NO_ERROR);
61823b3eb3cSopenharmony_ci    maskVal = nodeAPI->getAttribute(rootNode, NODE_MASK);
61923b3eb3cSopenharmony_ci
62023b3eb3cSopenharmony_ci    value2[0].i32 = ARKUI_BLEND_MODE_NONE;
62123b3eb3cSopenharmony_ci    value2[1].i32 = BLEND_APPLY_TYPE_FAST;
62223b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_BLEND_MODE, &item2);
62323b3eb3cSopenharmony_ci    auto blendModeVal = nodeAPI->getAttribute(rootNode, NODE_BLEND_MODE);
62423b3eb3cSopenharmony_ci    EXPECT_EQ(blendModeVal->value[0].i32, static_cast<int32_t>(ARKUI_BLEND_MODE_NONE));
62523b3eb3cSopenharmony_ci
62623b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_DIRECTION_LTR;
62723b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_DIRECTION, &item);
62823b3eb3cSopenharmony_ci    auto directionVal = nodeAPI->getAttribute(rootNode, NODE_DIRECTION);
62923b3eb3cSopenharmony_ci    EXPECT_EQ(directionVal->value[0].i32, static_cast<int32_t>(ARKUI_DIRECTION_LTR));
63023b3eb3cSopenharmony_ci
63123b3eb3cSopenharmony_ci    value4[0].f32 = val0;
63223b3eb3cSopenharmony_ci    value4[1].f32 = size;
63323b3eb3cSopenharmony_ci    value4[2].f32 = val0;
63423b3eb3cSopenharmony_ci    value4[3].f32 = size;
63523b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_CONSTRAINT_SIZE, &item4);
63623b3eb3cSopenharmony_ci    auto constraintSizeVal = nodeAPI->getAttribute(rootNode, NODE_CONSTRAINT_SIZE);
63723b3eb3cSopenharmony_ci    EXPECT_EQ(constraintSizeVal->value[0].f32, val0);
63823b3eb3cSopenharmony_ci
63923b3eb3cSopenharmony_ci    value[0].f32 = val05;
64023b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_GRAY_SCALE, &item);
64123b3eb3cSopenharmony_ci    auto grayScaleVal = nodeAPI->getAttribute(rootNode, NODE_GRAY_SCALE);
64223b3eb3cSopenharmony_ci    EXPECT_EQ(grayScaleVal->value[0].f32, val05);
64323b3eb3cSopenharmony_ci    value[0].f32 = val10;
64423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_GRAY_SCALE, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
64523b3eb3cSopenharmony_ci
64623b3eb3cSopenharmony_ci    value[0].f32 = val05;
64723b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_INVERT, &item);
64823b3eb3cSopenharmony_ci    auto invertVal = nodeAPI->getAttribute(rootNode, NODE_INVERT);
64923b3eb3cSopenharmony_ci    EXPECT_EQ(invertVal->value[0].f32, val05);
65023b3eb3cSopenharmony_ci    value[0].f32 = val10;
65123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_INVERT, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
65223b3eb3cSopenharmony_ci
65323b3eb3cSopenharmony_ci    value[0].f32 = val05;
65423b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SEPIA, &item);
65523b3eb3cSopenharmony_ci    auto sepiaVal = nodeAPI->getAttribute(rootNode, NODE_SEPIA);
65623b3eb3cSopenharmony_ci    EXPECT_EQ(sepiaVal->value[0].f32, val05);
65723b3eb3cSopenharmony_ci    value[0].f32 = val10;
65823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SEPIA, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
65923b3eb3cSopenharmony_ci
66023b3eb3cSopenharmony_ci    value[0].f32 = val05;
66123b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_CONTRAST, &item);
66223b3eb3cSopenharmony_ci    auto contrastVal = nodeAPI->getAttribute(rootNode, NODE_CONTRAST);
66323b3eb3cSopenharmony_ci    EXPECT_EQ(contrastVal->value[0].f32, val05);
66423b3eb3cSopenharmony_ci    value[0].f32 = val100;
66523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_CONTRAST, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
66623b3eb3cSopenharmony_ci
66723b3eb3cSopenharmony_ci    value[0].u32 = color;
66823b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_FOREGROUND_COLOR, &item);
66923b3eb3cSopenharmony_ci    auto foregroundColorVal = nodeAPI->getAttribute(rootNode, NODE_FOREGROUND_COLOR);
67023b3eb3cSopenharmony_ci    EXPECT_NE(foregroundColorVal, nullptr);
67123b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_COLOR_STRATEGY_INVERT;
67223b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_FOREGROUND_COLOR, &item);
67323b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_COLOR_STRATEGY_AVERAGE;
67423b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_FOREGROUND_COLOR, &item);
67523b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_COLOR_STRATEGY_PRIMARY;
67623b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_FOREGROUND_COLOR, &item);
67723b3eb3cSopenharmony_ci
67823b3eb3cSopenharmony_ci    value2[0].f32 = val10;
67923b3eb3cSopenharmony_ci    value2[1].f32 = val10;
68023b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_OFFSET, &item2);
68123b3eb3cSopenharmony_ci    auto offsetVal = nodeAPI->getAttribute(rootNode, NODE_OFFSET);
68223b3eb3cSopenharmony_ci    EXPECT_EQ(offsetVal->value[0].f32, val10);
68323b3eb3cSopenharmony_ci
68423b3eb3cSopenharmony_ci    value2[0].f32 = val10;
68523b3eb3cSopenharmony_ci    value2[1].f32 = val10;
68623b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_MARK_ANCHOR, &item2);
68723b3eb3cSopenharmony_ci    auto maskAnchorVal = nodeAPI->getAttribute(rootNode, NODE_MARK_ANCHOR);
68823b3eb3cSopenharmony_ci    EXPECT_EQ(maskAnchorVal->value[0].f32, val10);
68923b3eb3cSopenharmony_ci
69023b3eb3cSopenharmony_ci    value2[0].f32 = val10;
69123b3eb3cSopenharmony_ci    value2[1].f32 = val10;
69223b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_BACKGROUND_IMAGE_POSITION, &item2);
69323b3eb3cSopenharmony_ci    auto backgroundImagePositionVal = nodeAPI->getAttribute(rootNode, NODE_BACKGROUND_IMAGE_POSITION);
69423b3eb3cSopenharmony_ci    EXPECT_EQ(backgroundImagePositionVal->value[0].f32, val10);
69523b3eb3cSopenharmony_ci
69623b3eb3cSopenharmony_ci    value[0].i32 = 0;
69723b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_ACCESSIBILITY_GROUP, &item);
69823b3eb3cSopenharmony_ci    auto accessibilityGroupVal = nodeAPI->getAttribute(rootNode, NODE_ACCESSIBILITY_GROUP);
69923b3eb3cSopenharmony_ci    EXPECT_EQ(accessibilityGroupVal->value[0].i32, 0);
70023b3eb3cSopenharmony_ci
70123b3eb3cSopenharmony_ci    item.string = "test";
70223b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_ACCESSIBILITY_TEXT, &item);
70323b3eb3cSopenharmony_ci    auto accessibilityTextVal = nodeAPI->getAttribute(rootNode, NODE_ACCESSIBILITY_TEXT);
70423b3eb3cSopenharmony_ci    EXPECT_NE(accessibilityTextVal, nullptr);
70523b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_ACCESSIBILITY_DESCRIPTION, &item);
70623b3eb3cSopenharmony_ci    auto accessibilityDescVal = nodeAPI->getAttribute(rootNode, NODE_ACCESSIBILITY_DESCRIPTION);
70723b3eb3cSopenharmony_ci    EXPECT_NE(accessibilityDescVal, nullptr);
70823b3eb3cSopenharmony_ci
70923b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_ACCESSIBILITY_MODE_AUTO;
71023b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_ACCESSIBILITY_MODE, &item);
71123b3eb3cSopenharmony_ci    auto accessibilityModeVal = nodeAPI->getAttribute(rootNode, NODE_ACCESSIBILITY_MODE);
71223b3eb3cSopenharmony_ci    EXPECT_EQ(accessibilityModeVal->value[0].i32, static_cast<int32_t>(ARKUI_ACCESSIBILITY_MODE_AUTO));
71323b3eb3cSopenharmony_ci
71423b3eb3cSopenharmony_ci    value[0].f32 = val05;
71523b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_ASPECT_RATIO, &item);
71623b3eb3cSopenharmony_ci    auto aspectRatioVal = nodeAPI->getAttribute(rootNode, NODE_ASPECT_RATIO);
71723b3eb3cSopenharmony_ci    EXPECT_EQ(aspectRatioVal->value[0].f32, val05);
71823b3eb3cSopenharmony_ci
71923b3eb3cSopenharmony_ci    value[0].f32 = val05;
72023b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_LAYOUT_WEIGHT, &item);
72123b3eb3cSopenharmony_ci    auto layoutWeightVal = nodeAPI->getAttribute(rootNode, NODE_LAYOUT_WEIGHT);
72223b3eb3cSopenharmony_ci    EXPECT_EQ(layoutWeightVal->value[0].f32, val05);
72323b3eb3cSopenharmony_ci
72423b3eb3cSopenharmony_ci    value[0].u32 = 0;
72523b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_DISPLAY_PRIORITY, &item);
72623b3eb3cSopenharmony_ci    auto displayPriorityVal = nodeAPI->getAttribute(rootNode, NODE_DISPLAY_PRIORITY);
72723b3eb3cSopenharmony_ci    EXPECT_EQ(displayPriorityVal->value[0].u32, 0);
72823b3eb3cSopenharmony_ci
72923b3eb3cSopenharmony_ci    value4[0].f32 = val10;
73023b3eb3cSopenharmony_ci    value4[1].f32 = val10;
73123b3eb3cSopenharmony_ci    value4[2].f32 = val10;
73223b3eb3cSopenharmony_ci    value4[3].f32 = val10;
73323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_OUTLINE_WIDTH, &item4), ARKUI_ERROR_CODE_NO_ERROR);
73423b3eb3cSopenharmony_ci
73523b3eb3cSopenharmony_ci    value[0].f32 = val05;
73623b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_WIDTH_PERCENT, &item);
73723b3eb3cSopenharmony_ci    auto widthPercentVal = nodeAPI->getAttribute(rootNode, NODE_WIDTH_PERCENT);
73823b3eb3cSopenharmony_ci    EXPECT_EQ(widthPercentVal->value[0].f32, val05);
73923b3eb3cSopenharmony_ci
74023b3eb3cSopenharmony_ci    value[0].f32 = val05;
74123b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_HEIGHT_PERCENT, &item);
74223b3eb3cSopenharmony_ci    auto heightPercentVal = nodeAPI->getAttribute(rootNode, NODE_HEIGHT_PERCENT);
74323b3eb3cSopenharmony_ci    EXPECT_EQ(heightPercentVal->value[0].f32, val05);
74423b3eb3cSopenharmony_ci
74523b3eb3cSopenharmony_ci    value[0].f32 = val01;
74623b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_PADDING_PERCENT, &item);
74723b3eb3cSopenharmony_ci    auto paddingPercentVal = nodeAPI->getAttribute(rootNode, NODE_PADDING_PERCENT);
74823b3eb3cSopenharmony_ci    EXPECT_EQ(paddingPercentVal->value[0].f32, val01);
74923b3eb3cSopenharmony_ci    value4[0].f32 = val01;
75023b3eb3cSopenharmony_ci    value4[1].f32 = val01;
75123b3eb3cSopenharmony_ci    value4[2].f32 = val01;
75223b3eb3cSopenharmony_ci    value4[3].f32 = val01;
75323b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_PADDING_PERCENT, &item4);
75423b3eb3cSopenharmony_ci    auto paddingPercentVal4 = nodeAPI->getAttribute(rootNode, NODE_PADDING_PERCENT);
75523b3eb3cSopenharmony_ci    EXPECT_EQ(paddingPercentVal4->value[0].f32, val01);
75623b3eb3cSopenharmony_ci
75723b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_MARGIN_PERCENT, &item);
75823b3eb3cSopenharmony_ci    auto marginPercentVal = nodeAPI->getAttribute(rootNode, NODE_MARGIN_PERCENT);
75923b3eb3cSopenharmony_ci    EXPECT_EQ(marginPercentVal->value[0].f32, val01);
76023b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_MARGIN_PERCENT, &item4);
76123b3eb3cSopenharmony_ci    auto marginPercentVal4 = nodeAPI->getAttribute(rootNode, NODE_MARGIN_PERCENT);
76223b3eb3cSopenharmony_ci    EXPECT_EQ(marginPercentVal4->value[0].f32, val01);
76323b3eb3cSopenharmony_ci
76423b3eb3cSopenharmony_ci    value[0].i32 = false;
76523b3eb3cSopenharmony_ci    item.string = "test";
76623b3eb3cSopenharmony_ci    item.size = 0;
76723b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_GEOMETRY_TRANSITION, &item);
76823b3eb3cSopenharmony_ci    item.size = 1;
76923b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_GEOMETRY_TRANSITION, &item);
77023b3eb3cSopenharmony_ci    auto geometryTransitionVal = nodeAPI->getAttribute(rootNode, NODE_GEOMETRY_TRANSITION);
77123b3eb3cSopenharmony_ci    EXPECT_EQ(geometryTransitionVal->value[0].i32, 0);
77223b3eb3cSopenharmony_ci
77323b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_RENDER_FIT_CENTER;
77423b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_RENDER_FIT, &item);
77523b3eb3cSopenharmony_ci    auto renderFitVal = nodeAPI->getAttribute(rootNode, NODE_RENDER_FIT);
77623b3eb3cSopenharmony_ci    EXPECT_EQ(renderFitVal->value[0].i32, static_cast<int32_t>(ARKUI_RENDER_FIT_CENTER));
77723b3eb3cSopenharmony_ci
77823b3eb3cSopenharmony_ci    value[0].u32 = color;
77923b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_OUTLINE_COLOR, &item);
78023b3eb3cSopenharmony_ci    auto outlineColorVal = nodeAPI->getAttribute(rootNode, NODE_OUTLINE_COLOR);
78123b3eb3cSopenharmony_ci    EXPECT_EQ(outlineColorVal->value[0].u32, color);
78223b3eb3cSopenharmony_ci    value4[0].u32 = color;
78323b3eb3cSopenharmony_ci    value4[1].u32 = color;
78423b3eb3cSopenharmony_ci    value4[2].u32 = color;
78523b3eb3cSopenharmony_ci    value4[3].u32 = color;
78623b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_OUTLINE_COLOR, &item4);
78723b3eb3cSopenharmony_ci    auto outlineColorVal4 = nodeAPI->getAttribute(rootNode, NODE_OUTLINE_COLOR);
78823b3eb3cSopenharmony_ci    EXPECT_EQ(outlineColorVal4->value[0].u32, color);
78923b3eb3cSopenharmony_ci
79023b3eb3cSopenharmony_ci    value2[0].f32 = size;
79123b3eb3cSopenharmony_ci    value2[1].f32 = size;
79223b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SIZE, &item2);
79323b3eb3cSopenharmony_ci    auto sizeVal = nodeAPI->getAttribute(rootNode, NODE_SIZE);
79423b3eb3cSopenharmony_ci    EXPECT_EQ(sizeVal->value[0].f32, size);
79523b3eb3cSopenharmony_ci
79623b3eb3cSopenharmony_ci    value[0].i32 = false;
79723b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_RENDER_GROUP, &item);
79823b3eb3cSopenharmony_ci    auto renderGroupVal = nodeAPI->getAttribute(rootNode, NODE_RENDER_GROUP);
79923b3eb3cSopenharmony_ci    EXPECT_EQ(renderGroupVal->value[0].i32, 0);
80023b3eb3cSopenharmony_ci
80123b3eb3cSopenharmony_ci    value[0].u32 = color;
80223b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_COLOR_BLEND, &item);
80323b3eb3cSopenharmony_ci    auto colorBlendVal = nodeAPI->getAttribute(rootNode, NODE_COLOR_BLEND);
80423b3eb3cSopenharmony_ci    EXPECT_EQ(colorBlendVal->value[0].u32, color);
80523b3eb3cSopenharmony_ci
80623b3eb3cSopenharmony_ci    value4[0].i32 = 0;
80723b3eb3cSopenharmony_ci    value4[1].i32 = 0;
80823b3eb3cSopenharmony_ci    value4[2].i32 = 100;
80923b3eb3cSopenharmony_ci    value4[3].i32 = 100;
81023b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_LAYOUT_RECT, &item4);
81123b3eb3cSopenharmony_ci    auto layoutRectVal = nodeAPI->getAttribute(rootNode, NODE_LAYOUT_RECT);
81223b3eb3cSopenharmony_ci    EXPECT_EQ(layoutRectVal->value[0].i32, 0);
81323b3eb3cSopenharmony_ci
81423b3eb3cSopenharmony_ci    value[0].i32 = 1;
81523b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_FOCUS_ON_TOUCH, &item);
81623b3eb3cSopenharmony_ci    auto onTouchVal = nodeAPI->getAttribute(rootNode, NODE_FOCUS_ON_TOUCH);
81723b3eb3cSopenharmony_ci    EXPECT_EQ(onTouchVal->value[0].i32, 1);
81823b3eb3cSopenharmony_ci
81923b3eb3cSopenharmony_ci    value[0].f32 = val01;
82023b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_BORDER_WIDTH_PERCENT, &item);
82123b3eb3cSopenharmony_ci    auto borderWidthPercentVal = nodeAPI->getAttribute(rootNode, NODE_BORDER_WIDTH_PERCENT);
82223b3eb3cSopenharmony_ci    EXPECT_EQ(borderWidthPercentVal->value[0].f32, val01);
82323b3eb3cSopenharmony_ci    value4[0].f32 = val01;
82423b3eb3cSopenharmony_ci    value4[1].f32 = val01;
82523b3eb3cSopenharmony_ci    value4[2].f32 = val01;
82623b3eb3cSopenharmony_ci    value4[3].f32 = val01;
82723b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_BORDER_WIDTH_PERCENT, &item4);
82823b3eb3cSopenharmony_ci    auto borderWidthPercentVal4 = nodeAPI->getAttribute(rootNode, NODE_BORDER_WIDTH_PERCENT);
82923b3eb3cSopenharmony_ci    EXPECT_EQ(borderWidthPercentVal4->value[0].f32, val01);
83023b3eb3cSopenharmony_ci
83123b3eb3cSopenharmony_ci    value[0].f32 = val01;
83223b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_BORDER_RADIUS_PERCENT, &item);
83323b3eb3cSopenharmony_ci    auto borderRadiusPercentVal = nodeAPI->getAttribute(rootNode, NODE_BORDER_RADIUS_PERCENT);
83423b3eb3cSopenharmony_ci    EXPECT_EQ(borderRadiusPercentVal->value[0].f32, val01);
83523b3eb3cSopenharmony_ci    value4[0].f32 = val01;
83623b3eb3cSopenharmony_ci    value4[1].f32 = val01;
83723b3eb3cSopenharmony_ci    value4[2].f32 = val01;
83823b3eb3cSopenharmony_ci    value4[3].f32 = val01;
83923b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_BORDER_RADIUS_PERCENT, &item4);
84023b3eb3cSopenharmony_ci    auto borderRadiusPercentVal4 = nodeAPI->getAttribute(rootNode, NODE_BORDER_RADIUS_PERCENT);
84123b3eb3cSopenharmony_ci    EXPECT_EQ(borderRadiusPercentVal4->value[0].f32, val01);
84223b3eb3cSopenharmony_ci
84323b3eb3cSopenharmony_ci    auto accessibilityIdVal = nodeAPI->getAttribute(rootNode, NODE_ACCESSIBILITY_ID);
84423b3eb3cSopenharmony_ci    EXPECT_NE(accessibilityIdVal, nullptr);
84523b3eb3cSopenharmony_ci
84623b3eb3cSopenharmony_ci    value[0].u32 = ARKUI_ACCESSIBILITY_ACTION_CLICK;
84723b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_ACCESSIBILITY_ACTIONS, &item);
84823b3eb3cSopenharmony_ci    auto accessibilityActionVal = nodeAPI->getAttribute(rootNode, NODE_ACCESSIBILITY_ACTIONS);
84923b3eb3cSopenharmony_ci    EXPECT_NE(accessibilityActionVal, nullptr);
85023b3eb3cSopenharmony_ci
85123b3eb3cSopenharmony_ci
85223b3eb3cSopenharmony_ci    value[0].u32 = ARKUI_NODE_STACK;
85323b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_ACCESSIBILITY_ROLE, &item);
85423b3eb3cSopenharmony_ci    auto accessibilityRoleVal = nodeAPI->getAttribute(rootNode, NODE_ACCESSIBILITY_ROLE);
85523b3eb3cSopenharmony_ci    EXPECT_NE(accessibilityRoleVal, nullptr);
85623b3eb3cSopenharmony_ci
85723b3eb3cSopenharmony_ci    value2[0].u32 = ARKUI_SAFE_AREA_TYPE_SYSTEM;
85823b3eb3cSopenharmony_ci    value2[1].u32 = ARKUI_SAFE_AREA_EDGE_TOP;
85923b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_EXPAND_SAFE_AREA, &item2);
86023b3eb3cSopenharmony_ci    auto extendSafeAreaVal = nodeAPI->getAttribute(rootNode, NODE_EXPAND_SAFE_AREA);
86123b3eb3cSopenharmony_ci    EXPECT_EQ(extendSafeAreaVal->value[0].u32, ARKUI_SAFE_AREA_TYPE_SYSTEM);
86223b3eb3cSopenharmony_ci
86323b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_ALIGNMENT_CENTER;
86423b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_STACK_ALIGN_CONTENT, &item);
86523b3eb3cSopenharmony_ci    auto stackAlignVal = nodeAPI->getAttribute(rootNode, NODE_STACK_ALIGN_CONTENT);
86623b3eb3cSopenharmony_ci    EXPECT_EQ(stackAlignVal->value[0].i32, static_cast<int32_t>(ARKUI_ALIGNMENT_CENTER));
86723b3eb3cSopenharmony_ci
86823b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TRANSITION), nullptr);
86923b3eb3cSopenharmony_ci
87023b3eb3cSopenharmony_ci    value[0].f32 = val05;
87123b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_VISIBLE_AREA_CHANGE_RATIO, &item);
87223b3eb3cSopenharmony_ci    value[0].f32 = val01;
87323b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_VISIBLE_AREA_CHANGE_RATIO, &item);
87423b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_VISIBLE_AREA_CHANGE_RATIO), nullptr);
87523b3eb3cSopenharmony_ci
87623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_WIDTH), ARKUI_ERROR_CODE_NO_ERROR);
87723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_HEIGHT), ARKUI_ERROR_CODE_NO_ERROR);
87823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_BACKGROUND_COLOR), ARKUI_ERROR_CODE_NO_ERROR);
87923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_PADDING), ARKUI_ERROR_CODE_NO_ERROR);
88023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_MARGIN), ARKUI_ERROR_CODE_NO_ERROR);
88123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_ID), ARKUI_ERROR_CODE_NO_ERROR);
88223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_ENABLED), ARKUI_ERROR_CODE_NO_ERROR);
88323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TRANSLATE), ARKUI_ERROR_CODE_NO_ERROR);
88423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_SCALE), ARKUI_ERROR_CODE_NO_ERROR);
88523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_ROTATE), ARKUI_ERROR_CODE_NO_ERROR);
88623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_BRIGHTNESS), ARKUI_ERROR_CODE_NO_ERROR);
88723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_SATURATION), ARKUI_ERROR_CODE_NO_ERROR);
88823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_BLUR), ARKUI_ERROR_CODE_NO_ERROR);
88923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_LINEAR_GRADIENT), ARKUI_ERROR_CODE_NO_ERROR);
89023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_ALIGNMENT), ARKUI_ERROR_CODE_NO_ERROR);
89123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_OPACITY), ARKUI_ERROR_CODE_NO_ERROR);
89223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_BORDER_WIDTH), ARKUI_ERROR_CODE_NO_ERROR);
89323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_BORDER_RADIUS), ARKUI_ERROR_CODE_NO_ERROR);
89423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_BORDER_COLOR), ARKUI_ERROR_CODE_NO_ERROR);
89523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_BORDER_STYLE), ARKUI_ERROR_CODE_NO_ERROR);
89623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_Z_INDEX), ARKUI_ERROR_CODE_NO_ERROR);
89723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_VISIBILITY), ARKUI_ERROR_CODE_NO_ERROR);
89823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_CLIP), ARKUI_ERROR_CODE_NO_ERROR);
89923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_CLIP_SHAPE), ARKUI_ERROR_CODE_NO_ERROR);
90023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TRANSFORM), ARKUI_ERROR_CODE_NO_ERROR);
90123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_HIT_TEST_BEHAVIOR), ARKUI_ERROR_CODE_NO_ERROR);
90223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_POSITION), ARKUI_ERROR_CODE_NO_ERROR);
90323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_SHADOW), ARKUI_ERROR_CODE_NO_ERROR);
90423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_CUSTOM_SHADOW), ARKUI_ERROR_CODE_NO_ERROR);
90523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_BACKGROUND_IMAGE), ARKUI_ERROR_CODE_NO_ERROR);
90623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_BACKGROUND_IMAGE_SIZE), ARKUI_ERROR_CODE_NO_ERROR);
90723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_BACKGROUND_IMAGE_SIZE_WITH_STYLE), ARKUI_ERROR_CODE_NO_ERROR);
90823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_BACKGROUND_BLUR_STYLE), ARKUI_ERROR_CODE_NO_ERROR);
90923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TRANSFORM_CENTER), ARKUI_ERROR_CODE_NO_ERROR);
91023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_OPACITY_TRANSITION), ARKUI_ERROR_CODE_NO_ERROR);
91123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_ROTATE_TRANSITION), ARKUI_ERROR_CODE_NO_ERROR);
91223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_SCALE_TRANSITION), ARKUI_ERROR_CODE_NO_ERROR);
91323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TRANSLATE_TRANSITION), ARKUI_ERROR_CODE_NO_ERROR);
91423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_MOVE_TRANSITION), ARKUI_ERROR_CODE_NO_ERROR);
91523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_FOCUSABLE), ARKUI_ERROR_CODE_NO_ERROR);
91623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_DEFAULT_FOCUS), ARKUI_ERROR_CODE_NO_ERROR);
91723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_RESPONSE_REGION), ARKUI_ERROR_CODE_NO_ERROR);
91823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_OVERLAY), ARKUI_ERROR_CODE_NO_ERROR);
91923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_SWEEP_GRADIENT), ARKUI_ERROR_CODE_NO_ERROR);
92023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_RADIAL_GRADIENT), ARKUI_ERROR_CODE_NO_ERROR);
92123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_MASK), ARKUI_ERROR_CODE_NO_ERROR);
92223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_BLEND_MODE), ARKUI_ERROR_CODE_NO_ERROR);
92323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_DIRECTION), ARKUI_ERROR_CODE_NO_ERROR);
92423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_CONSTRAINT_SIZE), ARKUI_ERROR_CODE_NO_ERROR);
92523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_GRAY_SCALE), ARKUI_ERROR_CODE_NO_ERROR);
92623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_INVERT), ARKUI_ERROR_CODE_NO_ERROR);
92723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_SEPIA), ARKUI_ERROR_CODE_NO_ERROR);
92823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_CONTRAST), ARKUI_ERROR_CODE_NO_ERROR);
92923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_FOREGROUND_COLOR), ARKUI_ERROR_CODE_NO_ERROR);
93023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_OFFSET), ARKUI_ERROR_CODE_NO_ERROR);
93123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_MARK_ANCHOR), ARKUI_ERROR_CODE_NO_ERROR);
93223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_BACKGROUND_IMAGE_POSITION), ARKUI_ERROR_CODE_NO_ERROR);
93323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_ACCESSIBILITY_GROUP), ARKUI_ERROR_CODE_NO_ERROR);
93423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_ACCESSIBILITY_TEXT), ARKUI_ERROR_CODE_NO_ERROR);
93523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_ACCESSIBILITY_MODE), ARKUI_ERROR_CODE_NO_ERROR);
93623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_ACCESSIBILITY_DESCRIPTION), ARKUI_ERROR_CODE_NO_ERROR);
93723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_FOCUS_STATUS), ARKUI_ERROR_CODE_NO_ERROR);
93823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_ASPECT_RATIO), ARKUI_ERROR_CODE_NO_ERROR);
93923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_LAYOUT_WEIGHT), ARKUI_ERROR_CODE_NO_ERROR);
94023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_DISPLAY_PRIORITY), ARKUI_ERROR_CODE_NO_ERROR);
94123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_OUTLINE_WIDTH), ARKUI_ERROR_CODE_NO_ERROR);
94223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_WIDTH_PERCENT), ARKUI_ERROR_CODE_NO_ERROR);
94323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_HEIGHT_PERCENT), ARKUI_ERROR_CODE_NO_ERROR);
94423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_PADDING_PERCENT), ARKUI_ERROR_CODE_NO_ERROR);
94523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_MARGIN_PERCENT), ARKUI_ERROR_CODE_NO_ERROR);
94623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_GEOMETRY_TRANSITION), ARKUI_ERROR_CODE_NO_ERROR);
94723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_RENDER_FIT), ARKUI_ERROR_CODE_NO_ERROR);
94823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_OUTLINE_COLOR), ARKUI_ERROR_CODE_NO_ERROR);
94923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_SIZE), ARKUI_ERROR_CODE_NO_ERROR);
95023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_RENDER_GROUP), ARKUI_ERROR_CODE_NO_ERROR);
95123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_COLOR_BLEND), ARKUI_ERROR_CODE_NO_ERROR);
95223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_FOREGROUND_BLUR_STYLE), ARKUI_ERROR_CODE_NO_ERROR);
95323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_LAYOUT_RECT), ARKUI_ERROR_CODE_NO_ERROR);
95423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_FOCUS_ON_TOUCH), ARKUI_ERROR_CODE_NO_ERROR);
95523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_BORDER_WIDTH_PERCENT), ARKUI_ERROR_CODE_NO_ERROR);
95623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_BORDER_RADIUS_PERCENT), ARKUI_ERROR_CODE_NO_ERROR);
95723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_ACCESSIBILITY_ID), ARKUI_ERROR_CODE_NO_ERROR);
95823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_ACCESSIBILITY_ACTIONS), ARKUI_ERROR_CODE_NO_ERROR);
95923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_ACCESSIBILITY_ROLE), ARKUI_ERROR_CODE_NO_ERROR);
96023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_ACCESSIBILITY_STATE), ARKUI_ERROR_CODE_NO_ERROR);
96123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_ACCESSIBILITY_VALUE), ARKUI_ERROR_CODE_NO_ERROR);
96223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_EXPAND_SAFE_AREA), ARKUI_ERROR_CODE_NO_ERROR);
96323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_VISIBLE_AREA_CHANGE_RATIO), ARKUI_ERROR_CODE_NO_ERROR);
96423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TRANSITION), ARKUI_ERROR_CODE_NO_ERROR);
96523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_STACK_ALIGN_CONTENT), ARKUI_ERROR_CODE_NO_ERROR);
96623b3eb3cSopenharmony_ci}
96723b3eb3cSopenharmony_ci
96823b3eb3cSopenharmony_ci/**
96923b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest006
97023b3eb3cSopenharmony_ci * @tc.desc: Test ConvertOriginEventType function.
97123b3eb3cSopenharmony_ci * @tc.type: FUNC
97223b3eb3cSopenharmony_ci */
97323b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest006, TestSize.Level1)
97423b3eb3cSopenharmony_ci{
97523b3eb3cSopenharmony_ci    int32_t ret;
97623b3eb3cSopenharmony_ci    int32_t nodeType = static_cast<int32_t>(ARKUI_NODE_TEXT_INPUT);
97723b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_TEXT_INPUT_ON_CHANGE, nodeType);
97823b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_TEXT_INPUT_CHANGE));
97923b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_TEXT_INPUT_ON_SUBMIT, nodeType);
98023b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_TEXT_INPUT_SUBMIT));
98123b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_TEXT_INPUT_ON_CUT, nodeType);
98223b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_TEXT_INPUT_CUT));
98323b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_TEXT_INPUT_ON_PASTE, nodeType);
98423b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_TEXT_INPUT_PASTE));
98523b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_TEXT_INPUT_ON_TEXT_SELECTION_CHANGE, nodeType);
98623b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_TEXT_INPUT_TEXT_SELECTION_CHANGE));
98723b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_TEXT_INPUT_ON_EDIT_CHANGE, nodeType);
98823b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_TEXT_INPUT_EDIT_CHANGE));
98923b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_TEXT_INPUT_ON_CONTENT_SIZE_CHANGE, nodeType);
99023b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_TEXT_INPUT_CONTENT_SIZE_CHANGE));
99123b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_TEXT_INPUT_ON_INPUT_FILTER_ERROR, nodeType);
99223b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_TEXT_INPUT_INPUT_FILTER_ERROR));
99323b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_TEXT_INPUT_ON_CONTENT_SCROLL, nodeType);
99423b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_TEXT_INPUT_CONTENT_SCROLL));
99523b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_TEXT_INPUT_ON_WILL_INSERT, nodeType);
99623b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_TEXT_INPUT_WILL_INSERT));
99723b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_TEXT_INPUT_ON_DID_INSERT, nodeType);
99823b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_TEXT_INPUT_DID_INSERT));
99923b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_TEXT_INPUT_ON_WILL_DELETE, nodeType);
100023b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_TEXT_INPUT_WILL_DELETE));
100123b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_TEXT_INPUT_ON_DID_DELETE, nodeType);
100223b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_TEXT_INPUT_DID_DELETE));
100323b3eb3cSopenharmony_ci
100423b3eb3cSopenharmony_ci    nodeType = static_cast<int32_t>(ARKUI_NODE_SCROLL);
100523b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_SCROLL_EVENT_ON_SCROLL, nodeType);
100623b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_SCROLL));
100723b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_SCROLL_EVENT_ON_SCROLL_FRAME_BEGIN, nodeType);
100823b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_SCROLL_FRAME_BEGIN));
100923b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_SCROLL_EVENT_ON_WILL_SCROLL, nodeType);
101023b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_SCROLL_WILL_SCROLL));
101123b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_SCROLL_EVENT_ON_DID_SCROLL, nodeType);
101223b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_SCROLL_DID_SCROLL));
101323b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_SCROLL_EVENT_ON_SCROLL_START, nodeType);
101423b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_SCROLL_START));
101523b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_SCROLL_EVENT_ON_SCROLL_STOP, nodeType);
101623b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_SCROLL_STOP));
101723b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_SCROLL_EVENT_ON_SCROLL_EDGE, nodeType);
101823b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_SCROLL_EDGE));
101923b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_SCROLL_EVENT_ON_REACH_START, nodeType);
102023b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_SCROLL_REACH_START));
102123b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_SCROLL_EVENT_ON_REACH_END, nodeType);
102223b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_SCROLL_REACH_END));
102323b3eb3cSopenharmony_ci
102423b3eb3cSopenharmony_ci    nodeType = static_cast<int32_t>(ARKUI_NODE_LIST);
102523b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_SCROLL_EVENT_ON_SCROLL, nodeType);
102623b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_LIST_SCROLL));
102723b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_SCROLL_EVENT_ON_SCROLL_FRAME_BEGIN, nodeType);
102823b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_LIST_SCROLL_FRAME_BEGIN));
102923b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_SCROLL_EVENT_ON_SCROLL_START, nodeType);
103023b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_LIST_SCROLL_START));
103123b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_SCROLL_EVENT_ON_SCROLL_STOP, nodeType);
103223b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_LIST_SCROLL_STOP));
103323b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_SCROLL_EVENT_ON_REACH_START, nodeType);
103423b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_LIST_REACH_START));
103523b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_SCROLL_EVENT_ON_REACH_END, nodeType);
103623b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_LIST_REACH_END));
103723b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_LIST_ON_SCROLL_INDEX, nodeType);
103823b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_LIST_SCROLL_INDEX));
103923b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_LIST_ON_DID_SCROLL, nodeType);
104023b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_LIST_DID_SCROLL));
104123b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_LIST_ON_WILL_SCROLL, nodeType);
104223b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_LIST_WILL_SCROLL));
104323b3eb3cSopenharmony_ci
104423b3eb3cSopenharmony_ci    nodeType = static_cast<int32_t>(ARKUI_NODE_WATER_FLOW);
104523b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_SCROLL_EVENT_ON_SCROLL_FRAME_BEGIN, nodeType);
104623b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_WATER_FLOW_SCROLL_FRAME_BEGIN));
104723b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_SCROLL_EVENT_ON_SCROLL_START, nodeType);
104823b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_WATER_FLOW_SCROLL_START));
104923b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_SCROLL_EVENT_ON_SCROLL_STOP, nodeType);
105023b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_WATER_FLOW_SCROLL_STOP));
105123b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_ON_WILL_SCROLL, nodeType);
105223b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_WATER_FLOW_WILL_SCROLL));
105323b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_SCROLL_EVENT_ON_REACH_START, nodeType);
105423b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_WATER_FLOW_REACH_START));
105523b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_SCROLL_EVENT_ON_REACH_END, nodeType);
105623b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_WATER_FLOW_REACH_END));
105723b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_WATER_FLOW_ON_DID_SCROLL, nodeType);
105823b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_WATER_FLOW_DID_SCROLL));
105923b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_WATER_FLOW_ON_SCROLL_INDEX, nodeType);
106023b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_WATER_FLOW_SCROLL_INDEX));
106123b3eb3cSopenharmony_ci
106223b3eb3cSopenharmony_ci    nodeType = static_cast<int32_t>(ARKUI_NODE_STACK);
106323b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_EVENT_ON_APPEAR, nodeType);
106423b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_APPEAR));
106523b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_EVENT_ON_DISAPPEAR, nodeType);
106623b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_DISAPPEAR));
106723b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_EVENT_ON_AREA_CHANGE, nodeType);
106823b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_AREA_CHANGE));
106923b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_ON_FOCUS, nodeType);
107023b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_FOCUS));
107123b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_ON_BLUR, nodeType);
107223b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_BLUR));
107323b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_TOUCH_EVENT, nodeType);
107423b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_TOUCH));
107523b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_ON_CLICK, nodeType);
107623b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_CLICK));
107723b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_ON_TOUCH_INTERCEPT, nodeType);
107823b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_TOUCH_INTERCEPT));
107923b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_EVENT_ON_VISIBLE_AREA_CHANGE, nodeType);
108023b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_VISIBLE_AREA_CHANGE));
108123b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_ON_HOVER, nodeType);
108223b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_HOVER));
108323b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_ON_MOUSE, nodeType);
108423b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_MOUSE));
108523b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_EVENT_ON_ATTACH, nodeType);
108623b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_ATTACH));
108723b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_EVENT_ON_DETACH, nodeType);
108823b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_DETACH));
108923b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_ON_ACCESSIBILITY_ACTIONS, nodeType);
109023b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_ACCESSIBILITY_ACTIONS));
109123b3eb3cSopenharmony_ci
109223b3eb3cSopenharmony_ci    nodeType = static_cast<int32_t>(ARKUI_NODE_TEXT_AREA);
109323b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_TEXT_AREA_ON_CHANGE, nodeType);
109423b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_TEXTAREA_CHANGE));
109523b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_TEXT_AREA_ON_INPUT_FILTER_ERROR, nodeType);
109623b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_TEXT_AREA_INPUT_FILTER_ERROR));
109723b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_TEXT_AREA_ON_EDIT_CHANGE, nodeType);
109823b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_TEXTAREA_EDIT_CHANGE));
109923b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_TEXT_AREA_ON_SUBMIT, nodeType);
110023b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_TEXTAREA_ON_SUBMIT));
110123b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_TEXT_AREA_ON_CONTENT_SIZE_CHANGE, nodeType);
110223b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_TEXTAREA_CONTENT_SIZE_CHANGE));
110323b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_TEXT_AREA_ON_PASTE, nodeType);
110423b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_TEXTAREA_PASTE));
110523b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_TEXT_AREA_ON_TEXT_SELECTION_CHANGE, nodeType);
110623b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_TEXTAREA_TEXT_SELECTION_CHANGE));
110723b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_TEXT_AREA_ON_CONTENT_SCROLL, nodeType);
110823b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_TEXT_AREA_CONTENT_SCROLL));
110923b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_TEXT_AREA_ON_WILL_INSERT, nodeType);
111023b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_TEXT_AREA_WILL_INSERT));
111123b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_TEXT_AREA_ON_DID_INSERT, nodeType);
111223b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_TEXT_AREA_DID_INSERT));
111323b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_TEXT_AREA_ON_WILL_DELETE, nodeType);
111423b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_TEXT_AREA_WILL_DELETE));
111523b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_TEXT_AREA_ON_DID_DELETE, nodeType);
111623b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_TEXT_AREA_DID_DELETE));
111723b3eb3cSopenharmony_ci
111823b3eb3cSopenharmony_ci
111923b3eb3cSopenharmony_ci    nodeType = static_cast<int32_t>(ARKUI_NODE_REFRESH);
112023b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_REFRESH_STATE_CHANGE, nodeType);
112123b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_REFRESH_STATE_CHANGE));
112223b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_REFRESH_ON_REFRESH, nodeType);
112323b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_REFRESH_REFRESHING));
112423b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_REFRESH_ON_OFFSET_CHANGE, nodeType);
112523b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_REFRESH_ON_OFFSET_CHANGE));
112623b3eb3cSopenharmony_ci
112723b3eb3cSopenharmony_ci    nodeType = static_cast<int32_t>(ARKUI_NODE_TOGGLE);
112823b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_TOGGLE_ON_CHANGE, nodeType);
112923b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_TOGGLE_CHANGE));
113023b3eb3cSopenharmony_ci
113123b3eb3cSopenharmony_ci    nodeType = static_cast<int32_t>(ARKUI_NODE_IMAGE);
113223b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_IMAGE_ON_COMPLETE, nodeType);
113323b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_IMAGE_COMPLETE));
113423b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_IMAGE_ON_ERROR, nodeType);
113523b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_IMAGE_ERROR));
113623b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_IMAGE_ON_SVG_PLAY_FINISH, nodeType);
113723b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_IMAGE_SVG_PLAY_FINISH));
113823b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_IMAGE_ON_DOWNLOAD_PROGRESS, nodeType);
113923b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_IMAGE_DOWNLOAD_PROGRESS));
114023b3eb3cSopenharmony_ci
114123b3eb3cSopenharmony_ci    nodeType = static_cast<int32_t>(ARKUI_NODE_DATE_PICKER);
114223b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_DATE_PICKER_EVENT_ON_DATE_CHANGE, nodeType);
114323b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_DATE_PICKER_DATE_CHANGE));
114423b3eb3cSopenharmony_ci
114523b3eb3cSopenharmony_ci    nodeType = static_cast<int32_t>(ARKUI_NODE_TIME_PICKER);
114623b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_TIME_PICKER_EVENT_ON_CHANGE, nodeType);
114723b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_TIME_PICKER_CHANGE));
114823b3eb3cSopenharmony_ci
114923b3eb3cSopenharmony_ci    nodeType = static_cast<int32_t>(ARKUI_NODE_TEXT_PICKER);
115023b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_TEXT_PICKER_EVENT_ON_CHANGE, nodeType);
115123b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_TEXT_PICKER_CHANGE));
115223b3eb3cSopenharmony_ci
115323b3eb3cSopenharmony_ci    nodeType = static_cast<int32_t>(ARKUI_NODE_CALENDAR_PICKER);
115423b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_CALENDAR_PICKER_EVENT_ON_CHANGE, nodeType);
115523b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_CALENDAR_PICKER_CHANGE));
115623b3eb3cSopenharmony_ci
115723b3eb3cSopenharmony_ci    nodeType = static_cast<int32_t>(ARKUI_NODE_CHECKBOX);
115823b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_CHECKBOX_EVENT_ON_CHANGE, nodeType);
115923b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_CHECKBOX_CHANGE));
116023b3eb3cSopenharmony_ci
116123b3eb3cSopenharmony_ci    nodeType = static_cast<int32_t>(ARKUI_NODE_SLIDER);
116223b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_SLIDER_EVENT_ON_CHANGE, nodeType);
116323b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_SLIDER_CHANGE));
116423b3eb3cSopenharmony_ci
116523b3eb3cSopenharmony_ci    nodeType = static_cast<int32_t>(ARKUI_NODE_SWIPER);
116623b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_SWIPER_EVENT_ON_CHANGE, nodeType);
116723b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_SWIPER_CHANGE));
116823b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_SWIPER_EVENT_ON_ANIMATION_START, nodeType);
116923b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_SWIPER_ANIMATION_START));
117023b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_SWIPER_EVENT_ON_ANIMATION_END, nodeType);
117123b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_SWIPER_ANIMATION_END));
117223b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_SWIPER_EVENT_ON_GESTURE_SWIPE, nodeType);
117323b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_SWIPER_GESTURE_SWIPE));
117423b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_SWIPER_EVENT_ON_CONTENT_DID_SCROLL, nodeType);
117523b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_SWIPER_DID_CONTENT_SCROLL));
117623b3eb3cSopenharmony_ci
117723b3eb3cSopenharmony_ci    nodeType = static_cast<int32_t>(ARKUI_NODE_TEXT);
117823b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_TEXT_ON_DETECT_RESULT_UPDATE, nodeType);
117923b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_DETECT_RESULT_UPDATE));
118023b3eb3cSopenharmony_ci
118123b3eb3cSopenharmony_ci    nodeType = static_cast<int32_t>(ARKUI_NODE_RADIO);
118223b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_RADIO_EVENT_ON_CHANGE, nodeType);
118323b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_RADIO_CHANGE));
118423b3eb3cSopenharmony_ci
118523b3eb3cSopenharmony_ci    nodeType = static_cast<int32_t>(ARKUI_NODE_IMAGE_ANIMATOR);
118623b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_IMAGE_ANIMATOR_EVENT_ON_START, nodeType);
118723b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_IMAGE_ANIMATOR_ON_START));
118823b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_IMAGE_ANIMATOR_EVENT_ON_CANCEL, nodeType);
118923b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_IMAGE_ANIMATOR_ON_CANCEL));
119023b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_IMAGE_ANIMATOR_EVENT_ON_PAUSE, nodeType);
119123b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_IMAGE_ANIMATOR_ON_PAUSE));
119223b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_IMAGE_ANIMATOR_EVENT_ON_REPEAT, nodeType);
119323b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_IMAGE_ANIMATOR_ON_REPEAT));
119423b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertOriginEventType(NODE_IMAGE_ANIMATOR_EVENT_ON_FINISH, nodeType);
119523b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(ON_IMAGE_ANIMATOR_ON_FINISH));
119623b3eb3cSopenharmony_ci}
119723b3eb3cSopenharmony_ci
119823b3eb3cSopenharmony_ci/**
119923b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest007
120023b3eb3cSopenharmony_ci * @tc.desc: Test ConvertToNodeEventType function.
120123b3eb3cSopenharmony_ci * @tc.type: FUNC
120223b3eb3cSopenharmony_ci */
120323b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest007, TestSize.Level1)
120423b3eb3cSopenharmony_ci{
120523b3eb3cSopenharmony_ci    int32_t ret;
120623b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_TEXT_INPUT_CHANGE);
120723b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_TEXT_INPUT_ON_CHANGE));
120823b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_TEXT_INPUT_SUBMIT);
120923b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_TEXT_INPUT_ON_SUBMIT));
121023b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_TEXT_INPUT_CUT);
121123b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_TEXT_INPUT_ON_CUT));
121223b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_TEXT_INPUT_PASTE);
121323b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_TEXT_INPUT_ON_PASTE));
121423b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_TEXT_INPUT_TEXT_SELECTION_CHANGE);
121523b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_TEXT_INPUT_ON_TEXT_SELECTION_CHANGE));
121623b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_TEXT_INPUT_EDIT_CHANGE);
121723b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_TEXT_INPUT_ON_EDIT_CHANGE));
121823b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_TEXT_INPUT_CONTENT_SIZE_CHANGE);
121923b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_TEXT_INPUT_ON_CONTENT_SIZE_CHANGE));
122023b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_TEXT_INPUT_INPUT_FILTER_ERROR);
122123b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_TEXT_INPUT_ON_INPUT_FILTER_ERROR));
122223b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_TEXT_INPUT_CONTENT_SCROLL);
122323b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_TEXT_INPUT_ON_CONTENT_SCROLL));
122423b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_TEXT_INPUT_WILL_INSERT);
122523b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_TEXT_INPUT_ON_WILL_INSERT));
122623b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_TEXT_INPUT_DID_INSERT);
122723b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_TEXT_INPUT_ON_DID_INSERT));
122823b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_TEXT_INPUT_WILL_DELETE);
122923b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_TEXT_INPUT_ON_WILL_DELETE));
123023b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_TEXT_INPUT_DID_DELETE);
123123b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_TEXT_INPUT_ON_DID_DELETE));
123223b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_SCROLL);
123323b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_SCROLL_EVENT_ON_SCROLL));
123423b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_SCROLL_FRAME_BEGIN);
123523b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_SCROLL_EVENT_ON_SCROLL_FRAME_BEGIN));
123623b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_SCROLL_WILL_SCROLL);
123723b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_SCROLL_EVENT_ON_WILL_SCROLL));
123823b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_SCROLL_DID_SCROLL);
123923b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_SCROLL_EVENT_ON_DID_SCROLL));
124023b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_SCROLL_START);
124123b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_SCROLL_EVENT_ON_SCROLL_START));
124223b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_SCROLL_STOP);
124323b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_SCROLL_EVENT_ON_SCROLL_STOP));
124423b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_SCROLL_EDGE);
124523b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_SCROLL_EVENT_ON_SCROLL_EDGE));
124623b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_SCROLL_REACH_START);
124723b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_SCROLL_EVENT_ON_REACH_START));
124823b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_SCROLL_REACH_END);
124923b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_SCROLL_EVENT_ON_REACH_END));
125023b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_LIST_SCROLL);
125123b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_SCROLL_EVENT_ON_SCROLL));
125223b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_LIST_SCROLL_FRAME_BEGIN);
125323b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_SCROLL_EVENT_ON_SCROLL_FRAME_BEGIN));
125423b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_LIST_SCROLL_START);
125523b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_SCROLL_EVENT_ON_SCROLL_START));
125623b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_LIST_SCROLL_STOP);
125723b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_SCROLL_EVENT_ON_SCROLL_STOP));
125823b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_LIST_REACH_START);
125923b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_SCROLL_EVENT_ON_REACH_START));
126023b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_LIST_REACH_END);
126123b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_SCROLL_EVENT_ON_REACH_END));
126223b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_LIST_SCROLL_INDEX);
126323b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_LIST_ON_SCROLL_INDEX));
126423b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_LIST_DID_SCROLL);
126523b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_LIST_ON_DID_SCROLL));
126623b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_LIST_WILL_SCROLL);
126723b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_LIST_ON_WILL_SCROLL));
126823b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_WATER_FLOW_SCROLL_FRAME_BEGIN);
126923b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_SCROLL_EVENT_ON_SCROLL_FRAME_BEGIN));
127023b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_WATER_FLOW_SCROLL_START);
127123b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_SCROLL_EVENT_ON_SCROLL_START));
127223b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_WATER_FLOW_SCROLL_STOP);
127323b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_SCROLL_EVENT_ON_SCROLL_STOP));
127423b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_WATER_FLOW_WILL_SCROLL);
127523b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_ON_WILL_SCROLL));
127623b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_WATER_FLOW_REACH_START);
127723b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_SCROLL_EVENT_ON_REACH_START));
127823b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_WATER_FLOW_REACH_END);
127923b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_SCROLL_EVENT_ON_REACH_END));
128023b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_WATER_FLOW_DID_SCROLL);
128123b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_WATER_FLOW_ON_DID_SCROLL));
128223b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_WATER_FLOW_SCROLL_INDEX);
128323b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_WATER_FLOW_ON_SCROLL_INDEX));
128423b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_APPEAR);
128523b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_EVENT_ON_APPEAR));
128623b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_DISAPPEAR);
128723b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_EVENT_ON_DISAPPEAR));
128823b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_AREA_CHANGE);
128923b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_EVENT_ON_AREA_CHANGE));
129023b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_FOCUS);
129123b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_ON_FOCUS));
129223b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_BLUR);
129323b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_ON_BLUR));
129423b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_TOUCH);
129523b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_TOUCH_EVENT));
129623b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_CLICK);
129723b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_ON_CLICK));
129823b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_TOUCH_INTERCEPT);
129923b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_ON_TOUCH_INTERCEPT));
130023b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_VISIBLE_AREA_CHANGE);
130123b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_EVENT_ON_VISIBLE_AREA_CHANGE));
130223b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_HOVER);
130323b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_ON_HOVER));
130423b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_MOUSE);
130523b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_ON_MOUSE));
130623b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_ATTACH);
130723b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_EVENT_ON_ATTACH));
130823b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_DETACH);
130923b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_EVENT_ON_DETACH));
131023b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_ACCESSIBILITY_ACTIONS);
131123b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_ON_ACCESSIBILITY_ACTIONS));
131223b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_TEXTAREA_CHANGE);
131323b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_TEXT_AREA_ON_CHANGE));
131423b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_TEXT_AREA_INPUT_FILTER_ERROR);
131523b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_TEXT_AREA_ON_INPUT_FILTER_ERROR));
131623b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_TEXTAREA_EDIT_CHANGE);
131723b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_TEXT_AREA_ON_EDIT_CHANGE));
131823b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_TEXTAREA_ON_SUBMIT);
131923b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_TEXT_AREA_ON_SUBMIT));
132023b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_TEXTAREA_CONTENT_SIZE_CHANGE);
132123b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_TEXT_AREA_ON_CONTENT_SIZE_CHANGE));
132223b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_TEXTAREA_PASTE);
132323b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_TEXT_AREA_ON_PASTE));
132423b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_TEXTAREA_TEXT_SELECTION_CHANGE);
132523b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_TEXT_AREA_ON_TEXT_SELECTION_CHANGE));
132623b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_TEXT_AREA_CONTENT_SCROLL);
132723b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_TEXT_AREA_ON_CONTENT_SCROLL));
132823b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_TEXT_AREA_WILL_INSERT);
132923b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_TEXT_AREA_ON_WILL_INSERT));
133023b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_TEXT_AREA_DID_INSERT);
133123b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_TEXT_AREA_ON_DID_INSERT));
133223b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_TEXT_AREA_WILL_DELETE);
133323b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_TEXT_AREA_ON_WILL_DELETE));
133423b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_TEXT_AREA_DID_DELETE);
133523b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_TEXT_AREA_ON_DID_DELETE));
133623b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_REFRESH_STATE_CHANGE);
133723b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_REFRESH_STATE_CHANGE));
133823b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_REFRESH_REFRESHING);
133923b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_REFRESH_ON_REFRESH));
134023b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_REFRESH_ON_OFFSET_CHANGE);
134123b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_REFRESH_ON_OFFSET_CHANGE));
134223b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_TOGGLE_CHANGE);
134323b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_TOGGLE_ON_CHANGE));
134423b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_IMAGE_COMPLETE);
134523b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_IMAGE_ON_COMPLETE));
134623b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_IMAGE_ERROR);
134723b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_IMAGE_ON_ERROR));
134823b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_IMAGE_SVG_PLAY_FINISH);
134923b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_IMAGE_ON_SVG_PLAY_FINISH));
135023b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_IMAGE_DOWNLOAD_PROGRESS);
135123b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_IMAGE_ON_DOWNLOAD_PROGRESS));
135223b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_DATE_PICKER_DATE_CHANGE);
135323b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_DATE_PICKER_EVENT_ON_DATE_CHANGE));
135423b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_TIME_PICKER_CHANGE);
135523b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_TIME_PICKER_EVENT_ON_CHANGE));
135623b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_TEXT_PICKER_CHANGE);
135723b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_TEXT_PICKER_EVENT_ON_CHANGE));
135823b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_CALENDAR_PICKER_CHANGE);
135923b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_CALENDAR_PICKER_EVENT_ON_CHANGE));
136023b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_CHECKBOX_CHANGE);
136123b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_CHECKBOX_EVENT_ON_CHANGE));
136223b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_SLIDER_CHANGE);
136323b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_SLIDER_EVENT_ON_CHANGE));
136423b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_SWIPER_CHANGE);
136523b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_SWIPER_EVENT_ON_CHANGE));
136623b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_SWIPER_ANIMATION_START);
136723b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_SWIPER_EVENT_ON_ANIMATION_START));
136823b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_SWIPER_ANIMATION_END);
136923b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_SWIPER_EVENT_ON_ANIMATION_END));
137023b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_SWIPER_GESTURE_SWIPE);
137123b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_SWIPER_EVENT_ON_GESTURE_SWIPE));
137223b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_SWIPER_DID_CONTENT_SCROLL);
137323b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_SWIPER_EVENT_ON_CONTENT_DID_SCROLL));
137423b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_DETECT_RESULT_UPDATE);
137523b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_TEXT_ON_DETECT_RESULT_UPDATE));
137623b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_RADIO_CHANGE);
137723b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_RADIO_EVENT_ON_CHANGE));
137823b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_IMAGE_ANIMATOR_ON_START);
137923b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_IMAGE_ANIMATOR_EVENT_ON_START));
138023b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_IMAGE_ANIMATOR_ON_CANCEL);
138123b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_IMAGE_ANIMATOR_EVENT_ON_CANCEL));
138223b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_IMAGE_ANIMATOR_ON_PAUSE);
138323b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_IMAGE_ANIMATOR_EVENT_ON_PAUSE));
138423b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_IMAGE_ANIMATOR_ON_REPEAT);
138523b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_IMAGE_ANIMATOR_EVENT_ON_REPEAT));
138623b3eb3cSopenharmony_ci    ret = OHOS::Ace::NodeModel::ConvertToNodeEventType(ON_IMAGE_ANIMATOR_ON_FINISH);
138723b3eb3cSopenharmony_ci    EXPECT_EQ(ret, static_cast<int32_t>(NODE_IMAGE_ANIMATOR_EVENT_ON_FINISH));
138823b3eb3cSopenharmony_ci}
138923b3eb3cSopenharmony_ci
139023b3eb3cSopenharmony_ci/**
139123b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest008
139223b3eb3cSopenharmony_ci * @tc.desc: Test textNode function.
139323b3eb3cSopenharmony_ci * @tc.type: FUNC
139423b3eb3cSopenharmony_ci */
139523b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest008, TestSize.Level1)
139623b3eb3cSopenharmony_ci{
139723b3eb3cSopenharmony_ci    auto nodeAPI = reinterpret_cast<ArkUI_NativeNodeAPI_1*>(
139823b3eb3cSopenharmony_ci        OH_ArkUI_QueryModuleInterfaceByName(ARKUI_NATIVE_NODE, "ArkUI_NativeNodeAPI_1"));
139923b3eb3cSopenharmony_ci    auto rootNode = new ArkUI_Node({ARKUI_NODE_TEXT, nullptr});
140023b3eb3cSopenharmony_ci    uint32_t color = 0XFFFF0000;
140123b3eb3cSopenharmony_ci    float size = 10.0f;
140223b3eb3cSopenharmony_ci    ArkUI_NumberValue value[] = {{.u32 = color}};
140323b3eb3cSopenharmony_ci    ArkUI_AttributeItem item = {value, sizeof(value) / sizeof(ArkUI_NumberValue)};
140423b3eb3cSopenharmony_ci    ArkUI_NumberValue shadow[] = {{.f32 = size}, {.i32 = ARKUI_SHADOW_TYPE_COLOR}, {.u32 = color}, {.f32 = size},
140523b3eb3cSopenharmony_ci        {.f32 = size}};
140623b3eb3cSopenharmony_ci    ArkUI_AttributeItem shadowItem = {shadow, sizeof(shadow) / sizeof(ArkUI_NumberValue)};
140723b3eb3cSopenharmony_ci    ArkUI_NumberValue fontValue[] = {{.f32 = size}, {.i32 = ARKUI_FONT_WEIGHT_NORMAL},
140823b3eb3cSopenharmony_ci        {.i32 = ARKUI_FONT_STYLE_NORMAL}};
140923b3eb3cSopenharmony_ci    ArkUI_AttributeItem fontItem = {fontValue, sizeof(fontValue) / sizeof(ArkUI_NumberValue)};
141023b3eb3cSopenharmony_ci    ArkUI_NumberValue decoration[] = {{.i32 = ARKUI_TEXT_DECORATION_TYPE_UNDERLINE}, {.u32 = color},
141123b3eb3cSopenharmony_ci        {.i32 = ARKUI_TEXT_DECORATION_STYLE_SOLID}};
141223b3eb3cSopenharmony_ci    ArkUI_AttributeItem decorationItem = {decoration, sizeof(decoration) / sizeof(ArkUI_NumberValue)};
141323b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_FONT_COLOR, &item);
141423b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_SELECTED_BACKGROUND_COLOR, &item);
141523b3eb3cSopenharmony_ci    value[0].f32 = size;
141623b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_FONT_SIZE, &item);
141723b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_BASELINE_OFFSET, &item);
141823b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_MIN_FONT_SIZE, &item);
141923b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_MAX_FONT_SIZE, &item);
142023b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_FONT, &item);
142123b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_LINE_HEIGHT, &item);
142223b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_LETTER_SPACING, &item);
142323b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_INDENT, &item);
142423b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_LINE_SPACING, &item);
142523b3eb3cSopenharmony_ci
142623b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_FONT_WEIGHT_W100;
142723b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_FONT_WEIGHT, &item);
142823b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_FONT_STYLE_NORMAL;
142923b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_FONT_STYLE, &item);
143023b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_TEXT_HEIGHT_ADAPTIVE_POLICY_MAX_LINES_FIRST;
143123b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_HEIGHT_ADAPTIVE_POLICY, &item);
143223b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_COPY_OPTIONS_NONE;
143323b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_COPY_OPTION, &item);
143423b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_TEXT_DECORATION_TYPE_NONE;
143523b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_DECORATION, &item);
143623b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_TEXT_CASE_NORMAL;
143723b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_CASE, &item);
143823b3eb3cSopenharmony_ci    value[0].i32 = 1;
143923b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_MAX_LINES, &item);
144023b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_TEXT_ALIGNMENT_START;
144123b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_ALIGN, &item);
144223b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_TEXT_OVERFLOW_NONE;
144323b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_OVERFLOW, &item);
144423b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_WORD_BREAK_NORMAL;
144523b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_WORD_BREAK, &item);
144623b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_ELLIPSIS_MODE_START;
144723b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_ELLIPSIS_MODE, &item);
144823b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_TEXT_DATA_DETECTOR_TYPE_URL;
144923b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_ENABLE_DATA_DETECTOR_CONFIG, &item);
145023b3eb3cSopenharmony_ci
145123b3eb3cSopenharmony_ci    value[0].i32 = false;
145223b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_ENABLE_DATA_DETECTOR, &item);
145323b3eb3cSopenharmony_ci
145423b3eb3cSopenharmony_ci    item.string = "test";
145523b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_FONT_FEATURE, &item);
145623b3eb3cSopenharmony_ci
145723b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_TEXT_SHADOW, &shadowItem);
145823b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_FONT, &fontItem);
145923b3eb3cSopenharmony_ci    fontItem.string = "test";
146023b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_FONT, &fontItem);
146123b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_FONT_FAMILY, &fontItem);
146223b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_CONTENT, &fontItem);
146323b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_DECORATION, &decorationItem);
146423b3eb3cSopenharmony_ci    value[0].i32 = true;
146523b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_HALF_LEADING, &item);
146623b3eb3cSopenharmony_ci    decoration[2].i32 = -1;
146723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TEXT_DECORATION, &decorationItem), ARKUI_ERROR_CODE_PARAM_INVALID);
146823b3eb3cSopenharmony_ci
146923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_CONTENT), ARKUI_ERROR_CODE_NO_ERROR);
147023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_FONT_COLOR), ARKUI_ERROR_CODE_NO_ERROR);
147123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_FONT_SIZE), ARKUI_ERROR_CODE_NO_ERROR);
147223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_FONT_STYLE), ARKUI_ERROR_CODE_NO_ERROR);
147323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_FONT_WEIGHT), ARKUI_ERROR_CODE_NO_ERROR);
147423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_LINE_HEIGHT), ARKUI_ERROR_CODE_NO_ERROR);
147523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_DECORATION), ARKUI_ERROR_CODE_NO_ERROR);
147623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_CASE), ARKUI_ERROR_CODE_NO_ERROR);
147723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_LETTER_SPACING), ARKUI_ERROR_CODE_NO_ERROR);
147823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_MAX_LINES), ARKUI_ERROR_CODE_NO_ERROR);
147923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_ALIGN), ARKUI_ERROR_CODE_NO_ERROR);
148023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_OVERFLOW), ARKUI_ERROR_CODE_NO_ERROR);
148123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_FONT_FAMILY), ARKUI_ERROR_CODE_NO_ERROR);
148223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_COPY_OPTION), ARKUI_ERROR_CODE_NO_ERROR);
148323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_BASELINE_OFFSET), ARKUI_ERROR_CODE_NO_ERROR);
148423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_TEXT_SHADOW), ARKUI_ERROR_CODE_NO_ERROR);
148523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_MIN_FONT_SIZE), ARKUI_ERROR_CODE_NO_ERROR);
148623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_MAX_FONT_SIZE), ARKUI_ERROR_CODE_NO_ERROR);
148723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_FONT), ARKUI_ERROR_CODE_NO_ERROR);
148823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_HEIGHT_ADAPTIVE_POLICY), ARKUI_ERROR_CODE_NO_ERROR);
148923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_INDENT), ARKUI_ERROR_CODE_NO_ERROR);
149023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_WORD_BREAK), ARKUI_ERROR_CODE_NO_ERROR);
149123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_ELLIPSIS_MODE), ARKUI_ERROR_CODE_NO_ERROR);
149223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_LINE_SPACING), ARKUI_ERROR_CODE_NO_ERROR);
149323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_FONT_FEATURE), ARKUI_ERROR_CODE_NO_ERROR);
149423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_ENABLE_DATA_DETECTOR), ARKUI_ERROR_CODE_NO_ERROR);
149523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_ENABLE_DATA_DETECTOR_CONFIG), ARKUI_ERROR_CODE_NO_ERROR);
149623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_SELECTED_BACKGROUND_COLOR), ARKUI_ERROR_CODE_NO_ERROR);
149723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_CONTENT_WITH_STYLED_STRING), ARKUI_ERROR_CODE_NO_ERROR);
149823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_HALF_LEADING), ARKUI_ERROR_CODE_NO_ERROR);
149923b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_CONTENT), nullptr);
150023b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_FONT_COLOR), nullptr);
150123b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_FONT_SIZE), nullptr);
150223b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_FONT_STYLE), nullptr);
150323b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_FONT_WEIGHT), nullptr);
150423b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_LINE_HEIGHT), nullptr);
150523b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_DECORATION), nullptr);
150623b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_CASE), nullptr);
150723b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_LETTER_SPACING), nullptr);
150823b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_MAX_LINES), nullptr);
150923b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_ALIGN), nullptr);
151023b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_OVERFLOW), nullptr);
151123b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_FONT_FAMILY), nullptr);
151223b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_COPY_OPTION), nullptr);
151323b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_BASELINE_OFFSET), nullptr);
151423b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_TEXT_SHADOW), nullptr);
151523b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_MIN_FONT_SIZE), nullptr);
151623b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_MAX_FONT_SIZE), nullptr);
151723b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_FONT), nullptr);
151823b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_HEIGHT_ADAPTIVE_POLICY), nullptr);
151923b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_INDENT), nullptr);
152023b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_WORD_BREAK), nullptr);
152123b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_ELLIPSIS_MODE), nullptr);
152223b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_LINE_SPACING), nullptr);
152323b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_FONT_FEATURE), nullptr);
152423b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_ENABLE_DATA_DETECTOR), nullptr);
152523b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_ENABLE_DATA_DETECTOR_CONFIG), nullptr);
152623b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_SELECTED_BACKGROUND_COLOR), nullptr);
152723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->getAttribute(rootNode, NODE_TEXT_CONTENT_WITH_STYLED_STRING), nullptr);
152823b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_HALF_LEADING), nullptr);
152923b3eb3cSopenharmony_ci    nodeAPI->disposeNode(rootNode);
153023b3eb3cSopenharmony_ci}
153123b3eb3cSopenharmony_ci
153223b3eb3cSopenharmony_ci/**
153323b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest009
153423b3eb3cSopenharmony_ci * @tc.desc: Test spanNode function.
153523b3eb3cSopenharmony_ci * @tc.type: FUNC
153623b3eb3cSopenharmony_ci */
153723b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest009, TestSize.Level1)
153823b3eb3cSopenharmony_ci{
153923b3eb3cSopenharmony_ci    auto nodeAPI = reinterpret_cast<ArkUI_NativeNodeAPI_1*>(
154023b3eb3cSopenharmony_ci        OH_ArkUI_QueryModuleInterfaceByName(ARKUI_NATIVE_NODE, "ArkUI_NativeNodeAPI_1"));
154123b3eb3cSopenharmony_ci    auto rootNode = nodeAPI->createNode(ARKUI_NODE_SPAN);
154223b3eb3cSopenharmony_ci    ASSERT_NE(rootNode, nullptr);
154323b3eb3cSopenharmony_ci    uint32_t color = 0XFFFF0000;
154423b3eb3cSopenharmony_ci    float size = 10.0f;
154523b3eb3cSopenharmony_ci    ArkUI_NumberValue value[] = {{.u32 = color}};
154623b3eb3cSopenharmony_ci    ArkUI_AttributeItem item = {value, sizeof(value) / sizeof(ArkUI_NumberValue)};
154723b3eb3cSopenharmony_ci    ArkUI_NumberValue shadow[] = {{.f32 = size}, {.i32 = ARKUI_SHADOW_TYPE_COLOR}, {.u32 = color}, {.f32 = size},
154823b3eb3cSopenharmony_ci        {.f32 = size}};
154923b3eb3cSopenharmony_ci    ArkUI_AttributeItem shadowItem = {shadow, sizeof(shadow) / sizeof(ArkUI_NumberValue)};
155023b3eb3cSopenharmony_ci    ArkUI_NumberValue backgroundStyle[] = {{.u32 = color}, {.f32 = size}, {.f32 = size}, {.f32 = size},
155123b3eb3cSopenharmony_ci        {.f32 = size}};
155223b3eb3cSopenharmony_ci    ArkUI_AttributeItem backgroundStyleItem = {backgroundStyle, sizeof(backgroundStyle) / sizeof(ArkUI_NumberValue)};
155323b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_FONT_COLOR, &item);
155423b3eb3cSopenharmony_ci    value[0].f32 = size;
155523b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_FONT_SIZE, &item);
155623b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SPAN_BASELINE_OFFSET, &item);
155723b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_LINE_HEIGHT, &item);
155823b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_LETTER_SPACING, &item);
155923b3eb3cSopenharmony_ci
156023b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_FONT_WEIGHT_W100;
156123b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_FONT_WEIGHT, &item);
156223b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_FONT_STYLE_NORMAL;
156323b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_FONT_STYLE, &item);
156423b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_TEXT_DECORATION_TYPE_NONE;
156523b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_DECORATION, &item);
156623b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_TEXT_CASE_NORMAL;
156723b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_CASE, &item);
156823b3eb3cSopenharmony_ci    item.string = "test";
156923b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_FONT_FAMILY, &item);
157023b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SPAN_CONTENT, &item);
157123b3eb3cSopenharmony_ci
157223b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_TEXT_SHADOW, &shadowItem);
157323b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SPAN_TEXT_BACKGROUND_STYLE, &backgroundStyleItem);
157423b3eb3cSopenharmony_ci    backgroundStyle[2].f32 = -1.0f;
157523b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SPAN_TEXT_BACKGROUND_STYLE, &backgroundStyleItem);
157623b3eb3cSopenharmony_ci    backgroundStyleItem.size = 2;
157723b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SPAN_TEXT_BACKGROUND_STYLE, &backgroundStyleItem);
157823b3eb3cSopenharmony_ci    backgroundStyle[1].f32 = -1.0f;
157923b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SPAN_TEXT_BACKGROUND_STYLE, &backgroundStyleItem);
158023b3eb3cSopenharmony_ci
158123b3eb3cSopenharmony_ci
158223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_SPAN_CONTENT), ARKUI_ERROR_CODE_NO_ERROR);
158323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_SPAN_TEXT_BACKGROUND_STYLE), ARKUI_ERROR_CODE_NO_ERROR);
158423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_SPAN_BASELINE_OFFSET), ARKUI_ERROR_CODE_NO_ERROR);
158523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_FONT_COLOR), ARKUI_ERROR_CODE_NO_ERROR);
158623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_DECORATION), ARKUI_ERROR_CODE_NO_ERROR);
158723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_FONT_SIZE), ARKUI_ERROR_CODE_NO_ERROR);
158823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_FONT_STYLE), ARKUI_ERROR_CODE_NO_ERROR);
158923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_FONT_WEIGHT), ARKUI_ERROR_CODE_NO_ERROR);
159023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_LINE_HEIGHT), ARKUI_ERROR_CODE_NO_ERROR);
159123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_CASE), ARKUI_ERROR_CODE_NO_ERROR);
159223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_LETTER_SPACING), ARKUI_ERROR_CODE_NO_ERROR);
159323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_FONT_FAMILY), ARKUI_ERROR_CODE_NO_ERROR);
159423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_TEXT_SHADOW), ARKUI_ERROR_CODE_NO_ERROR);
159523b3eb3cSopenharmony_ci
159623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_WIDTH, nullptr), ARKUI_ERROR_CODE_ATTRIBUTE_OR_EVENT_NOT_SUPPORTED);
159723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->getAttribute(rootNode, NODE_WIDTH), nullptr);
159823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_WIDTH), ARKUI_ERROR_CODE_ATTRIBUTE_OR_EVENT_NOT_SUPPORTED);
159923b3eb3cSopenharmony_ci
160023b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_SPAN_CONTENT), nullptr);
160123b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_SPAN_TEXT_BACKGROUND_STYLE), nullptr);
160223b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_SPAN_BASELINE_OFFSET), nullptr);
160323b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_FONT_COLOR), nullptr);
160423b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_DECORATION), nullptr);
160523b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_FONT_SIZE), nullptr);
160623b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_FONT_STYLE), nullptr);
160723b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_FONT_WEIGHT), nullptr);
160823b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_LINE_HEIGHT), nullptr);
160923b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_CASE), nullptr);
161023b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_LETTER_SPACING), nullptr);
161123b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_FONT_FAMILY), nullptr);
161223b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_TEXT_SHADOW), nullptr);
161323b3eb3cSopenharmony_ci    nodeAPI->disposeNode(rootNode);
161423b3eb3cSopenharmony_ci}
161523b3eb3cSopenharmony_ci
161623b3eb3cSopenharmony_ci/**
161723b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest010
161823b3eb3cSopenharmony_ci * @tc.desc: Test imageSpanNode function.
161923b3eb3cSopenharmony_ci * @tc.type: FUNC
162023b3eb3cSopenharmony_ci */
162123b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest010, TestSize.Level1)
162223b3eb3cSopenharmony_ci{
162323b3eb3cSopenharmony_ci    auto nodeAPI = reinterpret_cast<ArkUI_NativeNodeAPI_1*>(
162423b3eb3cSopenharmony_ci        OH_ArkUI_QueryModuleInterfaceByName(ARKUI_NATIVE_NODE, "ArkUI_NativeNodeAPI_1"));
162523b3eb3cSopenharmony_ci    auto rootNode = new ArkUI_Node({ARKUI_NODE_IMAGE_SPAN, nullptr});
162623b3eb3cSopenharmony_ci    ArkUI_NumberValue value[] = {{.i32 = ARKUI_IMAGE_SPAN_ALIGNMENT_BASELINE}};
162723b3eb3cSopenharmony_ci    ArkUI_AttributeItem item = {value, sizeof(value) / sizeof(ArkUI_NumberValue)};
162823b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_IMAGE_SPAN_VERTICAL_ALIGNMENT, &item);
162923b3eb3cSopenharmony_ci    item.string = "test";
163023b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_IMAGE_SPAN_SRC, &item);
163123b3eb3cSopenharmony_ci    value[0].f32 = 10.0f;
163223b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_IMAGE_SPAN_BASELINE_OFFSET, &item);
163323b3eb3cSopenharmony_ci
163423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_IMAGE_SPAN_SRC), ARKUI_ERROR_CODE_NO_ERROR);
163523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_IMAGE_SPAN_VERTICAL_ALIGNMENT), ARKUI_ERROR_CODE_NO_ERROR);
163623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_IMAGE_SPAN_ALT), ARKUI_ERROR_CODE_NO_ERROR);
163723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_IMAGE_SPAN_BASELINE_OFFSET), ARKUI_ERROR_CODE_NO_ERROR);
163823b3eb3cSopenharmony_ci
163923b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_IMAGE_SPAN_SRC), nullptr);
164023b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_IMAGE_SPAN_VERTICAL_ALIGNMENT), nullptr);
164123b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_IMAGE_SPAN_ALT), nullptr);
164223b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_IMAGE_SPAN_BASELINE_OFFSET), nullptr);
164323b3eb3cSopenharmony_ci    nodeAPI->disposeNode(rootNode);
164423b3eb3cSopenharmony_ci}
164523b3eb3cSopenharmony_ci
164623b3eb3cSopenharmony_ci/**
164723b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest011
164823b3eb3cSopenharmony_ci * @tc.desc: Test imageNode function.
164923b3eb3cSopenharmony_ci * @tc.type: FUNC
165023b3eb3cSopenharmony_ci */
165123b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest011, TestSize.Level1)
165223b3eb3cSopenharmony_ci{
165323b3eb3cSopenharmony_ci    auto nodeAPI = reinterpret_cast<ArkUI_NativeNodeAPI_1*>(
165423b3eb3cSopenharmony_ci        OH_ArkUI_QueryModuleInterfaceByName(ARKUI_NATIVE_NODE, "ArkUI_NativeNodeAPI_1"));
165523b3eb3cSopenharmony_ci    auto rootNode = new ArkUI_Node({ARKUI_NODE_IMAGE, nullptr});
165623b3eb3cSopenharmony_ci
165723b3eb3cSopenharmony_ci    float border = 10.0f;
165823b3eb3cSopenharmony_ci    ArkUI_NumberValue value[] = {{.f32 = border}};
165923b3eb3cSopenharmony_ci    ArkUI_AttributeItem item = {value, sizeof(value) / sizeof(ArkUI_NumberValue)};
166023b3eb3cSopenharmony_ci    ArkUI_NumberValue value20[] = {{.f32 = 1.0f}, {.f32 = 0.0f}, {.f32 = 0.0f}, {.f32 = 0.0f}, {.f32 = 0.0f},
166123b3eb3cSopenharmony_ci        {.f32 = 0.0f}, {.f32 = 1.0f}, {.f32 = 0.0f}, {.f32 = 0.0f}, {.f32 = 0.0f},
166223b3eb3cSopenharmony_ci        {.f32 = 0.0f}, {.f32 = 0.0f}, {.f32 = 1.0f}, {.f32 = 0.0f}, {.f32 = 0.0f},
166323b3eb3cSopenharmony_ci        {.f32 = 0.0f}, {.f32 = 0.0f}, {.f32 = 0.0f}, {.f32 = 1.0f}, {.f32 = 0.0f}};
166423b3eb3cSopenharmony_ci
166523b3eb3cSopenharmony_ci    ArkUI_AttributeItem item20 = {value20, sizeof(value20) / sizeof(ArkUI_NumberValue)};
166623b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_BORDER_RADIUS, &item);
166723b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_BORDER_RADIUS_PERCENT, &item);
166823b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_OBJECT_FIT_CONTAIN;
166923b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_IMAGE_OBJECT_FIT, &item);
167023b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_IMAGE_INTERPOLATION_NONE;
167123b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_IMAGE_INTERPOLATION, &item);
167223b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_IMAGE_REPEAT_X;
167323b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_IMAGE_OBJECT_REPEAT, &item);
167423b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_IMAGE_RENDER_MODE_ORIGINAL;
167523b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_IMAGE_RENDER_MODE, &item);
167623b3eb3cSopenharmony_ci    value[0].i32 = 1;
167723b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_IMAGE_FIT_ORIGINAL_SIZE, &item);
167823b3eb3cSopenharmony_ci
167923b3eb3cSopenharmony_ci    value[0].i32 = true;
168023b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_IMAGE_AUTO_RESIZE, &item);
168123b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_IMAGE_RESIZABLE, &item);
168223b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_IMAGE_DRAGGABLE, &item);
168323b3eb3cSopenharmony_ci
168423b3eb3cSopenharmony_ci    value[0].u32 = 0xFFFF0000;
168523b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_IMAGE_FILL_COLOR, &item);
168623b3eb3cSopenharmony_ci
168723b3eb3cSopenharmony_ci    item.string = "test";
168823b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_IMAGE_SRC, &item);
168923b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_IMAGE_ALT, &item);
169023b3eb3cSopenharmony_ci
169123b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_IMAGE_COLOR_FILTER, &item20);
169223b3eb3cSopenharmony_ci
169323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_IMAGE_SRC), ARKUI_ERROR_CODE_NO_ERROR);
169423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_IMAGE_OBJECT_FIT), ARKUI_ERROR_CODE_NO_ERROR);
169523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_IMAGE_INTERPOLATION), ARKUI_ERROR_CODE_NO_ERROR);
169623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_IMAGE_OBJECT_REPEAT), ARKUI_ERROR_CODE_NO_ERROR);
169723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_IMAGE_COLOR_FILTER), ARKUI_ERROR_CODE_NO_ERROR);
169823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_IMAGE_AUTO_RESIZE), ARKUI_ERROR_CODE_NO_ERROR);
169923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_IMAGE_ALT), ARKUI_ERROR_CODE_NO_ERROR);
170023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_IMAGE_DRAGGABLE), ARKUI_ERROR_CODE_NO_ERROR);
170123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_IMAGE_RENDER_MODE), ARKUI_ERROR_CODE_NO_ERROR);
170223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_IMAGE_FIT_ORIGINAL_SIZE), ARKUI_ERROR_CODE_NO_ERROR);
170323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_IMAGE_FILL_COLOR), ARKUI_ERROR_CODE_NO_ERROR);
170423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_IMAGE_RESIZABLE), ARKUI_ERROR_CODE_NO_ERROR);
170523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_BORDER_RADIUS), ARKUI_ERROR_CODE_NO_ERROR);
170623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_BORDER_RADIUS_PERCENT), ARKUI_ERROR_CODE_NO_ERROR);
170723b3eb3cSopenharmony_ci
170823b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_IMAGE_SRC), nullptr);
170923b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_IMAGE_OBJECT_FIT), nullptr);
171023b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_IMAGE_INTERPOLATION), nullptr);
171123b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_IMAGE_OBJECT_REPEAT), nullptr);
171223b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_IMAGE_COLOR_FILTER), nullptr);
171323b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_IMAGE_AUTO_RESIZE), nullptr);
171423b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_IMAGE_ALT), nullptr);
171523b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_IMAGE_DRAGGABLE), nullptr);
171623b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_IMAGE_RENDER_MODE), nullptr);
171723b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_IMAGE_FILL_COLOR), nullptr);
171823b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_IMAGE_RESIZABLE), nullptr);
171923b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_IMAGE_FIT_ORIGINAL_SIZE), nullptr);
172023b3eb3cSopenharmony_ci    nodeAPI->disposeNode(rootNode);
172123b3eb3cSopenharmony_ci}
172223b3eb3cSopenharmony_ci
172323b3eb3cSopenharmony_ci/**
172423b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest012
172523b3eb3cSopenharmony_ci * @tc.desc: Test toggleNode function.
172623b3eb3cSopenharmony_ci * @tc.type: FUNC
172723b3eb3cSopenharmony_ci */
172823b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest012, TestSize.Level1)
172923b3eb3cSopenharmony_ci{
173023b3eb3cSopenharmony_ci    auto nodeAPI = reinterpret_cast<ArkUI_NativeNodeAPI_1*>(
173123b3eb3cSopenharmony_ci        OH_ArkUI_QueryModuleInterfaceByName(ARKUI_NATIVE_NODE, "ArkUI_NativeNodeAPI_1"));
173223b3eb3cSopenharmony_ci    auto rootNode = nodeAPI->createNode(ARKUI_NODE_TOGGLE);
173323b3eb3cSopenharmony_ci    ASSERT_NE(rootNode, nullptr);
173423b3eb3cSopenharmony_ci    uint32_t color = 0XFFFF0000;
173523b3eb3cSopenharmony_ci    ArkUI_NumberValue value[] = {{.u32 = color}};
173623b3eb3cSopenharmony_ci    ArkUI_AttributeItem item = {value, sizeof(value) / sizeof(ArkUI_NumberValue)};
173723b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TOGGLE_SELECTED_COLOR, &item);
173823b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TOGGLE_SWITCH_POINT_COLOR, &item);
173923b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TOGGLE_VALUE, &item);
174023b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TOGGLE_UNSELECTED_COLOR, &item);
174123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TOGGLE_SELECTED_COLOR), ARKUI_ERROR_CODE_NO_ERROR);
174223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TOGGLE_SWITCH_POINT_COLOR), ARKUI_ERROR_CODE_NO_ERROR);
174323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TOGGLE_VALUE), ARKUI_ERROR_CODE_NO_ERROR);
174423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TOGGLE_UNSELECTED_COLOR), ARKUI_ERROR_CODE_NO_ERROR);
174523b3eb3cSopenharmony_ci
174623b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TOGGLE_SELECTED_COLOR), nullptr);
174723b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TOGGLE_SWITCH_POINT_COLOR), nullptr);
174823b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TOGGLE_VALUE), nullptr);
174923b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TOGGLE_UNSELECTED_COLOR), nullptr);
175023b3eb3cSopenharmony_ci    nodeAPI->disposeNode(rootNode);
175123b3eb3cSopenharmony_ci}
175223b3eb3cSopenharmony_ci
175323b3eb3cSopenharmony_ci/**
175423b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest013
175523b3eb3cSopenharmony_ci * @tc.desc: Test loadingProgressNode function.
175623b3eb3cSopenharmony_ci * @tc.type: FUNC
175723b3eb3cSopenharmony_ci */
175823b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest013, TestSize.Level1)
175923b3eb3cSopenharmony_ci{
176023b3eb3cSopenharmony_ci    auto nodeAPI = reinterpret_cast<ArkUI_NativeNodeAPI_1*>(
176123b3eb3cSopenharmony_ci        OH_ArkUI_QueryModuleInterfaceByName(ARKUI_NATIVE_NODE, "ArkUI_NativeNodeAPI_1"));
176223b3eb3cSopenharmony_ci    auto rootNode = new ArkUI_Node({ARKUI_NODE_LOADING_PROGRESS, nullptr});
176323b3eb3cSopenharmony_ci    ASSERT_NE(rootNode, nullptr);
176423b3eb3cSopenharmony_ci    uint32_t color = 0XFFFF0000;
176523b3eb3cSopenharmony_ci    ArkUI_NumberValue value[] = {{.u32 = color}};
176623b3eb3cSopenharmony_ci    ArkUI_AttributeItem item = {value, sizeof(value) / sizeof(ArkUI_NumberValue)};
176723b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_LOADING_PROGRESS_COLOR, &item);
176823b3eb3cSopenharmony_ci    value[0].i32 = true;
176923b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_LOADING_PROGRESS_ENABLE_LOADING, &item);
177023b3eb3cSopenharmony_ci    value[0].i32 = -1;
177123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_LOADING_PROGRESS_ENABLE_LOADING, &item),
177223b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
177323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_LOADING_PROGRESS_COLOR), ARKUI_ERROR_CODE_NO_ERROR);
177423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_LOADING_PROGRESS_ENABLE_LOADING), ARKUI_ERROR_CODE_NO_ERROR);
177523b3eb3cSopenharmony_ci
177623b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_LOADING_PROGRESS_COLOR), nullptr);
177723b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_LOADING_PROGRESS_ENABLE_LOADING), nullptr);
177823b3eb3cSopenharmony_ci    nodeAPI->disposeNode(rootNode);
177923b3eb3cSopenharmony_ci}
178023b3eb3cSopenharmony_ci
178123b3eb3cSopenharmony_ci/**
178223b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest014
178323b3eb3cSopenharmony_ci * @tc.desc: Test textinputNode function.
178423b3eb3cSopenharmony_ci * @tc.type: FUNC
178523b3eb3cSopenharmony_ci */
178623b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest014, TestSize.Level1)
178723b3eb3cSopenharmony_ci{
178823b3eb3cSopenharmony_ci    auto nodeAPI = reinterpret_cast<ArkUI_NativeNodeAPI_1*>(
178923b3eb3cSopenharmony_ci        OH_ArkUI_QueryModuleInterfaceByName(ARKUI_NATIVE_NODE, "ArkUI_NativeNodeAPI_1"));
179023b3eb3cSopenharmony_ci    auto rootNode = new ArkUI_Node({ARKUI_NODE_TEXT_INPUT, nullptr});
179123b3eb3cSopenharmony_ci    uint32_t color = 0XFFFF0000;
179223b3eb3cSopenharmony_ci    float padding = 10.0f;
179323b3eb3cSopenharmony_ci    ArkUI_NumberValue value[] = {{.u32 = color}};
179423b3eb3cSopenharmony_ci    ArkUI_AttributeItem item = {value, sizeof(value) / sizeof(ArkUI_NumberValue)};
179523b3eb3cSopenharmony_ci    ArkUI_NumberValue value4[] = {{.u32 = color}, {.u32 = color}, {.u32 = color}, {.u32 = color}};
179623b3eb3cSopenharmony_ci    ArkUI_AttributeItem item4 = {value4, sizeof(value4) / sizeof(ArkUI_NumberValue)};
179723b3eb3cSopenharmony_ci    ArkUI_NumberValue fontValue[] = {{.f32 = padding}, {.i32 = ARKUI_FONT_STYLE_NORMAL},
179823b3eb3cSopenharmony_ci        {.i32 = ARKUI_FONT_WEIGHT_W100}};
179923b3eb3cSopenharmony_ci    ArkUI_AttributeItem fontItem = {fontValue, sizeof(fontValue) / sizeof(ArkUI_NumberValue)};
180023b3eb3cSopenharmony_ci    ArkUI_NumberValue cancelBtn[] = {{.i32 = ARKUI_CANCELBUTTON_STYLE_CONSTANT}, {.f32 = padding}, {.u32 = color}};
180123b3eb3cSopenharmony_ci    ArkUI_AttributeItem cancelBtnItem = {cancelBtn, sizeof(cancelBtn) / sizeof(ArkUI_NumberValue)};
180223b3eb3cSopenharmony_ci    ArkUI_NumberValue selection[] = {{.i32 = 0}, {.i32 = 1}};
180323b3eb3cSopenharmony_ci    ArkUI_AttributeItem selectionItem = {selection, sizeof(selection) / sizeof(ArkUI_NumberValue)};
180423b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_BACKGROUND_COLOR, &item);
180523b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_BORDER_COLOR, &item);
180623b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_FONT_COLOR, &item);
180723b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_INPUT_CARET_COLOR, &item);
180823b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_INPUT_PLACEHOLDER_COLOR, &item);
180923b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_INPUT_SELECTED_BACKGROUND_COLOR, &item);
181023b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_INPUT_UNDERLINE_COLOR, &item4);
181123b3eb3cSopenharmony_ci    value[0].f32 = padding;
181223b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_PADDING, &item);
181323b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_MARGIN, &item);
181423b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_BORDER_WIDTH, &item);
181523b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_BORDER_RADIUS, &item);
181623b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_BORDER_WIDTH_PERCENT, &item);
181723b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_BORDER_RADIUS_PERCENT, &item);
181823b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_MARGIN_PERCENT, &item);
181923b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_FONT_SIZE, &item);
182023b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_INPUT_CARET_STYLE, &item);
182123b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_MIN_FONT_SIZE, &item);
182223b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_MAX_FONT_SIZE, &item);
182323b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_LINE_HEIGHT, &item);
182423b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_BORDER_STYLE_SOLID;
182523b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_BORDER_STYLE, &item);
182623b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_FONT_WEIGHT_W100;
182723b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_FONT_WEIGHT, &item);
182823b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_FONT_STYLE_NORMAL;
182923b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_FONT_STYLE, &item);
183023b3eb3cSopenharmony_ci    value[0].i32 = true;
183123b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_INPUT_SHOW_UNDERLINE, &item);
183223b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_INPUT_MAX_LENGTH, &item);
183323b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_INPUT_ENABLE_KEYBOARD_ON_FOCUS, &item);
183423b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_INPUT_SHOW_PASSWORD_ICON, &item);
183523b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_INPUT_EDITING, &item);
183623b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_INPUT_SELECTION_MENU_HIDDEN, &item);
183723b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_INPUT_ENABLE_AUTO_FILL, &item);
183823b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_INPUT_SELECT_ALL, &item);
183923b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_INPUT_CARET_OFFSET, &item);
184023b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_INPUT_NUMBER_OF_LINES, &item);
184123b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_INPUT_BLUR_ON_SUBMIT, &item);
184223b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_INPUT_SHOW_KEYBOARD_ON_FOCUS, &item);
184323b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_MAX_LINES, &item);
184423b3eb3cSopenharmony_ci    value[0].i32 = false;
184523b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_INPUT_EDITING, &item);
184623b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_ENTER_KEY_TYPE_GO;
184723b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_INPUT_ENTER_KEY_TYPE, &item);
184823b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_TEXTINPUT_TYPE_NORMAL;
184923b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_INPUT_TYPE, &item);
185023b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_TEXTINPUT_CONTENT_TYPE_USER_NAME;
185123b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_INPUT_CONTENT_TYPE, &item);
185223b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_TEXTINPUT_CONTENT_TYPE_FORMAT_ADDRESS;
185323b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_INPUT_CONTENT_TYPE, &item);
185423b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_TEXTINPUT_STYLE_DEFAULT;
185523b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_INPUT_STYLE, &item);
185623b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_WORD_BREAK_NORMAL;
185723b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_INPUT_WORD_BREAK, &item);
185823b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_TEXT_ALIGNMENT_START;
185923b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_ALIGN, &item);
186023b3eb3cSopenharmony_ci    item.string = "test";
186123b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_INPUT_PLACEHOLDER, &item);
186223b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_INPUT_TEXT, &item);
186323b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_INPUT_PASSWORD_RULES, &item);
186423b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_INPUT_INPUT_FILTER, &item);
186523b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_FONT_FAMILY, &item);
186623b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_FONT_FEATURE, &item);
186723b3eb3cSopenharmony_ci    item.object = rootNode;
186823b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_INPUT_CUSTOM_KEYBOARD, &item);
186923b3eb3cSopenharmony_ci
187023b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_INPUT_PLACEHOLDER_FONT, &fontItem);
187123b3eb3cSopenharmony_ci    cancelBtnItem.size = 1;
187223b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_INPUT_CANCEL_BUTTON, &cancelBtnItem);
187323b3eb3cSopenharmony_ci    cancelBtnItem.size = 2;
187423b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_INPUT_CANCEL_BUTTON, &cancelBtnItem);
187523b3eb3cSopenharmony_ci    cancelBtnItem.size = sizeof(cancelBtn) / sizeof(ArkUI_NumberValue);
187623b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_INPUT_CANCEL_BUTTON, &cancelBtnItem);
187723b3eb3cSopenharmony_ci    cancelBtnItem.string = "test";
187823b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_INPUT_CANCEL_BUTTON, &cancelBtnItem);
187923b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_INPUT_TEXT_SELECTION, &selectionItem);
188023b3eb3cSopenharmony_ci    selection[0].i32 = 2;
188123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TEXT_INPUT_TEXT_SELECTION, &selectionItem),
188223b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
188323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_INPUT_PLACEHOLDER), ARKUI_ERROR_CODE_NO_ERROR);
188423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_INPUT_TEXT), ARKUI_ERROR_CODE_NO_ERROR);
188523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_INPUT_CARET_COLOR), ARKUI_ERROR_CODE_NO_ERROR);
188623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_INPUT_CARET_STYLE), ARKUI_ERROR_CODE_NO_ERROR);
188723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_INPUT_SHOW_UNDERLINE), ARKUI_ERROR_CODE_NO_ERROR);
188823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_INPUT_MAX_LENGTH), ARKUI_ERROR_CODE_NO_ERROR);
188923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_INPUT_ENTER_KEY_TYPE), ARKUI_ERROR_CODE_NO_ERROR);
189023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_INPUT_PLACEHOLDER_COLOR), ARKUI_ERROR_CODE_NO_ERROR);
189123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_INPUT_PLACEHOLDER_FONT), ARKUI_ERROR_CODE_NO_ERROR);
189223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_INPUT_ENABLE_KEYBOARD_ON_FOCUS), ARKUI_ERROR_CODE_NO_ERROR);
189323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_INPUT_TYPE), ARKUI_ERROR_CODE_NO_ERROR);
189423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_INPUT_SELECTED_BACKGROUND_COLOR), ARKUI_ERROR_CODE_NO_ERROR);
189523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_INPUT_SHOW_PASSWORD_ICON), ARKUI_ERROR_CODE_NO_ERROR);
189623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_INPUT_CANCEL_BUTTON), ARKUI_ERROR_CODE_NO_ERROR);
189723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_INPUT_TEXT_SELECTION), ARKUI_ERROR_CODE_NO_ERROR);
189823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_INPUT_UNDERLINE_COLOR), ARKUI_ERROR_CODE_NO_ERROR);
189923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_INPUT_ENABLE_AUTO_FILL), ARKUI_ERROR_CODE_NO_ERROR);
190023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_INPUT_CONTENT_TYPE), ARKUI_ERROR_CODE_NO_ERROR);
190123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_INPUT_PASSWORD_RULES), ARKUI_ERROR_CODE_NO_ERROR);
190223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_INPUT_SELECT_ALL), ARKUI_ERROR_CODE_NO_ERROR);
190323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_INPUT_INPUT_FILTER), ARKUI_ERROR_CODE_NO_ERROR);
190423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_INPUT_STYLE), ARKUI_ERROR_CODE_NO_ERROR);
190523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_INPUT_CARET_OFFSET), ARKUI_ERROR_CODE_NO_ERROR);
190623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_INPUT_SELECTION_MENU_HIDDEN), ARKUI_ERROR_CODE_NO_ERROR);
190723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_INPUT_BLUR_ON_SUBMIT), ARKUI_ERROR_CODE_NO_ERROR);
190823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_INPUT_CUSTOM_KEYBOARD), ARKUI_ERROR_CODE_NO_ERROR);
190923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_INPUT_WORD_BREAK), ARKUI_ERROR_CODE_NO_ERROR);
191023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_INPUT_SHOW_KEYBOARD_ON_FOCUS), ARKUI_ERROR_CODE_NO_ERROR);
191123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_INPUT_NUMBER_OF_LINES), ARKUI_ERROR_CODE_NO_ERROR);
191223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_BACKGROUND_COLOR), ARKUI_ERROR_CODE_NO_ERROR);
191323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_PADDING), ARKUI_ERROR_CODE_NO_ERROR);
191423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_MARGIN), ARKUI_ERROR_CODE_NO_ERROR);
191523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_BORDER_WIDTH), ARKUI_ERROR_CODE_NO_ERROR);
191623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_BORDER_RADIUS), ARKUI_ERROR_CODE_NO_ERROR);
191723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_BORDER_COLOR), ARKUI_ERROR_CODE_NO_ERROR);
191823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_BORDER_STYLE), ARKUI_ERROR_CODE_NO_ERROR);
191923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_FONT_COLOR), ARKUI_ERROR_CODE_NO_ERROR);
192023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_FONT_SIZE), ARKUI_ERROR_CODE_NO_ERROR);
192123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_FONT_STYLE), ARKUI_ERROR_CODE_NO_ERROR);
192223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_FONT_WEIGHT), ARKUI_ERROR_CODE_NO_ERROR);
192323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_FONT_FAMILY), ARKUI_ERROR_CODE_NO_ERROR);
192423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_MIN_FONT_SIZE), ARKUI_ERROR_CODE_NO_ERROR);
192523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_MAX_FONT_SIZE), ARKUI_ERROR_CODE_NO_ERROR);
192623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_LINE_HEIGHT), ARKUI_ERROR_CODE_NO_ERROR);
192723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_MAX_LINES), ARKUI_ERROR_CODE_NO_ERROR);
192823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_ALIGN), ARKUI_ERROR_CODE_NO_ERROR);
192923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_FONT_FEATURE), ARKUI_ERROR_CODE_NO_ERROR);
193023b3eb3cSopenharmony_ci
193123b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_INPUT_PLACEHOLDER), nullptr);
193223b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_INPUT_TEXT), nullptr);
193323b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_INPUT_CARET_COLOR), nullptr);
193423b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_INPUT_CARET_STYLE), nullptr);
193523b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_INPUT_SHOW_UNDERLINE), nullptr);
193623b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_INPUT_MAX_LENGTH), nullptr);
193723b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_INPUT_ENTER_KEY_TYPE), nullptr);
193823b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_INPUT_PLACEHOLDER_COLOR), nullptr);
193923b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_INPUT_PLACEHOLDER_FONT), nullptr);
194023b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_INPUT_ENABLE_KEYBOARD_ON_FOCUS), nullptr);
194123b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_INPUT_TYPE), nullptr);
194223b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_INPUT_SELECTED_BACKGROUND_COLOR), nullptr);
194323b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_INPUT_SHOW_PASSWORD_ICON), nullptr);
194423b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_INPUT_EDITING), nullptr);
194523b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_INPUT_CANCEL_BUTTON), nullptr);
194623b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_INPUT_TEXT_SELECTION), nullptr);
194723b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_INPUT_UNDERLINE_COLOR), nullptr);
194823b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_INPUT_ENABLE_AUTO_FILL), nullptr);
194923b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_INPUT_CONTENT_TYPE), nullptr);
195023b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_INPUT_PASSWORD_RULES), nullptr);
195123b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_INPUT_SELECT_ALL), nullptr);
195223b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_INPUT_INPUT_FILTER), nullptr);
195323b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_INPUT_STYLE), nullptr);
195423b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_INPUT_CARET_OFFSET), nullptr);
195523b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_INPUT_CONTENT_RECT), nullptr);
195623b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_INPUT_CONTENT_LINE_COUNT), nullptr);
195723b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_INPUT_SELECTION_MENU_HIDDEN), nullptr);
195823b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_INPUT_BLUR_ON_SUBMIT), nullptr);
195923b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_INPUT_CUSTOM_KEYBOARD), nullptr);
196023b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_INPUT_WORD_BREAK), nullptr);
196123b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_INPUT_SHOW_KEYBOARD_ON_FOCUS), nullptr);
196223b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_INPUT_NUMBER_OF_LINES), nullptr);
196323b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_BACKGROUND_COLOR), nullptr);
196423b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_PADDING), nullptr);
196523b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_MARGIN), nullptr);
196623b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_BORDER_WIDTH), nullptr);
196723b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_BORDER_RADIUS), nullptr);
196823b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_BORDER_COLOR), nullptr);
196923b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_BORDER_STYLE), nullptr);
197023b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_FONT_COLOR), nullptr);
197123b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_FONT_SIZE), nullptr);
197223b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_FONT_STYLE), nullptr);
197323b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_FONT_WEIGHT), nullptr);
197423b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_FONT_FAMILY), nullptr);
197523b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_MIN_FONT_SIZE), nullptr);
197623b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_MAX_FONT_SIZE), nullptr);
197723b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_LINE_HEIGHT), nullptr);
197823b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_MAX_LINES), nullptr);
197923b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_ALIGN), nullptr);
198023b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_FONT_FEATURE), nullptr);
198123b3eb3cSopenharmony_ci    nodeAPI->disposeNode(rootNode);
198223b3eb3cSopenharmony_ci}
198323b3eb3cSopenharmony_ci
198423b3eb3cSopenharmony_ci/**
198523b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest015
198623b3eb3cSopenharmony_ci * @tc.desc: Test textareaNode function.
198723b3eb3cSopenharmony_ci * @tc.type: FUNC
198823b3eb3cSopenharmony_ci */
198923b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest015, TestSize.Level1)
199023b3eb3cSopenharmony_ci{
199123b3eb3cSopenharmony_ci    auto nodeAPI = reinterpret_cast<ArkUI_NativeNodeAPI_1*>(
199223b3eb3cSopenharmony_ci        OH_ArkUI_QueryModuleInterfaceByName(ARKUI_NATIVE_NODE, "ArkUI_NativeNodeAPI_1"));
199323b3eb3cSopenharmony_ci    auto rootNode = new ArkUI_Node({ARKUI_NODE_TEXT_AREA, nullptr});
199423b3eb3cSopenharmony_ci    uint32_t color = 0XFFFF0000;
199523b3eb3cSopenharmony_ci    float padding = 10.0f;
199623b3eb3cSopenharmony_ci    ArkUI_NumberValue value[] = {{.u32 = color}};
199723b3eb3cSopenharmony_ci    ArkUI_AttributeItem item = {value, sizeof(value) / sizeof(ArkUI_NumberValue)};
199823b3eb3cSopenharmony_ci    ArkUI_NumberValue fontValue[] = {{.f32 = padding}, {.i32 = ARKUI_FONT_STYLE_NORMAL},
199923b3eb3cSopenharmony_ci        {.i32 = ARKUI_FONT_WEIGHT_W100}};
200023b3eb3cSopenharmony_ci    ArkUI_AttributeItem fontItem = {fontValue, sizeof(fontValue) / sizeof(ArkUI_NumberValue)};
200123b3eb3cSopenharmony_ci    ArkUI_NumberValue showCounter[] = {{.i32 = true}, {.f32 = 50}, {.i32 = true}};
200223b3eb3cSopenharmony_ci    ArkUI_AttributeItem showCounterItem = {fontValue, sizeof(showCounter) / sizeof(ArkUI_NumberValue)};
200323b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_BACKGROUND_COLOR, &item);
200423b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_BORDER_COLOR, &item);
200523b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_FONT_COLOR, &item);
200623b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_AREA_CARET_COLOR, &item);
200723b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_AREA_PLACEHOLDER_COLOR, &item);
200823b3eb3cSopenharmony_ci    value[0].f32 = padding;
200923b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_PADDING, &item);
201023b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_MARGIN, &item);
201123b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_BORDER_WIDTH, &item);
201223b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_BORDER_RADIUS, &item);
201323b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_BORDER_WIDTH_PERCENT, &item);
201423b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_BORDER_RADIUS_PERCENT, &item);
201523b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_MARGIN_PERCENT, &item);
201623b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_FONT_SIZE, &item);
201723b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_MIN_FONT_SIZE, &item);
201823b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_MAX_FONT_SIZE, &item);
201923b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_LINE_HEIGHT, &item);
202023b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_BORDER_STYLE_SOLID;
202123b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_BORDER_STYLE, &item);
202223b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_FONT_WEIGHT_W100;
202323b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_FONT_WEIGHT, &item);
202423b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_FONT_STYLE_NORMAL;
202523b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_FONT_STYLE, &item);
202623b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_TEXTAREA_TYPE_NORMAL;
202723b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_AREA_TYPE, &item);
202823b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_TEXT_ALIGNMENT_START;
202923b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_ALIGN, &item);
203023b3eb3cSopenharmony_ci    value[0].i32 = true;
203123b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_AREA_MAX_LENGTH, &item);
203223b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_AREA_EDITING, &item);
203323b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_AREA_SELECTION_MENU_HIDDEN, &item);
203423b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_MAX_LINES, &item);
203523b3eb3cSopenharmony_ci    value[0].i32 = false;
203623b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_AREA_EDITING, &item);
203723b3eb3cSopenharmony_ci
203823b3eb3cSopenharmony_ci    item.string = "test";
203923b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_AREA_PLACEHOLDER, &item);
204023b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_AREA_TEXT, &item);
204123b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_FONT_FAMILY, &item);
204223b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_FONT_FEATURE, &item);
204323b3eb3cSopenharmony_ci
204423b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_AREA_PLACEHOLDER_FONT, &fontItem);
204523b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_AREA_SHOW_COUNTER, &showCounterItem);
204623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_AREA_PLACEHOLDER), ARKUI_ERROR_CODE_NO_ERROR);
204723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_AREA_TEXT), ARKUI_ERROR_CODE_NO_ERROR);
204823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_AREA_MAX_LENGTH), ARKUI_ERROR_CODE_NO_ERROR);
204923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_AREA_PLACEHOLDER_COLOR), ARKUI_ERROR_CODE_NO_ERROR);
205023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_AREA_PLACEHOLDER_FONT), ARKUI_ERROR_CODE_NO_ERROR);
205123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_AREA_CARET_COLOR), ARKUI_ERROR_CODE_NO_ERROR);
205223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_AREA_TYPE), ARKUI_ERROR_CODE_NO_ERROR);
205323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_AREA_SHOW_COUNTER), ARKUI_ERROR_CODE_NO_ERROR);
205423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_AREA_SELECTION_MENU_HIDDEN), ARKUI_ERROR_CODE_NO_ERROR);
205523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_AREA_BLUR_ON_SUBMIT), ARKUI_ERROR_CODE_NO_ERROR);
205623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_AREA_INPUT_FILTER), ARKUI_ERROR_CODE_NO_ERROR);
205723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_AREA_SELECTED_BACKGROUND_COLOR), ARKUI_ERROR_CODE_NO_ERROR);
205823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_AREA_ENTER_KEY_TYPE), ARKUI_ERROR_CODE_NO_ERROR);
205923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_AREA_ENABLE_KEYBOARD_ON_FOCUS), ARKUI_ERROR_CODE_NO_ERROR);
206023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_AREA_CARET_OFFSET), ARKUI_ERROR_CODE_NO_ERROR);
206123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_AREA_TEXT_SELECTION), ARKUI_ERROR_CODE_NO_ERROR);
206223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_AREA_ENABLE_AUTO_FILL), ARKUI_ERROR_CODE_NO_ERROR);
206323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_AREA_CONTENT_TYPE), ARKUI_ERROR_CODE_NO_ERROR);
206423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_AREA_SHOW_KEYBOARD_ON_FOCUS), ARKUI_ERROR_CODE_NO_ERROR);
206523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_AREA_NUMBER_OF_LINES), ARKUI_ERROR_CODE_NO_ERROR);
206623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_BACKGROUND_COLOR), ARKUI_ERROR_CODE_NO_ERROR);
206723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_MARGIN), ARKUI_ERROR_CODE_NO_ERROR);
206823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_BORDER_WIDTH), ARKUI_ERROR_CODE_NO_ERROR);
206923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_BORDER_RADIUS), ARKUI_ERROR_CODE_NO_ERROR);
207023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_BORDER_COLOR), ARKUI_ERROR_CODE_NO_ERROR);
207123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_BORDER_STYLE), ARKUI_ERROR_CODE_NO_ERROR);
207223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_FONT_COLOR), ARKUI_ERROR_CODE_NO_ERROR);
207323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_FONT_SIZE), ARKUI_ERROR_CODE_NO_ERROR);
207423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_FONT_STYLE), ARKUI_ERROR_CODE_NO_ERROR);
207523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_FONT_WEIGHT), ARKUI_ERROR_CODE_NO_ERROR);
207623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_FONT_FAMILY), ARKUI_ERROR_CODE_NO_ERROR);
207723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_MIN_FONT_SIZE), ARKUI_ERROR_CODE_NO_ERROR);
207823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_MAX_FONT_SIZE), ARKUI_ERROR_CODE_NO_ERROR);
207923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_LINE_HEIGHT), ARKUI_ERROR_CODE_NO_ERROR);
208023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_MAX_LINES), ARKUI_ERROR_CODE_NO_ERROR);
208123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_ALIGN), ARKUI_ERROR_CODE_NO_ERROR);
208223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_FONT_FEATURE), ARKUI_ERROR_CODE_NO_ERROR);
208323b3eb3cSopenharmony_ci
208423b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_AREA_PLACEHOLDER), nullptr);
208523b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_AREA_TEXT), nullptr);
208623b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_AREA_MAX_LENGTH), nullptr);
208723b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_AREA_PLACEHOLDER_COLOR), nullptr);
208823b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_AREA_PLACEHOLDER_FONT), nullptr);
208923b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_AREA_CARET_COLOR), nullptr);
209023b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_AREA_EDITING), nullptr);
209123b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_AREA_TYPE), nullptr);
209223b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_AREA_SHOW_COUNTER), nullptr);
209323b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_AREA_SELECTION_MENU_HIDDEN), nullptr);
209423b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_AREA_BLUR_ON_SUBMIT), nullptr);
209523b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_AREA_INPUT_FILTER), nullptr);
209623b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_AREA_SELECTED_BACKGROUND_COLOR), nullptr);
209723b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_AREA_ENTER_KEY_TYPE), nullptr);
209823b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_AREA_ENABLE_KEYBOARD_ON_FOCUS), nullptr);
209923b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_AREA_CARET_OFFSET), nullptr);
210023b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_AREA_CONTENT_RECT), nullptr);
210123b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_AREA_CONTENT_LINE_COUNT), nullptr);
210223b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_AREA_TEXT_SELECTION), nullptr);
210323b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_AREA_ENABLE_AUTO_FILL), nullptr);
210423b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_AREA_CONTENT_TYPE), nullptr);
210523b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_AREA_SHOW_KEYBOARD_ON_FOCUS), nullptr);
210623b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_AREA_NUMBER_OF_LINES), nullptr);
210723b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_BACKGROUND_COLOR), nullptr);
210823b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_PADDING), nullptr);
210923b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_MARGIN), nullptr);
211023b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_BORDER_WIDTH), nullptr);
211123b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_BORDER_RADIUS), nullptr);
211223b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_BORDER_COLOR), nullptr);
211323b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_BORDER_STYLE), nullptr);
211423b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_FONT_COLOR), nullptr);
211523b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_FONT_SIZE), nullptr);
211623b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_FONT_STYLE), nullptr);
211723b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_FONT_WEIGHT), nullptr);
211823b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_FONT_FAMILY), nullptr);
211923b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_MIN_FONT_SIZE), nullptr);
212023b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_MAX_FONT_SIZE), nullptr);
212123b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_LINE_HEIGHT), nullptr);
212223b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_MAX_LINES), nullptr);
212323b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_ALIGN), nullptr);
212423b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_FONT_FEATURE), nullptr);
212523b3eb3cSopenharmony_ci    nodeAPI->disposeNode(rootNode);
212623b3eb3cSopenharmony_ci}
212723b3eb3cSopenharmony_ci
212823b3eb3cSopenharmony_ci/**
212923b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest016
213023b3eb3cSopenharmony_ci * @tc.desc: Test buttonNode function.
213123b3eb3cSopenharmony_ci * @tc.type: FUNC
213223b3eb3cSopenharmony_ci */
213323b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest016, TestSize.Level1)
213423b3eb3cSopenharmony_ci{
213523b3eb3cSopenharmony_ci    auto nodeAPI = reinterpret_cast<ArkUI_NativeNodeAPI_1*>(
213623b3eb3cSopenharmony_ci        OH_ArkUI_QueryModuleInterfaceByName(ARKUI_NATIVE_NODE, "ArkUI_NativeNodeAPI_1"));
213723b3eb3cSopenharmony_ci    auto rootNode = new ArkUI_Node({ARKUI_NODE_BUTTON, nullptr});
213823b3eb3cSopenharmony_ci    ArkUI_NumberValue value[] = {{.f32 = 10.0f}};
213923b3eb3cSopenharmony_ci    ArkUI_AttributeItem item = {value, sizeof(value) / sizeof(ArkUI_NumberValue), "test", nullptr};
214023b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_BUTTON_LABEL, &item);
214123b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_BUTTON_LABEL), nullptr);
214223b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_FONT_SIZE, &item);
214323b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_FONT_SIZE), nullptr);
214423b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_BUTTON_TYPE_NORMAL;
214523b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_BUTTON_TYPE, &item);
214623b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_BUTTON_TYPE), nullptr);
214723b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_FONT_WEIGHT_W100;
214823b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_FONT_WEIGHT, &item);
214923b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_FONT_WEIGHT), nullptr);
215023b3eb3cSopenharmony_ci    value[0].u32 = 0xFFFF0000;
215123b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_BACKGROUND_COLOR, &item);
215223b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_BACKGROUND_COLOR), nullptr);
215323b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_FONT_COLOR, &item);
215423b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_FONT_COLOR), nullptr);
215523b3eb3cSopenharmony_ci
215623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_BUTTON_LABEL), ARKUI_ERROR_CODE_NO_ERROR);
215723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_BUTTON_TYPE), ARKUI_ERROR_CODE_NO_ERROR);
215823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_BACKGROUND_COLOR), ARKUI_ERROR_CODE_NO_ERROR);
215923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_FONT_COLOR), ARKUI_ERROR_CODE_NO_ERROR);
216023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_FONT_SIZE), ARKUI_ERROR_CODE_NO_ERROR);
216123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_FONT_WEIGHT), ARKUI_ERROR_CODE_NO_ERROR);
216223b3eb3cSopenharmony_ci    nodeAPI->disposeNode(rootNode);
216323b3eb3cSopenharmony_ci}
216423b3eb3cSopenharmony_ci
216523b3eb3cSopenharmony_ci/**
216623b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest017
216723b3eb3cSopenharmony_ci * @tc.desc: Test progressNode function.
216823b3eb3cSopenharmony_ci * @tc.type: FUNC
216923b3eb3cSopenharmony_ci */
217023b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest017, TestSize.Level1)
217123b3eb3cSopenharmony_ci{
217223b3eb3cSopenharmony_ci    auto nodeAPI = reinterpret_cast<ArkUI_NativeNodeAPI_1*>(
217323b3eb3cSopenharmony_ci        OH_ArkUI_QueryModuleInterfaceByName(ARKUI_NATIVE_NODE, "ArkUI_NativeNodeAPI_1"));
217423b3eb3cSopenharmony_ci    auto rootNode = nodeAPI->createNode(ARKUI_NODE_PROGRESS);
217523b3eb3cSopenharmony_ci    ASSERT_NE(rootNode, nullptr);
217623b3eb3cSopenharmony_ci    ArkUI_NumberValue value[] = {{.f32 = 10.0f}};
217723b3eb3cSopenharmony_ci    ArkUI_AttributeItem item = {value, sizeof(value) / sizeof(ArkUI_NumberValue)};
217823b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_PROGRESS_VALUE, &item);
217923b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_PROGRESS_TOTAL, &item);
218023b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_PROGRESS_COLOR, &item);
218123b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_PROGRESS_TYPE_LINEAR;
218223b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_PROGRESS_TYPE, &item);
218323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_PROGRESS_VALUE), ARKUI_ERROR_CODE_NO_ERROR);
218423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_PROGRESS_TOTAL), ARKUI_ERROR_CODE_NO_ERROR);
218523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_PROGRESS_COLOR), ARKUI_ERROR_CODE_NO_ERROR);
218623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_PROGRESS_TYPE), ARKUI_ERROR_CODE_NO_ERROR);
218723b3eb3cSopenharmony_ci
218823b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_PROGRESS_VALUE), nullptr);
218923b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_PROGRESS_TOTAL), nullptr);
219023b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_PROGRESS_COLOR), nullptr);
219123b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_PROGRESS_TYPE), nullptr);
219223b3eb3cSopenharmony_ci    nodeAPI->disposeNode(rootNode);
219323b3eb3cSopenharmony_ci}
219423b3eb3cSopenharmony_ci
219523b3eb3cSopenharmony_ci/**
219623b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest018
219723b3eb3cSopenharmony_ci * @tc.desc: Test checkboxNode function.
219823b3eb3cSopenharmony_ci * @tc.type: FUNC
219923b3eb3cSopenharmony_ci */
220023b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest018, TestSize.Level1)
220123b3eb3cSopenharmony_ci{
220223b3eb3cSopenharmony_ci    auto nodeAPI = reinterpret_cast<ArkUI_NativeNodeAPI_1*>(
220323b3eb3cSopenharmony_ci        OH_ArkUI_QueryModuleInterfaceByName(ARKUI_NATIVE_NODE, "ArkUI_NativeNodeAPI_1"));
220423b3eb3cSopenharmony_ci    auto rootNode = nodeAPI->createNode(ARKUI_NODE_CHECKBOX);
220523b3eb3cSopenharmony_ci    ASSERT_NE(rootNode, nullptr);
220623b3eb3cSopenharmony_ci    float size = 10.0f;
220723b3eb3cSopenharmony_ci    uint32_t color = 0xFFFF0000;
220823b3eb3cSopenharmony_ci    ArkUI_NumberValue value[] = {{.i32 = true}};
220923b3eb3cSopenharmony_ci    ArkUI_AttributeItem item = {value, sizeof(value) / sizeof(ArkUI_NumberValue)};
221023b3eb3cSopenharmony_ci    ArkUI_NumberValue mark[] = {{.u32 = color}, {.f32 = size}, {.f32 = size}};
221123b3eb3cSopenharmony_ci    ArkUI_AttributeItem markItem = {mark, sizeof(mark) / sizeof(ArkUI_NumberValue), nullptr, nullptr};
221223b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_CHECKBOX_SELECT, &item);
221323b3eb3cSopenharmony_ci    value[0].u32 = color;
221423b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_CHECKBOX_SELECT_COLOR, &item);
221523b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_CHECKBOX_UNSELECT_COLOR, &item);
221623b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_CHECKBOX_MARK, &item);
221723b3eb3cSopenharmony_ci    value[0].i32 = ArkUI_CHECKBOX_SHAPE_CIRCLE;
221823b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_CHECKBOX_SHAPE, &item);
221923b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_CHECKBOX_MARK, &markItem);
222023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_CHECKBOX_SELECT), ARKUI_ERROR_CODE_NO_ERROR);
222123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_CHECKBOX_SELECT_COLOR), ARKUI_ERROR_CODE_NO_ERROR);
222223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_CHECKBOX_UNSELECT_COLOR), ARKUI_ERROR_CODE_NO_ERROR);
222323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_CHECKBOX_MARK), ARKUI_ERROR_CODE_NO_ERROR);
222423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_CHECKBOX_SHAPE), ARKUI_ERROR_CODE_NO_ERROR);
222523b3eb3cSopenharmony_ci
222623b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_CHECKBOX_SELECT), nullptr);
222723b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_CHECKBOX_SELECT_COLOR), nullptr);
222823b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_CHECKBOX_UNSELECT_COLOR), nullptr);
222923b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_CHECKBOX_MARK), nullptr);
223023b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_CHECKBOX_SHAPE), nullptr);
223123b3eb3cSopenharmony_ci    nodeAPI->disposeNode(rootNode);
223223b3eb3cSopenharmony_ci}
223323b3eb3cSopenharmony_ci
223423b3eb3cSopenharmony_ci/**
223523b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest019
223623b3eb3cSopenharmony_ci * @tc.desc: Test xcomponentNode function.
223723b3eb3cSopenharmony_ci * @tc.type: FUNC
223823b3eb3cSopenharmony_ci */
223923b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest019, TestSize.Level1)
224023b3eb3cSopenharmony_ci{
224123b3eb3cSopenharmony_ci    auto nodeAPI = reinterpret_cast<ArkUI_NativeNodeAPI_1*>(
224223b3eb3cSopenharmony_ci        OH_ArkUI_QueryModuleInterfaceByName(ARKUI_NATIVE_NODE, "ArkUI_NativeNodeAPI_1"));
224323b3eb3cSopenharmony_ci    auto rootNode = nodeAPI->createNode(ARKUI_NODE_XCOMPONENT);
224423b3eb3cSopenharmony_ci    ASSERT_NE(rootNode, nullptr);
224523b3eb3cSopenharmony_ci
224623b3eb3cSopenharmony_ci    ArkUI_NumberValue value[] = {{.i32 = ARKUI_XCOMPONENT_TYPE_SURFACE}, {.f32 = 10.0f}};
224723b3eb3cSopenharmony_ci    ArkUI_AttributeItem item = {value, sizeof(value) / sizeof(ArkUI_NumberValue), "test"};
224823b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_XCOMPONENT_ID, &item);
224923b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_XCOMPONENT_TYPE, &item);
225023b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_XCOMPONENT_TYPE_TEXTURE;
225123b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_XCOMPONENT_TYPE, &item);
225223b3eb3cSopenharmony_ci
225323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_XCOMPONENT_TYPE), ARKUI_ERROR_CODE_NO_ERROR);
225423b3eb3cSopenharmony_ci
225523b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_XCOMPONENT_ID), nullptr);
225623b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_XCOMPONENT_TYPE), nullptr);
225723b3eb3cSopenharmony_ci    nodeAPI->disposeNode(rootNode);
225823b3eb3cSopenharmony_ci}
225923b3eb3cSopenharmony_ci
226023b3eb3cSopenharmony_ci/**
226123b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest020
226223b3eb3cSopenharmony_ci * @tc.desc: Test datePickerNode function.
226323b3eb3cSopenharmony_ci * @tc.type: FUNC
226423b3eb3cSopenharmony_ci */
226523b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest020, TestSize.Level1)
226623b3eb3cSopenharmony_ci{
226723b3eb3cSopenharmony_ci    auto nodeAPI = reinterpret_cast<ArkUI_NativeNodeAPI_1*>(
226823b3eb3cSopenharmony_ci        OH_ArkUI_QueryModuleInterfaceByName(ARKUI_NATIVE_NODE, "ArkUI_NativeNodeAPI_1"));
226923b3eb3cSopenharmony_ci
227023b3eb3cSopenharmony_ci    auto rootNode = new ArkUI_Node({ARKUI_NODE_DATE_PICKER, nullptr});
227123b3eb3cSopenharmony_ci    ArkUI_NumberValue value[] = {{.i32 = true}};
227223b3eb3cSopenharmony_ci    ArkUI_AttributeItem item = {value, sizeof(value) / sizeof(ArkUI_NumberValue), nullptr, nullptr};
227323b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_DATE_PICKER_LUNAR, &item);
227423b3eb3cSopenharmony_ci    item.string = "1970-1-1";
227523b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_DATE_PICKER_START, &item);
227623b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_DATE_PICKER_END, &item);
227723b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_DATE_PICKER_SELECTED, &item);
227823b3eb3cSopenharmony_ci    item.string = "#ff182431;14;normal;Arial;normal";
227923b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_DATE_PICKER_DISAPPEAR_TEXT_STYLE, &item);
228023b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_DATE_PICKER_TEXT_STYLE, &item);
228123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_DATE_PICKER_SELECTED_TEXT_STYLE, &item),
228223b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_NO_ERROR);
228323b3eb3cSopenharmony_ci    item.string = "#ff182431;14;normal;Arial;test";
228423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_DATE_PICKER_SELECTED_TEXT_STYLE, &item),
228523b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_NO_ERROR);
228623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_DATE_PICKER_LUNAR), ARKUI_ERROR_CODE_NO_ERROR);
228723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_DATE_PICKER_START), ARKUI_ERROR_CODE_NO_ERROR);
228823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_DATE_PICKER_END), ARKUI_ERROR_CODE_NO_ERROR);
228923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_DATE_PICKER_SELECTED), ARKUI_ERROR_CODE_NO_ERROR);
229023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_DATE_PICKER_DISAPPEAR_TEXT_STYLE), ARKUI_ERROR_CODE_NO_ERROR);
229123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_DATE_PICKER_TEXT_STYLE), ARKUI_ERROR_CODE_NO_ERROR);
229223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_DATE_PICKER_SELECTED_TEXT_STYLE), ARKUI_ERROR_CODE_NO_ERROR);
229323b3eb3cSopenharmony_ci
229423b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_DATE_PICKER_LUNAR), nullptr);
229523b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_DATE_PICKER_START), nullptr);
229623b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_DATE_PICKER_END), nullptr);
229723b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_DATE_PICKER_SELECTED), nullptr);
229823b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_DATE_PICKER_DISAPPEAR_TEXT_STYLE), nullptr);
229923b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_DATE_PICKER_TEXT_STYLE), nullptr);
230023b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_DATE_PICKER_SELECTED_TEXT_STYLE), nullptr);
230123b3eb3cSopenharmony_ci    nodeAPI->disposeNode(rootNode);
230223b3eb3cSopenharmony_ci}
230323b3eb3cSopenharmony_ci
230423b3eb3cSopenharmony_ci/**
230523b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest021
230623b3eb3cSopenharmony_ci * @tc.desc: Test timePickerNode function.
230723b3eb3cSopenharmony_ci * @tc.type: FUNC
230823b3eb3cSopenharmony_ci */
230923b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest021, TestSize.Level1)
231023b3eb3cSopenharmony_ci{
231123b3eb3cSopenharmony_ci    auto nodeAPI = reinterpret_cast<ArkUI_NativeNodeAPI_1*>(
231223b3eb3cSopenharmony_ci        OH_ArkUI_QueryModuleInterfaceByName(ARKUI_NATIVE_NODE, "ArkUI_NativeNodeAPI_1"));
231323b3eb3cSopenharmony_ci    auto rootNode = new ArkUI_Node({ARKUI_NODE_TIME_PICKER, nullptr});
231423b3eb3cSopenharmony_ci    ArkUI_NumberValue value[] = {{.i32 = true}};
231523b3eb3cSopenharmony_ci    ArkUI_AttributeItem item = {value, sizeof(value) / sizeof(ArkUI_NumberValue), nullptr, nullptr};
231623b3eb3cSopenharmony_ci    item.string = "11-59";
231723b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TIME_PICKER_SELECTED, &item);
231823b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TIME_PICKER_USE_MILITARY_TIME, &item);
231923b3eb3cSopenharmony_ci    item.string = "#ff182431;14;normal;Arial;normal";
232023b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TIME_PICKER_DISAPPEAR_TEXT_STYLE, &item);
232123b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TIME_PICKER_TEXT_STYLE, &item);
232223b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TIME_PICKER_SELECTED_TEXT_STYLE, &item);
232323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TIME_PICKER_SELECTED), ARKUI_ERROR_CODE_NO_ERROR);
232423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TIME_PICKER_USE_MILITARY_TIME), ARKUI_ERROR_CODE_NO_ERROR);
232523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TIME_PICKER_DISAPPEAR_TEXT_STYLE), ARKUI_ERROR_CODE_NO_ERROR);
232623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TIME_PICKER_TEXT_STYLE), ARKUI_ERROR_CODE_NO_ERROR);
232723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TIME_PICKER_SELECTED_TEXT_STYLE), ARKUI_ERROR_CODE_NO_ERROR);
232823b3eb3cSopenharmony_ci
232923b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TIME_PICKER_SELECTED), nullptr);
233023b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TIME_PICKER_USE_MILITARY_TIME), nullptr);
233123b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TIME_PICKER_DISAPPEAR_TEXT_STYLE), nullptr);
233223b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TIME_PICKER_TEXT_STYLE), nullptr);
233323b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TIME_PICKER_SELECTED_TEXT_STYLE), nullptr);
233423b3eb3cSopenharmony_ci    nodeAPI->disposeNode(rootNode);
233523b3eb3cSopenharmony_ci}
233623b3eb3cSopenharmony_ci
233723b3eb3cSopenharmony_ci/**
233823b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest022
233923b3eb3cSopenharmony_ci * @tc.desc: Test textPickerNode function.
234023b3eb3cSopenharmony_ci * @tc.type: FUNC
234123b3eb3cSopenharmony_ci */
234223b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest022, TestSize.Level1)
234323b3eb3cSopenharmony_ci{
234423b3eb3cSopenharmony_ci    auto nodeAPI = reinterpret_cast<ArkUI_NativeNodeAPI_1*>(
234523b3eb3cSopenharmony_ci        OH_ArkUI_QueryModuleInterfaceByName(ARKUI_NATIVE_NODE, "ArkUI_NativeNodeAPI_1"));
234623b3eb3cSopenharmony_ci    auto rootNode = new ArkUI_Node({ARKUI_NODE_TEXT_PICKER, nullptr});
234723b3eb3cSopenharmony_ci    ArkUI_NumberValue value[] = {{.i32 = ARKUI_TEXTPICKER_RANGETYPE_SINGLE}};
234823b3eb3cSopenharmony_ci    ArkUI_AttributeItem item = {value, sizeof(value) / sizeof(ArkUI_NumberValue), nullptr, nullptr};
234923b3eb3cSopenharmony_ci    item.string = "1;2;3";
235023b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_PICKER_OPTION_RANGE, &item);
235123b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_PICKER_OPTION_VALUE, &item);
235223b3eb3cSopenharmony_ci    item.string = "#ff182431;14;normal;Arial;normal";
235323b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_PICKER_DISAPPEAR_TEXT_STYLE, &item);
235423b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_PICKER_TEXT_STYLE, &item);
235523b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_PICKER_SELECTED_TEXT_STYLE, &item);
235623b3eb3cSopenharmony_ci
235723b3eb3cSopenharmony_ci    value[0].u32 = 0;
235823b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_PICKER_OPTION_SELECTED, &item);
235923b3eb3cSopenharmony_ci    value[0].i32 = 0;
236023b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_PICKER_CAN_LOOP, &item);
236123b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_PICKER_SELECTED_INDEX, &item);
236223b3eb3cSopenharmony_ci
236323b3eb3cSopenharmony_ci    value[0].f32 = 10.0f;
236423b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_TEXT_PICKER_DEFAULT_PICKER_ITEM_HEIGHT, &item);
236523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_PICKER_OPTION_RANGE), ARKUI_ERROR_CODE_NO_ERROR);
236623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_PICKER_OPTION_SELECTED), ARKUI_ERROR_CODE_NO_ERROR);
236723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_PICKER_OPTION_VALUE), ARKUI_ERROR_CODE_NO_ERROR);
236823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_PICKER_DISAPPEAR_TEXT_STYLE), ARKUI_ERROR_CODE_NO_ERROR);
236923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_PICKER_TEXT_STYLE), ARKUI_ERROR_CODE_NO_ERROR);
237023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_PICKER_SELECTED_TEXT_STYLE), ARKUI_ERROR_CODE_NO_ERROR);
237123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_PICKER_SELECTED_INDEX), ARKUI_ERROR_CODE_NO_ERROR);
237223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_TEXT_PICKER_CAN_LOOP), ARKUI_ERROR_CODE_NO_ERROR);
237323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(
237423b3eb3cSopenharmony_ci        rootNode, NODE_TEXT_PICKER_DEFAULT_PICKER_ITEM_HEIGHT), ARKUI_ERROR_CODE_NO_ERROR);
237523b3eb3cSopenharmony_ci
237623b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_PICKER_OPTION_RANGE), nullptr);
237723b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_PICKER_OPTION_SELECTED), nullptr);
237823b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_PICKER_OPTION_VALUE), nullptr);
237923b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_PICKER_DISAPPEAR_TEXT_STYLE), nullptr);
238023b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_PICKER_TEXT_STYLE), nullptr);
238123b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_PICKER_SELECTED_TEXT_STYLE), nullptr);
238223b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_PICKER_SELECTED_INDEX), nullptr);
238323b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_PICKER_CAN_LOOP), nullptr);
238423b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_TEXT_PICKER_DEFAULT_PICKER_ITEM_HEIGHT), nullptr);
238523b3eb3cSopenharmony_ci    nodeAPI->disposeNode(rootNode);
238623b3eb3cSopenharmony_ci}
238723b3eb3cSopenharmony_ci
238823b3eb3cSopenharmony_ci/**
238923b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest023
239023b3eb3cSopenharmony_ci * @tc.desc: Test calendarPickerNode function.
239123b3eb3cSopenharmony_ci * @tc.type: FUNC
239223b3eb3cSopenharmony_ci */
239323b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest023, TestSize.Level1)
239423b3eb3cSopenharmony_ci{
239523b3eb3cSopenharmony_ci    auto nodeAPI = reinterpret_cast<ArkUI_NativeNodeAPI_1*>(
239623b3eb3cSopenharmony_ci        OH_ArkUI_QueryModuleInterfaceByName(ARKUI_NATIVE_NODE, "ArkUI_NativeNodeAPI_1"));
239723b3eb3cSopenharmony_ci    auto rootNode = new ArkUI_Node({ARKUI_NODE_CALENDAR_PICKER, nullptr});
239823b3eb3cSopenharmony_ci    float offset = 10.0f;
239923b3eb3cSopenharmony_ci    ArkUI_NumberValue value[] = {{.f32 = offset}};
240023b3eb3cSopenharmony_ci    ArkUI_AttributeItem item = {value, sizeof(value) / sizeof(ArkUI_NumberValue), nullptr, nullptr};
240123b3eb3cSopenharmony_ci    ArkUI_NumberValue value3[] = {{.u32 = 2024}, {.u32 = 1}, {.u32 = 1}};
240223b3eb3cSopenharmony_ci    ArkUI_AttributeItem item3 = {value3, sizeof(value3) / sizeof(ArkUI_NumberValue), nullptr, nullptr};
240323b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_CALENDAR_PICKER_HINT_RADIUS, &item);
240423b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_CALENDAR_PICKER_SELECTED_DATE, &item3);
240523b3eb3cSopenharmony_ci
240623b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_CALENDAR_ALIGNMENT_START;
240723b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_CALENDAR_PICKER_EDGE_ALIGNMENT, &item);
240823b3eb3cSopenharmony_ci    value3[0].i32 = ARKUI_CALENDAR_ALIGNMENT_START;
240923b3eb3cSopenharmony_ci    value3[1].f32 = offset;
241023b3eb3cSopenharmony_ci    value3[2].f32 = offset;
241123b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_CALENDAR_PICKER_EDGE_ALIGNMENT, &item3);
241223b3eb3cSopenharmony_ci    value3[0].u32 = 0xFFFF0000;
241323b3eb3cSopenharmony_ci    value3[1].f32 = offset;
241423b3eb3cSopenharmony_ci    value3[2].i32 = ARKUI_FONT_WEIGHT_NORMAL;
241523b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_CALENDAR_PICKER_TEXT_STYLE, &item3);
241623b3eb3cSopenharmony_ci    item3.size = -1;
241723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_CALENDAR_PICKER_TEXT_STYLE, &item3), ARKUI_ERROR_CODE_PARAM_INVALID);
241823b3eb3cSopenharmony_ci
241923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_CALENDAR_PICKER_HINT_RADIUS), ARKUI_ERROR_CODE_NO_ERROR);
242023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_CALENDAR_PICKER_SELECTED_DATE), ARKUI_ERROR_CODE_NO_ERROR);
242123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_CALENDAR_PICKER_EDGE_ALIGNMENT), ARKUI_ERROR_CODE_NO_ERROR);
242223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_CALENDAR_PICKER_TEXT_STYLE), ARKUI_ERROR_CODE_NO_ERROR);
242323b3eb3cSopenharmony_ci
242423b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_CALENDAR_PICKER_HINT_RADIUS), nullptr);
242523b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_CALENDAR_PICKER_SELECTED_DATE), nullptr);
242623b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_CALENDAR_PICKER_EDGE_ALIGNMENT), nullptr);
242723b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_CALENDAR_PICKER_TEXT_STYLE), nullptr);
242823b3eb3cSopenharmony_ci    nodeAPI->disposeNode(rootNode);
242923b3eb3cSopenharmony_ci}
243023b3eb3cSopenharmony_ci
243123b3eb3cSopenharmony_ci/**
243223b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest024
243323b3eb3cSopenharmony_ci * @tc.desc: Test sliderNode function.
243423b3eb3cSopenharmony_ci * @tc.type: FUNC
243523b3eb3cSopenharmony_ci */
243623b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest024, TestSize.Level1)
243723b3eb3cSopenharmony_ci{
243823b3eb3cSopenharmony_ci    auto nodeAPI = reinterpret_cast<ArkUI_NativeNodeAPI_1*>(
243923b3eb3cSopenharmony_ci        OH_ArkUI_QueryModuleInterfaceByName(ARKUI_NATIVE_NODE, "ArkUI_NativeNodeAPI_1"));
244023b3eb3cSopenharmony_ci    auto rootNode = nodeAPI->createNode(ARKUI_NODE_SLIDER);
244123b3eb3cSopenharmony_ci    ASSERT_NE(rootNode, nullptr);
244223b3eb3cSopenharmony_ci    uint32_t color = 0xFFFF0000;
244323b3eb3cSopenharmony_ci    float size = 10.0f;
244423b3eb3cSopenharmony_ci    ArkUI_NumberValue value[] = {{.u32 = color}};
244523b3eb3cSopenharmony_ci    ArkUI_AttributeItem item = {value, sizeof(value) / sizeof(ArkUI_NumberValue), nullptr, nullptr};
244623b3eb3cSopenharmony_ci    ArkUI_NumberValue blockStyle[] = {{.i32 = ARKUI_SLIDER_BLOCK_STYLE_IMAGE }, {.i32 = ARKUI_CLIP_TYPE_PATH},
244723b3eb3cSopenharmony_ci        {.f32 = size}, {.f32 = size}, {.f32 = size}};
244823b3eb3cSopenharmony_ci    ArkUI_AttributeItem blockStyleItem = {blockStyle, sizeof(blockStyle) / sizeof(ArkUI_NumberValue), "test", nullptr};
244923b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SLIDER_BLOCK_COLOR, &item);
245023b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SLIDER_TRACK_COLOR, &item);
245123b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SLIDER_SELECTED_COLOR, &item);
245223b3eb3cSopenharmony_ci    value[0].i32 = true;
245323b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SLIDER_SHOW_STEPS, &item);
245423b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SLIDER_REVERSE, &item);
245523b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_SLIDER_DIRECTION_VERTICAL;
245623b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SLIDER_DIRECTION, &item);
245723b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_SLIDER_STYLE_OUT_SET;
245823b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SLIDER_STYLE, &item);
245923b3eb3cSopenharmony_ci    value[0].f32 = size;
246023b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SLIDER_VALUE, &item);
246123b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SLIDER_MIN_VALUE, &item);
246223b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SLIDER_MAX_VALUE, &item);
246323b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SLIDER_STEP, &item);
246423b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SLIDER_TRACK_THICKNESS, &item);
246523b3eb3cSopenharmony_ci
246623b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SLIDER_BLOCK_STYLE, &blockStyleItem);
246723b3eb3cSopenharmony_ci    blockStyle[0].i32 = ARKUI_SLIDER_BLOCK_STYLE_SHAPE;
246823b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SLIDER_BLOCK_STYLE, &blockStyleItem);
246923b3eb3cSopenharmony_ci    blockStyle[1].i32 = ARKUI_CLIP_TYPE_RECTANGLE;
247023b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SLIDER_BLOCK_STYLE, &blockStyleItem);
247123b3eb3cSopenharmony_ci    blockStyle[0].i32 = ARKUI_SLIDER_BLOCK_STYLE_DEFAULT;
247223b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SLIDER_BLOCK_STYLE, &blockStyleItem);
247323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_SLIDER_BLOCK_COLOR), ARKUI_ERROR_CODE_NO_ERROR);
247423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_SLIDER_TRACK_COLOR), ARKUI_ERROR_CODE_NO_ERROR);
247523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_SLIDER_SELECTED_COLOR), ARKUI_ERROR_CODE_NO_ERROR);
247623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_SLIDER_SHOW_STEPS), ARKUI_ERROR_CODE_NO_ERROR);
247723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_SLIDER_BLOCK_STYLE), ARKUI_ERROR_CODE_NO_ERROR);
247823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_SLIDER_VALUE), ARKUI_ERROR_CODE_NO_ERROR);
247923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_SLIDER_MIN_VALUE), ARKUI_ERROR_CODE_NO_ERROR);
248023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_SLIDER_MAX_VALUE), ARKUI_ERROR_CODE_NO_ERROR);
248123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_SLIDER_STEP), ARKUI_ERROR_CODE_NO_ERROR);
248223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_SLIDER_DIRECTION), ARKUI_ERROR_CODE_NO_ERROR);
248323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_SLIDER_REVERSE), ARKUI_ERROR_CODE_NO_ERROR);
248423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_SLIDER_STYLE), ARKUI_ERROR_CODE_NO_ERROR);
248523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_SLIDER_TRACK_THICKNESS), ARKUI_ERROR_CODE_NO_ERROR);
248623b3eb3cSopenharmony_ci
248723b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_SLIDER_BLOCK_COLOR), nullptr);
248823b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_SLIDER_TRACK_COLOR), nullptr);
248923b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_SLIDER_SELECTED_COLOR), nullptr);
249023b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_SLIDER_SHOW_STEPS), nullptr);
249123b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_SLIDER_BLOCK_STYLE), nullptr);
249223b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_SLIDER_VALUE), nullptr);
249323b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_SLIDER_MIN_VALUE), nullptr);
249423b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_SLIDER_MAX_VALUE), nullptr);
249523b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_SLIDER_STEP), nullptr);
249623b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_SLIDER_DIRECTION), nullptr);
249723b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_SLIDER_REVERSE), nullptr);
249823b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_SLIDER_STYLE), nullptr);
249923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->getAttribute(rootNode, NODE_SLIDER_TRACK_THICKNESS), nullptr);
250023b3eb3cSopenharmony_ci    nodeAPI->disposeNode(rootNode);
250123b3eb3cSopenharmony_ci}
250223b3eb3cSopenharmony_ci
250323b3eb3cSopenharmony_ci/**
250423b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest025
250523b3eb3cSopenharmony_ci * @tc.desc: Test radioNode function.
250623b3eb3cSopenharmony_ci * @tc.type: FUNC
250723b3eb3cSopenharmony_ci */
250823b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest025, TestSize.Level1)
250923b3eb3cSopenharmony_ci{
251023b3eb3cSopenharmony_ci    auto nodeAPI = reinterpret_cast<ArkUI_NativeNodeAPI_1*>(
251123b3eb3cSopenharmony_ci        OH_ArkUI_QueryModuleInterfaceByName(ARKUI_NATIVE_NODE, "ArkUI_NativeNodeAPI_1"));
251223b3eb3cSopenharmony_ci    auto rootNode = nodeAPI->createNode(ARKUI_NODE_RADIO);
251323b3eb3cSopenharmony_ci    ASSERT_NE(rootNode, nullptr);
251423b3eb3cSopenharmony_ci    uint32_t color = 0xFFFF0000;
251523b3eb3cSopenharmony_ci    ArkUI_NumberValue value[] = {{.i32 = true}};
251623b3eb3cSopenharmony_ci    ArkUI_AttributeItem item = {value, sizeof(value) / sizeof(ArkUI_NumberValue), nullptr, nullptr};
251723b3eb3cSopenharmony_ci    ArkUI_NumberValue style[] = {{.u32 = color}, {.u32 = color}, {.u32 = color}};
251823b3eb3cSopenharmony_ci    ArkUI_AttributeItem styleItem = {style, sizeof(style) / sizeof(ArkUI_NumberValue), nullptr, nullptr};
251923b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_RADIO_CHECKED, &item);
252023b3eb3cSopenharmony_ci    item.string = "test";
252123b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_RADIO_VALUE, &item);
252223b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_RADIO_GROUP, &item);
252323b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_RADIO_STYLE, &styleItem);
252423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_RADIO_CHECKED), ARKUI_ERROR_CODE_NO_ERROR);
252523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_RADIO_STYLE), ARKUI_ERROR_CODE_NO_ERROR);
252623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_RADIO_VALUE), ARKUI_ERROR_CODE_NO_ERROR);
252723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_RADIO_GROUP), ARKUI_ERROR_CODE_NO_ERROR);
252823b3eb3cSopenharmony_ci
252923b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_RADIO_CHECKED), nullptr);
253023b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_RADIO_STYLE), nullptr);
253123b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_RADIO_VALUE), nullptr);
253223b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_RADIO_GROUP), nullptr);
253323b3eb3cSopenharmony_ci    nodeAPI->disposeNode(rootNode);
253423b3eb3cSopenharmony_ci}
253523b3eb3cSopenharmony_ci
253623b3eb3cSopenharmony_ci/**
253723b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest026
253823b3eb3cSopenharmony_ci * @tc.desc: Test scrollNode function.
253923b3eb3cSopenharmony_ci * @tc.type: FUNC
254023b3eb3cSopenharmony_ci */
254123b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest026, TestSize.Level1)
254223b3eb3cSopenharmony_ci{
254323b3eb3cSopenharmony_ci    auto nodeAPI = reinterpret_cast<ArkUI_NativeNodeAPI_1*>(
254423b3eb3cSopenharmony_ci        OH_ArkUI_QueryModuleInterfaceByName(ARKUI_NATIVE_NODE, "ArkUI_NativeNodeAPI_1"));
254523b3eb3cSopenharmony_ci    auto rootNode = nodeAPI->createNode(ARKUI_NODE_SCROLL);
254623b3eb3cSopenharmony_ci    ASSERT_NE(rootNode, nullptr);
254723b3eb3cSopenharmony_ci    float distance = 10.0f;
254823b3eb3cSopenharmony_ci    uint32_t color = 0xFFFF0000;
254923b3eb3cSopenharmony_ci    ArkUI_NumberValue value[] = {{.f32 = distance}};
255023b3eb3cSopenharmony_ci    ArkUI_AttributeItem item = {value, sizeof(value) / sizeof(ArkUI_NumberValue)};
255123b3eb3cSopenharmony_ci    ArkUI_NumberValue value2[] = {{.i32 = true}, {.i32 = true}};
255223b3eb3cSopenharmony_ci    ArkUI_AttributeItem item2 = {value2, sizeof(value2) / sizeof(ArkUI_NumberValue)};
255323b3eb3cSopenharmony_ci    ArkUI_NumberValue scrollsnap[] = {{.i32 = ARKUI_SCROLL_SNAP_ALIGN_NONE}, {.i32 = true}, {.i32 = true},
255423b3eb3cSopenharmony_ci        {.f32 = distance}};
255523b3eb3cSopenharmony_ci    ArkUI_AttributeItem scrollsnapItem = {scrollsnap, sizeof(scrollsnap) / sizeof(ArkUI_NumberValue)};
255623b3eb3cSopenharmony_ci    ArkUI_NumberValue scrollnested[] = {{.i32 = ARKUI_SCROLL_NESTED_MODE_SELF_ONLY},
255723b3eb3cSopenharmony_ci        {.i32 = ARKUI_SCROLL_NESTED_MODE_SELF_ONLY}};
255823b3eb3cSopenharmony_ci    ArkUI_AttributeItem scrollnestedItem = {scrollnested, sizeof(scrollnested) / sizeof(ArkUI_NumberValue)};
255923b3eb3cSopenharmony_ci    ArkUI_NumberValue scrolloffset[] = {{.f32 = distance}, {.f32 = distance}, { .i32 = 1000},
256023b3eb3cSopenharmony_ci        {.i32 = ARKUI_CURVE_LINEAR}, {.i32 = true}};
256123b3eb3cSopenharmony_ci    ArkUI_AttributeItem scrolloffsetItem = {scrolloffset, sizeof(scrolloffset) / sizeof(ArkUI_NumberValue)};
256223b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SCROLL_FRICTION, &item);
256323b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SCROLL_BAR_WIDTH, &item);
256423b3eb3cSopenharmony_ci
256523b3eb3cSopenharmony_ci    value[0].u32 = color;
256623b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SCROLL_BAR_COLOR, &item);
256723b3eb3cSopenharmony_ci
256823b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_SCROLL_BAR_DISPLAY_MODE_AUTO;
256923b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SCROLL_BAR_DISPLAY_MODE, &item);
257023b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_SCROLL_DIRECTION_VERTICAL;
257123b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SCROLL_SCROLL_DIRECTION, &item);
257223b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_EDGE_EFFECT_NONE;
257323b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SCROLL_EDGE_EFFECT, &item);
257423b3eb3cSopenharmony_ci    value[0].i32 = true;
257523b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SCROLL_ENABLE_SCROLL_INTERACTION, &item);
257623b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SCROLL_ENABLE_PAGING, &item);
257723b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SCROLL_PAGE, &item);
257823b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_SCROLL_EDGE_TOP;
257923b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SCROLL_EDGE, &item);
258023b3eb3cSopenharmony_ci
258123b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SCROLL_SNAP, &scrollsnapItem);
258223b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SCROLL_NESTED_SCROLL, &scrollnestedItem);
258323b3eb3cSopenharmony_ci    scrolloffsetItem.size = 2;
258423b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SCROLL_OFFSET, &scrolloffsetItem);
258523b3eb3cSopenharmony_ci    scrolloffsetItem.size = sizeof(scrolloffset) / sizeof(ArkUI_NumberValue);
258623b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SCROLL_OFFSET, &scrolloffsetItem);
258723b3eb3cSopenharmony_ci    scrolloffset[3].i32 = -1;
258823b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SCROLL_OFFSET, &scrolloffsetItem);
258923b3eb3cSopenharmony_ci
259023b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SCROLL_PAGE, &item2);
259123b3eb3cSopenharmony_ci    value2[1].i32 = -1;
259223b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SCROLL_PAGE, &item2);
259323b3eb3cSopenharmony_ci
259423b3eb3cSopenharmony_ci    value2[0].f32 = distance;
259523b3eb3cSopenharmony_ci    value2[1].f32 = distance;
259623b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SCROLL_BY, &item2);
259723b3eb3cSopenharmony_ci    nodeAPI->setLengthMetricUnit(rootNode, ARKUI_LENGTH_METRIC_UNIT_PX);
259823b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SCROLL_BY, &item2);
259923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_SCROLL_BAR_DISPLAY_MODE), ARKUI_ERROR_CODE_NO_ERROR);
260023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_SCROLL_BAR_WIDTH), ARKUI_ERROR_CODE_NO_ERROR);
260123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_SCROLL_BAR_COLOR), ARKUI_ERROR_CODE_NO_ERROR);
260223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_SCROLL_SCROLL_DIRECTION), ARKUI_ERROR_CODE_NO_ERROR);
260323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_SCROLL_EDGE_EFFECT), ARKUI_ERROR_CODE_NO_ERROR);
260423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_SCROLL_ENABLE_SCROLL_INTERACTION), ARKUI_ERROR_CODE_NO_ERROR);
260523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_SCROLL_FRICTION), ARKUI_ERROR_CODE_NO_ERROR);
260623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_SCROLL_SNAP), ARKUI_ERROR_CODE_NO_ERROR);
260723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_SCROLL_NESTED_SCROLL), ARKUI_ERROR_CODE_NO_ERROR);
260823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_SCROLL_OFFSET), ARKUI_ERROR_CODE_NO_ERROR);
260923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_SCROLL_EDGE), ARKUI_ERROR_CODE_NO_ERROR);
261023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_SCROLL_ENABLE_PAGING), ARKUI_ERROR_CODE_NO_ERROR);
261123b3eb3cSopenharmony_ci
261223b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_SCROLL_BAR_DISPLAY_MODE), nullptr);
261323b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_SCROLL_BAR_WIDTH), nullptr);
261423b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_SCROLL_BAR_COLOR), nullptr);
261523b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_SCROLL_SCROLL_DIRECTION), nullptr);
261623b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_SCROLL_EDGE_EFFECT), nullptr);
261723b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_SCROLL_ENABLE_SCROLL_INTERACTION), nullptr);
261823b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_SCROLL_FRICTION), nullptr);
261923b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_SCROLL_SNAP), nullptr);
262023b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_SCROLL_NESTED_SCROLL), nullptr);
262123b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_SCROLL_OFFSET), nullptr);
262223b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_SCROLL_EDGE), nullptr);
262323b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_SCROLL_ENABLE_PAGING), nullptr);
262423b3eb3cSopenharmony_ci    nodeAPI->disposeNode(rootNode);
262523b3eb3cSopenharmony_ci}
262623b3eb3cSopenharmony_ci
262723b3eb3cSopenharmony_ci/**
262823b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest027
262923b3eb3cSopenharmony_ci * @tc.desc: Test listNode function.
263023b3eb3cSopenharmony_ci * @tc.type: FUNC
263123b3eb3cSopenharmony_ci */
263223b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest027, TestSize.Level1)
263323b3eb3cSopenharmony_ci{
263423b3eb3cSopenharmony_ci    auto nodeAPI = reinterpret_cast<ArkUI_NativeNodeAPI_1*>(
263523b3eb3cSopenharmony_ci        OH_ArkUI_QueryModuleInterfaceByName(ARKUI_NATIVE_NODE, "ArkUI_NativeNodeAPI_1"));
263623b3eb3cSopenharmony_ci    auto rootNode = new ArkUI_Node({ARKUI_NODE_LIST, nullptr});
263723b3eb3cSopenharmony_ci    auto childNode = new ArkUI_Node({ARKUI_NODE_LIST_ITEM, nullptr});
263823b3eb3cSopenharmony_ci    auto groupNode = new ArkUI_Node({ARKUI_NODE_LIST_ITEM_GROUP, nullptr});
263923b3eb3cSopenharmony_ci
264023b3eb3cSopenharmony_ci    float distance = 10.0f;
264123b3eb3cSopenharmony_ci    uint32_t color = 0xFFFF0000;
264223b3eb3cSopenharmony_ci    ArkUI_NumberValue value[] = {{.f32 = distance}};
264323b3eb3cSopenharmony_ci    ArkUI_AttributeItem item = {value, sizeof(value) / sizeof(ArkUI_NumberValue)};
264423b3eb3cSopenharmony_ci    ArkUI_NumberValue value2[] = {{.f32 = distance}, {.f32 = distance}};
264523b3eb3cSopenharmony_ci    ArkUI_AttributeItem item2 = {value2, sizeof(value2) / sizeof(ArkUI_NumberValue)};
264623b3eb3cSopenharmony_ci    ArkUI_NumberValue scrollnested[] = {{.i32 = ARKUI_SCROLL_NESTED_MODE_SELF_ONLY},
264723b3eb3cSopenharmony_ci        {.i32 = ARKUI_SCROLL_NESTED_MODE_SELF_ONLY}};
264823b3eb3cSopenharmony_ci    ArkUI_AttributeItem scrollnestedItem = {scrollnested, sizeof(scrollnested) / sizeof(ArkUI_NumberValue)};
264923b3eb3cSopenharmony_ci    ArkUI_NumberValue scrollToIndex[] = {{.i32 = 0}, {.i32 = 1}, {.i32 = ARKUI_SCROLL_ALIGNMENT_START}};
265023b3eb3cSopenharmony_ci    ArkUI_AttributeItem scrollToIndexItem = {scrollToIndex, sizeof(scrollToIndex) / sizeof(ArkUI_NumberValue)};
265123b3eb3cSopenharmony_ci    ArkUI_NumberValue divider[] = {{.u32 = color}, {.f32 = distance}, {.f32 = distance}, {.f32 = distance}};
265223b3eb3cSopenharmony_ci    ArkUI_AttributeItem dividerItem = {divider, sizeof(divider) / sizeof(ArkUI_NumberValue)};
265323b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SCROLL_FRICTION, &item);
265423b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SCROLL_BAR_WIDTH, &item);
265523b3eb3cSopenharmony_ci    value[0].u32 = color;
265623b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SCROLL_BAR_COLOR, &item);
265723b3eb3cSopenharmony_ci
265823b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_SCROLL_BAR_DISPLAY_MODE_AUTO;
265923b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SCROLL_BAR_DISPLAY_MODE, &item);
266023b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_EDGE_EFFECT_NONE;
266123b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SCROLL_EDGE_EFFECT, &item);
266223b3eb3cSopenharmony_ci    value[0].i32 = true;
266323b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SCROLL_ENABLE_SCROLL_INTERACTION, &item);
266423b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_AXIS_VERTICAL;
266523b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_LIST_DIRECTION, &item);
266623b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_STICKY_STYLE_NONE;
266723b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_LIST_STICKY, &item);
266823b3eb3cSopenharmony_ci    value[0].i32 = 1;
266923b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_LIST_SPACE, &item);
267023b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_LIST_CACHED_COUNT, &item);
267123b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_LIST_ITEM_ALIGNMENT_START;
267223b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_LIST_ALIGN_LIST_ITEM, &item);
267323b3eb3cSopenharmony_ci    value[0].i32 = 0;
267423b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_LIST_SCROLL_TO_INDEX, &item);
267523b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_LIST_INITIAL_INDEX, &item);
267623b3eb3cSopenharmony_ci    item.object = rootNode;
267723b3eb3cSopenharmony_ci    nodeAPI->setAttribute(groupNode, NODE_LIST_ITEM_GROUP_SET_HEADER, &item);
267823b3eb3cSopenharmony_ci    nodeAPI->setAttribute(groupNode, NODE_LIST_ITEM_GROUP_SET_FOOTER, &item);
267923b3eb3cSopenharmony_ci
268023b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SCROLL_NESTED_SCROLL, &scrollnestedItem);
268123b3eb3cSopenharmony_ci
268223b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_LIST_SCROLL_TO_INDEX, &scrollToIndexItem);
268323b3eb3cSopenharmony_ci    scrollToIndex[2].i32 = ARKUI_SCROLL_ALIGNMENT_NONE;
268423b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_LIST_SCROLL_TO_INDEX, &scrollToIndexItem);
268523b3eb3cSopenharmony_ci
268623b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_LIST_DIVIDER, &dividerItem);
268723b3eb3cSopenharmony_ci    nodeAPI->setAttribute(groupNode, NODE_LIST_ITEM_GROUP_SET_DIVIDER, &dividerItem);
268823b3eb3cSopenharmony_ci
268923b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SCROLL_BY, &item2);
269023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_LIST_DIRECTION), ARKUI_ERROR_CODE_NO_ERROR);
269123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_LIST_STICKY), ARKUI_ERROR_CODE_NO_ERROR);
269223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_LIST_SPACE), ARKUI_ERROR_CODE_NO_ERROR);
269323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_LIST_NODE_ADAPTER), ARKUI_ERROR_CODE_NO_ERROR);
269423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_LIST_CACHED_COUNT), ARKUI_ERROR_CODE_NO_ERROR);
269523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_LIST_ALIGN_LIST_ITEM), ARKUI_ERROR_CODE_NO_ERROR);
269623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_LIST_CHILDREN_MAIN_SIZE), ARKUI_ERROR_CODE_NO_ERROR);
269723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_LIST_INITIAL_INDEX), ARKUI_ERROR_CODE_NO_ERROR);
269823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_LIST_DIVIDER), ARKUI_ERROR_CODE_NO_ERROR);
269923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_SCROLL_FRICTION), ARKUI_ERROR_CODE_NO_ERROR);
270023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_SCROLL_BAR_DISPLAY_MODE), ARKUI_ERROR_CODE_NO_ERROR);
270123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_SCROLL_BAR_WIDTH), ARKUI_ERROR_CODE_NO_ERROR);
270223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_SCROLL_BAR_COLOR), ARKUI_ERROR_CODE_NO_ERROR);
270323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_SCROLL_EDGE_EFFECT), ARKUI_ERROR_CODE_NO_ERROR);
270423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_SCROLL_ENABLE_SCROLL_INTERACTION), ARKUI_ERROR_CODE_NO_ERROR);
270523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_SCROLL_NESTED_SCROLL), ARKUI_ERROR_CODE_NO_ERROR);
270623b3eb3cSopenharmony_ci
270723b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_LIST_DIRECTION), nullptr);
270823b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_LIST_STICKY), nullptr);
270923b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_LIST_SPACE), nullptr);
271023b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_LIST_NODE_ADAPTER), nullptr);
271123b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_LIST_CACHED_COUNT), nullptr);
271223b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_LIST_ALIGN_LIST_ITEM), nullptr);
271323b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_LIST_INITIAL_INDEX), nullptr);
271423b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_LIST_DIVIDER), nullptr);
271523b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_SCROLL_FRICTION), nullptr);
271623b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_SCROLL_BAR_DISPLAY_MODE), nullptr);
271723b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_SCROLL_BAR_WIDTH), nullptr);
271823b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_SCROLL_BAR_COLOR), nullptr);
271923b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_SCROLL_EDGE_EFFECT), nullptr);
272023b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_SCROLL_ENABLE_SCROLL_INTERACTION), nullptr);
272123b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_SCROLL_NESTED_SCROLL), nullptr);
272223b3eb3cSopenharmony_ci
272323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(childNode, NODE_LIST_ITEM_SWIPE_ACTION), ARKUI_ERROR_CODE_NO_ERROR);
272423b3eb3cSopenharmony_ci
272523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(groupNode, NODE_LIST_ITEM_GROUP_SET_HEADER), ARKUI_ERROR_CODE_NO_ERROR);
272623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(groupNode, NODE_LIST_ITEM_GROUP_SET_FOOTER), ARKUI_ERROR_CODE_NO_ERROR);
272723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(groupNode, NODE_LIST_ITEM_GROUP_SET_DIVIDER), ARKUI_ERROR_CODE_NO_ERROR);
272823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(groupNode, NODE_LIST_ITEM_GROUP_CHILDREN_MAIN_SIZE), ARKUI_ERROR_CODE_NO_ERROR);
272923b3eb3cSopenharmony_ci
273023b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(groupNode, NODE_LIST_ITEM_GROUP_SET_DIVIDER), nullptr);
273123b3eb3cSopenharmony_ci
273223b3eb3cSopenharmony_ci    nodeAPI->disposeNode(rootNode);
273323b3eb3cSopenharmony_ci    nodeAPI->disposeNode(childNode);
273423b3eb3cSopenharmony_ci    nodeAPI->disposeNode(groupNode);
273523b3eb3cSopenharmony_ci}
273623b3eb3cSopenharmony_ci
273723b3eb3cSopenharmony_ci/**
273823b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest028
273923b3eb3cSopenharmony_ci * @tc.desc: Test swiperNode function.
274023b3eb3cSopenharmony_ci * @tc.type: FUNC
274123b3eb3cSopenharmony_ci */
274223b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest028, TestSize.Level1)
274323b3eb3cSopenharmony_ci{
274423b3eb3cSopenharmony_ci    auto nodeAPI = reinterpret_cast<ArkUI_NativeNodeAPI_1*>(
274523b3eb3cSopenharmony_ci        OH_ArkUI_QueryModuleInterfaceByName(ARKUI_NATIVE_NODE, "ArkUI_NativeNodeAPI_1"));
274623b3eb3cSopenharmony_ci    auto rootNode = new ArkUI_Node({ARKUI_NODE_SWIPER, nullptr});
274723b3eb3cSopenharmony_ci    ArkUI_NumberValue value[] = {{.i32 = ARKUI_CURVE_LINEAR}};
274823b3eb3cSopenharmony_ci    ArkUI_AttributeItem item = {value, sizeof(value) / sizeof(ArkUI_NumberValue), nullptr, nullptr};
274923b3eb3cSopenharmony_ci    ArkUI_NumberValue value2[] = {{.i32 = 1}, {.i32 = 1}};
275023b3eb3cSopenharmony_ci    ArkUI_AttributeItem item2 = {value2, sizeof(value2) / sizeof(ArkUI_NumberValue), nullptr, nullptr};
275123b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SWIPER_CURVE, &item);
275223b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_CURVE_EASE;
275323b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SWIPER_CURVE, &item);
275423b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_CURVE_EASE_IN;
275523b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SWIPER_CURVE, &item);
275623b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_CURVE_EASE_OUT;
275723b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SWIPER_CURVE, &item);
275823b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_CURVE_EASE_IN_OUT;
275923b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SWIPER_CURVE, &item);
276023b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_CURVE_FAST_OUT_SLOW_IN;
276123b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SWIPER_CURVE, &item);
276223b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_CURVE_LINEAR_OUT_SLOW_IN;
276323b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SWIPER_CURVE, &item);
276423b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_CURVE_FAST_OUT_LINEAR_IN;
276523b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SWIPER_CURVE, &item);
276623b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_CURVE_EXTREME_DECELERATION;
276723b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SWIPER_CURVE, &item);
276823b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_CURVE_SHARP;
276923b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SWIPER_CURVE, &item);
277023b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_CURVE_RHYTHM;
277123b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SWIPER_CURVE, &item);
277223b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_CURVE_SMOOTH;
277323b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SWIPER_CURVE, &item);
277423b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_CURVE_FRICTION;
277523b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SWIPER_CURVE, &item);
277623b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_SWIPER_ARROW_HIDE;
277723b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SWIPER_SHOW_DISPLAY_ARROW, &item);
277823b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_SWIPER_ARROW_SHOW_ON_HOVER;
277923b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SWIPER_SHOW_DISPLAY_ARROW, &item);
278023b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_EDGE_EFFECT_SPRING;
278123b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SWIPER_EDGE_EFFECT_MODE, &item);
278223b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_SWIPER_NESTED_SRCOLL_SELF_ONLY;
278323b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SWIPER_NESTED_SCROLL, &item);
278423b3eb3cSopenharmony_ci    value[0].i32 = true;
278523b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SWIPER_LOOP, &item);
278623b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SWIPER_AUTO_PLAY, &item);
278723b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SWIPER_SHOW_INDICATOR, &item);
278823b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SWIPER_VERTICAL, &item);
278923b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SWIPER_INDEX, &item);
279023b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SWIPER_DISPLAY_COUNT, &item);
279123b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SWIPER_DISABLE_SWIPE, &item);
279223b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SWIPER_CACHED_COUNT, &item);
279323b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SWIPER_SWIPE_TO_INDEX, &item);
279423b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SWIPER_INDICATOR_INTERACTIVE, &item);
279523b3eb3cSopenharmony_ci
279623b3eb3cSopenharmony_ci    value[0].f32 = 10.0f;
279723b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SWIPER_INTERVAL, &item);
279823b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SWIPER_DURATION, &item);
279923b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SWIPER_ITEM_SPACE, &item);
280023b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SWIPER_PREV_MARGIN, &item);
280123b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SWIPER_NEXT_MARGIN, &item);
280223b3eb3cSopenharmony_ci
280323b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SWIPER_SWIPE_TO_INDEX, &item2);
280423b3eb3cSopenharmony_ci    value2[1].i32 = -1;
280523b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SWIPER_SWIPE_TO_INDEX, &item2);
280623b3eb3cSopenharmony_ci
280723b3eb3cSopenharmony_ci    value2[0].f32 = 10.0f;
280823b3eb3cSopenharmony_ci    value2[1].i32 = 1;
280923b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SWIPER_PREV_MARGIN, &item);
281023b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SWIPER_NEXT_MARGIN, &item);
281123b3eb3cSopenharmony_ci    value2[1].i32 = -1;
281223b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SWIPER_PREV_MARGIN, &item);
281323b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SWIPER_NEXT_MARGIN, &item);
281423b3eb3cSopenharmony_ci
281523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_SWIPER_LOOP), ARKUI_ERROR_CODE_NO_ERROR);
281623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_SWIPER_AUTO_PLAY), ARKUI_ERROR_CODE_NO_ERROR);
281723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_SWIPER_SHOW_INDICATOR), ARKUI_ERROR_CODE_NO_ERROR);
281823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_SWIPER_INTERVAL), ARKUI_ERROR_CODE_NO_ERROR);
281923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_SWIPER_VERTICAL), ARKUI_ERROR_CODE_NO_ERROR);
282023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_SWIPER_DURATION), ARKUI_ERROR_CODE_NO_ERROR);
282123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_SWIPER_CURVE), ARKUI_ERROR_CODE_NO_ERROR);
282223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_SWIPER_ITEM_SPACE), ARKUI_ERROR_CODE_NO_ERROR);
282323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_SWIPER_INDEX), ARKUI_ERROR_CODE_NO_ERROR);
282423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_SWIPER_DISPLAY_COUNT), ARKUI_ERROR_CODE_NO_ERROR);
282523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_SWIPER_DISABLE_SWIPE), ARKUI_ERROR_CODE_NO_ERROR);
282623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_SWIPER_SHOW_DISPLAY_ARROW), ARKUI_ERROR_CODE_NO_ERROR);
282723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_SWIPER_EDGE_EFFECT_MODE), ARKUI_ERROR_CODE_NO_ERROR);
282823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_SWIPER_NODE_ADAPTER), ARKUI_ERROR_CODE_NO_ERROR);
282923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_SWIPER_CACHED_COUNT), ARKUI_ERROR_CODE_NO_ERROR);
283023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_SWIPER_PREV_MARGIN), ARKUI_ERROR_CODE_NO_ERROR);
283123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_SWIPER_NEXT_MARGIN), ARKUI_ERROR_CODE_NO_ERROR);
283223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_SWIPER_INDICATOR), ARKUI_ERROR_CODE_NO_ERROR);
283323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_SWIPER_NESTED_SCROLL), ARKUI_ERROR_CODE_NO_ERROR);
283423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_SWIPER_INDICATOR_INTERACTIVE), ARKUI_ERROR_CODE_NO_ERROR);
283523b3eb3cSopenharmony_ci
283623b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_SWIPER_LOOP), nullptr);
283723b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_SWIPER_AUTO_PLAY), nullptr);
283823b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_SWIPER_SHOW_INDICATOR), nullptr);
283923b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_SWIPER_INTERVAL), nullptr);
284023b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_SWIPER_VERTICAL), nullptr);
284123b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_SWIPER_DURATION), nullptr);
284223b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_SWIPER_CURVE), nullptr);
284323b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_SWIPER_ITEM_SPACE), nullptr);
284423b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_SWIPER_INDEX), nullptr);
284523b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_SWIPER_DISPLAY_COUNT), nullptr);
284623b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_SWIPER_DISABLE_SWIPE), nullptr);
284723b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_SWIPER_SHOW_DISPLAY_ARROW), nullptr);
284823b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_SWIPER_EDGE_EFFECT_MODE), nullptr);
284923b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_SWIPER_NODE_ADAPTER), nullptr);
285023b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_SWIPER_CACHED_COUNT), nullptr);
285123b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_SWIPER_PREV_MARGIN), nullptr);
285223b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_SWIPER_NEXT_MARGIN), nullptr);
285323b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_SWIPER_INDICATOR), nullptr);
285423b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_SWIPER_NESTED_SCROLL), nullptr);
285523b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_SWIPER_INDICATOR_INTERACTIVE), nullptr);
285623b3eb3cSopenharmony_ci    nodeAPI->disposeNode(rootNode);
285723b3eb3cSopenharmony_ci}
285823b3eb3cSopenharmony_ci
285923b3eb3cSopenharmony_ci/**
286023b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest029
286123b3eb3cSopenharmony_ci * @tc.desc: Test columnNode function.
286223b3eb3cSopenharmony_ci * @tc.type: FUNC
286323b3eb3cSopenharmony_ci */
286423b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest029, TestSize.Level1)
286523b3eb3cSopenharmony_ci{
286623b3eb3cSopenharmony_ci    auto nodeAPI = reinterpret_cast<ArkUI_NativeNodeAPI_1*>(
286723b3eb3cSopenharmony_ci        OH_ArkUI_QueryModuleInterfaceByName(ARKUI_NATIVE_NODE, "ArkUI_NativeNodeAPI_1"));
286823b3eb3cSopenharmony_ci    auto rootNode = nodeAPI->createNode(ARKUI_NODE_COLUMN);
286923b3eb3cSopenharmony_ci    ASSERT_NE(rootNode, nullptr);
287023b3eb3cSopenharmony_ci    ArkUI_NumberValue value[] = {{.i32 = ARKUI_HORIZONTAL_ALIGNMENT_CENTER}};
287123b3eb3cSopenharmony_ci    ArkUI_AttributeItem item = {value, sizeof(value) / sizeof(ArkUI_NumberValue), nullptr, nullptr};
287223b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_COLUMN_ALIGN_ITEMS, &item);
287323b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_FLEX_ALIGNMENT_START;
287423b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_COLUMN_JUSTIFY_CONTENT, &item);
287523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_COLUMN_ALIGN_ITEMS), ARKUI_ERROR_CODE_NO_ERROR);
287623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_COLUMN_JUSTIFY_CONTENT), ARKUI_ERROR_CODE_NO_ERROR);
287723b3eb3cSopenharmony_ci
287823b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_COLUMN_ALIGN_ITEMS), nullptr);
287923b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_COLUMN_JUSTIFY_CONTENT), nullptr);
288023b3eb3cSopenharmony_ci    nodeAPI->disposeNode(rootNode);
288123b3eb3cSopenharmony_ci}
288223b3eb3cSopenharmony_ci
288323b3eb3cSopenharmony_ci/**
288423b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest030
288523b3eb3cSopenharmony_ci * @tc.desc: Test rowNode function.
288623b3eb3cSopenharmony_ci * @tc.type: FUNC
288723b3eb3cSopenharmony_ci */
288823b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest030, TestSize.Level1)
288923b3eb3cSopenharmony_ci{
289023b3eb3cSopenharmony_ci    auto nodeAPI = reinterpret_cast<ArkUI_NativeNodeAPI_1*>(
289123b3eb3cSopenharmony_ci        OH_ArkUI_QueryModuleInterfaceByName(ARKUI_NATIVE_NODE, "ArkUI_NativeNodeAPI_1"));
289223b3eb3cSopenharmony_ci    auto rootNode = nodeAPI->createNode(ARKUI_NODE_ROW);
289323b3eb3cSopenharmony_ci    ASSERT_NE(rootNode, nullptr);
289423b3eb3cSopenharmony_ci    ArkUI_NumberValue value[] = {{.i32 = ARKUI_VERTICAL_ALIGNMENT_CENTER}};
289523b3eb3cSopenharmony_ci    ArkUI_AttributeItem item = {value, sizeof(value) / sizeof(ArkUI_NumberValue), nullptr, nullptr};
289623b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_ROW_ALIGN_ITEMS, &item);
289723b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_FLEX_ALIGNMENT_START;
289823b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_ROW_JUSTIFY_CONTENT, &item);
289923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_ROW_ALIGN_ITEMS), ARKUI_ERROR_CODE_NO_ERROR);
290023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_ROW_JUSTIFY_CONTENT), ARKUI_ERROR_CODE_NO_ERROR);
290123b3eb3cSopenharmony_ci
290223b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_ROW_ALIGN_ITEMS), nullptr);
290323b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_ROW_JUSTIFY_CONTENT), nullptr);
290423b3eb3cSopenharmony_ci    nodeAPI->disposeNode(rootNode);
290523b3eb3cSopenharmony_ci}
290623b3eb3cSopenharmony_ci
290723b3eb3cSopenharmony_ci/**
290823b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest031
290923b3eb3cSopenharmony_ci * @tc.desc: Test flexNode function.
291023b3eb3cSopenharmony_ci * @tc.type: FUNC
291123b3eb3cSopenharmony_ci */
291223b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest031, TestSize.Level1)
291323b3eb3cSopenharmony_ci{
291423b3eb3cSopenharmony_ci    auto nodeAPI = reinterpret_cast<ArkUI_NativeNodeAPI_1*>(
291523b3eb3cSopenharmony_ci        OH_ArkUI_QueryModuleInterfaceByName(ARKUI_NATIVE_NODE, "ArkUI_NativeNodeAPI_1"));
291623b3eb3cSopenharmony_ci    auto rootNode = nodeAPI->createNode(ARKUI_NODE_FLEX);
291723b3eb3cSopenharmony_ci    auto childNode = nodeAPI->createNode(ARKUI_NODE_STACK);
291823b3eb3cSopenharmony_ci    ASSERT_NE(rootNode, nullptr);
291923b3eb3cSopenharmony_ci    ASSERT_NE(childNode, nullptr);
292023b3eb3cSopenharmony_ci    nodeAPI->addChild(rootNode, childNode);
292123b3eb3cSopenharmony_ci
292223b3eb3cSopenharmony_ci    ArkUI_NumberValue value0[] = {};
292323b3eb3cSopenharmony_ci    ArkUI_AttributeItem item0 = {value0, 0, nullptr, nullptr};
292423b3eb3cSopenharmony_ci    int32_t negativeEnum = -1;
292523b3eb3cSopenharmony_ci    ArkUI_NumberValue valueEnum[] = {{.i32 = negativeEnum}};
292623b3eb3cSopenharmony_ci    ArkUI_AttributeItem itemEnum = {valueEnum, 1, nullptr, nullptr};
292723b3eb3cSopenharmony_ci    float negativeFloat = -1.0f;
292823b3eb3cSopenharmony_ci    ArkUI_NumberValue valueFloat[] = {{.f32 = negativeFloat}};
292923b3eb3cSopenharmony_ci    ArkUI_AttributeItem itemFloat = {valueFloat, sizeof(valueFloat) / sizeof(ArkUI_NumberValue)};
293023b3eb3cSopenharmony_ci    ArkUI_NumberValue value[] = {{.i32 = ARKUI_ITEM_ALIGNMENT_AUTO}};
293123b3eb3cSopenharmony_ci    ArkUI_AttributeItem item = {value, sizeof(value) / sizeof(ArkUI_NumberValue), nullptr, nullptr};
293223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(childNode, NODE_ALIGN_SELF, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
293323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(childNode, NODE_ALIGN_SELF, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
293423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(childNode, NODE_ALIGN_SELF, &item), ARKUI_ERROR_CODE_NO_ERROR);
293523b3eb3cSopenharmony_ci    auto alignSelfVal = nodeAPI->getAttribute(childNode, NODE_ALIGN_SELF);
293623b3eb3cSopenharmony_ci    EXPECT_EQ(alignSelfVal->value[0].i32, static_cast<int32_t>(ARKUI_ITEM_ALIGNMENT_AUTO));
293723b3eb3cSopenharmony_ci
293823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(childNode, NODE_FLEX_GROW, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
293923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(childNode, NODE_FLEX_GROW, &itemFloat), ARKUI_ERROR_CODE_PARAM_INVALID);
294023b3eb3cSopenharmony_ci    float flexGrowInput = 2.0f;
294123b3eb3cSopenharmony_ci    value[0].f32 = flexGrowInput;
294223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(childNode, NODE_FLEX_GROW, &item), ARKUI_ERROR_CODE_NO_ERROR);
294323b3eb3cSopenharmony_ci    auto flexGrowVal = nodeAPI->getAttribute(childNode, NODE_FLEX_GROW);
294423b3eb3cSopenharmony_ci    EXPECT_EQ(flexGrowVal->value[0].f32, flexGrowInput);
294523b3eb3cSopenharmony_ci
294623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(childNode, NODE_FLEX_SHRINK, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
294723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(childNode, NODE_FLEX_SHRINK, &itemFloat), ARKUI_ERROR_CODE_PARAM_INVALID);
294823b3eb3cSopenharmony_ci    float flexShrinkInput = 0.0f;
294923b3eb3cSopenharmony_ci    value[0].f32 = flexShrinkInput;
295023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(childNode, NODE_FLEX_SHRINK, &item), ARKUI_ERROR_CODE_NO_ERROR);
295123b3eb3cSopenharmony_ci    auto flexShrinkVal = nodeAPI->getAttribute(childNode, NODE_FLEX_SHRINK);
295223b3eb3cSopenharmony_ci    EXPECT_EQ(flexShrinkVal->value[0].f32, flexShrinkInput);
295323b3eb3cSopenharmony_ci
295423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(childNode, NODE_FLEX_BASIS, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
295523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(childNode, NODE_FLEX_BASIS, &itemFloat), ARKUI_ERROR_CODE_PARAM_INVALID);
295623b3eb3cSopenharmony_ci    float flexBasisInput = 100.0f;
295723b3eb3cSopenharmony_ci    value[0].f32 = flexBasisInput;
295823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(childNode, NODE_FLEX_BASIS, &item), ARKUI_ERROR_CODE_NO_ERROR);
295923b3eb3cSopenharmony_ci    auto flexBasisVal = nodeAPI->getAttribute(childNode, NODE_FLEX_BASIS);
296023b3eb3cSopenharmony_ci    EXPECT_EQ(flexBasisVal->value[0].f32, flexBasisInput);
296123b3eb3cSopenharmony_ci
296223b3eb3cSopenharmony_ci    ArkUI_NumberValue flexOptVal[] = {{.i32 = ARKUI_FLEX_DIRECTION_ROW}, {.i32 = ARKUI_FLEX_WRAP_NO_WRAP},
296323b3eb3cSopenharmony_ci        {.i32 = ARKUI_FLEX_ALIGNMENT_START}, {.i32 = ARKUI_ITEM_ALIGNMENT_START}, {.i32 = ARKUI_FLEX_ALIGNMENT_START}};
296423b3eb3cSopenharmony_ci    ArkUI_AttributeItem flexOptItem = {flexOptVal, sizeof(flexOptVal) / sizeof(ArkUI_NumberValue), nullptr, nullptr};
296523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_FLEX_OPTION, &flexOptItem), ARKUI_ERROR_CODE_NO_ERROR);
296623b3eb3cSopenharmony_ci    auto flexOptResult = nodeAPI->getAttribute(rootNode, NODE_FLEX_OPTION);
296723b3eb3cSopenharmony_ci    EXPECT_EQ(flexOptResult->value[0].i32, static_cast<int32_t>(ARKUI_FLEX_DIRECTION_ROW));
296823b3eb3cSopenharmony_ci
296923b3eb3cSopenharmony_ci    int32_t abnormalVal = 10;
297023b3eb3cSopenharmony_ci    flexOptVal[4].i32 = abnormalVal;
297123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_FLEX_OPTION, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
297223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_FLEX_OPTION, &flexOptItem), ARKUI_ERROR_CODE_PARAM_INVALID);
297323b3eb3cSopenharmony_ci    flexOptVal[3].i32 = abnormalVal;
297423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_FLEX_OPTION, &flexOptItem), ARKUI_ERROR_CODE_PARAM_INVALID);
297523b3eb3cSopenharmony_ci    flexOptVal[2].i32 = abnormalVal;
297623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_FLEX_OPTION, &flexOptItem), ARKUI_ERROR_CODE_PARAM_INVALID);
297723b3eb3cSopenharmony_ci    flexOptVal[1].i32 = abnormalVal;
297823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_FLEX_OPTION, &flexOptItem), ARKUI_ERROR_CODE_PARAM_INVALID);
297923b3eb3cSopenharmony_ci    flexOptVal[0].i32 = abnormalVal;
298023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_FLEX_OPTION, &flexOptItem), ARKUI_ERROR_CODE_PARAM_INVALID);
298123b3eb3cSopenharmony_ci    flexOptItem.size = -1;
298223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_FLEX_OPTION, &flexOptItem), ARKUI_ERROR_CODE_NO_ERROR);
298323b3eb3cSopenharmony_ci
298423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(childNode, NODE_ALIGN_SELF), ARKUI_ERROR_CODE_NO_ERROR);
298523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(childNode, NODE_FLEX_GROW), ARKUI_ERROR_CODE_NO_ERROR);
298623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(childNode, NODE_FLEX_SHRINK), ARKUI_ERROR_CODE_NO_ERROR);
298723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(childNode, NODE_FLEX_BASIS), ARKUI_ERROR_CODE_NO_ERROR);
298823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_FLEX_OPTION), ARKUI_ERROR_CODE_NO_ERROR);
298923b3eb3cSopenharmony_ci    nodeAPI->disposeNode(childNode);
299023b3eb3cSopenharmony_ci    nodeAPI->disposeNode(rootNode);
299123b3eb3cSopenharmony_ci}
299223b3eb3cSopenharmony_ci
299323b3eb3cSopenharmony_ci/**
299423b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest032
299523b3eb3cSopenharmony_ci * @tc.desc: Test refreshNode function.
299623b3eb3cSopenharmony_ci * @tc.type: FUNC
299723b3eb3cSopenharmony_ci */
299823b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest032, TestSize.Level1)
299923b3eb3cSopenharmony_ci{
300023b3eb3cSopenharmony_ci    auto nodeAPI = reinterpret_cast<ArkUI_NativeNodeAPI_1*>(
300123b3eb3cSopenharmony_ci        OH_ArkUI_QueryModuleInterfaceByName(ARKUI_NATIVE_NODE, "ArkUI_NativeNodeAPI_1"));
300223b3eb3cSopenharmony_ci    auto rootNode = new ArkUI_Node({ARKUI_NODE_REFRESH, nullptr});
300323b3eb3cSopenharmony_ci    ASSERT_NE(rootNode, nullptr);
300423b3eb3cSopenharmony_ci    ArkUI_NumberValue value[] = {{.i32 = true}};
300523b3eb3cSopenharmony_ci    ArkUI_AttributeItem item = {value, sizeof(value) / sizeof(ArkUI_NumberValue), nullptr, nullptr};
300623b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_REFRESH_REFRESHING, &item);
300723b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_REFRESH_PULL_DOWN_RATIO, &item);
300823b3eb3cSopenharmony_ci    value[0].f32 = 0.5f;
300923b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_REFRESH_PULL_DOWN_RATIO, &item);
301023b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_REFRESH_OFFSET, &item);
301123b3eb3cSopenharmony_ci    item.object = rootNode;
301223b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_REFRESH_CONTENT, &item);
301323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_REFRESH_CONTENT), ARKUI_ERROR_CODE_NO_ERROR);
301423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_REFRESH_PULL_DOWN_RATIO), ARKUI_ERROR_CODE_NO_ERROR);
301523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_REFRESH_OFFSET), ARKUI_ERROR_CODE_NO_ERROR);
301623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_REFRESH_PULL_TO_REFRESH), ARKUI_ERROR_CODE_NO_ERROR);
301723b3eb3cSopenharmony_ci
301823b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_REFRESH_REFRESHING), nullptr);
301923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->getAttribute(rootNode, NODE_REFRESH_CONTENT), nullptr);
302023b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_REFRESH_PULL_DOWN_RATIO), nullptr);
302123b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_REFRESH_OFFSET), nullptr);
302223b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_REFRESH_PULL_TO_REFRESH), nullptr);
302323b3eb3cSopenharmony_ci    nodeAPI->disposeNode(rootNode);
302423b3eb3cSopenharmony_ci}
302523b3eb3cSopenharmony_ci
302623b3eb3cSopenharmony_ci/**
302723b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest033
302823b3eb3cSopenharmony_ci * @tc.desc: Test waterflowNode function.
302923b3eb3cSopenharmony_ci * @tc.type: FUNC
303023b3eb3cSopenharmony_ci */
303123b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest033, TestSize.Level1)
303223b3eb3cSopenharmony_ci{
303323b3eb3cSopenharmony_ci    auto nodeAPI = reinterpret_cast<ArkUI_NativeNodeAPI_1*>(
303423b3eb3cSopenharmony_ci        OH_ArkUI_QueryModuleInterfaceByName(ARKUI_NATIVE_NODE, "ArkUI_NativeNodeAPI_1"));
303523b3eb3cSopenharmony_ci    auto rootNode = new ArkUI_Node({ARKUI_NODE_WATER_FLOW, nullptr});
303623b3eb3cSopenharmony_ci    float distance = 10.0f;
303723b3eb3cSopenharmony_ci    uint32_t color = 0xFFFF0000;
303823b3eb3cSopenharmony_ci    ArkUI_NumberValue value[] = {{.f32 = distance}};
303923b3eb3cSopenharmony_ci    ArkUI_AttributeItem item = {value, sizeof(value) / sizeof(ArkUI_NumberValue)};
304023b3eb3cSopenharmony_ci    ArkUI_NumberValue value2[] = {{.f32 = distance}, {.f32 = distance}};
304123b3eb3cSopenharmony_ci    ArkUI_AttributeItem item2 = {value2, sizeof(value2) / sizeof(ArkUI_NumberValue)};
304223b3eb3cSopenharmony_ci    ArkUI_NumberValue scrollnested[] = {{.i32 = ARKUI_SCROLL_NESTED_MODE_SELF_ONLY},
304323b3eb3cSopenharmony_ci        {.i32 = ARKUI_SCROLL_NESTED_MODE_SELF_ONLY}};
304423b3eb3cSopenharmony_ci    ArkUI_AttributeItem scrollnestedItem = {scrollnested, sizeof(scrollnested) / sizeof(ArkUI_NumberValue)};
304523b3eb3cSopenharmony_ci    ArkUI_NumberValue constraintSize[] = {{.f32 = distance}, {.f32 = distance}, {.f32 = distance}, {.f32 = distance}};
304623b3eb3cSopenharmony_ci    ArkUI_AttributeItem constraintSizeItem = {constraintSize, sizeof(constraintSize) / sizeof(ArkUI_NumberValue)};
304723b3eb3cSopenharmony_ci    ArkUI_NumberValue indexValue[] = {{.i32 = 0}, {.i32 = 0}, {.i32 = ARKUI_SCROLL_ALIGNMENT_START}};
304823b3eb3cSopenharmony_ci    ArkUI_AttributeItem indexItem = {indexValue, sizeof(indexValue) / sizeof(ArkUI_NumberValue)};
304923b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SCROLL_FRICTION, &item);
305023b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SCROLL_BAR_WIDTH, &item);
305123b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_WATER_FLOW_COLUMN_GAP, &item);
305223b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_WATER_FLOW_ROW_GAP, &item);
305323b3eb3cSopenharmony_ci    value[0].u32 = color;
305423b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SCROLL_BAR_COLOR, &item);
305523b3eb3cSopenharmony_ci
305623b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_SCROLL_BAR_DISPLAY_MODE_AUTO;
305723b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SCROLL_BAR_DISPLAY_MODE, &item);
305823b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_EDGE_EFFECT_NONE;
305923b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SCROLL_EDGE_EFFECT, &item);
306023b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_FLEX_DIRECTION_ROW;
306123b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_WATER_FLOW_LAYOUT_DIRECTION, &item);
306223b3eb3cSopenharmony_ci    value[0].i32 = true;
306323b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SCROLL_ENABLE_SCROLL_INTERACTION, &item);
306423b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_WATER_FLOW_CACHED_COUNT, &item);
306523b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_WATER_FLOW_SCROLL_TO_INDEX, &item);
306623b3eb3cSopenharmony_ci
306723b3eb3cSopenharmony_ci    item.string = "test";
306823b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_WATER_FLOW_COLUMN_TEMPLATE, &item);
306923b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_WATER_FLOW_ROW_TEMPLATE, &item);
307023b3eb3cSopenharmony_ci
307123b3eb3cSopenharmony_ci    item.object = rootNode;
307223b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_WATER_FLOW_FOOTER, &item);
307323b3eb3cSopenharmony_ci
307423b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SCROLL_NESTED_SCROLL, &scrollnestedItem);
307523b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_SCROLL_BY, &item2);
307623b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_WATER_FLOW_ITEM_CONSTRAINT_SIZE, &constraintSizeItem);
307723b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_WATER_FLOW_SCROLL_TO_INDEX, &indexItem);
307823b3eb3cSopenharmony_ci    indexValue[2].i32 = ARKUI_SCROLL_ALIGNMENT_NONE;
307923b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_WATER_FLOW_SCROLL_TO_INDEX, &indexItem);
308023b3eb3cSopenharmony_ci    indexValue[2].i32 = -1;
308123b3eb3cSopenharmony_ci    indexValue[1].i32 = -1;
308223b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_WATER_FLOW_SCROLL_TO_INDEX, &indexItem);
308323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_WATER_FLOW_LAYOUT_DIRECTION), ARKUI_ERROR_CODE_NO_ERROR);
308423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_WATER_FLOW_COLUMN_TEMPLATE), ARKUI_ERROR_CODE_NO_ERROR);
308523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_WATER_FLOW_ROW_TEMPLATE), ARKUI_ERROR_CODE_NO_ERROR);
308623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_WATER_FLOW_COLUMN_GAP), ARKUI_ERROR_CODE_NO_ERROR);
308723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_WATER_FLOW_ROW_GAP), ARKUI_ERROR_CODE_NO_ERROR);
308823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_WATER_FLOW_SECTION_OPTION), ARKUI_ERROR_CODE_NO_ERROR);
308923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_WATER_FLOW_NODE_ADAPTER), ARKUI_ERROR_CODE_NO_ERROR);
309023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_WATER_FLOW_CACHED_COUNT), ARKUI_ERROR_CODE_NO_ERROR);
309123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_WATER_FLOW_FOOTER), ARKUI_ERROR_CODE_NO_ERROR);
309223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_WATER_FLOW_ITEM_CONSTRAINT_SIZE), ARKUI_ERROR_CODE_NO_ERROR);
309323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_SCROLL_FRICTION), ARKUI_ERROR_CODE_NO_ERROR);
309423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_SCROLL_BAR_DISPLAY_MODE), ARKUI_ERROR_CODE_NO_ERROR);
309523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_SCROLL_BAR_WIDTH), ARKUI_ERROR_CODE_NO_ERROR);
309623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_SCROLL_BAR_COLOR), ARKUI_ERROR_CODE_NO_ERROR);
309723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_SCROLL_EDGE_EFFECT), ARKUI_ERROR_CODE_NO_ERROR);
309823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_SCROLL_ENABLE_SCROLL_INTERACTION), ARKUI_ERROR_CODE_NO_ERROR);
309923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_SCROLL_NESTED_SCROLL), ARKUI_ERROR_CODE_NO_ERROR);
310023b3eb3cSopenharmony_ci
310123b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_WATER_FLOW_LAYOUT_DIRECTION), nullptr);
310223b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_WATER_FLOW_COLUMN_TEMPLATE), nullptr);
310323b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_WATER_FLOW_ROW_TEMPLATE), nullptr);
310423b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_WATER_FLOW_COLUMN_GAP), nullptr);
310523b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_WATER_FLOW_ROW_GAP), nullptr);
310623b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_WATER_FLOW_NODE_ADAPTER), nullptr);
310723b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_WATER_FLOW_CACHED_COUNT), nullptr);
310823b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_WATER_FLOW_ITEM_CONSTRAINT_SIZE), nullptr);
310923b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_SCROLL_FRICTION), nullptr);
311023b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_SCROLL_BAR_DISPLAY_MODE), nullptr);
311123b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_SCROLL_BAR_WIDTH), nullptr);
311223b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_SCROLL_BAR_COLOR), nullptr);
311323b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_SCROLL_EDGE_EFFECT), nullptr);
311423b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_SCROLL_ENABLE_SCROLL_INTERACTION), nullptr);
311523b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_SCROLL_NESTED_SCROLL), nullptr);
311623b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_WATER_FLOW_SECTION_OPTION), nullptr);
311723b3eb3cSopenharmony_ci    nodeAPI->disposeNode(rootNode);
311823b3eb3cSopenharmony_ci}
311923b3eb3cSopenharmony_ci
312023b3eb3cSopenharmony_ci/**
312123b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest034
312223b3eb3cSopenharmony_ci * @tc.desc: Test gridNode function.
312323b3eb3cSopenharmony_ci * @tc.type: FUNC
312423b3eb3cSopenharmony_ci */
312523b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest034, TestSize.Level1)
312623b3eb3cSopenharmony_ci{
312723b3eb3cSopenharmony_ci    auto nodeAPI = reinterpret_cast<ArkUI_NativeNodeAPI_1*>(
312823b3eb3cSopenharmony_ci        OH_ArkUI_QueryModuleInterfaceByName(ARKUI_NATIVE_NODE, "ArkUI_NativeNodeAPI_1"));
312923b3eb3cSopenharmony_ci    auto rootNode = nodeAPI->createNode(ARKUI_NODE_GRID);
313023b3eb3cSopenharmony_ci    ASSERT_NE(rootNode, nullptr);
313123b3eb3cSopenharmony_ci    ArkUI_NumberValue value[] = {{.f32 = 1.0f}};
313223b3eb3cSopenharmony_ci    ArkUI_AttributeItem item = {value, sizeof(value) / sizeof(ArkUI_NumberValue), "test"};
313323b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_GRID_COLUMN_TEMPLATE, &item);
313423b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_GRID_ROW_TEMPLATE, &item);
313523b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_GRID_COLUMN_GAP, &item);
313623b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_GRID_ROW_GAP, &item);
313723b3eb3cSopenharmony_ci    value[0].i32 = 1;
313823b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_GRID_CACHED_COUNT, &item);
313923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_GRID_COLUMN_TEMPLATE), ARKUI_ERROR_CODE_NO_ERROR);
314023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_GRID_ROW_TEMPLATE), ARKUI_ERROR_CODE_NO_ERROR);
314123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_GRID_COLUMN_GAP), ARKUI_ERROR_CODE_NO_ERROR);
314223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_GRID_ROW_GAP), ARKUI_ERROR_CODE_NO_ERROR);
314323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_GRID_NODE_ADAPTER), ARKUI_ERROR_CODE_NO_ERROR);
314423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_GRID_CACHED_COUNT), ARKUI_ERROR_CODE_NO_ERROR);
314523b3eb3cSopenharmony_ci
314623b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_GRID_COLUMN_TEMPLATE), nullptr);
314723b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_GRID_ROW_TEMPLATE), nullptr);
314823b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_GRID_COLUMN_GAP), nullptr);
314923b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_GRID_ROW_GAP), nullptr);
315023b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_GRID_NODE_ADAPTER), nullptr);
315123b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_GRID_CACHED_COUNT), nullptr);
315223b3eb3cSopenharmony_ci    nodeAPI->disposeNode(rootNode);
315323b3eb3cSopenharmony_ci}
315423b3eb3cSopenharmony_ci
315523b3eb3cSopenharmony_ci/**
315623b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest035
315723b3eb3cSopenharmony_ci * @tc.desc: Test relativeContainerNode function.
315823b3eb3cSopenharmony_ci * @tc.type: FUNC
315923b3eb3cSopenharmony_ci */
316023b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest035, TestSize.Level1)
316123b3eb3cSopenharmony_ci{
316223b3eb3cSopenharmony_ci    auto nodeAPI = reinterpret_cast<ArkUI_NativeNodeAPI_1*>(
316323b3eb3cSopenharmony_ci        OH_ArkUI_QueryModuleInterfaceByName(ARKUI_NATIVE_NODE, "ArkUI_NativeNodeAPI_1"));
316423b3eb3cSopenharmony_ci    auto rootNode = new ArkUI_Node({ARKUI_NODE_RELATIVE_CONTAINER, nullptr});
316523b3eb3cSopenharmony_ci    ASSERT_NE(rootNode, nullptr);
316623b3eb3cSopenharmony_ci
316723b3eb3cSopenharmony_ci    auto alignRules = OH_ArkUI_AlignmentRuleOption_Create();
316823b3eb3cSopenharmony_ci    float baisVal = 10.0f;
316923b3eb3cSopenharmony_ci    ArkUI_AttributeItem alignRulesItem = {.size = 0, .object = alignRules};
317023b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_ALIGN_RULES, &alignRulesItem);
317123b3eb3cSopenharmony_ci    OH_ArkUI_AlignmentRuleOption_SetStart(nullptr, nullptr, ARKUI_HORIZONTAL_ALIGNMENT_START);
317223b3eb3cSopenharmony_ci    OH_ArkUI_AlignmentRuleOption_SetStart(alignRules, nullptr, ARKUI_HORIZONTAL_ALIGNMENT_START);
317323b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_AlignmentRuleOption_GetStartId(alignRules), nullptr);
317423b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_AlignmentRuleOption_GetStartAlignment(alignRules), static_cast<ArkUI_HorizontalAlignment>(-1));
317523b3eb3cSopenharmony_ci    OH_ArkUI_AlignmentRuleOption_SetStart(alignRules, "__container__", ARKUI_HORIZONTAL_ALIGNMENT_START);
317623b3eb3cSopenharmony_ci    OH_ArkUI_AlignmentRuleOption_SetTop(nullptr, nullptr, ARKUI_VERTICAL_ALIGNMENT_TOP);
317723b3eb3cSopenharmony_ci    OH_ArkUI_AlignmentRuleOption_SetTop(alignRules, nullptr, ARKUI_VERTICAL_ALIGNMENT_TOP);
317823b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_AlignmentRuleOption_GetTopId(alignRules), nullptr);
317923b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_AlignmentRuleOption_GetTopAlignment(alignRules), static_cast<ArkUI_VerticalAlignment>(-1));
318023b3eb3cSopenharmony_ci    OH_ArkUI_AlignmentRuleOption_SetTop(alignRules, "__container__", ARKUI_VERTICAL_ALIGNMENT_TOP);
318123b3eb3cSopenharmony_ci    OH_ArkUI_AlignmentRuleOption_SetEnd(nullptr, nullptr, ARKUI_HORIZONTAL_ALIGNMENT_END);
318223b3eb3cSopenharmony_ci    OH_ArkUI_AlignmentRuleOption_SetEnd(alignRules, nullptr, ARKUI_HORIZONTAL_ALIGNMENT_END);
318323b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_AlignmentRuleOption_GetEndId(alignRules), nullptr);
318423b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_AlignmentRuleOption_GetEndAlignment(alignRules), static_cast<ArkUI_HorizontalAlignment>(-1));
318523b3eb3cSopenharmony_ci    OH_ArkUI_AlignmentRuleOption_SetEnd(alignRules, "__container__", ARKUI_HORIZONTAL_ALIGNMENT_END);
318623b3eb3cSopenharmony_ci    OH_ArkUI_AlignmentRuleOption_SetBottom(nullptr, nullptr, ARKUI_VERTICAL_ALIGNMENT_BOTTOM);
318723b3eb3cSopenharmony_ci    OH_ArkUI_AlignmentRuleOption_SetBottom(alignRules, nullptr, ARKUI_VERTICAL_ALIGNMENT_BOTTOM);
318823b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_AlignmentRuleOption_GetBottomId(alignRules), nullptr);
318923b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_AlignmentRuleOption_GetBottomAlignment(alignRules), static_cast<ArkUI_VerticalAlignment>(-1));
319023b3eb3cSopenharmony_ci    OH_ArkUI_AlignmentRuleOption_SetBottom(alignRules, "__container__", ARKUI_VERTICAL_ALIGNMENT_BOTTOM);
319123b3eb3cSopenharmony_ci    OH_ArkUI_AlignmentRuleOption_SetCenterHorizontal(nullptr, nullptr, ARKUI_HORIZONTAL_ALIGNMENT_CENTER);
319223b3eb3cSopenharmony_ci    OH_ArkUI_AlignmentRuleOption_SetCenterHorizontal(alignRules, nullptr, ARKUI_HORIZONTAL_ALIGNMENT_CENTER);
319323b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_AlignmentRuleOption_GetCenterIdHorizontal(alignRules), nullptr);
319423b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_AlignmentRuleOption_GetCenterAlignmentHorizontal(alignRules),
319523b3eb3cSopenharmony_ci        static_cast<ArkUI_HorizontalAlignment>(-1));
319623b3eb3cSopenharmony_ci    OH_ArkUI_AlignmentRuleOption_SetCenterHorizontal(alignRules, "__container__", ARKUI_HORIZONTAL_ALIGNMENT_CENTER);
319723b3eb3cSopenharmony_ci    OH_ArkUI_AlignmentRuleOption_SetCenterVertical(nullptr, nullptr, ARKUI_VERTICAL_ALIGNMENT_CENTER);
319823b3eb3cSopenharmony_ci    OH_ArkUI_AlignmentRuleOption_SetCenterVertical(alignRules, nullptr, ARKUI_VERTICAL_ALIGNMENT_CENTER);
319923b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_AlignmentRuleOption_GetCenterIdVertical(alignRules), nullptr);
320023b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_AlignmentRuleOption_GetCenterAlignmentVertical(alignRules),
320123b3eb3cSopenharmony_ci        static_cast<ArkUI_VerticalAlignment>(-1));
320223b3eb3cSopenharmony_ci    OH_ArkUI_AlignmentRuleOption_SetCenterVertical(alignRules, "__container__", ARKUI_VERTICAL_ALIGNMENT_CENTER);
320323b3eb3cSopenharmony_ci    OH_ArkUI_AlignmentRuleOption_SetBiasHorizontal(nullptr, baisVal);
320423b3eb3cSopenharmony_ci    OH_ArkUI_AlignmentRuleOption_SetBiasHorizontal(alignRules, baisVal);
320523b3eb3cSopenharmony_ci    OH_ArkUI_AlignmentRuleOption_SetBiasVertical(nullptr, baisVal);
320623b3eb3cSopenharmony_ci    OH_ArkUI_AlignmentRuleOption_SetBiasVertical(alignRules, baisVal);
320723b3eb3cSopenharmony_ci    alignRulesItem.object = alignRules;
320823b3eb3cSopenharmony_ci    nodeAPI->setAttribute(rootNode, NODE_ALIGN_RULES, &alignRulesItem);
320923b3eb3cSopenharmony_ci    auto alignRulesGetVal = nodeAPI->getAttribute(rootNode, NODE_ALIGN_RULES);
321023b3eb3cSopenharmony_ci    ASSERT_NE(alignRulesGetVal, nullptr);
321123b3eb3cSopenharmony_ci    OH_ArkUI_AlignmentRuleOption_GetStartId(alignRules);
321223b3eb3cSopenharmony_ci    OH_ArkUI_AlignmentRuleOption_GetStartAlignment(alignRules);
321323b3eb3cSopenharmony_ci    OH_ArkUI_AlignmentRuleOption_GetEndId(alignRules);
321423b3eb3cSopenharmony_ci    OH_ArkUI_AlignmentRuleOption_GetEndAlignment(alignRules);
321523b3eb3cSopenharmony_ci    OH_ArkUI_AlignmentRuleOption_GetCenterIdHorizontal(alignRules);
321623b3eb3cSopenharmony_ci    OH_ArkUI_AlignmentRuleOption_GetCenterAlignmentHorizontal(alignRules);
321723b3eb3cSopenharmony_ci    OH_ArkUI_AlignmentRuleOption_GetTopId(alignRules);
321823b3eb3cSopenharmony_ci    OH_ArkUI_AlignmentRuleOption_GetTopAlignment(alignRules);
321923b3eb3cSopenharmony_ci    OH_ArkUI_AlignmentRuleOption_GetBottomId(alignRules);
322023b3eb3cSopenharmony_ci    OH_ArkUI_AlignmentRuleOption_GetBottomAlignment(alignRules);
322123b3eb3cSopenharmony_ci    OH_ArkUI_AlignmentRuleOption_GetCenterIdVertical(alignRules);
322223b3eb3cSopenharmony_ci    OH_ArkUI_AlignmentRuleOption_GetCenterAlignmentVertical(alignRules);
322323b3eb3cSopenharmony_ci    OH_ArkUI_AlignmentRuleOption_GetBiasHorizontal(alignRules);
322423b3eb3cSopenharmony_ci    OH_ArkUI_AlignmentRuleOption_GetBiasVertical(alignRules);
322523b3eb3cSopenharmony_ci
322623b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_AlignmentRuleOption_GetStartId(nullptr), nullptr);
322723b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_AlignmentRuleOption_GetStartAlignment(nullptr), static_cast<ArkUI_HorizontalAlignment>(-1));
322823b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_AlignmentRuleOption_GetEndId(nullptr), nullptr);
322923b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_AlignmentRuleOption_GetEndAlignment(nullptr), static_cast<ArkUI_HorizontalAlignment>(-1));
323023b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_AlignmentRuleOption_GetCenterIdHorizontal(nullptr), nullptr);
323123b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_AlignmentRuleOption_GetCenterAlignmentHorizontal(nullptr),
323223b3eb3cSopenharmony_ci        static_cast<ArkUI_HorizontalAlignment>(-1));
323323b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_AlignmentRuleOption_GetTopId(nullptr), nullptr);
323423b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_AlignmentRuleOption_GetTopAlignment(nullptr), static_cast<ArkUI_VerticalAlignment>(-1));
323523b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_AlignmentRuleOption_GetBottomId(nullptr), nullptr);
323623b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_AlignmentRuleOption_GetBottomAlignment(nullptr), static_cast<ArkUI_VerticalAlignment>(-1));
323723b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_AlignmentRuleOption_GetCenterIdVertical(nullptr), nullptr);
323823b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_AlignmentRuleOption_GetCenterAlignmentVertical(nullptr),
323923b3eb3cSopenharmony_ci        static_cast<ArkUI_VerticalAlignment>(-1));
324023b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_AlignmentRuleOption_GetBiasHorizontal(nullptr), -1.0f);
324123b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_AlignmentRuleOption_GetBiasVertical(nullptr), -1.0f);
324223b3eb3cSopenharmony_ci
324323b3eb3cSopenharmony_ci
324423b3eb3cSopenharmony_ci    ArkUI_NumberValue chainModeVal[] = {{.i32 = ARKUI_AXIS_HORIZONTAL},
324523b3eb3cSopenharmony_ci        {.i32 = ARKUI_RELATIVE_LAYOUT_CHAIN_STYLE_PACKED}};
324623b3eb3cSopenharmony_ci    ArkUI_AttributeItem chainModeItem = {chainModeVal, sizeof(chainModeVal) / sizeof(ArkUI_NumberValue)};
324723b3eb3cSopenharmony_ci    auto chainModRet = nodeAPI->setAttribute(rootNode, NODE_RELATIVE_LAYOUT_CHAIN_MODE, &chainModeItem);
324823b3eb3cSopenharmony_ci    EXPECT_EQ(chainModRet, ARKUI_ERROR_CODE_NO_ERROR);
324923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(
325023b3eb3cSopenharmony_ci        rootNode, NODE_RELATIVE_LAYOUT_CHAIN_MODE, nullptr), ARKUI_ERROR_CODE_PARAM_INVALID);
325123b3eb3cSopenharmony_ci    auto chainModResult = nodeAPI->getAttribute(rootNode, NODE_RELATIVE_LAYOUT_CHAIN_MODE);
325223b3eb3cSopenharmony_ci    EXPECT_NE(chainModResult, nullptr);
325323b3eb3cSopenharmony_ci
325423b3eb3cSopenharmony_ci    int32_t guideLineOptSize = 1;
325523b3eb3cSopenharmony_ci    float positionStart = 50.0f;
325623b3eb3cSopenharmony_ci    float positionEnd = 60.0f;
325723b3eb3cSopenharmony_ci    auto guidelineOption = OH_ArkUI_GuidelineOption_Create(guideLineOptSize);
325823b3eb3cSopenharmony_ci    OH_ArkUI_GuidelineOption_SetId(nullptr, nullptr, 0);
325923b3eb3cSopenharmony_ci    OH_ArkUI_GuidelineOption_SetId(guidelineOption, nullptr, -1);
326023b3eb3cSopenharmony_ci    OH_ArkUI_GuidelineOption_SetId(guidelineOption, nullptr, 2);
326123b3eb3cSopenharmony_ci    OH_ArkUI_GuidelineOption_SetId(guidelineOption, "__container__", 0);
326223b3eb3cSopenharmony_ci    OH_ArkUI_GuidelineOption_SetDirection(nullptr, ARKUI_AXIS_VERTICAL, 0);
326323b3eb3cSopenharmony_ci    OH_ArkUI_GuidelineOption_SetDirection(guidelineOption, ARKUI_AXIS_VERTICAL, -1);
326423b3eb3cSopenharmony_ci    OH_ArkUI_GuidelineOption_SetDirection(guidelineOption, ARKUI_AXIS_VERTICAL, 2);
326523b3eb3cSopenharmony_ci    OH_ArkUI_GuidelineOption_SetDirection(guidelineOption, ARKUI_AXIS_VERTICAL, 0);
326623b3eb3cSopenharmony_ci    OH_ArkUI_GuidelineOption_SetPositionStart(nullptr, positionStart, 0);
326723b3eb3cSopenharmony_ci    OH_ArkUI_GuidelineOption_SetPositionStart(guidelineOption, positionStart, -1);
326823b3eb3cSopenharmony_ci    OH_ArkUI_GuidelineOption_SetPositionStart(guidelineOption, positionStart, 2);
326923b3eb3cSopenharmony_ci    OH_ArkUI_GuidelineOption_SetPositionStart(guidelineOption, positionStart, 0);
327023b3eb3cSopenharmony_ci    OH_ArkUI_GuidelineOption_SetPositionEnd(nullptr, positionEnd, 0);
327123b3eb3cSopenharmony_ci    OH_ArkUI_GuidelineOption_SetPositionEnd(guidelineOption, positionEnd, -1);
327223b3eb3cSopenharmony_ci    OH_ArkUI_GuidelineOption_SetPositionEnd(guidelineOption, positionEnd, 2);
327323b3eb3cSopenharmony_ci    OH_ArkUI_GuidelineOption_SetPositionEnd(guidelineOption, positionEnd, 0);
327423b3eb3cSopenharmony_ci    ArkUI_AttributeItem guidelineOptItem = {.object = guidelineOption};
327523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_RELATIVE_CONTAINER_GUIDE_LINE, &guidelineOptItem),
327623b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_NO_ERROR);
327723b3eb3cSopenharmony_ci    auto guidelineOptResult = nodeAPI->getAttribute(rootNode, NODE_RELATIVE_CONTAINER_GUIDE_LINE);
327823b3eb3cSopenharmony_ci    ASSERT_NE(guidelineOptResult, nullptr);
327923b3eb3cSopenharmony_ci    OH_ArkUI_GuidelineOption_GetId(guidelineOption, 0);
328023b3eb3cSopenharmony_ci    OH_ArkUI_GuidelineOption_GetDirection(guidelineOption, 0);
328123b3eb3cSopenharmony_ci    OH_ArkUI_GuidelineOption_GetPositionStart(guidelineOption, 0);
328223b3eb3cSopenharmony_ci    OH_ArkUI_GuidelineOption_GetPositionEnd(guidelineOption, 0);
328323b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_GuidelineOption_GetId(nullptr, 0), nullptr);
328423b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_GuidelineOption_GetId(guidelineOption, -1), nullptr);
328523b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_GuidelineOption_GetId(guidelineOption, 2), nullptr);
328623b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_GuidelineOption_GetDirection(nullptr, 0), static_cast<ArkUI_Axis>(-1));
328723b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_GuidelineOption_GetDirection(guidelineOption, -1), static_cast<ArkUI_Axis>(-1));
328823b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_GuidelineOption_GetDirection(guidelineOption, 2), static_cast<ArkUI_Axis>(-1));
328923b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_GuidelineOption_GetPositionStart(nullptr, 0), 0.0f);
329023b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_GuidelineOption_GetPositionStart(guidelineOption, -1), 0.0f);
329123b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_GuidelineOption_GetPositionStart(guidelineOption, 2), 0.0f);
329223b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_GuidelineOption_GetPositionEnd(nullptr, 0), 0.0f);
329323b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_GuidelineOption_GetPositionEnd(guidelineOption, -1), 0.0f);
329423b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_GuidelineOption_GetPositionEnd(guidelineOption, 2), 0.0f);
329523b3eb3cSopenharmony_ci
329623b3eb3cSopenharmony_ci    auto abnormalBarrierOption = OH_ArkUI_BarrierOption_Create(-1);
329723b3eb3cSopenharmony_ci    auto barrierOption = OH_ArkUI_BarrierOption_Create(guideLineOptSize);
329823b3eb3cSopenharmony_ci    OH_ArkUI_BarrierOption_SetId(nullptr, nullptr, 0);
329923b3eb3cSopenharmony_ci    OH_ArkUI_BarrierOption_SetId(barrierOption, nullptr, -1);
330023b3eb3cSopenharmony_ci    OH_ArkUI_BarrierOption_SetId(barrierOption, nullptr, 2);
330123b3eb3cSopenharmony_ci    OH_ArkUI_BarrierOption_SetId(barrierOption, "__container__", 0);
330223b3eb3cSopenharmony_ci    OH_ArkUI_BarrierOption_SetDirection(nullptr, ARKUI_BARRIER_DIRECTION_TOP, 0);
330323b3eb3cSopenharmony_ci    OH_ArkUI_BarrierOption_SetDirection(barrierOption, ARKUI_BARRIER_DIRECTION_TOP, -1);
330423b3eb3cSopenharmony_ci    OH_ArkUI_BarrierOption_SetDirection(barrierOption, ARKUI_BARRIER_DIRECTION_TOP, 2);
330523b3eb3cSopenharmony_ci    OH_ArkUI_BarrierOption_SetDirection(barrierOption, ARKUI_BARRIER_DIRECTION_TOP, 0);
330623b3eb3cSopenharmony_ci    OH_ArkUI_BarrierOption_SetReferencedId(nullptr, nullptr, 0);
330723b3eb3cSopenharmony_ci    OH_ArkUI_BarrierOption_SetReferencedId(barrierOption, nullptr, -1);
330823b3eb3cSopenharmony_ci    OH_ArkUI_BarrierOption_SetReferencedId(barrierOption, nullptr, 2);
330923b3eb3cSopenharmony_ci    OH_ArkUI_BarrierOption_SetReferencedId(barrierOption, "__container__", 0);
331023b3eb3cSopenharmony_ci    ArkUI_AttributeItem barrierOptItem = {.object = barrierOption};
331123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_RELATIVE_CONTAINER_BARRIER, &barrierOptItem),
331223b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_NO_ERROR);
331323b3eb3cSopenharmony_ci    auto barrierOptResult = nodeAPI->getAttribute(rootNode, NODE_RELATIVE_CONTAINER_BARRIER);
331423b3eb3cSopenharmony_ci    ASSERT_NE(barrierOptResult, nullptr);
331523b3eb3cSopenharmony_ci    OH_ArkUI_BarrierOption_GetId(barrierOption, 0);
331623b3eb3cSopenharmony_ci    OH_ArkUI_BarrierOption_GetDirection(barrierOption, 0);
331723b3eb3cSopenharmony_ci    OH_ArkUI_BarrierOption_GetReferencedId(barrierOption, 0, 0);
331823b3eb3cSopenharmony_ci    OH_ArkUI_BarrierOption_GetReferencedIdSize(barrierOption, 0);
331923b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_BarrierOption_GetId(nullptr, 0), nullptr);
332023b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_BarrierOption_GetId(barrierOption, -1), nullptr);
332123b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_BarrierOption_GetId(barrierOption, 2), nullptr);
332223b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_BarrierOption_GetDirection(nullptr, 0), ARKUI_BARRIER_DIRECTION_TOP);
332323b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_BarrierOption_GetDirection(barrierOption, -1), ARKUI_BARRIER_DIRECTION_TOP);
332423b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_BarrierOption_GetDirection(barrierOption, 2), ARKUI_BARRIER_DIRECTION_TOP);
332523b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_BarrierOption_GetReferencedId(nullptr, 0, 0), nullptr);
332623b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_BarrierOption_GetReferencedId(barrierOption, -1, 0), nullptr);
332723b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_BarrierOption_GetReferencedId(barrierOption, 2, 0), nullptr);
332823b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_BarrierOption_GetReferencedId(barrierOption, 0, -1), nullptr);
332923b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_BarrierOption_GetReferencedId(barrierOption, 0, 2), nullptr);
333023b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_BarrierOption_GetReferencedIdSize(nullptr, 0), 0);
333123b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_BarrierOption_GetReferencedIdSize(barrierOption, -1), 0);
333223b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_BarrierOption_GetReferencedIdSize(barrierOption, 2), 0);
333323b3eb3cSopenharmony_ci
333423b3eb3cSopenharmony_ci    OH_ArkUI_AlignmentRuleOption_Dispose(alignRules);
333523b3eb3cSopenharmony_ci    OH_ArkUI_GuidelineOption_Dispose(guidelineOption);
333623b3eb3cSopenharmony_ci    OH_ArkUI_BarrierOption_Dispose(barrierOption);
333723b3eb3cSopenharmony_ci    OH_ArkUI_BarrierOption_Dispose(abnormalBarrierOption);
333823b3eb3cSopenharmony_ci
333923b3eb3cSopenharmony_ci    OH_ArkUI_AlignmentRuleOption_Dispose(nullptr);
334023b3eb3cSopenharmony_ci    OH_ArkUI_GuidelineOption_Dispose(nullptr);
334123b3eb3cSopenharmony_ci    OH_ArkUI_BarrierOption_Dispose(nullptr);
334223b3eb3cSopenharmony_ci
334323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_ALIGN_RULES), ARKUI_ERROR_CODE_NO_ERROR);
334423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_RELATIVE_LAYOUT_CHAIN_MODE), ARKUI_ERROR_CODE_NO_ERROR);
334523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_RELATIVE_CONTAINER_GUIDE_LINE), ARKUI_ERROR_CODE_NO_ERROR);
334623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_RELATIVE_CONTAINER_BARRIER), ARKUI_ERROR_CODE_NO_ERROR);
334723b3eb3cSopenharmony_ci    nodeAPI->disposeNode(rootNode);
334823b3eb3cSopenharmony_ci}
334923b3eb3cSopenharmony_ci
335023b3eb3cSopenharmony_ci/**
335123b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest036
335223b3eb3cSopenharmony_ci * @tc.desc: Test imageAnimatorNode function.
335323b3eb3cSopenharmony_ci * @tc.type: FUNC
335423b3eb3cSopenharmony_ci */
335523b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest036, TestSize.Level1)
335623b3eb3cSopenharmony_ci{
335723b3eb3cSopenharmony_ci    auto nodeAPI = reinterpret_cast<ArkUI_NativeNodeAPI_1*>(
335823b3eb3cSopenharmony_ci        OH_ArkUI_QueryModuleInterfaceByName(ARKUI_NATIVE_NODE, "ArkUI_NativeNodeAPI_1"));
335923b3eb3cSopenharmony_ci    auto rootNode = new ArkUI_Node({ARKUI_NODE_IMAGE_ANIMATOR, nullptr});
336023b3eb3cSopenharmony_ci    ASSERT_NE(rootNode, nullptr);
336123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_IMAGE_ANIMATOR_IMAGES), ARKUI_ERROR_CODE_NO_ERROR);
336223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_IMAGE_ANIMATOR_STATE), ARKUI_ERROR_CODE_NO_ERROR);
336323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_IMAGE_ANIMATOR_DURATION), ARKUI_ERROR_CODE_NO_ERROR);
336423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_IMAGE_ANIMATOR_REVERSE), ARKUI_ERROR_CODE_NO_ERROR);
336523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_IMAGE_ANIMATOR_FIXED_SIZE), ARKUI_ERROR_CODE_NO_ERROR);
336623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_IMAGE_ANIMATOR_FILL_MODE), ARKUI_ERROR_CODE_NO_ERROR);
336723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(rootNode, NODE_IMAGE_ANIMATOR_ITERATION), ARKUI_ERROR_CODE_NO_ERROR);
336823b3eb3cSopenharmony_ci
336923b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_IMAGE_ANIMATOR_IMAGES), nullptr);
337023b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_IMAGE_ANIMATOR_STATE), nullptr);
337123b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_IMAGE_ANIMATOR_DURATION), nullptr);
337223b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_IMAGE_ANIMATOR_REVERSE), nullptr);
337323b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_IMAGE_ANIMATOR_FIXED_SIZE), nullptr);
337423b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_IMAGE_ANIMATOR_FILL_MODE), nullptr);
337523b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_IMAGE_ANIMATOR_ITERATION), nullptr);
337623b3eb3cSopenharmony_ci    nodeAPI->disposeNode(rootNode);
337723b3eb3cSopenharmony_ci}
337823b3eb3cSopenharmony_ci
337923b3eb3cSopenharmony_ci/**
338023b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest037
338123b3eb3cSopenharmony_ci * @tc.desc: Test abnormalInputForCommon function.
338223b3eb3cSopenharmony_ci * @tc.type: FUNC
338323b3eb3cSopenharmony_ci */
338423b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest037, TestSize.Level1)
338523b3eb3cSopenharmony_ci{
338623b3eb3cSopenharmony_ci    auto nodeAPI = reinterpret_cast<ArkUI_NativeNodeAPI_1*>(
338723b3eb3cSopenharmony_ci        OH_ArkUI_QueryModuleInterfaceByName(ARKUI_NATIVE_NODE, "ArkUI_NativeNodeAPI_1"));
338823b3eb3cSopenharmony_ci    auto rootNode = new ArkUI_Node({ARKUI_NODE_STACK, nullptr});
338923b3eb3cSopenharmony_ci    float negativeFloat = -1.0f;
339023b3eb3cSopenharmony_ci    int32_t negativeEnum = -1;
339123b3eb3cSopenharmony_ci    uint32_t color = 0XFFFF0000;
339223b3eb3cSopenharmony_ci    float val0 = 0.0f;
339323b3eb3cSopenharmony_ci    float val1 = 1.0f;
339423b3eb3cSopenharmony_ci    float val10 = 10.0f;
339523b3eb3cSopenharmony_ci    ArkUI_NumberValue value[] = {{.f32 = negativeFloat}};
339623b3eb3cSopenharmony_ci    ArkUI_AttributeItem item = {value, sizeof(value) / sizeof(ArkUI_NumberValue)};
339723b3eb3cSopenharmony_ci    ArkUI_NumberValue value4[] = {{.f32 = negativeFloat}, {.f32 = negativeFloat}, {.f32 = negativeFloat},
339823b3eb3cSopenharmony_ci        {.f32 = negativeFloat}};
339923b3eb3cSopenharmony_ci    ArkUI_AttributeItem item4 = {value4, sizeof(value4) / sizeof(ArkUI_NumberValue)};
340023b3eb3cSopenharmony_ci    ArkUI_NumberValue value0[] = {};
340123b3eb3cSopenharmony_ci    ArkUI_AttributeItem item0 = {value0, 0, nullptr, nullptr};
340223b3eb3cSopenharmony_ci    ArkUI_NumberValue valueEnum[] = {{.i32 = negativeEnum}};
340323b3eb3cSopenharmony_ci    ArkUI_AttributeItem itemEnum = {valueEnum, 1, "test", nullptr};
340423b3eb3cSopenharmony_ci    ArkUI_NumberValue valueEnum4[] = {{.i32 = negativeEnum}, {.i32 = negativeEnum}, {.i32 = negativeEnum},
340523b3eb3cSopenharmony_ci        {.i32 = negativeEnum}};
340623b3eb3cSopenharmony_ci    ArkUI_AttributeItem itemEnum4 = {valueEnum4, sizeof(valueEnum4) / sizeof(ArkUI_NumberValue), nullptr, nullptr};
340723b3eb3cSopenharmony_ci
340823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_WIDTH, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
340923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_WIDTH, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
341023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_HEIGHT, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
341123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_HEIGHT, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
341223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_WIDTH_PERCENT, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
341323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_WIDTH_PERCENT, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
341423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_HEIGHT_PERCENT, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
341523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_HEIGHT_PERCENT, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
341623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_BACKGROUND_COLOR, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
341723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_BACKGROUND_IMAGE, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
341823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_BACKGROUND_IMAGE, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
341923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_PADDING, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
342023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_PADDING_PERCENT, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
342123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_ID, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
342223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_ENABLED, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
342323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_ENABLED, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
342423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_MARGIN, nullptr), ARKUI_ERROR_CODE_PARAM_INVALID);
342523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_MARGIN, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
342623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_MARGIN_PERCENT, nullptr), ARKUI_ERROR_CODE_PARAM_INVALID);
342723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_MARGIN_PERCENT, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
342823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_FONT_COLOR, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
342923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_FONT_SIZE, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
343023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TRANSLATE, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
343123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SCALE, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
343223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_ROTATE, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
343323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_BRIGHTNESS, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
343423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_BRIGHTNESS, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
343523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SATURATION, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
343623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SATURATION, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
343723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_BLUR, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
343823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_LINEAR_GRADIENT, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
343923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_LINEAR_GRADIENT, &item4), ARKUI_ERROR_CODE_PARAM_INVALID);
344023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_ALIGNMENT, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
344123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_ALIGNMENT, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
344223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_OPACITY, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
344323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_OPACITY, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
344423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_BORDER_WIDTH, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
344523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_BORDER_WIDTH, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
344623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_BORDER_WIDTH, &item4), ARKUI_ERROR_CODE_PARAM_INVALID);
344723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_BORDER_WIDTH_PERCENT, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
344823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_BORDER_WIDTH_PERCENT, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
344923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_BORDER_WIDTH_PERCENT, &item4), ARKUI_ERROR_CODE_PARAM_INVALID);
345023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_BORDER_RADIUS, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
345123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_BORDER_RADIUS, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
345223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_BORDER_RADIUS, &item4), ARKUI_ERROR_CODE_PARAM_INVALID);
345323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_BORDER_RADIUS_PERCENT, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
345423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_BORDER_RADIUS_PERCENT, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
345523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_BORDER_RADIUS_PERCENT, &item4), ARKUI_ERROR_CODE_PARAM_INVALID);
345623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_BORDER_COLOR, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
345723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_BORDER_STYLE, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
345823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_BORDER_STYLE, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
345923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_BORDER_STYLE, &itemEnum4), ARKUI_ERROR_CODE_PARAM_INVALID);
346023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_Z_INDEX, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
346123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_VISIBILITY, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
346223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_VISIBILITY, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
346323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_CLIP, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
346423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_CLIP, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
346523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_CLIP_SHAPE, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
346623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_CLIP_SHAPE, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
346723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TRANSFORM, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
346823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_HIT_TEST_BEHAVIOR, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
346923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_HIT_TEST_BEHAVIOR, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
347023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_POSITION, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
347123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SHADOW, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
347223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SHADOW, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
347323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_CUSTOM_SHADOW, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
347423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_CUSTOM_SHADOW, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
347523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_FOCUSABLE, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
347623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_FOCUSABLE, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
347723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_ACCESSIBILITY_GROUP, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
347823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_ACCESSIBILITY_GROUP, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
347923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_ACCESSIBILITY_TEXT, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
348023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_ACCESSIBILITY_MODE, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
348123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_ACCESSIBILITY_MODE, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
348223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_ACCESSIBILITY_DESCRIPTION, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
348323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_ACCESSIBILITY_ACTIONS, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
348423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_ACCESSIBILITY_ROLE, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
348523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_DEFAULT_FOCUS, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
348623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_DEFAULT_FOCUS, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
348723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_RESPONSE_REGION, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
348823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_OVERLAY, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
348923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_OVERLAY, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
349023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_BACKGROUND_IMAGE_POSITION, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
349123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SWEEP_GRADIENT, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
349223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SWEEP_GRADIENT, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
349323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_RADIAL_GRADIENT, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
349423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_RADIAL_GRADIENT, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
349523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_MASK, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
349623b3eb3cSopenharmony_ci    ArkUI_NumberValue mask[] = {{.u32 = color}, {.u32 = color}, {.f32 = val10}, {.i32 = ARKUI_MASK_TYPE_RECTANGLE},
349723b3eb3cSopenharmony_ci        {.f32 = negativeFloat}, {.f32 = negativeFloat}, {.f32 = negativeFloat}, {.f32 = negativeFloat}};
349823b3eb3cSopenharmony_ci    ArkUI_AttributeItem maskItem = {mask, sizeof(mask) / sizeof(ArkUI_NumberValue)};
349923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_MASK, &maskItem), ARKUI_ERROR_CODE_PARAM_INVALID);
350023b3eb3cSopenharmony_ci    maskItem.size = 5;
350123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_MASK, &maskItem), ARKUI_ERROR_CODE_PARAM_INVALID);
350223b3eb3cSopenharmony_ci    mask[3].i32 = ARKUI_MASK_TYPE_PATH;
350323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_MASK, &maskItem), ARKUI_ERROR_CODE_PARAM_INVALID);
350423b3eb3cSopenharmony_ci    mask[0].i32 = ARKUI_MASK_TYPE_PROGRESS;
350523b3eb3cSopenharmony_ci    mask[1].f32 = negativeFloat;
350623b3eb3cSopenharmony_ci    mask[3].u32 = color;
350723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_MASK, &maskItem), ARKUI_ERROR_CODE_PARAM_INVALID);
350823b3eb3cSopenharmony_ci    mask[1].f32 = val10;
350923b3eb3cSopenharmony_ci    mask[2].f32 = negativeFloat;
351023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_MASK, &maskItem), ARKUI_ERROR_CODE_PARAM_INVALID);
351123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_BLEND_MODE, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
351223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_BLEND_MODE, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
351323b3eb3cSopenharmony_ci
351423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_DIRECTION, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
351523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_DIRECTION, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
351623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_CONSTRAINT_SIZE, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
351723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_CONSTRAINT_SIZE, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
351823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_CONSTRAINT_SIZE, &item4), ARKUI_ERROR_CODE_PARAM_INVALID);
351923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_GRAY_SCALE, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
352023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_GRAY_SCALE, &item4), ARKUI_ERROR_CODE_PARAM_INVALID);
352123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_INVERT, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
352223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_INVERT, &item4), ARKUI_ERROR_CODE_PARAM_INVALID);
352323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SEPIA, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
352423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SEPIA, &item4), ARKUI_ERROR_CODE_PARAM_INVALID);
352523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_CONTRAST, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
352623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_CONTRAST, &item4), ARKUI_ERROR_CODE_PARAM_INVALID);
352723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_FOREGROUND_COLOR, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
352823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_OFFSET, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
352923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_MARK_ANCHOR, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
353023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_ALIGN_RULES, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
353123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_FOCUS_STATUS, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
353223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_FOCUS_STATUS, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
353323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_ASPECT_RATIO, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
353423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_ASPECT_RATIO, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
353523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_LAYOUT_WEIGHT, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
353623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_DISPLAY_PRIORITY, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
353723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_OUTLINE_WIDTH, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
353823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_GEOMETRY_TRANSITION, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
353923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_RENDER_FIT, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
354023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_RENDER_FIT, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
354123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_OUTLINE_COLOR, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
354223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SIZE, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
354323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SIZE, &item4), ARKUI_ERROR_CODE_PARAM_INVALID);
354423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_RENDER_GROUP, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
354523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_RENDER_GROUP, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
354623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_COLOR_BLEND, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
354723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_BACKGROUND_IMAGE_SIZE, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
354823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_BACKGROUND_IMAGE_SIZE, &item4), ARKUI_ERROR_CODE_PARAM_INVALID);
354923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_BACKGROUND_IMAGE_SIZE_WITH_STYLE, &item0),
355023b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
355123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_BACKGROUND_IMAGE_SIZE_WITH_STYLE, &itemEnum),
355223b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
355323b3eb3cSopenharmony_ci    ArkUI_NumberValue backgroundBlurVal[] = {{.i32 = ARKUI_BLUR_STYLE_THIN}, {.i32 = ARKUI_COLOR_MODE_SYSTEM},
355423b3eb3cSopenharmony_ci        {.i32 = ARKUI_ADAPTIVE_COLOR_DEFAULT}, {.f32 = 0}, {.f32 = 0}, {.f32 = negativeFloat}};
355523b3eb3cSopenharmony_ci    ArkUI_AttributeItem backgroundBlurItem = {backgroundBlurVal, sizeof(backgroundBlurVal) / sizeof(ArkUI_NumberValue)};
355623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_BACKGROUND_BLUR_STYLE, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
355723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_FOREGROUND_BLUR_STYLE, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
355823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_BACKGROUND_BLUR_STYLE, &backgroundBlurItem),
355923b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
356023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_FOREGROUND_BLUR_STYLE, &backgroundBlurItem),
356123b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
356223b3eb3cSopenharmony_ci    backgroundBlurVal[4].f32 = negativeFloat;
356323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_BACKGROUND_BLUR_STYLE, &backgroundBlurItem),
356423b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
356523b3eb3cSopenharmony_ci    backgroundBlurVal[3].f32 = negativeFloat;
356623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_BACKGROUND_BLUR_STYLE, &backgroundBlurItem),
356723b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
356823b3eb3cSopenharmony_ci    backgroundBlurVal[2].i32 = negativeEnum;
356923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_BACKGROUND_BLUR_STYLE, &backgroundBlurItem),
357023b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
357123b3eb3cSopenharmony_ci    backgroundBlurVal[1].i32 = negativeEnum;
357223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_BACKGROUND_BLUR_STYLE, &backgroundBlurItem),
357323b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
357423b3eb3cSopenharmony_ci    backgroundBlurVal[0].i32 = negativeEnum;
357523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_BACKGROUND_BLUR_STYLE, &backgroundBlurItem),
357623b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
357723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TRANSFORM_CENTER, &item4), ARKUI_ERROR_CODE_PARAM_INVALID);
357823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_OPACITY_TRANSITION, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
357923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_ROTATE_TRANSITION, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
358023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SCALE_TRANSITION, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
358123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TRANSLATE_TRANSITION, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
358223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_MOVE_TRANSITION, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
358323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_LAYOUT_RECT, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
358423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_LAYOUT_RECT, &itemEnum4), ARKUI_ERROR_CODE_PARAM_INVALID);
358523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_FOCUS_ON_TOUCH, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
358623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_FOCUS_ON_TOUCH, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
358723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_ACCESSIBILITY_STATE, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
358823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_ACCESSIBILITY_VALUE, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
358923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_EXPAND_SAFE_AREA, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
359023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_VISIBLE_AREA_CHANGE_RATIO, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
359123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_VISIBLE_AREA_CHANGE_RATIO, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
359223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TRANSITION, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
359323b3eb3cSopenharmony_ci
359423b3eb3cSopenharmony_ci    ArkUI_NumberValue opacityTransition[] = {{.f32 = val0}, {.i32 = 1000}, {.i32 = ARKUI_CURVE_LINEAR}, {.i32 = 1000},
359523b3eb3cSopenharmony_ci        {.i32 = 1}, {.i32 = ARKUI_ANIMATION_PLAY_MODE_NORMAL}, {.f32 = val1}};
359623b3eb3cSopenharmony_ci    ArkUI_AttributeItem opacityTransitionItem =
359723b3eb3cSopenharmony_ci        {opacityTransition, sizeof(opacityTransition) / sizeof(ArkUI_NumberValue)};
359823b3eb3cSopenharmony_ci    opacityTransition[6].f32 = negativeFloat;
359923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_OPACITY_TRANSITION, &opacityTransitionItem),
360023b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
360123b3eb3cSopenharmony_ci    opacityTransition[5].i32 = negativeEnum;
360223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_OPACITY_TRANSITION, &opacityTransitionItem),
360323b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
360423b3eb3cSopenharmony_ci    opacityTransition[5].i32 = static_cast<int32_t>(ARKUI_ANIMATION_PLAY_MODE_ALTERNATE_REVERSE) + 1;
360523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_OPACITY_TRANSITION, &opacityTransitionItem),
360623b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
360723b3eb3cSopenharmony_ci    opacityTransition[2].i32 = negativeEnum;
360823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_OPACITY_TRANSITION, &opacityTransitionItem),
360923b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
361023b3eb3cSopenharmony_ci    opacityTransition[2].i32 = static_cast<int32_t>(ARKUI_CURVE_FRICTION) + 1;
361123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_OPACITY_TRANSITION, &opacityTransitionItem),
361223b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
361323b3eb3cSopenharmony_ci
361423b3eb3cSopenharmony_ci    valueEnum4[0].i32 = 0;
361523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_BLEND_MODE, &itemEnum4), ARKUI_ERROR_CODE_PARAM_INVALID);
361623b3eb3cSopenharmony_ci    valueEnum4[2].i32 = 0;
361723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_LAYOUT_RECT, &itemEnum4), ARKUI_ERROR_CODE_PARAM_INVALID);
361823b3eb3cSopenharmony_ci    valueEnum4[0].u32 = 0;
361923b3eb3cSopenharmony_ci    valueEnum4[1].u32 = 0;
362023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_EXPAND_SAFE_AREA, &itemEnum4), ARKUI_ERROR_CODE_NO_ERROR);
362123b3eb3cSopenharmony_ci    valueEnum4[1].u32 = 20;
362223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_EXPAND_SAFE_AREA, &itemEnum4), ARKUI_ERROR_CODE_PARAM_INVALID);
362323b3eb3cSopenharmony_ci    valueEnum4[0].u32 = 20;
362423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_EXPAND_SAFE_AREA, &itemEnum4), ARKUI_ERROR_CODE_PARAM_INVALID);
362523b3eb3cSopenharmony_ci    valueEnum[0].u32 = -1;
362623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_ACCESSIBILITY_ROLE, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
362723b3eb3cSopenharmony_ci    item0.size = -1;
362823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TRANSFORM_CENTER, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
362923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_BORDER_WIDTH, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
363023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_BORDER_RADIUS, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
363123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_BORDER_WIDTH_PERCENT, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
363223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_BORDER_RADIUS_PERCENT, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
363323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_BORDER_COLOR, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
363423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_BORDER_STYLE, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
363523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_CUSTOM_SHADOW, &item0), ARKUI_ERROR_CODE_NO_ERROR);
363623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_OUTLINE_COLOR, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
363723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_EXPAND_SAFE_AREA, &item0), ARKUI_ERROR_CODE_NO_ERROR);
363823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TEXT_INPUT_PLACEHOLDER_FONT, &item0), ARKUI_ERROR_CODE_NO_ERROR);
363923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TEXT_AREA_PLACEHOLDER_FONT, &item0), ARKUI_ERROR_CODE_NO_ERROR);
364023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TEXT_AREA_SHOW_COUNTER, &item0), ARKUI_ERROR_CODE_NO_ERROR);
364123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_ALIGN_RULES, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
364223b3eb3cSopenharmony_ci
364323b3eb3cSopenharmony_ci    value[0].f32 = 2.0f;
364423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_OPACITY, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
364523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_FONT_SIZE, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
364623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_VISIBLE_AREA_CHANGE_RATIO, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
364723b3eb3cSopenharmony_ci    valueEnum[0].i32 = static_cast<int32_t>(MAX_NODE_SCOPE_NUM);
364823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_BORDER_STYLE, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
364923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_VISIBILITY, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
365023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_CLIP, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
365123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_HIT_TEST_BEHAVIOR, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
365223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SHADOW, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
365323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_DIRECTION, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
365423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_ALIGN_SELF, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
365523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_RENDER_FIT, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
365623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_FONT_WEIGHT, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
365723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_FONT_STYLE, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
365823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TEXT_INPUT_MAX_LENGTH, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
365923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TEXT_INPUT_ENTER_KEY_TYPE, &itemEnum),
366023b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
366123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TEXT_INPUT_TYPE, &itemEnum),
366223b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
366323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TEXT_AREA_TYPE, &itemEnum),
366423b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
366523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TEXT_INPUT_ENABLE_KEYBOARD_ON_FOCUS, &itemEnum),
366623b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
366723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TEXT_INPUT_SHOW_PASSWORD_ICON, &itemEnum),
366823b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
366923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TEXT_INPUT_EDITING, &itemEnum),
367023b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
367123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TEXT_AREA_EDITING, &itemEnum),
367223b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
367323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TEXT_INPUT_CANCEL_BUTTON, &itemEnum),
367423b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
367523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_STACK_ALIGN_CONTENT, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
367623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SWIPER_CURVE, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
367723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SWIPER_EDGE_EFFECT_MODE, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
367823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TEXT_DECORATION, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
367923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TEXT_CASE, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
368023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TEXT_ALIGN, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
368123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TEXT_OVERFLOW, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
368223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_IMAGE_SPAN_VERTICAL_ALIGNMENT, &itemEnum),
368323b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
368423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_IMAGE_OBJECT_FIT, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
368523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_IMAGE_INTERPOLATION, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
368623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_IMAGE_OBJECT_REPEAT, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
368723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_IMAGE_RENDER_MODE, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
368823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_IMAGE_FIT_ORIGINAL_SIZE, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
368923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_CALENDAR_PICKER_EDGE_ALIGNMENT, &itemEnum),
369023b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
369123b3eb3cSopenharmony_ci    valueEnum4[0].i32 = static_cast<int32_t>(MAX_NODE_SCOPE_NUM);
369223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_BORDER_STYLE, &itemEnum4), ARKUI_ERROR_CODE_PARAM_INVALID);
369323b3eb3cSopenharmony_ci    valueEnum[0].u32 = static_cast<int32_t>(MAX_NODE_SCOPE_NUM);
369423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_ACCESSIBILITY_ACTIONS, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
369523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TEXT_INPUT_CARET_COLOR, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
369623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TEXT_INPUT_PLACEHOLDER_COLOR, &itemEnum),
369723b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
369823b3eb3cSopenharmony_ci    valueEnum[0].i32 = true;
369923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_FOCUS_STATUS, &itemEnum), ARKUI_ERROR_CODE_NO_ERROR);
370023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_FONT_STYLE, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
370123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TEXT_COPY_OPTION, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
370223b3eb3cSopenharmony_ci
370323b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_FOCUS_STATUS), nullptr);
370423b3eb3cSopenharmony_ci    EXPECT_NE(nodeAPI->getAttribute(rootNode, NODE_OUTLINE_WIDTH), nullptr);
370523b3eb3cSopenharmony_ci    nodeAPI->disposeNode(rootNode);
370623b3eb3cSopenharmony_ci}
370723b3eb3cSopenharmony_ci
370823b3eb3cSopenharmony_ci/**
370923b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest038
371023b3eb3cSopenharmony_ci * @tc.desc: Test abnormalInputForText function.
371123b3eb3cSopenharmony_ci * @tc.type: FUNC
371223b3eb3cSopenharmony_ci */
371323b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest038, TestSize.Level1)
371423b3eb3cSopenharmony_ci{
371523b3eb3cSopenharmony_ci    auto nodeAPI = reinterpret_cast<ArkUI_NativeNodeAPI_1*>(
371623b3eb3cSopenharmony_ci        OH_ArkUI_QueryModuleInterfaceByName(ARKUI_NATIVE_NODE, "ArkUI_NativeNodeAPI_1"));
371723b3eb3cSopenharmony_ci    auto rootNode = new ArkUI_Node({ARKUI_NODE_TEXT, nullptr});
371823b3eb3cSopenharmony_ci    float negativeFloat = -1.0f;
371923b3eb3cSopenharmony_ci    int32_t negativeInt = -1;
372023b3eb3cSopenharmony_ci    ArkUI_NumberValue value[] = {{.f32 = negativeFloat}};
372123b3eb3cSopenharmony_ci    ArkUI_AttributeItem item = {value, sizeof(value) / sizeof(ArkUI_NumberValue), nullptr, nullptr};
372223b3eb3cSopenharmony_ci    ArkUI_NumberValue value0[] = {};
372323b3eb3cSopenharmony_ci    ArkUI_AttributeItem item0 = {value0, 0, nullptr, nullptr};
372423b3eb3cSopenharmony_ci    ArkUI_NumberValue value4[] = {{.f32 = negativeFloat}, {.f32 = negativeFloat}, {.f32 = negativeFloat},
372523b3eb3cSopenharmony_ci        {.f32 = negativeFloat}};
372623b3eb3cSopenharmony_ci    ArkUI_AttributeItem item4 = {value4, sizeof(value4) / sizeof(ArkUI_NumberValue), nullptr, nullptr};
372723b3eb3cSopenharmony_ci    ArkUI_NumberValue valueEnum[] = {{.i32 = negativeInt}};
372823b3eb3cSopenharmony_ci    ArkUI_AttributeItem itemEnum = {valueEnum, sizeof(valueEnum) / sizeof(ArkUI_NumberValue), nullptr, nullptr};
372923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TEXT_CONTENT, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
373023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_FONT_COLOR, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
373123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_FONT_SIZE, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
373223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_FONT_STYLE, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
373323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_FONT_WEIGHT, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
373423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_FONT_WEIGHT, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
373523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TEXT_LINE_HEIGHT, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
373623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TEXT_DECORATION, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
373723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TEXT_DECORATION, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
373823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TEXT_CASE, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
373923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TEXT_CASE, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
374023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TEXT_LETTER_SPACING, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
374123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TEXT_MAX_LINES, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
374223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TEXT_ALIGN, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
374323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TEXT_ALIGN, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
374423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TEXT_OVERFLOW, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
374523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TEXT_OVERFLOW, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
374623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_FONT_FAMILY, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
374723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TEXT_COPY_OPTION, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
374823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TEXT_BASELINE_OFFSET, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
374923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TEXT_TEXT_SHADOW, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
375023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TEXT_MIN_FONT_SIZE, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
375123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TEXT_MAX_FONT_SIZE, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
375223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TEXT_FONT, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
375323b3eb3cSopenharmony_ci    value4[1].i32 = negativeInt;
375423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TEXT_FONT, &item4), ARKUI_ERROR_CODE_PARAM_INVALID);
375523b3eb3cSopenharmony_ci    value4[1].i32 = 0;
375623b3eb3cSopenharmony_ci    value4[2].i32 = negativeInt;
375723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TEXT_FONT, &item4), ARKUI_ERROR_CODE_PARAM_INVALID);
375823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TEXT_HEIGHT_ADAPTIVE_POLICY, &item0),
375923b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
376023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TEXT_HEIGHT_ADAPTIVE_POLICY, &itemEnum),
376123b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
376223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TEXT_INDENT, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
376323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TEXT_WORD_BREAK, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
376423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TEXT_ELLIPSIS_MODE, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
376523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TEXT_LINE_SPACING, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
376623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TEXT_LINE_SPACING, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
376723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TEXT_FONT_FEATURE, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
376823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TEXT_ENABLE_DATA_DETECTOR, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
376923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TEXT_SELECTED_BACKGROUND_COLOR, &item0),
377023b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
377123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TEXT_CONTENT_WITH_STYLED_STRING, &item0),
377223b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
377323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TEXT_CONTENT_WITH_STYLED_STRING, nullptr),
377423b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
377523b3eb3cSopenharmony_ci    nodeAPI->disposeNode(rootNode);
377623b3eb3cSopenharmony_ci}
377723b3eb3cSopenharmony_ci
377823b3eb3cSopenharmony_ci/**
377923b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest039
378023b3eb3cSopenharmony_ci * @tc.desc: Test abnormalInputForTextField function.
378123b3eb3cSopenharmony_ci * @tc.type: FUNC
378223b3eb3cSopenharmony_ci */
378323b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest039, TestSize.Level1)
378423b3eb3cSopenharmony_ci{
378523b3eb3cSopenharmony_ci    auto nodeAPI = reinterpret_cast<ArkUI_NativeNodeAPI_1*>(
378623b3eb3cSopenharmony_ci        OH_ArkUI_QueryModuleInterfaceByName(ARKUI_NATIVE_NODE, "ArkUI_NativeNodeAPI_1"));
378723b3eb3cSopenharmony_ci    auto textinput = new ArkUI_Node({ARKUI_NODE_TEXT_INPUT, nullptr});
378823b3eb3cSopenharmony_ci    auto textarea = new ArkUI_Node({ARKUI_NODE_TEXT_AREA, nullptr});
378923b3eb3cSopenharmony_ci    float negativeFloat = -1.0f;
379023b3eb3cSopenharmony_ci    int32_t negativeInt = -1;
379123b3eb3cSopenharmony_ci    ArkUI_NumberValue value[] = {{.f32 = negativeFloat}};
379223b3eb3cSopenharmony_ci    ArkUI_AttributeItem item = {value, sizeof(value) / sizeof(ArkUI_NumberValue)};
379323b3eb3cSopenharmony_ci    ArkUI_NumberValue value0[] = {};
379423b3eb3cSopenharmony_ci    ArkUI_AttributeItem item0 = {value0, 0, nullptr, nullptr};
379523b3eb3cSopenharmony_ci    ArkUI_NumberValue value4[] = {{.f32 = 0.0f}, {.i32 = negativeInt}, {.i32 = negativeInt},
379623b3eb3cSopenharmony_ci        {.i32 = negativeInt}};
379723b3eb3cSopenharmony_ci    ArkUI_AttributeItem item4 = {value4, sizeof(value4) / sizeof(ArkUI_NumberValue), nullptr, nullptr};
379823b3eb3cSopenharmony_ci    ArkUI_NumberValue valueEnum[] = {{.i32 = negativeInt}};
379923b3eb3cSopenharmony_ci    ArkUI_AttributeItem itemEnum = {valueEnum, sizeof(valueEnum) / sizeof(ArkUI_NumberValue), nullptr, nullptr};
380023b3eb3cSopenharmony_ci
380123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(textinput, NODE_TEXT_INPUT_CARET_COLOR, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
380223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(textinput, NODE_TEXT_INPUT_CARET_STYLE, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
380323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(textinput, NODE_TEXT_INPUT_SHOW_UNDERLINE, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
380423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(textinput, NODE_TEXT_INPUT_SHOW_UNDERLINE, &itemEnum),
380523b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
380623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(textinput, NODE_TEXT_INPUT_MAX_LENGTH, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
380723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(textinput, NODE_TEXT_INPUT_MAX_LENGTH, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
380823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(textinput, NODE_TEXT_INPUT_ENTER_KEY_TYPE, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
380923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(textinput, NODE_TEXT_INPUT_ENTER_KEY_TYPE, &itemEnum),
381023b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
381123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(textinput, NODE_TEXT_INPUT_PLACEHOLDER_COLOR, &item0),
381223b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
381323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(
381423b3eb3cSopenharmony_ci        textinput, NODE_TEXT_INPUT_PLACEHOLDER_FONT, nullptr), ARKUI_ERROR_CODE_PARAM_INVALID);
381523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(
381623b3eb3cSopenharmony_ci        textinput, NODE_TEXT_INPUT_PLACEHOLDER_FONT, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
381723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(textinput, NODE_TEXT_INPUT_ENABLE_KEYBOARD_ON_FOCUS, &item0),
381823b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
381923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(textinput, NODE_TEXT_INPUT_ENABLE_KEYBOARD_ON_FOCUS, &itemEnum),
382023b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
382123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(textinput, NODE_TEXT_INPUT_TYPE, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
382223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(textinput, NODE_TEXT_INPUT_TYPE, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
382323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(textinput, NODE_TEXT_INPUT_SELECTED_BACKGROUND_COLOR, &item0),
382423b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
382523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(textinput, NODE_TEXT_INPUT_SHOW_PASSWORD_ICON, &item0),
382623b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
382723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(textinput, NODE_TEXT_INPUT_SHOW_PASSWORD_ICON, &itemEnum),
382823b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
382923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(textinput, NODE_TEXT_INPUT_EDITING, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
383023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(textinput, NODE_TEXT_INPUT_EDITING, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
383123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(textinput, NODE_TEXT_INPUT_CANCEL_BUTTON, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
383223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(textinput, NODE_TEXT_INPUT_CANCEL_BUTTON, &itemEnum),
383323b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
383423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(textinput, NODE_TEXT_INPUT_TEXT_SELECTION, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
383523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(textinput, NODE_TEXT_INPUT_UNDERLINE_COLOR, &item0),
383623b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
383723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(textinput, NODE_TEXT_INPUT_ENABLE_AUTO_FILL, &item0),
383823b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
383923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(textinput, NODE_TEXT_INPUT_CONTENT_TYPE, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
384023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(textinput, NODE_TEXT_INPUT_SELECT_ALL, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
384123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(textinput, NODE_TEXT_INPUT_STYLE, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
384223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(textinput, NODE_TEXT_INPUT_CARET_OFFSET, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
384323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(textinput, NODE_TEXT_INPUT_SELECTION_MENU_HIDDEN, &item0),
384423b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
384523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(textinput, NODE_TEXT_INPUT_SELECTION_MENU_HIDDEN, &itemEnum),
384623b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
384723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(textinput, NODE_TEXT_INPUT_BLUR_ON_SUBMIT, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
384823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(textinput, NODE_TEXT_INPUT_CUSTOM_KEYBOARD, &item0),
384923b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
385023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(textinput, NODE_TEXT_INPUT_WORD_BREAK, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
385123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(textinput, NODE_TEXT_INPUT_SHOW_KEYBOARD_ON_FOCUS, &item0),
385223b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
385323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(textinput, NODE_TEXT_INPUT_NUMBER_OF_LINES, &item0),
385423b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
385523b3eb3cSopenharmony_ci
385623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(
385723b3eb3cSopenharmony_ci        textarea, NODE_TEXT_AREA_PLACEHOLDER_FONT, nullptr), ARKUI_ERROR_CODE_PARAM_INVALID);
385823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(
385923b3eb3cSopenharmony_ci        textarea, NODE_TEXT_AREA_PLACEHOLDER_FONT, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
386023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(
386123b3eb3cSopenharmony_ci        textarea, NODE_TEXT_AREA_PLACEHOLDER_FONT, &item4), ARKUI_ERROR_CODE_PARAM_INVALID);
386223b3eb3cSopenharmony_ci    value4[1].i32 = ARKUI_FONT_STYLE_ITALIC;
386323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(
386423b3eb3cSopenharmony_ci        textarea, NODE_TEXT_AREA_PLACEHOLDER_FONT, &item4), ARKUI_ERROR_CODE_PARAM_INVALID);
386523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(
386623b3eb3cSopenharmony_ci        textinput, NODE_TEXT_INPUT_PLACEHOLDER_FONT, &item4), ARKUI_ERROR_CODE_PARAM_INVALID);
386723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(textarea, NODE_TEXT_AREA_EDITING, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
386823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(textarea, NODE_TEXT_AREA_TYPE, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
386923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(textarea, NODE_TEXT_AREA_SHOW_COUNTER, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
387023b3eb3cSopenharmony_ci    value4[0].i32 = negativeInt;
387123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(textarea, NODE_TEXT_AREA_SHOW_COUNTER, &item4), ARKUI_ERROR_CODE_PARAM_INVALID);
387223b3eb3cSopenharmony_ci    value4[0].i32 = 0;
387323b3eb3cSopenharmony_ci    value4[1].f32 = negativeFloat;
387423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(textarea, NODE_TEXT_AREA_SHOW_COUNTER, &item4), ARKUI_ERROR_CODE_PARAM_INVALID);
387523b3eb3cSopenharmony_ci    value4[1].f32 = 1.0f;
387623b3eb3cSopenharmony_ci    value4[2].i32 = negativeInt;
387723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(textarea, NODE_TEXT_AREA_SHOW_COUNTER, &item4), ARKUI_ERROR_CODE_PARAM_INVALID);
387823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(
387923b3eb3cSopenharmony_ci        textarea, NODE_TEXT_AREA_SELECTION_MENU_HIDDEN, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
388023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(
388123b3eb3cSopenharmony_ci        textarea, NODE_TEXT_AREA_SELECTION_MENU_HIDDEN, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
388223b3eb3cSopenharmony_ci    nodeAPI->disposeNode(textinput);
388323b3eb3cSopenharmony_ci    nodeAPI->disposeNode(textarea);
388423b3eb3cSopenharmony_ci}
388523b3eb3cSopenharmony_ci
388623b3eb3cSopenharmony_ci/**
388723b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest040
388823b3eb3cSopenharmony_ci * @tc.desc: Test abnormalInputForWaterflow function.
388923b3eb3cSopenharmony_ci * @tc.type: FUNC
389023b3eb3cSopenharmony_ci */
389123b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest040, TestSize.Level1)
389223b3eb3cSopenharmony_ci{
389323b3eb3cSopenharmony_ci    auto nodeAPI = reinterpret_cast<ArkUI_NativeNodeAPI_1*>(
389423b3eb3cSopenharmony_ci        OH_ArkUI_QueryModuleInterfaceByName(ARKUI_NATIVE_NODE, "ArkUI_NativeNodeAPI_1"));
389523b3eb3cSopenharmony_ci    auto rootNode = nodeAPI->createNode(ARKUI_NODE_WATER_FLOW);
389623b3eb3cSopenharmony_ci    float negativeFloat = -1.0f;
389723b3eb3cSopenharmony_ci    ArkUI_NumberValue value[] = {{.f32 = negativeFloat}};
389823b3eb3cSopenharmony_ci    ArkUI_AttributeItem item = {value, sizeof(value) / sizeof(ArkUI_NumberValue)};
389923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_WATER_FLOW_COLUMN_GAP, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
390023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_WATER_FLOW_ROW_GAP, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
390123b3eb3cSopenharmony_ci    nodeAPI->disposeNode(rootNode);
390223b3eb3cSopenharmony_ci}
390323b3eb3cSopenharmony_ci
390423b3eb3cSopenharmony_ci/**
390523b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest041
390623b3eb3cSopenharmony_ci * @tc.desc: Test abnormalInputForGrid function.
390723b3eb3cSopenharmony_ci * @tc.type: FUNC
390823b3eb3cSopenharmony_ci */
390923b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest041, TestSize.Level1)
391023b3eb3cSopenharmony_ci{
391123b3eb3cSopenharmony_ci    auto nodeAPI = reinterpret_cast<ArkUI_NativeNodeAPI_1*>(
391223b3eb3cSopenharmony_ci        OH_ArkUI_QueryModuleInterfaceByName(ARKUI_NATIVE_NODE, "ArkUI_NativeNodeAPI_1"));
391323b3eb3cSopenharmony_ci    auto rootNode = nodeAPI->createNode(ARKUI_NODE_GRID);
391423b3eb3cSopenharmony_ci    float negativeFloat = -1.0f;
391523b3eb3cSopenharmony_ci    ArkUI_NumberValue value[] = {{.f32 = negativeFloat}};
391623b3eb3cSopenharmony_ci    ArkUI_AttributeItem item = {value, sizeof(value) / sizeof(ArkUI_NumberValue)};
391723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_GRID_COLUMN_GAP, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
391823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_GRID_ROW_GAP, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
391923b3eb3cSopenharmony_ci    nodeAPI->disposeNode(rootNode);
392023b3eb3cSopenharmony_ci}
392123b3eb3cSopenharmony_ci
392223b3eb3cSopenharmony_ci/**
392323b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest042
392423b3eb3cSopenharmony_ci * @tc.desc: Test abnormalInputForSpan function.
392523b3eb3cSopenharmony_ci * @tc.type: FUNC
392623b3eb3cSopenharmony_ci */
392723b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest042, TestSize.Level1)
392823b3eb3cSopenharmony_ci{
392923b3eb3cSopenharmony_ci    auto nodeAPI = reinterpret_cast<ArkUI_NativeNodeAPI_1*>(
393023b3eb3cSopenharmony_ci        OH_ArkUI_QueryModuleInterfaceByName(ARKUI_NATIVE_NODE, "ArkUI_NativeNodeAPI_1"));
393123b3eb3cSopenharmony_ci    auto rootNode = nodeAPI->createNode(ARKUI_NODE_SPAN);
393223b3eb3cSopenharmony_ci    float negativeFloat = -1.0f;
393323b3eb3cSopenharmony_ci    ArkUI_NumberValue value[] = {{.f32 = negativeFloat}};
393423b3eb3cSopenharmony_ci    ArkUI_AttributeItem item = {value, sizeof(value) / sizeof(ArkUI_NumberValue), nullptr, nullptr};
393523b3eb3cSopenharmony_ci    ArkUI_NumberValue value0[] = {};
393623b3eb3cSopenharmony_ci    ArkUI_AttributeItem item0 = {value0, 0, nullptr, nullptr};
393723b3eb3cSopenharmony_ci    ArkUI_NumberValue value4[] = {{.f32 = negativeFloat}, {.f32 = negativeFloat}, {.f32 = negativeFloat},
393823b3eb3cSopenharmony_ci        {.f32 = negativeFloat}};
393923b3eb3cSopenharmony_ci    ArkUI_AttributeItem item4 = {value4, sizeof(value4) / sizeof(ArkUI_NumberValue), nullptr, nullptr};
394023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SPAN_CONTENT, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
394123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SPAN_TEXT_BACKGROUND_STYLE, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
394223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SPAN_TEXT_BACKGROUND_STYLE, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
394323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SPAN_TEXT_BACKGROUND_STYLE, &item4), ARKUI_ERROR_CODE_PARAM_INVALID);
394423b3eb3cSopenharmony_ci    nodeAPI->disposeNode(rootNode);
394523b3eb3cSopenharmony_ci}
394623b3eb3cSopenharmony_ci
394723b3eb3cSopenharmony_ci/**
394823b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest043
394923b3eb3cSopenharmony_ci * @tc.desc: Test abnormalInputForImageSpan function.
395023b3eb3cSopenharmony_ci * @tc.type: FUNC
395123b3eb3cSopenharmony_ci */
395223b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest043, TestSize.Level1)
395323b3eb3cSopenharmony_ci{
395423b3eb3cSopenharmony_ci    auto nodeAPI = reinterpret_cast<ArkUI_NativeNodeAPI_1*>(
395523b3eb3cSopenharmony_ci        OH_ArkUI_QueryModuleInterfaceByName(ARKUI_NATIVE_NODE, "ArkUI_NativeNodeAPI_1"));
395623b3eb3cSopenharmony_ci    auto rootNode = new ArkUI_Node({ARKUI_NODE_IMAGE_SPAN, nullptr});
395723b3eb3cSopenharmony_ci    int32_t negativeInt = -1;
395823b3eb3cSopenharmony_ci    ArkUI_NumberValue value0[] = {};
395923b3eb3cSopenharmony_ci    ArkUI_AttributeItem item0 = {value0, 0, nullptr, nullptr};
396023b3eb3cSopenharmony_ci    ArkUI_NumberValue valueEnum[] = {{.i32 = negativeInt}};
396123b3eb3cSopenharmony_ci    ArkUI_AttributeItem itemEnum = {valueEnum, sizeof(valueEnum) / sizeof(ArkUI_NumberValue), nullptr, nullptr};
396223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_IMAGE_SPAN_SRC, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
396323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_IMAGE_SPAN_VERTICAL_ALIGNMENT, &item0),
396423b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
396523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_IMAGE_SPAN_VERTICAL_ALIGNMENT, &itemEnum),
396623b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
396723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_IMAGE_SPAN_ALT, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
396823b3eb3cSopenharmony_ci    nodeAPI->disposeNode(rootNode);
396923b3eb3cSopenharmony_ci}
397023b3eb3cSopenharmony_ci
397123b3eb3cSopenharmony_ci/**
397223b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest044
397323b3eb3cSopenharmony_ci * @tc.desc: Test abnormalInputForImage function.
397423b3eb3cSopenharmony_ci * @tc.type: FUNC
397523b3eb3cSopenharmony_ci */
397623b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest044, TestSize.Level1)
397723b3eb3cSopenharmony_ci{
397823b3eb3cSopenharmony_ci    auto nodeAPI = reinterpret_cast<ArkUI_NativeNodeAPI_1*>(
397923b3eb3cSopenharmony_ci        OH_ArkUI_QueryModuleInterfaceByName(ARKUI_NATIVE_NODE, "ArkUI_NativeNodeAPI_1"));
398023b3eb3cSopenharmony_ci    auto rootNode = new ArkUI_Node({ARKUI_NODE_IMAGE, nullptr});
398123b3eb3cSopenharmony_ci    int32_t negativeInt = -1;
398223b3eb3cSopenharmony_ci    ArkUI_NumberValue value0[] = {};
398323b3eb3cSopenharmony_ci    ArkUI_AttributeItem item0 = {value0, 0, nullptr, nullptr};
398423b3eb3cSopenharmony_ci    ArkUI_NumberValue valueEnum[] = {{.i32 = negativeInt}};
398523b3eb3cSopenharmony_ci    ArkUI_AttributeItem itemEnum = {valueEnum, sizeof(valueEnum) / sizeof(ArkUI_NumberValue), nullptr, nullptr};
398623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_IMAGE_SRC, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
398723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_IMAGE_OBJECT_FIT, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
398823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_IMAGE_OBJECT_FIT, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
398923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_IMAGE_INTERPOLATION, &itemEnum),
399023b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
399123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_IMAGE_INTERPOLATION, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
399223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_IMAGE_OBJECT_REPEAT, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
399323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_IMAGE_OBJECT_REPEAT, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
399423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_IMAGE_COLOR_FILTER, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
399523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_IMAGE_AUTO_RESIZE, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
399623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_IMAGE_ALT, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
399723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_IMAGE_DRAGGABLE, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
399823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_IMAGE_RENDER_MODE, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
399923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_IMAGE_RENDER_MODE, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
400023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_IMAGE_FIT_ORIGINAL_SIZE, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
400123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_IMAGE_FIT_ORIGINAL_SIZE, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
400223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_IMAGE_FILL_COLOR, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
400323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_IMAGE_RESIZABLE, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
400423b3eb3cSopenharmony_ci    nodeAPI->disposeNode(rootNode);
400523b3eb3cSopenharmony_ci}
400623b3eb3cSopenharmony_ci
400723b3eb3cSopenharmony_ci/**
400823b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest045
400923b3eb3cSopenharmony_ci * @tc.desc: Test abnormalInputForToggle function.
401023b3eb3cSopenharmony_ci * @tc.type: FUNC
401123b3eb3cSopenharmony_ci */
401223b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest045, TestSize.Level1)
401323b3eb3cSopenharmony_ci{
401423b3eb3cSopenharmony_ci    auto nodeAPI = reinterpret_cast<ArkUI_NativeNodeAPI_1*>(
401523b3eb3cSopenharmony_ci        OH_ArkUI_QueryModuleInterfaceByName(ARKUI_NATIVE_NODE, "ArkUI_NativeNodeAPI_1"));
401623b3eb3cSopenharmony_ci    auto rootNode = nodeAPI->createNode(ARKUI_NODE_TOGGLE);
401723b3eb3cSopenharmony_ci    ArkUI_NumberValue value0[] = {};
401823b3eb3cSopenharmony_ci    ArkUI_AttributeItem item0 = {value0, 0, nullptr, nullptr};
401923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TOGGLE_SELECTED_COLOR, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
402023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TOGGLE_SWITCH_POINT_COLOR, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
402123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TOGGLE_VALUE, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
402223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TOGGLE_UNSELECTED_COLOR, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
402323b3eb3cSopenharmony_ci    nodeAPI->disposeNode(rootNode);
402423b3eb3cSopenharmony_ci}
402523b3eb3cSopenharmony_ci
402623b3eb3cSopenharmony_ci/**
402723b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest046
402823b3eb3cSopenharmony_ci * @tc.desc: Test abnormalInputForLoadingProgress function.
402923b3eb3cSopenharmony_ci * @tc.type: FUNC
403023b3eb3cSopenharmony_ci */
403123b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest046, TestSize.Level1)
403223b3eb3cSopenharmony_ci{
403323b3eb3cSopenharmony_ci    auto nodeAPI = reinterpret_cast<ArkUI_NativeNodeAPI_1*>(
403423b3eb3cSopenharmony_ci        OH_ArkUI_QueryModuleInterfaceByName(ARKUI_NATIVE_NODE, "ArkUI_NativeNodeAPI_1"));
403523b3eb3cSopenharmony_ci    auto rootNode = nodeAPI->createNode(ARKUI_NODE_LOADING_PROGRESS);
403623b3eb3cSopenharmony_ci    ArkUI_NumberValue value0[] = {};
403723b3eb3cSopenharmony_ci    ArkUI_AttributeItem item0 = {value0, 0, nullptr, nullptr};
403823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_LOADING_PROGRESS_COLOR, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
403923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_LOADING_PROGRESS_ENABLE_LOADING, &item0),
404023b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
404123b3eb3cSopenharmony_ci    nodeAPI->disposeNode(rootNode);
404223b3eb3cSopenharmony_ci}
404323b3eb3cSopenharmony_ci
404423b3eb3cSopenharmony_ci/**
404523b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest047
404623b3eb3cSopenharmony_ci * @tc.desc: Test abnormalInputForButton function.
404723b3eb3cSopenharmony_ci * @tc.type: FUNC
404823b3eb3cSopenharmony_ci */
404923b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest047, TestSize.Level1)
405023b3eb3cSopenharmony_ci{
405123b3eb3cSopenharmony_ci    auto nodeAPI = reinterpret_cast<ArkUI_NativeNodeAPI_1*>(
405223b3eb3cSopenharmony_ci        OH_ArkUI_QueryModuleInterfaceByName(ARKUI_NATIVE_NODE, "ArkUI_NativeNodeAPI_1"));
405323b3eb3cSopenharmony_ci    auto rootNode = new ArkUI_Node({ARKUI_NODE_BUTTON, nullptr});
405423b3eb3cSopenharmony_ci    int32_t negativeInt = -1;
405523b3eb3cSopenharmony_ci    ArkUI_NumberValue value0[] = {};
405623b3eb3cSopenharmony_ci    ArkUI_AttributeItem item0 = {value0, 0, nullptr, nullptr};
405723b3eb3cSopenharmony_ci    ArkUI_NumberValue valueEnum[] = {{.i32 = negativeInt}};
405823b3eb3cSopenharmony_ci    ArkUI_AttributeItem itemEnum = {valueEnum, sizeof(valueEnum) / sizeof(ArkUI_NumberValue), nullptr, nullptr};
405923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_BUTTON_LABEL, nullptr), ARKUI_ERROR_CODE_PARAM_INVALID);
406023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_BUTTON_LABEL, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
406123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_BUTTON_TYPE, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
406223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_BUTTON_TYPE, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
406323b3eb3cSopenharmony_ci    nodeAPI->disposeNode(rootNode);
406423b3eb3cSopenharmony_ci}
406523b3eb3cSopenharmony_ci
406623b3eb3cSopenharmony_ci/**
406723b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest048
406823b3eb3cSopenharmony_ci * @tc.desc: Test abnormalInputForProgress function.
406923b3eb3cSopenharmony_ci * @tc.type: FUNC
407023b3eb3cSopenharmony_ci */
407123b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest048, TestSize.Level1)
407223b3eb3cSopenharmony_ci{
407323b3eb3cSopenharmony_ci    auto nodeAPI = reinterpret_cast<ArkUI_NativeNodeAPI_1*>(
407423b3eb3cSopenharmony_ci        OH_ArkUI_QueryModuleInterfaceByName(ARKUI_NATIVE_NODE, "ArkUI_NativeNodeAPI_1"));
407523b3eb3cSopenharmony_ci    auto rootNode = nodeAPI->createNode(ARKUI_NODE_PROGRESS);
407623b3eb3cSopenharmony_ci    ArkUI_NumberValue value0[] = {};
407723b3eb3cSopenharmony_ci    ArkUI_AttributeItem item0 = {value0, 0, nullptr, nullptr};
407823b3eb3cSopenharmony_ci    ArkUI_NumberValue value[] = {{.f32 = -1.0f}};
407923b3eb3cSopenharmony_ci    ArkUI_AttributeItem item = {value, sizeof(value) / sizeof(ArkUI_NumberValue), nullptr, nullptr};
408023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_PROGRESS_VALUE, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
408123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_PROGRESS_VALUE, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
408223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_PROGRESS_TOTAL, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
408323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_PROGRESS_TOTAL, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
408423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_PROGRESS_COLOR, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
408523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_PROGRESS_TYPE, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
408623b3eb3cSopenharmony_ci    value[0].i32 = -1;
408723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_PROGRESS_TYPE, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
408823b3eb3cSopenharmony_ci    nodeAPI->disposeNode(rootNode);
408923b3eb3cSopenharmony_ci}
409023b3eb3cSopenharmony_ci
409123b3eb3cSopenharmony_ci/**
409223b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest049
409323b3eb3cSopenharmony_ci * @tc.desc: Test abnormalInputForCheckbox function.
409423b3eb3cSopenharmony_ci * @tc.type: FUNC
409523b3eb3cSopenharmony_ci */
409623b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest049, TestSize.Level1)
409723b3eb3cSopenharmony_ci{
409823b3eb3cSopenharmony_ci    auto nodeAPI = reinterpret_cast<ArkUI_NativeNodeAPI_1*>(
409923b3eb3cSopenharmony_ci        OH_ArkUI_QueryModuleInterfaceByName(ARKUI_NATIVE_NODE, "ArkUI_NativeNodeAPI_1"));
410023b3eb3cSopenharmony_ci    auto rootNode = nodeAPI->createNode(ARKUI_NODE_CHECKBOX);
410123b3eb3cSopenharmony_ci    uint32_t color = 0xFFFF0000;
410223b3eb3cSopenharmony_ci    float negativeFloat = -1.0f;
410323b3eb3cSopenharmony_ci    ArkUI_NumberValue value0[] = {};
410423b3eb3cSopenharmony_ci    ArkUI_AttributeItem item0 = {value0, 0, nullptr, nullptr};
410523b3eb3cSopenharmony_ci    ArkUI_NumberValue value[] = {{.i32 = -1}};
410623b3eb3cSopenharmony_ci    ArkUI_AttributeItem item = {value, sizeof(value) / sizeof(ArkUI_NumberValue), nullptr, nullptr};
410723b3eb3cSopenharmony_ci    ArkUI_NumberValue mark[] = {{.u32 = color}, {.f32 = negativeFloat}, {.f32 = negativeFloat}};
410823b3eb3cSopenharmony_ci    ArkUI_AttributeItem markItem = {mark, sizeof(mark) / sizeof(ArkUI_NumberValue), nullptr, nullptr};
410923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_CHECKBOX_SELECT, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
411023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_CHECKBOX_SELECT, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
411123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_CHECKBOX_SELECT_COLOR, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
411223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_CHECKBOX_UNSELECT_COLOR, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
411323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_CHECKBOX_MARK, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
411423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_CHECKBOX_MARK, &markItem), ARKUI_ERROR_CODE_PARAM_INVALID);
411523b3eb3cSopenharmony_ci    mark[1].f32 = 0.0f;
411623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_CHECKBOX_MARK, &markItem), ARKUI_ERROR_CODE_PARAM_INVALID);
411723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_CHECKBOX_SHAPE, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
411823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_CHECKBOX_SHAPE, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
411923b3eb3cSopenharmony_ci    nodeAPI->disposeNode(rootNode);
412023b3eb3cSopenharmony_ci}
412123b3eb3cSopenharmony_ci
412223b3eb3cSopenharmony_ci/**
412323b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest050
412423b3eb3cSopenharmony_ci * @tc.desc: Test abnormalInputForXComponent function.
412523b3eb3cSopenharmony_ci * @tc.type: FUNC
412623b3eb3cSopenharmony_ci */
412723b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest050, TestSize.Level1)
412823b3eb3cSopenharmony_ci{
412923b3eb3cSopenharmony_ci    auto nodeAPI = reinterpret_cast<ArkUI_NativeNodeAPI_1*>(
413023b3eb3cSopenharmony_ci        OH_ArkUI_QueryModuleInterfaceByName(ARKUI_NATIVE_NODE, "ArkUI_NativeNodeAPI_1"));
413123b3eb3cSopenharmony_ci    auto rootNode = nodeAPI->createNode(ARKUI_NODE_XCOMPONENT);
413223b3eb3cSopenharmony_ci    ArkUI_NumberValue value0[] = {};
413323b3eb3cSopenharmony_ci    ArkUI_AttributeItem item0 = {value0, 0, nullptr, nullptr};
413423b3eb3cSopenharmony_ci    ArkUI_NumberValue value[] = {{.i32 = -1}};
413523b3eb3cSopenharmony_ci    ArkUI_AttributeItem item = {value, sizeof(value) / sizeof(ArkUI_NumberValue), nullptr, nullptr};
413623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_XCOMPONENT_ID, nullptr), ARKUI_ERROR_CODE_PARAM_INVALID);
413723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_XCOMPONENT_ID, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
413823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_XCOMPONENT_TYPE, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
413923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_XCOMPONENT_TYPE, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
414023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_XCOMPONENT_SURFACE_SIZE, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
414123b3eb3cSopenharmony_ci    nodeAPI->disposeNode(rootNode);
414223b3eb3cSopenharmony_ci}
414323b3eb3cSopenharmony_ci
414423b3eb3cSopenharmony_ci/**
414523b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest051
414623b3eb3cSopenharmony_ci * @tc.desc: Test abnormalInputForDatePicker function.
414723b3eb3cSopenharmony_ci * @tc.type: FUNC
414823b3eb3cSopenharmony_ci */
414923b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest051, TestSize.Level1)
415023b3eb3cSopenharmony_ci{
415123b3eb3cSopenharmony_ci    auto nodeAPI = reinterpret_cast<ArkUI_NativeNodeAPI_1*>(
415223b3eb3cSopenharmony_ci        OH_ArkUI_QueryModuleInterfaceByName(ARKUI_NATIVE_NODE, "ArkUI_NativeNodeAPI_1"));
415323b3eb3cSopenharmony_ci    auto rootNode = nodeAPI->createNode(ARKUI_NODE_STACK);
415423b3eb3cSopenharmony_ci    float negativeFloat = -1.0f;
415523b3eb3cSopenharmony_ci    int32_t negativeInt = -1;
415623b3eb3cSopenharmony_ci    ArkUI_NumberValue value0[] = {};
415723b3eb3cSopenharmony_ci    ArkUI_AttributeItem item0 = {value0, 0, nullptr, nullptr};
415823b3eb3cSopenharmony_ci    ArkUI_NumberValue value[] = {{.f32 = negativeFloat}};
415923b3eb3cSopenharmony_ci    ArkUI_AttributeItem item = {value, sizeof(value) / sizeof(ArkUI_NumberValue), "test", nullptr};
416023b3eb3cSopenharmony_ci    ArkUI_NumberValue valueEnum[] = {{.i32 = negativeInt}};
416123b3eb3cSopenharmony_ci    ArkUI_AttributeItem itemEnum = {valueEnum, sizeof(valueEnum) / sizeof(ArkUI_NumberValue), nullptr, nullptr};
416223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_DATE_PICKER_LUNAR, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
416323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_DATE_PICKER_LUNAR, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
416423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_DATE_PICKER_START, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
416523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_DATE_PICKER_START, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
416623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_DATE_PICKER_END, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
416723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_DATE_PICKER_END, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
416823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_DATE_PICKER_SELECTED, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
416923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_DATE_PICKER_SELECTED, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
417023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_DATE_PICKER_DISAPPEAR_TEXT_STYLE, &item),
417123b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
417223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_DATE_PICKER_DISAPPEAR_TEXT_STYLE, &item0),
417323b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
417423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_DATE_PICKER_TEXT_STYLE, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
417523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_DATE_PICKER_TEXT_STYLE, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
417623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_DATE_PICKER_SELECTED_TEXT_STYLE, &item0),
417723b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
417823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_DATE_PICKER_SELECTED_TEXT_STYLE, &item),
417923b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
418023b3eb3cSopenharmony_ci    item.string = "test;10;normal;test;italic";
418123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_DATE_PICKER_SELECTED_TEXT_STYLE, &item),
418223b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_NO_ERROR);
418323b3eb3cSopenharmony_ci    item.string = "#ff182431;test;normal;test;italic";
418423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_DATE_PICKER_SELECTED_TEXT_STYLE, &item),
418523b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
418623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_DATE_PICKER_TEXT_STYLE, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
418723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_DATE_PICKER_DISAPPEAR_TEXT_STYLE, &item),
418823b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
418923b3eb3cSopenharmony_ci    nodeAPI->disposeNode(rootNode);
419023b3eb3cSopenharmony_ci}
419123b3eb3cSopenharmony_ci
419223b3eb3cSopenharmony_ci/**
419323b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest052
419423b3eb3cSopenharmony_ci * @tc.desc: Test abnormalInputForTimePicker function.
419523b3eb3cSopenharmony_ci * @tc.type: FUNC
419623b3eb3cSopenharmony_ci */
419723b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest052, TestSize.Level1)
419823b3eb3cSopenharmony_ci{
419923b3eb3cSopenharmony_ci    auto nodeAPI = reinterpret_cast<ArkUI_NativeNodeAPI_1*>(
420023b3eb3cSopenharmony_ci        OH_ArkUI_QueryModuleInterfaceByName(ARKUI_NATIVE_NODE, "ArkUI_NativeNodeAPI_1"));
420123b3eb3cSopenharmony_ci    auto rootNode = nodeAPI->createNode(ARKUI_NODE_STACK);
420223b3eb3cSopenharmony_ci    float negativeFloat = -1.0f;
420323b3eb3cSopenharmony_ci    ArkUI_NumberValue value0[] = {};
420423b3eb3cSopenharmony_ci    ArkUI_AttributeItem item0 = {value0, 0, nullptr, nullptr};
420523b3eb3cSopenharmony_ci    ArkUI_NumberValue value[] = {{.f32 = negativeFloat}};
420623b3eb3cSopenharmony_ci    ArkUI_AttributeItem item = {value, sizeof(value) / sizeof(ArkUI_NumberValue), "test", nullptr};
420723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TIME_PICKER_SELECTED, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
420823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TIME_PICKER_SELECTED, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
420923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TIME_PICKER_USE_MILITARY_TIME, &item0),
421023b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
421123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TIME_PICKER_DISAPPEAR_TEXT_STYLE, &item0),
421223b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
421323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TIME_PICKER_DISAPPEAR_TEXT_STYLE, &item),
421423b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
421523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TIME_PICKER_TEXT_STYLE, &item0),
421623b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
421723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TIME_PICKER_TEXT_STYLE, &item),
421823b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
421923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TIME_PICKER_SELECTED_TEXT_STYLE, &item0),
422023b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
422123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TIME_PICKER_SELECTED_TEXT_STYLE, &item),
422223b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
422323b3eb3cSopenharmony_ci    item.string = "#ff182431;test;normal;test;italic";
422423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TIME_PICKER_SELECTED_TEXT_STYLE, &item),
422523b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
422623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TIME_PICKER_TEXT_STYLE, &item),
422723b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
422823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TIME_PICKER_DISAPPEAR_TEXT_STYLE, &item),
422923b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
423023b3eb3cSopenharmony_ci    item.string = "50-60";
423123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TIME_PICKER_SELECTED, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
423223b3eb3cSopenharmony_ci    item.string = "10-60";
423323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TIME_PICKER_SELECTED, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
423423b3eb3cSopenharmony_ci    nodeAPI->disposeNode(rootNode);
423523b3eb3cSopenharmony_ci}
423623b3eb3cSopenharmony_ci
423723b3eb3cSopenharmony_ci/**
423823b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest053
423923b3eb3cSopenharmony_ci * @tc.desc: Test abnormalInputForTextPicker function.
424023b3eb3cSopenharmony_ci * @tc.type: FUNC
424123b3eb3cSopenharmony_ci */
424223b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest053, TestSize.Level1)
424323b3eb3cSopenharmony_ci{
424423b3eb3cSopenharmony_ci    auto nodeAPI = reinterpret_cast<ArkUI_NativeNodeAPI_1*>(
424523b3eb3cSopenharmony_ci        OH_ArkUI_QueryModuleInterfaceByName(ARKUI_NATIVE_NODE, "ArkUI_NativeNodeAPI_1"));
424623b3eb3cSopenharmony_ci    auto rootNode = nodeAPI->createNode(ARKUI_NODE_STACK);
424723b3eb3cSopenharmony_ci    ArkUI_NumberValue value0[] = {};
424823b3eb3cSopenharmony_ci    ArkUI_AttributeItem item0 = {value0, 0, nullptr, nullptr};
424923b3eb3cSopenharmony_ci    ArkUI_NumberValue value[] = {{.i32 = ARKUI_TEXTPICKER_RANGETYPE_SINGLE}};
425023b3eb3cSopenharmony_ci    ArkUI_AttributeItem item = {value, sizeof(value) / sizeof(ArkUI_NumberValue), nullptr, nullptr};
425123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TEXT_PICKER_OPTION_RANGE, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
425223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TEXT_PICKER_OPTION_RANGE, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
425323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TEXT_PICKER_OPTION_SELECTED, &item0),
425423b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
425523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TEXT_PICKER_OPTION_VALUE, &item0),
425623b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
425723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TEXT_PICKER_DISAPPEAR_TEXT_STYLE, &item0),
425823b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
425923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TEXT_PICKER_TEXT_STYLE, &item0),
426023b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
426123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TEXT_PICKER_SELECTED_TEXT_STYLE, &item0),
426223b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
426323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TEXT_PICKER_SELECTED_INDEX, &item0),
426423b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
426523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TEXT_PICKER_CAN_LOOP, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
426623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TEXT_PICKER_DEFAULT_PICKER_ITEM_HEIGHT, &item0),
426723b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
426823b3eb3cSopenharmony_ci    item.string = "test";
426923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TEXT_PICKER_DISAPPEAR_TEXT_STYLE, &item),
427023b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
427123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TEXT_PICKER_TEXT_STYLE, &item),
427223b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
427323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TEXT_PICKER_SELECTED_TEXT_STYLE, &item),
427423b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
427523b3eb3cSopenharmony_ci    item.string = "#ff182431;test;normal;test;italic";
427623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TEXT_PICKER_DISAPPEAR_TEXT_STYLE, &item),
427723b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
427823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TEXT_PICKER_TEXT_STYLE, &item),
427923b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
428023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_TEXT_PICKER_SELECTED_TEXT_STYLE, &item),
428123b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
428223b3eb3cSopenharmony_ci    nodeAPI->disposeNode(rootNode);
428323b3eb3cSopenharmony_ci}
428423b3eb3cSopenharmony_ci
428523b3eb3cSopenharmony_ci/**
428623b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest054
428723b3eb3cSopenharmony_ci * @tc.desc: Test abnormalInputForCalendarPicker function.
428823b3eb3cSopenharmony_ci * @tc.type: FUNC
428923b3eb3cSopenharmony_ci */
429023b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest054, TestSize.Level1)
429123b3eb3cSopenharmony_ci{
429223b3eb3cSopenharmony_ci    auto nodeAPI = reinterpret_cast<ArkUI_NativeNodeAPI_1*>(
429323b3eb3cSopenharmony_ci        OH_ArkUI_QueryModuleInterfaceByName(ARKUI_NATIVE_NODE, "ArkUI_NativeNodeAPI_1"));
429423b3eb3cSopenharmony_ci    auto rootNode = nodeAPI->createNode(ARKUI_NODE_CALENDAR_PICKER);
429523b3eb3cSopenharmony_ci    float negativeFloat = -1.0f;
429623b3eb3cSopenharmony_ci    int32_t negativeInt = -1;
429723b3eb3cSopenharmony_ci    ArkUI_NumberValue value0[] = {};
429823b3eb3cSopenharmony_ci    ArkUI_AttributeItem item0 = {value0, 0, nullptr, nullptr};
429923b3eb3cSopenharmony_ci    ArkUI_NumberValue value[] = {{.f32 = negativeFloat}};
430023b3eb3cSopenharmony_ci    ArkUI_AttributeItem item = {value, sizeof(value) / sizeof(ArkUI_NumberValue), nullptr, nullptr};
430123b3eb3cSopenharmony_ci    ArkUI_NumberValue value3[] = {{.u32 = 2024}, {.u32 = 13}, {.u32 = 1}};
430223b3eb3cSopenharmony_ci    ArkUI_AttributeItem item3 = {value3, sizeof(value3) / sizeof(ArkUI_NumberValue), nullptr, nullptr};
430323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_CALENDAR_PICKER_HINT_RADIUS, &item0),
430423b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
430523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_CALENDAR_PICKER_HINT_RADIUS, &item),
430623b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
430723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_CALENDAR_PICKER_SELECTED_DATE, &item0),
430823b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
430923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_CALENDAR_PICKER_SELECTED_DATE, &item3),
431023b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
431123b3eb3cSopenharmony_ci    value3[1].u32 = 12;
431223b3eb3cSopenharmony_ci    value3[2].u32 = 40;
431323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_CALENDAR_PICKER_SELECTED_DATE, &item3),
431423b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
431523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_CALENDAR_PICKER_EDGE_ALIGNMENT, &item0),
431623b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
431723b3eb3cSopenharmony_ci    value[0].i32 = negativeInt;
431823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_CALENDAR_PICKER_EDGE_ALIGNMENT, &item),
431923b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
432023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_CALENDAR_PICKER_TEXT_STYLE, &item0),
432123b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_NO_ERROR);
432223b3eb3cSopenharmony_ci    value3[1].f32 = negativeFloat;
432323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_CALENDAR_PICKER_TEXT_STYLE, &item3),
432423b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
432523b3eb3cSopenharmony_ci    value3[1].f32 = 1.0f;
432623b3eb3cSopenharmony_ci    value3[2].i32 = negativeInt;
432723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_CALENDAR_PICKER_TEXT_STYLE, &item3),
432823b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
432923b3eb3cSopenharmony_ci    nodeAPI->disposeNode(rootNode);
433023b3eb3cSopenharmony_ci}
433123b3eb3cSopenharmony_ci
433223b3eb3cSopenharmony_ci/**
433323b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest055
433423b3eb3cSopenharmony_ci * @tc.desc: Test abnormalInputForSlider function.
433523b3eb3cSopenharmony_ci * @tc.type: FUNC
433623b3eb3cSopenharmony_ci */
433723b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest055, TestSize.Level1)
433823b3eb3cSopenharmony_ci{
433923b3eb3cSopenharmony_ci    auto nodeAPI = reinterpret_cast<ArkUI_NativeNodeAPI_1*>(
434023b3eb3cSopenharmony_ci        OH_ArkUI_QueryModuleInterfaceByName(ARKUI_NATIVE_NODE, "ArkUI_NativeNodeAPI_1"));
434123b3eb3cSopenharmony_ci    auto rootNode = nodeAPI->createNode(ARKUI_NODE_SLIDER);
434223b3eb3cSopenharmony_ci    float negativeFloat = -1.0f;
434323b3eb3cSopenharmony_ci    ArkUI_NumberValue value0[] = {};
434423b3eb3cSopenharmony_ci    ArkUI_AttributeItem item0 = {value0, 0, nullptr, nullptr};
434523b3eb3cSopenharmony_ci    ArkUI_NumberValue value[] = {{.i32 = ARKUI_SLIDER_BLOCK_STYLE_IMAGE }, {.i32 = ARKUI_CLIP_TYPE_PATH},
434623b3eb3cSopenharmony_ci        {.f32 = negativeFloat}, {.f32 = negativeFloat}, {.f32 = negativeFloat}};
434723b3eb3cSopenharmony_ci    ArkUI_AttributeItem item = {value, sizeof(value) / sizeof(ArkUI_NumberValue), nullptr, nullptr};
434823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SLIDER_BLOCK_COLOR, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
434923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SLIDER_TRACK_COLOR, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
435023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SLIDER_SELECTED_COLOR, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
435123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SLIDER_SHOW_STEPS, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
435223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SLIDER_VALUE, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
435323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SLIDER_MIN_VALUE, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
435423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SLIDER_MAX_VALUE, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
435523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SLIDER_STEP, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
435623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SLIDER_DIRECTION, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
435723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SLIDER_REVERSE, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
435823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SLIDER_STYLE, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
435923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SLIDER_TRACK_THICKNESS, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
436023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SLIDER_BLOCK_STYLE, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
436123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SLIDER_BLOCK_STYLE, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
436223b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_SLIDER_BLOCK_STYLE_SHAPE;
436323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SLIDER_BLOCK_STYLE, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
436423b3eb3cSopenharmony_ci    value[1].i32 = ARKUI_CLIP_TYPE_RECTANGLE;
436523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SLIDER_BLOCK_STYLE, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
436623b3eb3cSopenharmony_ci    value[0].i32 = -1;
436723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SLIDER_SHOW_STEPS, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
436823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SLIDER_DIRECTION, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
436923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SLIDER_REVERSE, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
437023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SLIDER_STYLE, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
437123b3eb3cSopenharmony_ci    value[0].f32 = -1.0f;
437223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SLIDER_STEP, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
437323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SLIDER_TRACK_THICKNESS, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
437423b3eb3cSopenharmony_ci    nodeAPI->disposeNode(rootNode);
437523b3eb3cSopenharmony_ci}
437623b3eb3cSopenharmony_ci
437723b3eb3cSopenharmony_ci/**
437823b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest056
437923b3eb3cSopenharmony_ci * @tc.desc: Test abnormalInputForRadio function.
438023b3eb3cSopenharmony_ci * @tc.type: FUNC
438123b3eb3cSopenharmony_ci */
438223b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest056, TestSize.Level1)
438323b3eb3cSopenharmony_ci{
438423b3eb3cSopenharmony_ci    auto nodeAPI = reinterpret_cast<ArkUI_NativeNodeAPI_1*>(
438523b3eb3cSopenharmony_ci        OH_ArkUI_QueryModuleInterfaceByName(ARKUI_NATIVE_NODE, "ArkUI_NativeNodeAPI_1"));
438623b3eb3cSopenharmony_ci    auto rootNode = nodeAPI->createNode(ARKUI_NODE_RADIO);
438723b3eb3cSopenharmony_ci    ArkUI_NumberValue value0[] = {};
438823b3eb3cSopenharmony_ci    ArkUI_AttributeItem item0 = {value0, 0, nullptr, nullptr};
438923b3eb3cSopenharmony_ci    ArkUI_NumberValue value[] = {{.i32 = -1 }};
439023b3eb3cSopenharmony_ci    ArkUI_AttributeItem item = {value, sizeof(value) / sizeof(ArkUI_NumberValue), nullptr, nullptr};
439123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_RADIO_CHECKED, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
439223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_RADIO_CHECKED, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
439323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_RADIO_STYLE, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
439423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_RADIO_VALUE, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
439523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_RADIO_GROUP, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
439623b3eb3cSopenharmony_ci    item0.size = -1;
439723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_RADIO_STYLE, &item0), ARKUI_ERROR_CODE_NO_ERROR);
439823b3eb3cSopenharmony_ci    nodeAPI->disposeNode(rootNode);
439923b3eb3cSopenharmony_ci}
440023b3eb3cSopenharmony_ci
440123b3eb3cSopenharmony_ci/**
440223b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest057
440323b3eb3cSopenharmony_ci * @tc.desc: Test abnormalInputForStack function.
440423b3eb3cSopenharmony_ci * @tc.type: FUNC
440523b3eb3cSopenharmony_ci */
440623b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest057, TestSize.Level1)
440723b3eb3cSopenharmony_ci{
440823b3eb3cSopenharmony_ci    auto nodeAPI = reinterpret_cast<ArkUI_NativeNodeAPI_1*>(
440923b3eb3cSopenharmony_ci        OH_ArkUI_QueryModuleInterfaceByName(ARKUI_NATIVE_NODE, "ArkUI_NativeNodeAPI_1"));
441023b3eb3cSopenharmony_ci    auto rootNode = nodeAPI->createNode(ARKUI_NODE_STACK);
441123b3eb3cSopenharmony_ci    ArkUI_NumberValue value0[] = {};
441223b3eb3cSopenharmony_ci    ArkUI_AttributeItem item0 = {value0, 0, nullptr, nullptr};
441323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_STACK_ALIGN_CONTENT, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
441423b3eb3cSopenharmony_ci    nodeAPI->disposeNode(rootNode);
441523b3eb3cSopenharmony_ci}
441623b3eb3cSopenharmony_ci
441723b3eb3cSopenharmony_ci/**
441823b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest058
441923b3eb3cSopenharmony_ci * @tc.desc: Test abnormalInputForScroll function.
442023b3eb3cSopenharmony_ci * @tc.type: FUNC
442123b3eb3cSopenharmony_ci */
442223b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest058, TestSize.Level1)
442323b3eb3cSopenharmony_ci{
442423b3eb3cSopenharmony_ci    auto nodeAPI = reinterpret_cast<ArkUI_NativeNodeAPI_1*>(
442523b3eb3cSopenharmony_ci        OH_ArkUI_QueryModuleInterfaceByName(ARKUI_NATIVE_NODE, "ArkUI_NativeNodeAPI_1"));
442623b3eb3cSopenharmony_ci    auto rootNode = nodeAPI->createNode(ARKUI_NODE_SCROLL);
442723b3eb3cSopenharmony_ci    float negativeFloat = -1.0f;
442823b3eb3cSopenharmony_ci    int32_t negativeInt = -1;
442923b3eb3cSopenharmony_ci    ArkUI_NumberValue value0[] = {};
443023b3eb3cSopenharmony_ci    ArkUI_AttributeItem item0 = {value0, 0, nullptr, nullptr};
443123b3eb3cSopenharmony_ci    ArkUI_NumberValue value[] = {{.i32 = negativeInt }, {.i32 = negativeInt},
443223b3eb3cSopenharmony_ci        {.i32 = negativeInt}, {.f32 = negativeFloat}, {.f32 = negativeFloat}};
443323b3eb3cSopenharmony_ci    ArkUI_AttributeItem item = {value, sizeof(value) / sizeof(ArkUI_NumberValue), nullptr, nullptr};
443423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SCROLL_BAR_DISPLAY_MODE, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
443523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SCROLL_BAR_WIDTH, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
443623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SCROLL_BAR_COLOR, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
443723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SCROLL_SCROLL_DIRECTION, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
443823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SCROLL_SCROLL_DIRECTION, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
443923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SCROLL_EDGE_EFFECT, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
444023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SCROLL_EDGE_EFFECT, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
444123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SCROLL_ENABLE_SCROLL_INTERACTION, &item0),
444223b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
444323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SCROLL_ENABLE_SCROLL_INTERACTION, &item),
444423b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
444523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SCROLL_FRICTION, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
444623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SCROLL_SNAP, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
444723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SCROLL_SNAP, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
444823b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_SCROLL_SNAP_ALIGN_NONE;
444923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SCROLL_SNAP, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
445023b3eb3cSopenharmony_ci    value[1].i32 = true;
445123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SCROLL_SNAP, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
445223b3eb3cSopenharmony_ci    value[2].i32 = true;
445323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SCROLL_SNAP, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
445423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SCROLL_NESTED_SCROLL, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
445523b3eb3cSopenharmony_ci    value[0].i32 = negativeInt;
445623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SCROLL_NESTED_SCROLL, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
445723b3eb3cSopenharmony_ci    value[0].i32 = ARKUI_SCROLL_NESTED_MODE_SELF_ONLY;
445823b3eb3cSopenharmony_ci    value[1].i32 = negativeInt;
445923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SCROLL_NESTED_SCROLL, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
446023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SCROLL_EDGE_EFFECT, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
446123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SCROLL_OFFSET, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
446223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SCROLL_EDGE, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
446323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SCROLL_ENABLE_PAGING, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
446423b3eb3cSopenharmony_ci    value[0].i32 = negativeInt;
446523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SCROLL_ENABLE_PAGING, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
446623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SCROLL_PAGE, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
446723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SCROLL_PAGE, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
446823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SCROLL_BY, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
446923b3eb3cSopenharmony_ci    value[0].f32 = negativeFloat;
447023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SCROLL_FRICTION, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
447123b3eb3cSopenharmony_ci    nodeAPI->disposeNode(rootNode);
447223b3eb3cSopenharmony_ci}
447323b3eb3cSopenharmony_ci
447423b3eb3cSopenharmony_ci/**
447523b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest059
447623b3eb3cSopenharmony_ci * @tc.desc: Test abnormalInputForList function.
447723b3eb3cSopenharmony_ci * @tc.type: FUNC
447823b3eb3cSopenharmony_ci */
447923b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest059, TestSize.Level1)
448023b3eb3cSopenharmony_ci{
448123b3eb3cSopenharmony_ci    auto nodeAPI = reinterpret_cast<ArkUI_NativeNodeAPI_1*>(
448223b3eb3cSopenharmony_ci        OH_ArkUI_QueryModuleInterfaceByName(ARKUI_NATIVE_NODE, "ArkUI_NativeNodeAPI_1"));
448323b3eb3cSopenharmony_ci    auto rootNode = new ArkUI_Node({ARKUI_NODE_LIST, nullptr});
448423b3eb3cSopenharmony_ci    auto childNode = new ArkUI_Node({ARKUI_NODE_LIST_ITEM, nullptr});
448523b3eb3cSopenharmony_ci    auto childNodeNew = new ArkUI_Node({ARKUI_NODE_LIST_ITEM, nullptr});
448623b3eb3cSopenharmony_ci    auto groupNode = new ArkUI_Node({ARKUI_NODE_LIST_ITEM_GROUP, nullptr});
448723b3eb3cSopenharmony_ci
448823b3eb3cSopenharmony_ci    nodeAPI->insertChildAt(rootNode, groupNode, 0);
448923b3eb3cSopenharmony_ci    nodeAPI->insertChildAfter(groupNode, childNodeNew, nullptr);
449023b3eb3cSopenharmony_ci    nodeAPI->insertChildBefore(groupNode, childNode, childNodeNew);
449123b3eb3cSopenharmony_ci    float negativeFloat = -1.0f;
449223b3eb3cSopenharmony_ci    int32_t negativeInt = -1;
449323b3eb3cSopenharmony_ci    ArkUI_NumberValue value0[] = {};
449423b3eb3cSopenharmony_ci    ArkUI_AttributeItem item0 = {value0, 0, nullptr, nullptr};
449523b3eb3cSopenharmony_ci    ArkUI_NumberValue value[] = {{.i32 = negativeInt }, {.i32 = negativeInt},
449623b3eb3cSopenharmony_ci        {.i32 = negativeInt}, {.f32 = negativeFloat}, {.f32 = negativeFloat}};
449723b3eb3cSopenharmony_ci    ArkUI_AttributeItem item = {value, sizeof(value) / sizeof(ArkUI_NumberValue), nullptr, nullptr};
449823b3eb3cSopenharmony_ci    ArkUI_NumberValue valueEnum[] = {{.i32 = negativeInt}};
449923b3eb3cSopenharmony_ci    ArkUI_AttributeItem itemEnum = {valueEnum, 1, nullptr, nullptr};
450023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_LIST_DIRECTION, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
450123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_LIST_DIRECTION, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
450223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_LIST_STICKY, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
450323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_LIST_STICKY, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
450423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_LIST_SPACE, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
450523b3eb3cSopenharmony_ci    value[0].f32 = negativeFloat;
450623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_LIST_SPACE, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
450723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_LIST_NODE_ADAPTER, nullptr), ARKUI_ERROR_CODE_PARAM_INVALID);
450823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_LIST_NODE_ADAPTER, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
450923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_LIST_CACHED_COUNT, nullptr), ARKUI_ERROR_CODE_PARAM_INVALID);
451023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_LIST_CACHED_COUNT, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
451123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_LIST_CACHED_COUNT, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
451223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_LIST_SCROLL_TO_INDEX, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
451323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_LIST_ALIGN_LIST_ITEM, nullptr), ARKUI_ERROR_CODE_PARAM_INVALID);
451423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_LIST_ALIGN_LIST_ITEM, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
451523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_LIST_ALIGN_LIST_ITEM, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
451623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_LIST_CHILDREN_MAIN_SIZE, nullptr), ARKUI_ERROR_CODE_PARAM_INVALID);
451723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_LIST_CHILDREN_MAIN_SIZE, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
451823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_LIST_INITIAL_INDEX, nullptr), ARKUI_ERROR_CODE_PARAM_INVALID);
451923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_LIST_INITIAL_INDEX, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
452023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_LIST_INITIAL_INDEX, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
452123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_LIST_DIVIDER, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
452223b3eb3cSopenharmony_ci    value[1].f32 = negativeFloat;
452323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_LIST_DIVIDER, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
452423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(groupNode, NODE_LIST_ITEM_GROUP_SET_DIVIDER, &item),
452523b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
452623b3eb3cSopenharmony_ci    value[1].f32 = 0.0f;
452723b3eb3cSopenharmony_ci    value[2].f32 = negativeFloat;
452823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_LIST_DIVIDER, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
452923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(groupNode, NODE_LIST_ITEM_GROUP_SET_DIVIDER, &item),
453023b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
453123b3eb3cSopenharmony_ci    value[2].f32 = 0.0f;
453223b3eb3cSopenharmony_ci    value[3].f32 = negativeFloat;
453323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_LIST_DIVIDER, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
453423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(groupNode, NODE_LIST_ITEM_GROUP_SET_DIVIDER, &item),
453523b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
453623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(childNode, NODE_LIST_ITEM_SWIPE_ACTION, nullptr), ARKUI_ERROR_CODE_PARAM_INVALID);
453723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(childNode, NODE_LIST_ITEM_SWIPE_ACTION, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
453823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(groupNode, NODE_LIST_ITEM_GROUP_SET_HEADER, &item0),
453923b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
454023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(groupNode, NODE_LIST_ITEM_GROUP_SET_FOOTER, &item0),
454123b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
454223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(groupNode, NODE_LIST_ITEM_GROUP_SET_DIVIDER, &item0),
454323b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
454423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(groupNode, NODE_LIST_ITEM_GROUP_CHILDREN_MAIN_SIZE, nullptr),
454523b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
454623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(groupNode, NODE_LIST_ITEM_GROUP_CHILDREN_MAIN_SIZE, &item0),
454723b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
454823b3eb3cSopenharmony_ci    nodeAPI->removeChild(groupNode, childNode);
454923b3eb3cSopenharmony_ci    nodeAPI->disposeNode(rootNode);
455023b3eb3cSopenharmony_ci    nodeAPI->disposeNode(groupNode);
455123b3eb3cSopenharmony_ci    nodeAPI->disposeNode(childNode);
455223b3eb3cSopenharmony_ci}
455323b3eb3cSopenharmony_ci
455423b3eb3cSopenharmony_ci/**
455523b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest060
455623b3eb3cSopenharmony_ci * @tc.desc: Test abnormalInputForSwiper function.
455723b3eb3cSopenharmony_ci * @tc.type: FUNC
455823b3eb3cSopenharmony_ci */
455923b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest060, TestSize.Level1)
456023b3eb3cSopenharmony_ci{
456123b3eb3cSopenharmony_ci    auto nodeAPI = reinterpret_cast<ArkUI_NativeNodeAPI_1*>(
456223b3eb3cSopenharmony_ci        OH_ArkUI_QueryModuleInterfaceByName(ARKUI_NATIVE_NODE, "ArkUI_NativeNodeAPI_1"));
456323b3eb3cSopenharmony_ci    auto rootNode = new ArkUI_Node({ARKUI_NODE_SWIPER, nullptr});
456423b3eb3cSopenharmony_ci    float negativeFloat = -1.0f;
456523b3eb3cSopenharmony_ci    int32_t negativeInt = -1;
456623b3eb3cSopenharmony_ci    ArkUI_NumberValue value0[] = {};
456723b3eb3cSopenharmony_ci    ArkUI_AttributeItem item0 = {value0, 0, nullptr, nullptr};
456823b3eb3cSopenharmony_ci    ArkUI_NumberValue valueEnum[] = {{.i32 = negativeInt}};
456923b3eb3cSopenharmony_ci    ArkUI_AttributeItem itemEnum = {valueEnum, 1, nullptr, nullptr};
457023b3eb3cSopenharmony_ci    ArkUI_NumberValue valueFloat[] = {{.f32 = negativeFloat}};
457123b3eb3cSopenharmony_ci    ArkUI_AttributeItem itemFloat = {valueFloat, 1, nullptr, nullptr};
457223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SWIPER_LOOP, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
457323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SWIPER_LOOP, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
457423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SWIPER_AUTO_PLAY, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
457523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SWIPER_AUTO_PLAY, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
457623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SWIPER_SHOW_INDICATOR, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
457723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SWIPER_SHOW_INDICATOR, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
457823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SWIPER_INTERVAL, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
457923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SWIPER_INTERVAL, &itemFloat), ARKUI_ERROR_CODE_PARAM_INVALID);
458023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SWIPER_VERTICAL, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
458123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SWIPER_VERTICAL, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
458223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SWIPER_DURATION, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
458323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SWIPER_DURATION, &itemFloat), ARKUI_ERROR_CODE_PARAM_INVALID);
458423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SWIPER_CURVE, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
458523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SWIPER_CURVE, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
458623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SWIPER_ITEM_SPACE, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
458723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SWIPER_ITEM_SPACE, &itemFloat), ARKUI_ERROR_CODE_PARAM_INVALID);
458823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SWIPER_INDEX, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
458923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SWIPER_INDEX, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
459023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SWIPER_DISPLAY_COUNT, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
459123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SWIPER_DISABLE_SWIPE, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
459223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SWIPER_DISABLE_SWIPE, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
459323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SWIPER_SHOW_DISPLAY_ARROW, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
459423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SWIPER_SHOW_DISPLAY_ARROW, &itemFloat),
459523b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
459623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SWIPER_EDGE_EFFECT_MODE, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
459723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SWIPER_EDGE_EFFECT_MODE, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
459823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SWIPER_NODE_ADAPTER, nullptr), ARKUI_ERROR_CODE_PARAM_INVALID);
459923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SWIPER_NODE_ADAPTER, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
460023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SWIPER_CACHED_COUNT, nullptr), ARKUI_ERROR_CODE_PARAM_INVALID);
460123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SWIPER_CACHED_COUNT, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
460223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SWIPER_CACHED_COUNT, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
460323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SWIPER_PREV_MARGIN, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
460423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SWIPER_PREV_MARGIN, &itemFloat), ARKUI_ERROR_CODE_PARAM_INVALID);
460523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SWIPER_NEXT_MARGIN, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
460623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SWIPER_NEXT_MARGIN, &itemFloat), ARKUI_ERROR_CODE_PARAM_INVALID);
460723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SWIPER_INDICATOR, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
460823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SWIPER_INDICATOR, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
460923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SWIPER_INDICATOR_INTERACTIVE, &item0),
461023b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
461123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SWIPER_NESTED_SCROLL, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
461223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SWIPER_NESTED_SCROLL, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
461323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SWIPER_SWIPE_TO_INDEX, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
461423b3eb3cSopenharmony_ci    valueEnum[0].i32 = ARKUI_SWIPER_INDICATOR_TYPE_DOT;
461523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SWIPER_INDICATOR, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
461623b3eb3cSopenharmony_ci    nodeAPI->disposeNode(rootNode);
461723b3eb3cSopenharmony_ci}
461823b3eb3cSopenharmony_ci
461923b3eb3cSopenharmony_ci/**
462023b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest061
462123b3eb3cSopenharmony_ci * @tc.desc: Test abnormalInputForColumn function.
462223b3eb3cSopenharmony_ci * @tc.type: FUNC
462323b3eb3cSopenharmony_ci */
462423b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest061, TestSize.Level1)
462523b3eb3cSopenharmony_ci{
462623b3eb3cSopenharmony_ci    auto nodeAPI = reinterpret_cast<ArkUI_NativeNodeAPI_1*>(
462723b3eb3cSopenharmony_ci        OH_ArkUI_QueryModuleInterfaceByName(ARKUI_NATIVE_NODE, "ArkUI_NativeNodeAPI_1"));
462823b3eb3cSopenharmony_ci    auto rootNode = nodeAPI->createNode(ARKUI_NODE_COLUMN);
462923b3eb3cSopenharmony_ci    int32_t negativeInt = -1;
463023b3eb3cSopenharmony_ci    ArkUI_NumberValue value0[] = {};
463123b3eb3cSopenharmony_ci    ArkUI_AttributeItem item0 = {value0, 0, nullptr, nullptr};
463223b3eb3cSopenharmony_ci    ArkUI_NumberValue valueEnum[] = {{.i32 = negativeInt}};
463323b3eb3cSopenharmony_ci    ArkUI_AttributeItem itemEnum = {valueEnum, 1, nullptr, nullptr};
463423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_COLUMN_ALIGN_ITEMS, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
463523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_COLUMN_ALIGN_ITEMS, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
463623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_COLUMN_JUSTIFY_CONTENT, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
463723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_COLUMN_JUSTIFY_CONTENT, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
463823b3eb3cSopenharmony_ci    nodeAPI->disposeNode(rootNode);
463923b3eb3cSopenharmony_ci}
464023b3eb3cSopenharmony_ci
464123b3eb3cSopenharmony_ci/**
464223b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest062
464323b3eb3cSopenharmony_ci * @tc.desc: Test abnormalInputForRow function.
464423b3eb3cSopenharmony_ci * @tc.type: FUNC
464523b3eb3cSopenharmony_ci */
464623b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest062, TestSize.Level1)
464723b3eb3cSopenharmony_ci{
464823b3eb3cSopenharmony_ci    auto nodeAPI = reinterpret_cast<ArkUI_NativeNodeAPI_1*>(
464923b3eb3cSopenharmony_ci        OH_ArkUI_QueryModuleInterfaceByName(ARKUI_NATIVE_NODE, "ArkUI_NativeNodeAPI_1"));
465023b3eb3cSopenharmony_ci    auto rootNode = nodeAPI->createNode(ARKUI_NODE_ROW);
465123b3eb3cSopenharmony_ci    ASSERT_NE(rootNode, nullptr);
465223b3eb3cSopenharmony_ci    int32_t negativeInt = -1;
465323b3eb3cSopenharmony_ci    ArkUI_NumberValue value0[] = {};
465423b3eb3cSopenharmony_ci    ArkUI_AttributeItem item0 = {value0, 0, nullptr, nullptr};
465523b3eb3cSopenharmony_ci    ArkUI_NumberValue valueEnum[] = {{.i32 = negativeInt}};
465623b3eb3cSopenharmony_ci    ArkUI_AttributeItem itemEnum = {valueEnum, 1, nullptr, nullptr};
465723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_ROW_ALIGN_ITEMS, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
465823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_ROW_ALIGN_ITEMS, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
465923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_ROW_JUSTIFY_CONTENT, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
466023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_ROW_JUSTIFY_CONTENT, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
466123b3eb3cSopenharmony_ci    nodeAPI->disposeNode(rootNode);
466223b3eb3cSopenharmony_ci}
466323b3eb3cSopenharmony_ci
466423b3eb3cSopenharmony_ci/**
466523b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest063
466623b3eb3cSopenharmony_ci * @tc.desc: Test abnormalInputForRefresh function.
466723b3eb3cSopenharmony_ci * @tc.type: FUNC
466823b3eb3cSopenharmony_ci */
466923b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest063, TestSize.Level1)
467023b3eb3cSopenharmony_ci{
467123b3eb3cSopenharmony_ci    auto nodeAPI = reinterpret_cast<ArkUI_NativeNodeAPI_1*>(
467223b3eb3cSopenharmony_ci        OH_ArkUI_QueryModuleInterfaceByName(ARKUI_NATIVE_NODE, "ArkUI_NativeNodeAPI_1"));
467323b3eb3cSopenharmony_ci    auto rootNode = nodeAPI->createNode(ARKUI_NODE_REFRESH);
467423b3eb3cSopenharmony_ci    ASSERT_NE(rootNode, nullptr);
467523b3eb3cSopenharmony_ci    float negativeFloat = -1.0f;
467623b3eb3cSopenharmony_ci    int32_t negativeInt = -1;
467723b3eb3cSopenharmony_ci    ArkUI_NumberValue value0[] = {};
467823b3eb3cSopenharmony_ci    ArkUI_AttributeItem item0 = {value0, 0, nullptr, nullptr};
467923b3eb3cSopenharmony_ci    ArkUI_NumberValue valueEnum[] = {{.i32 = negativeInt}};
468023b3eb3cSopenharmony_ci    ArkUI_AttributeItem itemEnum = {valueEnum, 1, nullptr, nullptr};
468123b3eb3cSopenharmony_ci    ArkUI_NumberValue valueFloat[] = {{.f32 = negativeFloat}};
468223b3eb3cSopenharmony_ci    ArkUI_AttributeItem itemFloat = {valueFloat, 1, nullptr, nullptr};
468323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_REFRESH_REFRESHING, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
468423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_REFRESH_REFRESHING, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
468523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_REFRESH_CONTENT, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
468623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_REFRESH_PULL_DOWN_RATIO, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
468723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_REFRESH_PULL_DOWN_RATIO, &itemFloat),
468823b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
468923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_REFRESH_OFFSET, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
469023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_REFRESH_OFFSET, &itemFloat), ARKUI_ERROR_CODE_PARAM_INVALID);
469123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_REFRESH_PULL_TO_REFRESH, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
469223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_REFRESH_PULL_TO_REFRESH, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
469323b3eb3cSopenharmony_ci    valueFloat[0].f32 = 2.0f;
469423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_REFRESH_PULL_DOWN_RATIO, &itemFloat),
469523b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
469623b3eb3cSopenharmony_ci    nodeAPI->disposeNode(rootNode);
469723b3eb3cSopenharmony_ci}
469823b3eb3cSopenharmony_ci
469923b3eb3cSopenharmony_ci/**
470023b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest064
470123b3eb3cSopenharmony_ci * @tc.desc: Test abnormalInputForWaterflow function.
470223b3eb3cSopenharmony_ci * @tc.type: FUNC
470323b3eb3cSopenharmony_ci */
470423b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest064, TestSize.Level1)
470523b3eb3cSopenharmony_ci{
470623b3eb3cSopenharmony_ci    auto nodeAPI = reinterpret_cast<ArkUI_NativeNodeAPI_1*>(
470723b3eb3cSopenharmony_ci        OH_ArkUI_QueryModuleInterfaceByName(ARKUI_NATIVE_NODE, "ArkUI_NativeNodeAPI_1"));
470823b3eb3cSopenharmony_ci    auto rootNode = nodeAPI->createNode(ARKUI_NODE_WATER_FLOW);
470923b3eb3cSopenharmony_ci    ASSERT_NE(rootNode, nullptr);
471023b3eb3cSopenharmony_ci    float negativeFloat = -1.0f;
471123b3eb3cSopenharmony_ci    int32_t negativeInt = -1;
471223b3eb3cSopenharmony_ci    ArkUI_NumberValue value0[] = {};
471323b3eb3cSopenharmony_ci    ArkUI_AttributeItem item0 = {value0, 0, nullptr, nullptr};
471423b3eb3cSopenharmony_ci    ArkUI_NumberValue valueEnum[] = {{.i32 = negativeInt}};
471523b3eb3cSopenharmony_ci    ArkUI_AttributeItem itemEnum = {valueEnum, 1, nullptr, nullptr};
471623b3eb3cSopenharmony_ci    ArkUI_NumberValue valueFloat[] = {{.f32 = negativeFloat}, {.f32 = negativeFloat}, {.f32 = negativeFloat},
471723b3eb3cSopenharmony_ci        {.f32 = negativeFloat}};
471823b3eb3cSopenharmony_ci    ArkUI_AttributeItem itemFloat = {valueFloat, sizeof(valueFloat) / sizeof(ArkUI_NumberValue), nullptr, nullptr};
471923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_WATER_FLOW_LAYOUT_DIRECTION, &item0),
472023b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
472123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_WATER_FLOW_LAYOUT_DIRECTION, &itemEnum),
472223b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
472323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_WATER_FLOW_COLUMN_TEMPLATE, &item0),
472423b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
472523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_WATER_FLOW_ROW_TEMPLATE, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
472623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_WATER_FLOW_COLUMN_GAP, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
472723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_WATER_FLOW_COLUMN_GAP, &itemFloat), ARKUI_ERROR_CODE_PARAM_INVALID);
472823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_WATER_FLOW_ROW_GAP, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
472923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_WATER_FLOW_ROW_GAP, &itemFloat), ARKUI_ERROR_CODE_PARAM_INVALID);
473023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_WATER_FLOW_SECTION_OPTION, nullptr), ARKUI_ERROR_CODE_PARAM_INVALID);
473123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_WATER_FLOW_SECTION_OPTION, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
473223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_WATER_FLOW_SECTION_OPTION, &itemFloat),
473323b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
473423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_WATER_FLOW_NODE_ADAPTER, nullptr), ARKUI_ERROR_CODE_PARAM_INVALID);
473523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_WATER_FLOW_NODE_ADAPTER, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
473623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_WATER_FLOW_CACHED_COUNT, nullptr), ARKUI_ERROR_CODE_PARAM_INVALID);
473723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_WATER_FLOW_CACHED_COUNT, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
473823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_WATER_FLOW_CACHED_COUNT, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
473923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_WATER_FLOW_FOOTER, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
474023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_WATER_FLOW_SCROLL_TO_INDEX, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
474123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_WATER_FLOW_ITEM_CONSTRAINT_SIZE, &item0),
474223b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
474323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_WATER_FLOW_ITEM_CONSTRAINT_SIZE, &itemEnum),
474423b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
474523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_WATER_FLOW_ITEM_CONSTRAINT_SIZE, &itemFloat),
474623b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
474723b3eb3cSopenharmony_ci    nodeAPI->disposeNode(rootNode);
474823b3eb3cSopenharmony_ci}
474923b3eb3cSopenharmony_ci
475023b3eb3cSopenharmony_ci/**
475123b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest065
475223b3eb3cSopenharmony_ci * @tc.desc: Test abnormalInputForGrid function.
475323b3eb3cSopenharmony_ci * @tc.type: FUNC
475423b3eb3cSopenharmony_ci */
475523b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest065, TestSize.Level1)
475623b3eb3cSopenharmony_ci{
475723b3eb3cSopenharmony_ci    auto nodeAPI = reinterpret_cast<ArkUI_NativeNodeAPI_1*>(
475823b3eb3cSopenharmony_ci        OH_ArkUI_QueryModuleInterfaceByName(ARKUI_NATIVE_NODE, "ArkUI_NativeNodeAPI_1"));
475923b3eb3cSopenharmony_ci    auto rootNode = nodeAPI->createNode(ARKUI_NODE_GRID);
476023b3eb3cSopenharmony_ci    ASSERT_NE(rootNode, nullptr);
476123b3eb3cSopenharmony_ci    float negativeFloat = -1.0f;
476223b3eb3cSopenharmony_ci    int32_t negativeInt = -1;
476323b3eb3cSopenharmony_ci    ArkUI_NumberValue value0[] = {};
476423b3eb3cSopenharmony_ci    ArkUI_AttributeItem item0 = {value0, 0, nullptr, nullptr};
476523b3eb3cSopenharmony_ci    ArkUI_NumberValue valueEnum[] = {{.i32 = negativeInt}};
476623b3eb3cSopenharmony_ci    ArkUI_AttributeItem itemEnum = {valueEnum, 1, nullptr, nullptr};
476723b3eb3cSopenharmony_ci    ArkUI_NumberValue valueFloat[] = {{.f32 = negativeFloat}, {.f32 = negativeFloat}, {.f32 = negativeFloat},
476823b3eb3cSopenharmony_ci        {.f32 = negativeFloat}};
476923b3eb3cSopenharmony_ci    ArkUI_AttributeItem itemFloat = {valueFloat, sizeof(valueFloat) / sizeof(ArkUI_NumberValue), nullptr, nullptr};
477023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_GRID_COLUMN_TEMPLATE, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
477123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_GRID_ROW_TEMPLATE, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
477223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_GRID_COLUMN_GAP, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
477323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_GRID_COLUMN_GAP, &itemFloat), ARKUI_ERROR_CODE_PARAM_INVALID);
477423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_GRID_ROW_GAP, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
477523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_GRID_ROW_GAP, &itemFloat), ARKUI_ERROR_CODE_PARAM_INVALID);
477623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_GRID_NODE_ADAPTER, nullptr), ARKUI_ERROR_CODE_PARAM_INVALID);
477723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_GRID_NODE_ADAPTER, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
477823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_GRID_CACHED_COUNT, nullptr), ARKUI_ERROR_CODE_PARAM_INVALID);
477923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_GRID_CACHED_COUNT, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
478023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_GRID_CACHED_COUNT, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
478123b3eb3cSopenharmony_ci    nodeAPI->disposeNode(rootNode);
478223b3eb3cSopenharmony_ci}
478323b3eb3cSopenharmony_ci
478423b3eb3cSopenharmony_ci/**
478523b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest066
478623b3eb3cSopenharmony_ci * @tc.desc: Test abnormalInputForImageAnimator function.
478723b3eb3cSopenharmony_ci * @tc.type: FUNC
478823b3eb3cSopenharmony_ci */
478923b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest066, TestSize.Level1)
479023b3eb3cSopenharmony_ci{
479123b3eb3cSopenharmony_ci    auto nodeAPI = reinterpret_cast<ArkUI_NativeNodeAPI_1*>(
479223b3eb3cSopenharmony_ci        OH_ArkUI_QueryModuleInterfaceByName(ARKUI_NATIVE_NODE, "ArkUI_NativeNodeAPI_1"));
479323b3eb3cSopenharmony_ci    auto rootNode = nodeAPI->createNode(ARKUI_NODE_IMAGE_ANIMATOR);
479423b3eb3cSopenharmony_ci    ASSERT_NE(rootNode, nullptr);
479523b3eb3cSopenharmony_ci    int32_t negativeInt = -1;
479623b3eb3cSopenharmony_ci    ArkUI_NumberValue value0[] = {};
479723b3eb3cSopenharmony_ci    ArkUI_AttributeItem item0 = {value0, 0, nullptr, nullptr};
479823b3eb3cSopenharmony_ci    ArkUI_NumberValue valueEnum[] = {{.i32 = negativeInt}};
479923b3eb3cSopenharmony_ci    ArkUI_AttributeItem itemEnum = {valueEnum, 1, nullptr, nullptr};
480023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_IMAGE_ANIMATOR_IMAGES, nullptr), ARKUI_ERROR_CODE_PARAM_INVALID);
480123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_IMAGE_ANIMATOR_IMAGES, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
480223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_IMAGE_ANIMATOR_STATE, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
480323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_IMAGE_ANIMATOR_STATE, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
480423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_IMAGE_ANIMATOR_DURATION, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
480523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_IMAGE_ANIMATOR_REVERSE, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
480623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_IMAGE_ANIMATOR_REVERSE, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
480723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_IMAGE_ANIMATOR_FIXED_SIZE, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
480823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_IMAGE_ANIMATOR_FIXED_SIZE, &itemEnum),
480923b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
481023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_IMAGE_ANIMATOR_FILL_MODE, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
481123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_IMAGE_ANIMATOR_FILL_MODE, &itemEnum),
481223b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
481323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_IMAGE_ANIMATOR_ITERATION, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);
481423b3eb3cSopenharmony_ci    valueEnum[0].i32 = 4;
481523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_IMAGE_ANIMATOR_STATE, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
481623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_IMAGE_ANIMATOR_REVERSE, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID);
481723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_IMAGE_ANIMATOR_FIXED_SIZE, &itemEnum),
481823b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
481923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_IMAGE_ANIMATOR_FILL_MODE, &itemEnum),
482023b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
482123b3eb3cSopenharmony_ci    nodeAPI->disposeNode(rootNode);
482223b3eb3cSopenharmony_ci}
482323b3eb3cSopenharmony_ci
482423b3eb3cSopenharmony_ci/**
482523b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest067
482623b3eb3cSopenharmony_ci * @tc.desc: Test attributeAbnormal function.
482723b3eb3cSopenharmony_ci * @tc.type: FUNC
482823b3eb3cSopenharmony_ci */
482923b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest067, TestSize.Level1)
483023b3eb3cSopenharmony_ci{
483123b3eb3cSopenharmony_ci    auto nodeAPI = reinterpret_cast<ArkUI_NativeNodeAPI_1*>(
483223b3eb3cSopenharmony_ci        OH_ArkUI_QueryModuleInterfaceByName(ARKUI_NATIVE_NODE, "ArkUI_NativeNodeAPI_1"));
483323b3eb3cSopenharmony_ci    int32_t abnormalType = static_cast<int32_t>(ARKUI_NODE_CUSTOM_SPAN) + 1;
483423b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->createNode(static_cast<ArkUI_NodeType>(abnormalType)), nullptr);
483523b3eb3cSopenharmony_ci    nodeAPI->disposeNode(nullptr);
483623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->addChild(nullptr, nullptr), ARKUI_ERROR_CODE_PARAM_INVALID);
483723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->removeChild(nullptr, nullptr), ARKUI_ERROR_CODE_PARAM_INVALID);
483823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->insertChildAfter(nullptr, nullptr, nullptr), ARKUI_ERROR_CODE_PARAM_INVALID);
483923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->insertChildBefore(nullptr, nullptr, nullptr), ARKUI_ERROR_CODE_PARAM_INVALID);
484023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->insertChildAt(nullptr, nullptr, 0), ARKUI_ERROR_CODE_PARAM_INVALID);
484123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(nullptr, NODE_WIDTH, nullptr), ARKUI_ERROR_CODE_PARAM_INVALID);
484223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(nullptr, NODE_WIDTH), ARKUI_ERROR_CODE_PARAM_INVALID);
484323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->getAttribute(nullptr, NODE_WIDTH), nullptr);
484423b3eb3cSopenharmony_ci    auto abnormalNode = new ArkUI_Node({-1, nullptr});
484523b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->addChild(abnormalNode, abnormalNode), ARKUI_ERROR_CODE_NOT_SUPPROTED_FOR_ARKTS_NODE);
484623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->removeChild(abnormalNode, abnormalNode), ARKUI_ERROR_CODE_NOT_SUPPROTED_FOR_ARKTS_NODE);
484723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->insertChildAfter(abnormalNode, abnormalNode, nullptr),
484823b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_NOT_SUPPROTED_FOR_ARKTS_NODE);
484923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->insertChildBefore(abnormalNode, abnormalNode, nullptr),
485023b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_NOT_SUPPROTED_FOR_ARKTS_NODE);
485123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->insertChildAt(abnormalNode, abnormalNode, 0), ARKUI_ERROR_CODE_NOT_SUPPROTED_FOR_ARKTS_NODE);
485223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(abnormalNode, NODE_WIDTH, nullptr), ARKUI_ERROR_CODE_NOT_SUPPROTED_FOR_ARKTS_NODE);
485323b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(abnormalNode, NODE_WIDTH), ARKUI_ERROR_CODE_NOT_SUPPROTED_FOR_ARKTS_NODE);
485423b3eb3cSopenharmony_ci    int32_t abnormalAttribute = 999 * MAX_NODE_SCOPE_NUM;
485523b3eb3cSopenharmony_ci    auto node = nodeAPI->createNode(ARKUI_NODE_STACK);
485623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(node, static_cast<ArkUI_NodeAttributeType>(abnormalAttribute), nullptr),
485723b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_ATTRIBUTE_OR_EVENT_NOT_SUPPORTED);
485823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->resetAttribute(node, static_cast<ArkUI_NodeAttributeType>(abnormalAttribute)),
485923b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_ATTRIBUTE_OR_EVENT_NOT_SUPPORTED);
486023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->getAttribute(node, static_cast<ArkUI_NodeAttributeType>(abnormalAttribute)), nullptr);
486123b3eb3cSopenharmony_ci    for (int32_t i = 0; i <= static_cast<int32_t>(ARKUI_NODE_IMAGE_ANIMATOR); i++) {
486223b3eb3cSopenharmony_ci        abnormalAttribute = (i + 1) * MAX_NODE_SCOPE_NUM - 1;
486323b3eb3cSopenharmony_ci        EXPECT_EQ(nodeAPI->setAttribute(node, static_cast<ArkUI_NodeAttributeType>(abnormalAttribute), nullptr),
486423b3eb3cSopenharmony_ci            ARKUI_ERROR_CODE_ATTRIBUTE_OR_EVENT_NOT_SUPPORTED);
486523b3eb3cSopenharmony_ci        EXPECT_EQ(nodeAPI->resetAttribute(node, static_cast<ArkUI_NodeAttributeType>(abnormalAttribute)),
486623b3eb3cSopenharmony_ci            ARKUI_ERROR_CODE_NO_ERROR);
486723b3eb3cSopenharmony_ci        if (i == ARKUI_NODE_DATE_PICKER || i == ARKUI_NODE_TEXT_PICKER || i == ARKUI_NODE_TIME_PICKER ||
486823b3eb3cSopenharmony_ci            i == ARKUI_NODE_LOADING_PROGRESS) {
486923b3eb3cSopenharmony_ci            EXPECT_NE(nodeAPI->getAttribute(node, static_cast<ArkUI_NodeAttributeType>(abnormalAttribute)), nullptr);
487023b3eb3cSopenharmony_ci        } else {
487123b3eb3cSopenharmony_ci            EXPECT_EQ(nodeAPI->getAttribute(node, static_cast<ArkUI_NodeAttributeType>(abnormalAttribute)), nullptr);
487223b3eb3cSopenharmony_ci        }
487323b3eb3cSopenharmony_ci    }
487423b3eb3cSopenharmony_ci    for (int32_t j = static_cast<int32_t>(ARKUI_NODE_STACK); j < static_cast<int32_t>(ARKUI_NODE_GRID_ITEM); j++) {
487523b3eb3cSopenharmony_ci        abnormalAttribute = (j + 1) * MAX_NODE_SCOPE_NUM - 1;
487623b3eb3cSopenharmony_ci        if (j == ARKUI_NODE_FLOW_ITEM) {
487723b3eb3cSopenharmony_ci            EXPECT_EQ(nodeAPI->setAttribute(node, static_cast<ArkUI_NodeAttributeType>(abnormalAttribute), nullptr),
487823b3eb3cSopenharmony_ci                ARKUI_ERROR_CODE_PARAM_INVALID);
487923b3eb3cSopenharmony_ci            EXPECT_EQ(nodeAPI->resetAttribute(node, static_cast<ArkUI_NodeAttributeType>(abnormalAttribute)),
488023b3eb3cSopenharmony_ci                ARKUI_ERROR_CODE_PARAM_INVALID);
488123b3eb3cSopenharmony_ci            EXPECT_EQ(nodeAPI->getAttribute(node, static_cast<ArkUI_NodeAttributeType>(abnormalAttribute)), nullptr);
488223b3eb3cSopenharmony_ci        } else {
488323b3eb3cSopenharmony_ci            EXPECT_EQ(nodeAPI->setAttribute(node, static_cast<ArkUI_NodeAttributeType>(abnormalAttribute), nullptr),
488423b3eb3cSopenharmony_ci                ARKUI_ERROR_CODE_ATTRIBUTE_OR_EVENT_NOT_SUPPORTED);
488523b3eb3cSopenharmony_ci            EXPECT_EQ(nodeAPI->resetAttribute(node, static_cast<ArkUI_NodeAttributeType>(abnormalAttribute)),
488623b3eb3cSopenharmony_ci                ARKUI_ERROR_CODE_NO_ERROR);
488723b3eb3cSopenharmony_ci            if (j == ARKUI_NODE_LIST) {
488823b3eb3cSopenharmony_ci                EXPECT_NE(nodeAPI->getAttribute(
488923b3eb3cSopenharmony_ci                    node, static_cast<ArkUI_NodeAttributeType>(abnormalAttribute)), nullptr);
489023b3eb3cSopenharmony_ci            } else {
489123b3eb3cSopenharmony_ci                EXPECT_EQ(nodeAPI->getAttribute(
489223b3eb3cSopenharmony_ci                    node, static_cast<ArkUI_NodeAttributeType>(abnormalAttribute)), nullptr);
489323b3eb3cSopenharmony_ci            }
489423b3eb3cSopenharmony_ci        }
489523b3eb3cSopenharmony_ci    }
489623b3eb3cSopenharmony_ci    delete abnormalNode;
489723b3eb3cSopenharmony_ci    abnormalNode = nullptr;
489823b3eb3cSopenharmony_ci    nodeAPI->disposeNode(node);
489923b3eb3cSopenharmony_ci}
490023b3eb3cSopenharmony_ci
490123b3eb3cSopenharmony_ci/**
490223b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest068
490323b3eb3cSopenharmony_ci * @tc.desc: Test eventAbnormal function.
490423b3eb3cSopenharmony_ci * @tc.type: FUNC
490523b3eb3cSopenharmony_ci */
490623b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest068, TestSize.Level1)
490723b3eb3cSopenharmony_ci{
490823b3eb3cSopenharmony_ci    auto nodeAPI = reinterpret_cast<ArkUI_NativeNodeAPI_1*>(
490923b3eb3cSopenharmony_ci        OH_ArkUI_QueryModuleInterfaceByName(ARKUI_NATIVE_NODE, "ArkUI_NativeNodeAPI_1"));
491023b3eb3cSopenharmony_ci    auto node = nodeAPI->createNode(ARKUI_NODE_STACK);
491123b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->registerNodeEvent(nullptr, NODE_TOUCH_EVENT, 0, nullptr), ARKUI_ERROR_CODE_PARAM_INVALID);
491223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->registerNodeEvent(
491323b3eb3cSopenharmony_ci        node, static_cast<ArkUI_NodeEventType>(-1), 0, nullptr), ARKUI_ERROR_CODE_ATTRIBUTE_OR_EVENT_NOT_SUPPORTED);
491423b3eb3cSopenharmony_ci    nodeAPI->unregisterNodeEvent(nullptr, NODE_TOUCH_EVENT);
491523b3eb3cSopenharmony_ci    nodeAPI->unregisterNodeEvent(node, NODE_TOUCH_EVENT);
491623b3eb3cSopenharmony_ci    nodeAPI->disposeNode(node);
491723b3eb3cSopenharmony_ci}
491823b3eb3cSopenharmony_ci
491923b3eb3cSopenharmony_ci/**
492023b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest069
492123b3eb3cSopenharmony_ci * @tc.desc: Test lengthMetricUnit function.
492223b3eb3cSopenharmony_ci * @tc.type: FUNC
492323b3eb3cSopenharmony_ci */
492423b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest069, TestSize.Level1)
492523b3eb3cSopenharmony_ci{
492623b3eb3cSopenharmony_ci    auto nodeAPI = reinterpret_cast<ArkUI_NativeNodeAPI_1*>(
492723b3eb3cSopenharmony_ci        OH_ArkUI_QueryModuleInterfaceByName(ARKUI_NATIVE_NODE, "ArkUI_NativeNodeAPI_1"));
492823b3eb3cSopenharmony_ci    auto node = nodeAPI->createNode(ARKUI_NODE_STACK);
492923b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setLengthMetricUnit(nullptr, ARKUI_LENGTH_METRIC_UNIT_PX), ARKUI_ERROR_CODE_PARAM_INVALID);
493023b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setLengthMetricUnit(node, static_cast<ArkUI_LengthMetricUnit>(-2)),
493123b3eb3cSopenharmony_ci        ARKUI_ERROR_CODE_PARAM_INVALID);
493223b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setLengthMetricUnit(node, ARKUI_LENGTH_METRIC_UNIT_PX), ARKUI_ERROR_CODE_NO_ERROR);
493323b3eb3cSopenharmony_ci    ArkUI_NumberValue value[] = {{.f32 = 10.0f}, {.f32 = 10.0f}};
493423b3eb3cSopenharmony_ci    ArkUI_AttributeItem item = {value, sizeof(value) / sizeof(ArkUI_NumberValue)};
493523b3eb3cSopenharmony_ci    nodeAPI->setAttribute(node, NODE_WIDTH, &item);
493623b3eb3cSopenharmony_ci    nodeAPI->setLengthMetricUnit(node, ARKUI_LENGTH_METRIC_UNIT_FP);
493723b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->setAttribute(node, NODE_SCROLL_BY, &item), ARKUI_ERROR_CODE_PARAM_INVALID);
493823b3eb3cSopenharmony_ci    nodeAPI->disposeNode(node);
493923b3eb3cSopenharmony_ci}
494023b3eb3cSopenharmony_ci
494123b3eb3cSopenharmony_ci/**
494223b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest070
494323b3eb3cSopenharmony_ci * @tc.desc: Test convertEvent function.
494423b3eb3cSopenharmony_ci * @tc.type: FUNC
494523b3eb3cSopenharmony_ci */
494623b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest070, TestSize.Level1)
494723b3eb3cSopenharmony_ci{
494823b3eb3cSopenharmony_ci    ArkUINodeEvent origin;
494923b3eb3cSopenharmony_ci    ArkUI_NodeEvent event;
495023b3eb3cSopenharmony_ci    ArkUI_CompatibleNodeEvent compatibleEvent;
495123b3eb3cSopenharmony_ci    const std::string str = "test";
495223b3eb3cSopenharmony_ci    origin.kind = ArkUIEventCategory::COMPONENT_ASYNC_EVENT;
495323b3eb3cSopenharmony_ci    origin.componentAsyncEvent.subKind = ArkUIEventSubKind::ON_VISIBLE_AREA_CHANGE;
495423b3eb3cSopenharmony_ci    origin.componentAsyncEvent.data[0].i32 = 0;
495523b3eb3cSopenharmony_ci    EXPECT_EQ(OHOS::Ace::NodeModel::ConvertEvent(&origin, &event), true);
495623b3eb3cSopenharmony_ci    EXPECT_EQ(OHOS::Ace::NodeModel::ConvertEvent(&origin, &compatibleEvent), true);
495723b3eb3cSopenharmony_ci    origin.kind = ArkUIEventCategory::TEXT_INPUT;
495823b3eb3cSopenharmony_ci    origin.textInputEvent.subKind = ArkUIEventSubKind::ON_TEXT_INPUT_CHANGE;
495923b3eb3cSopenharmony_ci    origin.textInputEvent.nativeStringPtr = reinterpret_cast<intptr_t>(str.c_str());
496023b3eb3cSopenharmony_ci    EXPECT_EQ(OHOS::Ace::NodeModel::ConvertEvent(&origin, &event), true);
496123b3eb3cSopenharmony_ci    EXPECT_EQ(OHOS::Ace::NodeModel::ConvertEvent(&origin, &compatibleEvent), true);
496223b3eb3cSopenharmony_ci    origin.kind = ArkUIEventCategory::TOUCH_EVENT;
496323b3eb3cSopenharmony_ci    origin.touchEvent.subKind = ArkUIEventSubKind::ON_TOUCH;
496423b3eb3cSopenharmony_ci    origin.touchEvent.sourceType = 2;
496523b3eb3cSopenharmony_ci    origin.touchEvent.action = 0;
496623b3eb3cSopenharmony_ci    EXPECT_EQ(OHOS::Ace::NodeModel::ConvertEvent(&origin, &event), true);
496723b3eb3cSopenharmony_ci    EXPECT_EQ(OHOS::Ace::NodeModel::ConvertEvent(&origin, &compatibleEvent), true);
496823b3eb3cSopenharmony_ci    origin.touchEvent.sourceType = 0;
496923b3eb3cSopenharmony_ci    EXPECT_EQ(OHOS::Ace::NodeModel::ConvertEvent(&origin, &compatibleEvent), true);
497023b3eb3cSopenharmony_ci    origin.touchEvent.action = 1;
497123b3eb3cSopenharmony_ci    EXPECT_EQ(OHOS::Ace::NodeModel::ConvertEvent(&origin, &compatibleEvent), true);
497223b3eb3cSopenharmony_ci    origin.touchEvent.action = 2;
497323b3eb3cSopenharmony_ci    EXPECT_EQ(OHOS::Ace::NodeModel::ConvertEvent(&origin, &compatibleEvent), true);
497423b3eb3cSopenharmony_ci    origin.touchEvent.action = 3;
497523b3eb3cSopenharmony_ci    EXPECT_EQ(OHOS::Ace::NodeModel::ConvertEvent(&origin, &compatibleEvent), true);
497623b3eb3cSopenharmony_ci    origin.touchEvent.action = 4;
497723b3eb3cSopenharmony_ci    EXPECT_EQ(OHOS::Ace::NodeModel::ConvertEvent(&origin, &compatibleEvent), true);
497823b3eb3cSopenharmony_ci
497923b3eb3cSopenharmony_ci    origin.kind = ArkUIEventCategory::MOUSE_INPUT_EVENT;
498023b3eb3cSopenharmony_ci    origin.mouseEvent.subKind = ArkUIEventSubKind::ON_MOUSE;
498123b3eb3cSopenharmony_ci    EXPECT_EQ(OHOS::Ace::NodeModel::ConvertEvent(&origin, &event), true);
498223b3eb3cSopenharmony_ci    origin.kind = ArkUIEventCategory::MIXED_EVENT;
498323b3eb3cSopenharmony_ci    origin.mouseEvent.subKind = ArkUIEventSubKind::ON_TEXT_AREA_WILL_INSERT;
498423b3eb3cSopenharmony_ci    EXPECT_EQ(OHOS::Ace::NodeModel::ConvertEvent(&origin, &event), true);
498523b3eb3cSopenharmony_ci    origin.kind = ArkUIEventCategory::INVALID;
498623b3eb3cSopenharmony_ci    origin.mouseEvent.subKind = ArkUIEventSubKind::ON_TEXT_AREA_WILL_INSERT;
498723b3eb3cSopenharmony_ci    EXPECT_EQ(OHOS::Ace::NodeModel::ConvertEvent(&origin, &event), false);
498823b3eb3cSopenharmony_ci    EXPECT_EQ(OHOS::Ace::NodeModel::ConvertEvent(&origin, &compatibleEvent), false);
498923b3eb3cSopenharmony_ci}
499023b3eb3cSopenharmony_ci
499123b3eb3cSopenharmony_ci/**
499223b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest071
499323b3eb3cSopenharmony_ci * @tc.desc: Test ConvertToCTouch function.
499423b3eb3cSopenharmony_ci * @tc.type: FUNC
499523b3eb3cSopenharmony_ci */
499623b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest071, TestSize.Level1)
499723b3eb3cSopenharmony_ci{
499823b3eb3cSopenharmony_ci    EXPECT_EQ(OHOS::Ace::NodeModel::ConvertToCTouchActionType(0), 1);
499923b3eb3cSopenharmony_ci    EXPECT_EQ(OHOS::Ace::NodeModel::ConvertToCTouchActionType(1), 3);
500023b3eb3cSopenharmony_ci    EXPECT_EQ(OHOS::Ace::NodeModel::ConvertToCTouchActionType(2), 2);
500123b3eb3cSopenharmony_ci    EXPECT_EQ(OHOS::Ace::NodeModel::ConvertToCTouchActionType(3), 0);
500223b3eb3cSopenharmony_ci    EXPECT_EQ(OHOS::Ace::NodeModel::ConvertToCTouchActionType(-1), -1);
500323b3eb3cSopenharmony_ci
500423b3eb3cSopenharmony_ci    EXPECT_EQ(OHOS::Ace::NodeModel::ConvertToCInputEventToolType(1), 1);
500523b3eb3cSopenharmony_ci    EXPECT_EQ(OHOS::Ace::NodeModel::ConvertToCInputEventToolType(2), 2);
500623b3eb3cSopenharmony_ci    EXPECT_EQ(OHOS::Ace::NodeModel::ConvertToCInputEventToolType(7), 3);
500723b3eb3cSopenharmony_ci    EXPECT_EQ(OHOS::Ace::NodeModel::ConvertToCInputEventToolType(9), 4);
500823b3eb3cSopenharmony_ci    EXPECT_EQ(OHOS::Ace::NodeModel::ConvertToCInputEventToolType(0), 0);
500923b3eb3cSopenharmony_ci
501023b3eb3cSopenharmony_ci    EXPECT_EQ(OHOS::Ace::NodeModel::ConvertToCMouseActionType(1), 1);
501123b3eb3cSopenharmony_ci    EXPECT_EQ(OHOS::Ace::NodeModel::ConvertToCMouseActionType(2), 2);
501223b3eb3cSopenharmony_ci    EXPECT_EQ(OHOS::Ace::NodeModel::ConvertToCMouseActionType(3), 3);
501323b3eb3cSopenharmony_ci    EXPECT_EQ(OHOS::Ace::NodeModel::ConvertToCMouseActionType(0), 0);
501423b3eb3cSopenharmony_ci
501523b3eb3cSopenharmony_ci    EXPECT_EQ(OHOS::Ace::NodeModel::ConvertToCMouseEventButtonType(1), 1);
501623b3eb3cSopenharmony_ci    EXPECT_EQ(OHOS::Ace::NodeModel::ConvertToCMouseEventButtonType(2), 2);
501723b3eb3cSopenharmony_ci    EXPECT_EQ(OHOS::Ace::NodeModel::ConvertToCMouseEventButtonType(4), 3);
501823b3eb3cSopenharmony_ci    EXPECT_EQ(OHOS::Ace::NodeModel::ConvertToCMouseEventButtonType(8), 4);
501923b3eb3cSopenharmony_ci    EXPECT_EQ(OHOS::Ace::NodeModel::ConvertToCMouseEventButtonType(16), 5);
502023b3eb3cSopenharmony_ci    EXPECT_EQ(OHOS::Ace::NodeModel::ConvertToCMouseEventButtonType(-1), 0);
502123b3eb3cSopenharmony_ci}
502223b3eb3cSopenharmony_ci
502323b3eb3cSopenharmony_ci/**
502423b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest072
502523b3eb3cSopenharmony_ci * @tc.desc: Test convertEventResult function.
502623b3eb3cSopenharmony_ci * @tc.type: FUNC
502723b3eb3cSopenharmony_ci */
502823b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest072, TestSize.Level1)
502923b3eb3cSopenharmony_ci{
503023b3eb3cSopenharmony_ci    ArkUINodeEvent event;
503123b3eb3cSopenharmony_ci    ArkUI_CompatibleNodeEvent origin;
503223b3eb3cSopenharmony_ci    origin.kind = ArkUI_NodeEventType::NODE_TOUCH_EVENT;
503323b3eb3cSopenharmony_ci    EXPECT_EQ(OHOS::Ace::NodeModel::ConvertEventResult(&origin, &event), true);
503423b3eb3cSopenharmony_ci    origin.kind = ArkUI_NodeEventType::NODE_ON_TOUCH_INTERCEPT;
503523b3eb3cSopenharmony_ci    EXPECT_EQ(OHOS::Ace::NodeModel::ConvertEventResult(&origin, &event), true);
503623b3eb3cSopenharmony_ci    origin.kind = ArkUI_NodeEventType::NODE_TEXT_INPUT_ON_CHANGE;
503723b3eb3cSopenharmony_ci    EXPECT_EQ(OHOS::Ace::NodeModel::ConvertEventResult(&origin, &event), true);
503823b3eb3cSopenharmony_ci    origin.kind = ArkUI_NodeEventType::NODE_TEXT_INPUT_ON_CUT;
503923b3eb3cSopenharmony_ci    EXPECT_EQ(OHOS::Ace::NodeModel::ConvertEventResult(&origin, &event), true);
504023b3eb3cSopenharmony_ci    origin.kind = ArkUI_NodeEventType::NODE_TEXT_INPUT_ON_PASTE;
504123b3eb3cSopenharmony_ci    EXPECT_EQ(OHOS::Ace::NodeModel::ConvertEventResult(&origin, &event), true);
504223b3eb3cSopenharmony_ci    origin.kind = ArkUI_NodeEventType::NODE_TEXT_AREA_ON_CHANGE;
504323b3eb3cSopenharmony_ci    EXPECT_EQ(OHOS::Ace::NodeModel::ConvertEventResult(&origin, &event), true);
504423b3eb3cSopenharmony_ci    origin.kind = ArkUI_NodeEventType::NODE_TEXT_AREA_ON_PASTE;
504523b3eb3cSopenharmony_ci    EXPECT_EQ(OHOS::Ace::NodeModel::ConvertEventResult(&origin, &event), true);
504623b3eb3cSopenharmony_ci    origin.kind = ArkUI_NodeEventType::NODE_EVENT_ON_APPEAR;
504723b3eb3cSopenharmony_ci    EXPECT_EQ(OHOS::Ace::NodeModel::ConvertEventResult(&origin, &event), true);
504823b3eb3cSopenharmony_ci}
504923b3eb3cSopenharmony_ci
505023b3eb3cSopenharmony_ci/**
505123b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest073
505223b3eb3cSopenharmony_ci * @tc.desc: Test OH_ArkUI_NodeEvent_GetInputEvent function.
505323b3eb3cSopenharmony_ci * @tc.type: FUNC
505423b3eb3cSopenharmony_ci */
505523b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest073, TestSize.Level1)
505623b3eb3cSopenharmony_ci{
505723b3eb3cSopenharmony_ci    ArkUI_NodeEvent event = { 1, 0 };
505823b3eb3cSopenharmony_ci    event.origin = nullptr;
505923b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_NodeEvent_GetInputEvent(nullptr), nullptr);
506023b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_NodeEvent_GetInputEvent(nullptr), nullptr);
506123b3eb3cSopenharmony_ci    event.category = 0;
506223b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_NodeEvent_GetInputEvent(&event), nullptr);
506323b3eb3cSopenharmony_ci}
506423b3eb3cSopenharmony_ci
506523b3eb3cSopenharmony_ci/**
506623b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest074
506723b3eb3cSopenharmony_ci * @tc.desc: Test OH_ArkUI_NodeEvent_GetNodeComponentEvent function.
506823b3eb3cSopenharmony_ci * @tc.type: FUNC
506923b3eb3cSopenharmony_ci */
507023b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest074, TestSize.Level1)
507123b3eb3cSopenharmony_ci{
507223b3eb3cSopenharmony_ci    ArkUI_NodeEvent event = { 0, 0 };
507323b3eb3cSopenharmony_ci    event.origin = nullptr;
507423b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_NodeEvent_GetNodeComponentEvent(nullptr), nullptr);
507523b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_NodeEvent_GetNodeComponentEvent(&event), nullptr);
507623b3eb3cSopenharmony_ci    event.category = 1;
507723b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_NodeEvent_GetNodeComponentEvent(&event), nullptr);
507823b3eb3cSopenharmony_ci    ArkUINodeEvent origin = { 0, 0, 0};
507923b3eb3cSopenharmony_ci    origin.componentAsyncEvent.subKind = ArkUIEventSubKind::ON_VISIBLE_AREA_CHANGE;
508023b3eb3cSopenharmony_ci    origin.componentAsyncEvent.data[0].i32 = 0;
508123b3eb3cSopenharmony_ci    event.origin = &origin;
508223b3eb3cSopenharmony_ci    EXPECT_NE(OH_ArkUI_NodeEvent_GetNodeComponentEvent(&event), nullptr);
508323b3eb3cSopenharmony_ci}
508423b3eb3cSopenharmony_ci
508523b3eb3cSopenharmony_ci/**
508623b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest075
508723b3eb3cSopenharmony_ci * @tc.desc: Test OH_ArkUI_NodeEvent_GetStringAsyncEvent function.
508823b3eb3cSopenharmony_ci * @tc.type: FUNC
508923b3eb3cSopenharmony_ci */
509023b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest075, TestSize.Level1)
509123b3eb3cSopenharmony_ci{
509223b3eb3cSopenharmony_ci    ArkUI_NodeEvent event = { 0, 0 };
509323b3eb3cSopenharmony_ci    event.origin = nullptr;
509423b3eb3cSopenharmony_ci    const std::string str = "test";
509523b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_NodeEvent_GetStringAsyncEvent(nullptr), nullptr);
509623b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_NodeEvent_GetStringAsyncEvent(&event), nullptr);
509723b3eb3cSopenharmony_ci    event.category = 2;
509823b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_NodeEvent_GetStringAsyncEvent(&event), nullptr);
509923b3eb3cSopenharmony_ci    ArkUINodeEvent origin = { 0, 0, 0};
510023b3eb3cSopenharmony_ci    origin.textInputEvent.subKind = ArkUIEventSubKind::ON_TEXT_INPUT_CHANGE;
510123b3eb3cSopenharmony_ci    origin.textInputEvent.nativeStringPtr = reinterpret_cast<intptr_t>(str.c_str());
510223b3eb3cSopenharmony_ci    event.origin = &origin;
510323b3eb3cSopenharmony_ci    EXPECT_NE(OH_ArkUI_NodeEvent_GetStringAsyncEvent(&event), nullptr);
510423b3eb3cSopenharmony_ci}
510523b3eb3cSopenharmony_ci
510623b3eb3cSopenharmony_ci/**
510723b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest076
510823b3eb3cSopenharmony_ci * @tc.desc: Test OH_ArkUI_NodeEvent_GetUserData function.
510923b3eb3cSopenharmony_ci * @tc.type: FUNC
511023b3eb3cSopenharmony_ci */
511123b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest076, TestSize.Level1)
511223b3eb3cSopenharmony_ci{
511323b3eb3cSopenharmony_ci    ArkUI_NodeEvent event = { 0, 0 };
511423b3eb3cSopenharmony_ci    event.userData = nullptr;
511523b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_NodeEvent_GetUserData(nullptr), nullptr);
511623b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_NodeEvent_GetUserData(&event), nullptr);
511723b3eb3cSopenharmony_ci}
511823b3eb3cSopenharmony_ci
511923b3eb3cSopenharmony_ci/**
512023b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest077
512123b3eb3cSopenharmony_ci * @tc.desc: Test OH_ArkUI_NodeEvent_GetNumberValue function.
512223b3eb3cSopenharmony_ci * @tc.type: FUNC
512323b3eb3cSopenharmony_ci */
512423b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest077, TestSize.Level1)
512523b3eb3cSopenharmony_ci{
512623b3eb3cSopenharmony_ci    ArkUI_NodeEvent event = { 0, 0 };
512723b3eb3cSopenharmony_ci    event.origin = nullptr;
512823b3eb3cSopenharmony_ci    int32_t index = 0;
512923b3eb3cSopenharmony_ci    ArkUI_NumberValue value[] = {{.f32 = 10.0f}};
513023b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_NodeEvent_GetNumberValue(nullptr, index, value), 106108);
513123b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_NodeEvent_GetNumberValue(&event, index, value), 106108);
513223b3eb3cSopenharmony_ci    event.category = 3;
513323b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_NodeEvent_GetNumberValue(&event, index, value), 106108);
513423b3eb3cSopenharmony_ci    ArkUINodeEvent mixEvent;
513523b3eb3cSopenharmony_ci    mixEvent.kind = ArkUIEventCategory::MIXED_EVENT;
513623b3eb3cSopenharmony_ci    mixEvent.extraParam = reinterpret_cast<intptr_t>(nullptr);
513723b3eb3cSopenharmony_ci    mixEvent.mixedEvent.subKind = ArkUIEventSubKind::ON_TEXT_AREA_WILL_INSERT;
513823b3eb3cSopenharmony_ci    mixEvent.mixedEvent.numberData[0].f32 = 0.0f;
513923b3eb3cSopenharmony_ci    mixEvent.mixedEvent.numberDataLength = 1;
514023b3eb3cSopenharmony_ci    event.origin = &mixEvent;
514123b3eb3cSopenharmony_ci    index = 2;
514223b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_NodeEvent_GetNumberValue(&event, index, value), 106107);
514323b3eb3cSopenharmony_ci    index = -1;
514423b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_NodeEvent_GetNumberValue(&event, index, value), 106107);
514523b3eb3cSopenharmony_ci    index = 0;
514623b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_NodeEvent_GetNumberValue(&event, index, value), ARKUI_ERROR_CODE_NO_ERROR);
514723b3eb3cSopenharmony_ci}
514823b3eb3cSopenharmony_ci
514923b3eb3cSopenharmony_ci/**
515023b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest078
515123b3eb3cSopenharmony_ci * @tc.desc: Test OH_ArkUI_NodeEvent_GetStringValue function.
515223b3eb3cSopenharmony_ci * @tc.type: FUNC
515323b3eb3cSopenharmony_ci */
515423b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest078, TestSize.Level1)
515523b3eb3cSopenharmony_ci{
515623b3eb3cSopenharmony_ci    ArkUI_NodeEvent event = { 0, 0 };
515723b3eb3cSopenharmony_ci    event.origin = nullptr;
515823b3eb3cSopenharmony_ci    int32_t index = 0;
515923b3eb3cSopenharmony_ci    int32_t size = 0;
516023b3eb3cSopenharmony_ci    char* value[size];
516123b3eb3cSopenharmony_ci    const std::string str1 = "";
516223b3eb3cSopenharmony_ci    const std::string str2 = "test";
516323b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_NodeEvent_GetStringValue(nullptr, index, value, &size), 106108);
516423b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_NodeEvent_GetStringValue(&event, index, value, &size), 106108);
516523b3eb3cSopenharmony_ci    event.category = 3;
516623b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_NodeEvent_GetStringValue(&event, index, value, &size), 106108);
516723b3eb3cSopenharmony_ci    ArkUINodeEvent mixEvent;
516823b3eb3cSopenharmony_ci    mixEvent.kind = ArkUIEventCategory::MIXED_EVENT;
516923b3eb3cSopenharmony_ci    mixEvent.extraParam = reinterpret_cast<intptr_t>(nullptr);
517023b3eb3cSopenharmony_ci    mixEvent.mixedEvent.subKind = ArkUIEventSubKind::ON_TEXT_AREA_WILL_INSERT;
517123b3eb3cSopenharmony_ci    mixEvent.mixedEvent.stringPtrData[0] = reinterpret_cast<intptr_t>(str1.c_str());
517223b3eb3cSopenharmony_ci    mixEvent.mixedEvent.stringPtrDataLength = 1;
517323b3eb3cSopenharmony_ci    event.origin = &mixEvent;
517423b3eb3cSopenharmony_ci    index = 2;
517523b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_NodeEvent_GetStringValue(&event, index, value, &size), 106107);
517623b3eb3cSopenharmony_ci    index = 0;
517723b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_NodeEvent_GetStringValue(&event, index, value, &size), 106108);
517823b3eb3cSopenharmony_ci    mixEvent.mixedEvent.stringPtrData[0] = reinterpret_cast<intptr_t>(str2.c_str());
517923b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_NodeEvent_GetStringValue(&event, index, value, &size), 106108);
518023b3eb3cSopenharmony_ci}
518123b3eb3cSopenharmony_ci
518223b3eb3cSopenharmony_ci/**
518323b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest079
518423b3eb3cSopenharmony_ci * @tc.desc: Test OH_ArkUI_NodeEvent_SetReturnNumberValue function.
518523b3eb3cSopenharmony_ci * @tc.type: FUNC
518623b3eb3cSopenharmony_ci */
518723b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest079, TestSize.Level1)
518823b3eb3cSopenharmony_ci{
518923b3eb3cSopenharmony_ci    ArkUI_NodeEvent event = { 0, 0 };
519023b3eb3cSopenharmony_ci    event.origin = nullptr;
519123b3eb3cSopenharmony_ci    int32_t size = 1;
519223b3eb3cSopenharmony_ci    ArkUI_NumberValue value[] = {{.i32 = 10}};
519323b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_NodeEvent_SetReturnNumberValue(nullptr, value, size), 106108);
519423b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_NodeEvent_SetReturnNumberValue(&event, value, size), 106108);
519523b3eb3cSopenharmony_ci    event.category = 3;
519623b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_NodeEvent_SetReturnNumberValue(&event, value, size), 106108);
519723b3eb3cSopenharmony_ci    ArkUINodeEvent mixEvent;
519823b3eb3cSopenharmony_ci    mixEvent.kind = ArkUIEventCategory::MIXED_EVENT;
519923b3eb3cSopenharmony_ci    mixEvent.extraParam = reinterpret_cast<intptr_t>(nullptr);
520023b3eb3cSopenharmony_ci    mixEvent.mixedEvent.subKind = ArkUIEventSubKind::ON_TEXT_AREA_WILL_INSERT;
520123b3eb3cSopenharmony_ci    event.origin = &mixEvent;
520223b3eb3cSopenharmony_ci    EXPECT_EQ(OH_ArkUI_NodeEvent_SetReturnNumberValue(&event, value, size), ARKUI_ERROR_CODE_NO_ERROR);
520323b3eb3cSopenharmony_ci}
520423b3eb3cSopenharmony_ci
520523b3eb3cSopenharmony_ci/**
520623b3eb3cSopenharmony_ci * @tc.name: NativeNodeTest080
520723b3eb3cSopenharmony_ci * @tc.desc: Test customSpanNode function.
520823b3eb3cSopenharmony_ci * @tc.type: FUNC
520923b3eb3cSopenharmony_ci */
521023b3eb3cSopenharmony_ciHWTEST_F(NativeNodeTest, NativeNodeTest080, TestSize.Level1)
521123b3eb3cSopenharmony_ci{
521223b3eb3cSopenharmony_ci    auto nodeAPI = reinterpret_cast<ArkUI_NativeNodeAPI_1*>(
521323b3eb3cSopenharmony_ci        OH_ArkUI_QueryModuleInterfaceByName(ARKUI_NATIVE_NODE, "ArkUI_NativeNodeAPI_1"));
521423b3eb3cSopenharmony_ci    auto rootNode = new ArkUI_Node({ARKUI_NODE_CUSTOM_SPAN, nullptr});
521523b3eb3cSopenharmony_ci
521623b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->registerNodeCustomEvent(
521723b3eb3cSopenharmony_ci        rootNode, ARKUI_NODE_CUSTOM_EVENT_ON_MEASURE, 0, nullptr), ARKUI_ERROR_CODE_NO_ERROR);
521823b3eb3cSopenharmony_ci    EXPECT_EQ(nodeAPI->registerNodeCustomEvent(
521923b3eb3cSopenharmony_ci        rootNode, ARKUI_NODE_CUSTOM_EVENT_ON_DRAW, 1, nullptr), ARKUI_ERROR_CODE_NO_ERROR);
522023b3eb3cSopenharmony_ci    nodeAPI->unregisterNodeCustomEvent(rootNode, ARKUI_NODE_CUSTOM_EVENT_ON_MEASURE);
522123b3eb3cSopenharmony_ci    nodeAPI->unregisterNodeCustomEvent(rootNode, ARKUI_NODE_CUSTOM_EVENT_ON_DRAW);
522223b3eb3cSopenharmony_ci    nodeAPI->disposeNode(rootNode);
522323b3eb3cSopenharmony_ci}
522423b3eb3cSopenharmony_ci} // namespace OHOS::Ace