update frameworks/native/interaction/test/unittest/src/mouse_location_listener_test.cpp.

Signed-off-by: 李少雄 <lishaoxiong10@huawei.com>
This commit is contained in:
李少雄 2024-07-13 03:57:28 +00:00 committed by Gitee
parent e466cab6ee
commit 01c5afcb71
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -40,6 +40,7 @@ namespace Msdp {
namespace DeviceStatus {
using namespace testing::ext;
namespace {
const std::string COOPERATE_ACCESS_PERMISSION { "ohos.permission.COOPERATE_MANAGER" };
const std::string DM_SERVICE_ACCESS_PERMISSION { "ohos.permission.ACCESS_SERVICE_DM" };
const std::string DM_SERVICE_ACCESS_NEWPERMISSION { "ohos.permission.DISTRIBUTED_DATASYNC" };
const std::string PKG_NAME_PREFIX { "DBinderBus_Dms_" };
@ -60,10 +61,10 @@ void MouseLocationListenerTest::SetUpTestCase() {}
void MouseLocationListenerTest::SetUp()
{
const int32_t permsNum = 2;
const char *perms[permsNum];
perms[0] = DM_SERVICE_ACCESS_NEWPERMISSION.c_str();
perms[1] = DM_SERVICE_ACCESS_PERMISSION.c_str();
const int32_t permsNum = 3;
const char *perms[] = {DM_SERVICE_ACCESS_NEWPERMISSION.c_str(), DM_SERVICE_ACCESS_PERMISSION.c_str(),
COOPERATE_ACCESS_PERMISSION.c_str()};
NativeTokenInfoParams infoInstance = {
.dcapsNum = 0,
.permsNum = permsNum,