mirror of
https://github.com/openharmony/security_security_component_manager.git
synced 2026-08-24 22:51:27 -04:00
@@ -95,6 +95,7 @@ HWTEST_F(SecCompEnhanceTest, GetPoniterEventEnhanceData001, TestSize.Level0)
|
||||
uint8_t* enhanceData = nullptr;
|
||||
uint32_t enHancedataLen = MAX_HMAC_SIZE;
|
||||
|
||||
InitSecCompClientEnhance();
|
||||
int32_t result = SecCompEnhanceKit::GetPointerEventEnhanceData(originData, dataLen, enhanceData, enHancedataLen);
|
||||
if (g_inputEnhanceExist) {
|
||||
EXPECT_EQ(result, SC_SERVICE_ERROR_SERVICE_NOT_EXIST);
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
#include "sec_comp_enhance_adapter.h"
|
||||
#include "sec_comp_enhance_kit.h"
|
||||
|
||||
extern "C" __attribute__((visibility("default"))) void InitSecCompClientEnhance();
|
||||
|
||||
namespace OHOS {
|
||||
namespace Security {
|
||||
namespace SecurityComponent {
|
||||
|
||||
@@ -780,3 +780,18 @@ HWTEST_F(LocationButtonTest, CompareLocationButton003, TestSize.Level1)
|
||||
EXPECT_TRUE(button1.FromJson(jsonComponent, message, isClicked));
|
||||
EXPECT_FALSE(button1.CompareComponentBasicInfo(&button2, false));
|
||||
}
|
||||
|
||||
/**
|
||||
* @tc.name: IsCorrespondenceType001
|
||||
* @tc.desc: Test IsCorrespondenceType
|
||||
* @tc.type: FUNC
|
||||
* @tc.require:
|
||||
*/
|
||||
HWTEST_F(LocationButtonTest, IsCorrespondenceType001, TestSize.Level1)
|
||||
{
|
||||
LocationButton button;
|
||||
button.type_ = LOCATION_COMPONENT;
|
||||
EXPECT_TRUE(button.IsCorrespondenceType());
|
||||
button.type_ = SAVE_COMPONENT;
|
||||
EXPECT_FALSE(button.IsCorrespondenceType());
|
||||
}
|
||||
|
||||
@@ -171,3 +171,18 @@ HWTEST_F(PasteButtonTest, ComparePasteButton003, TestSize.Level0)
|
||||
ASSERT_TRUE(button1.FromJson(jsonComponent, message, isClicked));
|
||||
ASSERT_FALSE(button1.CompareComponentBasicInfo(&button2, true));
|
||||
}
|
||||
|
||||
/**
|
||||
* @tc.name: IsCorrespondenceType001
|
||||
* @tc.desc: Test IsCorrespondenceType
|
||||
* @tc.type: FUNC
|
||||
* @tc.require:
|
||||
*/
|
||||
HWTEST_F(PasteButtonTest, IsCorrespondenceType001, TestSize.Level1)
|
||||
{
|
||||
PasteButton button;
|
||||
button.type_ = PASTE_COMPONENT;
|
||||
EXPECT_TRUE(button.IsCorrespondenceType());
|
||||
button.type_ = LOCATION_COMPONENT;
|
||||
EXPECT_FALSE(button.IsCorrespondenceType());
|
||||
}
|
||||
|
||||
@@ -175,3 +175,18 @@ HWTEST_F(SaveButtonTest, CompareSaveButton003, TestSize.Level0)
|
||||
ASSERT_TRUE(button1.FromJson(jsonComponent, message, isClicked));
|
||||
ASSERT_FALSE(button1.CompareComponentBasicInfo(&button2, true));
|
||||
}
|
||||
|
||||
/**
|
||||
* @tc.name: IsCorrespondenceType001
|
||||
* @tc.desc: Test IsCorrespondenceType
|
||||
* @tc.type: FUNC
|
||||
* @tc.require:
|
||||
*/
|
||||
HWTEST_F(SaveButtonTest, IsCorrespondenceType001, TestSize.Level1)
|
||||
{
|
||||
SaveButton button;
|
||||
button.type_ = SAVE_COMPONENT;
|
||||
EXPECT_TRUE(button.IsCorrespondenceType());
|
||||
button.type_ = PASTE_COMPONENT;
|
||||
EXPECT_FALSE(button.IsCorrespondenceType());
|
||||
}
|
||||
|
||||
@@ -263,3 +263,26 @@ HWTEST_F(SecCompKitTest, HasCustomPermissionForSecComp001, TestSize.Level0)
|
||||
{
|
||||
EXPECT_EQ(false, SecCompKit::HasCustomPermissionForSecComp());
|
||||
}
|
||||
|
||||
/**
|
||||
* @tc.name: PreRegisterSecCompProcess001
|
||||
* @tc.desc: Test PreRegisterSecCompProcess.
|
||||
* @tc.type: FUNC
|
||||
* @tc.require:
|
||||
*/
|
||||
HWTEST_F(SecCompKitTest, PreRegisterSecCompProcess001, TestSize.Level0)
|
||||
{
|
||||
EXPECT_NE(SC_OK, SecCompKit::PreRegisterSecCompProcess());
|
||||
}
|
||||
|
||||
/**
|
||||
* @tc.name: LoadService001
|
||||
* @tc.desc: Test LoadService.
|
||||
* @tc.type: FUNC
|
||||
* @tc.require:
|
||||
*/
|
||||
HWTEST_F(SecCompKitTest, LoadService001, TestSize.Level0)
|
||||
{
|
||||
EXPECT_EQ(true, SecCompKit::LoadService());
|
||||
EXPECT_EQ(true, SecCompKit::IsServiceExist());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user