mirror of
https://gitee.com/openharmony/ability_ability_runtime
synced 2024-11-23 15:20:34 +00:00
commit
bd91691600
@ -27,7 +27,7 @@ using namespace testing::ext;
|
||||
namespace OHOS {
|
||||
namespace AbilityRuntime {
|
||||
namespace {
|
||||
constexpr int32_t DEFAULT_BLOCKLIST_EXTENSION_NUM = 17;
|
||||
constexpr int32_t DEFAULT_BLOCKLIST_EXTENSION_NUM = 18;
|
||||
constexpr int32_t EXTENSION_TYPE_FORM = 0;
|
||||
constexpr int32_t EXTENSION_TYPE_WORK_SCHEDULER = 1;
|
||||
constexpr int32_t EXTENSION_TYPE_INPUTMETHOD = 2;
|
||||
|
@ -186,7 +186,7 @@ HWTEST_F(MissionListManagerTest, StartAbility_002, TestSize.Level1)
|
||||
EXPECT_EQ(0, result2);
|
||||
abilityRequest.abilityInfo.launchMode = AppExecFwk::LaunchMode::SINGLETON;
|
||||
auto result3 = missionListManager->StartAbility(abilityRequest);
|
||||
EXPECT_NE(0, result3);
|
||||
EXPECT_EQ(0, result3);
|
||||
missionListManager.reset();
|
||||
}
|
||||
|
||||
@ -785,7 +785,7 @@ HWTEST_F(MissionListManagerTest, CreateOrReusedMissionInfo_002, TestSize.Level1)
|
||||
auto missionListManager = std::make_shared<MissionListManager>(userId);
|
||||
AbilityRequest abilityRequest;
|
||||
InnerMissionInfo info;
|
||||
abilityRequest.abilityInfo.launchMode = AppExecFwk::LaunchMode::SPECIFIED;
|
||||
abilityRequest.abilityInfo.launchMode = AppExecFwk::LaunchMode::STANDARD;
|
||||
abilityRequest.abilityInfo.applicationInfo.isLauncherApp = true;
|
||||
bool res = missionListManager->CreateOrReusedMissionInfo(abilityRequest, info);
|
||||
EXPECT_FALSE(res);
|
||||
@ -806,7 +806,7 @@ HWTEST_F(MissionListManagerTest, CreateOrReusedMissionInfo_003, TestSize.Level1)
|
||||
auto missionListManager = std::make_shared<MissionListManager>(userId);
|
||||
AbilityRequest abilityRequest;
|
||||
InnerMissionInfo info;
|
||||
abilityRequest.abilityInfo.launchMode = AppExecFwk::LaunchMode::SPECIFIED;
|
||||
abilityRequest.abilityInfo.launchMode = AppExecFwk::LaunchMode::STANDARD;
|
||||
abilityRequest.abilityInfo.applicationInfo.isLauncherApp = false;
|
||||
info.missionInfo.id = 0;
|
||||
bool res = missionListManager->CreateOrReusedMissionInfo(abilityRequest, info);
|
||||
@ -832,7 +832,7 @@ HWTEST_F(MissionListManagerTest, CreateOrReusedMissionInfo_004, TestSize.Level1)
|
||||
abilityRequest.abilityInfo.applicationInfo.isLauncherApp = false;
|
||||
info.missionInfo.id = 1;
|
||||
bool res = missionListManager->CreateOrReusedMissionInfo(abilityRequest, info);
|
||||
EXPECT_FALSE(res);
|
||||
EXPECT_TRUE(res);
|
||||
missionListManager.reset();
|
||||
}
|
||||
|
||||
|
@ -138,9 +138,8 @@ HWTEST_F(UserControllerTest, StopUserTest_0300, TestSize.Level0)
|
||||
HWTEST_F(UserControllerTest, LogoutUserTest_0100, TestSize.Level0)
|
||||
{
|
||||
UserController userController;
|
||||
userController.LogoutUser(-1);
|
||||
userController.LogoutUser(0);
|
||||
EXPECT_TRUE(userController.LogoutUser(100) == -1);
|
||||
auto result = userController.LogoutUser(-1);
|
||||
EXPECT_EQ(result, INVALID_USERID_VALUE);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -152,7 +151,7 @@ HWTEST_F(UserControllerTest, LogoutUserTest_0100, TestSize.Level0)
|
||||
HWTEST_F(UserControllerTest, LogoutUserTest_0200, TestSize.Level0)
|
||||
{
|
||||
UserController userController;
|
||||
EXPECT_TRUE(userController.LogoutUser(666) == -1);
|
||||
EXPECT_TRUE(userController.LogoutUser(666) == INVALID_USERID_VALUE);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user