mirror of
https://gitee.com/openharmony/ability_ability_runtime
synced 2024-11-23 15:20:34 +00:00
Signed-off-by: zhongjianfei <zhongjianfei@huawei.com> Change-Id: I6c2c41a762faabf4f4fce36d6373ac5eb83f8653
This commit is contained in:
parent
7d92f417cc
commit
f035dddcfe
@ -52,7 +52,7 @@ public:
|
||||
* @param useNewMission new mission flag.
|
||||
*/
|
||||
static void SetUseNewMission(bool useNewMission);
|
||||
|
||||
|
||||
/**
|
||||
* @brief Get if use new mission.
|
||||
*
|
||||
|
@ -26,66 +26,66 @@ namespace AppExecFwk {
|
||||
class DataAbilityResult final : public Parcelable {
|
||||
public:
|
||||
/**
|
||||
* @brief A constructor used to create a DataAbilityResult instance
|
||||
* with the input parameter count specified.
|
||||
* @brief A constructor used to create a DataAbilityResult instance
|
||||
* with the input parameter count specified.
|
||||
*/
|
||||
DataAbilityResult(int count);
|
||||
|
||||
|
||||
/**
|
||||
* @brief A constructor used to create a DataAbilityResult instance
|
||||
* @brief A constructor used to create a DataAbilityResult instance
|
||||
* with the input parameter uri specified
|
||||
*/
|
||||
*/
|
||||
DataAbilityResult(const Uri &uri);
|
||||
|
||||
|
||||
/**
|
||||
* @brief A constructor used to create a DataAbilityResult instance
|
||||
* @brief A constructor used to create a DataAbilityResult instance
|
||||
* with a Parcel object specified.
|
||||
*/
|
||||
DataAbilityResult(Parcel &parcel);
|
||||
|
||||
/**
|
||||
* @brief A constructor used to create a DataAbilityResult instance
|
||||
* with input parameters uri, count, and failure specified.
|
||||
* @brief A constructor used to create a DataAbilityResult instance
|
||||
* with input parameters uri, count, and failure specified.
|
||||
*/
|
||||
DataAbilityResult(const Uri &uri, int count);
|
||||
|
||||
~DataAbilityResult();
|
||||
|
||||
/**
|
||||
* @brief Obtains the Uri object corresponding to the operation.
|
||||
* @return Obtains the Uri object corresponding to the operation.
|
||||
* @brief Obtains the Uri object corresponding to the operation.
|
||||
* @return Obtains the Uri object corresponding to the operation.
|
||||
*/
|
||||
Uri GetUri();
|
||||
|
||||
/**
|
||||
* @brief Obtains the number of rows affected by the operation.
|
||||
* @brief Obtains the number of rows affected by the operation.
|
||||
* @return Returns the number of rows affected by the operation.
|
||||
*/
|
||||
int GetCount();
|
||||
|
||||
/**
|
||||
* @brief Prints out a string containing the class object information.
|
||||
* @brief Prints out a string containing the class object information.
|
||||
* @return Returns object information.
|
||||
*/
|
||||
std::string ToString();
|
||||
|
||||
/**
|
||||
* @brief Marshals a DataAbilityResult object into a Parcel.
|
||||
* @brief Marshals a DataAbilityResult object into a Parcel.
|
||||
* @param parcel Indicates the Parcel object for marshalling.
|
||||
* @return Returns true if the marshalling is successful; returns false otherwise.
|
||||
*/
|
||||
virtual bool Marshalling(Parcel &parcel) const;
|
||||
|
||||
/**
|
||||
* @brief Unmarshals a DataAbilityResult object from a Parcel.
|
||||
* @brief Unmarshals a DataAbilityResult object from a Parcel.
|
||||
* @param parcel Indicates the Parcel object for unmarshalling.
|
||||
* @return Returns true if the unmarshalling is successful; returns false otherwise.
|
||||
*/
|
||||
static DataAbilityResult *Unmarshalling(Parcel &parcel);
|
||||
|
||||
/**
|
||||
* @brief Creates a DataAbilityResult instance based on the given Parcel object.
|
||||
* Used to transfer DataAbilityResult object using Parcel.
|
||||
* @brief Creates a DataAbilityResult instance based on the given Parcel object.
|
||||
* Used to transfer DataAbilityResult object using Parcel.
|
||||
* @param parcel Indicates the Parcel object.
|
||||
* @return Returns the DataAbilityResult object.
|
||||
*/
|
||||
@ -93,7 +93,7 @@ public:
|
||||
|
||||
private:
|
||||
Uri uri_;
|
||||
int count_;
|
||||
int count_;
|
||||
|
||||
bool ReadFromParcel(Parcel &parcel);
|
||||
// no object in parcel
|
||||
|
@ -24,7 +24,7 @@ namespace OHOS {
|
||||
namespace AppExecFwk {
|
||||
class FormJsEventHandler : public EventHandler {
|
||||
public:
|
||||
FormJsEventHandler(const std::shared_ptr<EventRunner> &runner,
|
||||
FormJsEventHandler(const std::shared_ptr<EventRunner> &runner,
|
||||
const std::shared_ptr<Ability>& ability, const FormJsInfo& formJsInfo);
|
||||
~FormJsEventHandler() = default;
|
||||
|
||||
|
@ -68,7 +68,7 @@ public:
|
||||
*
|
||||
*/
|
||||
bool AbilityTransactionNew(const Want &want, const AAFwk::LifeCycleStateInfo &targetState);
|
||||
|
||||
|
||||
/**
|
||||
* @brief Execution the KeyDown callback of the ability
|
||||
* @param keyEvent Indicates the key-down event.
|
||||
|
@ -140,7 +140,7 @@ public:
|
||||
MOCK_METHOD1(GetProcessRunningInfos, int(std::vector<AppExecFwk::RunningProcessInfo> &info));
|
||||
|
||||
MOCK_METHOD2(GetWantSenderInfo, int(const sptr<IWantSender> &target, std::shared_ptr<WantSenderInfo> &info));
|
||||
|
||||
|
||||
int RemoveMission(int id) override;
|
||||
|
||||
int RemoveStack(int id) override;
|
||||
|
@ -53,8 +53,8 @@ bool BundleMgrProxy::GetFormsInfoByApp(const std::string &bundleName, std::vecto
|
||||
return true;
|
||||
}
|
||||
bool BundleMgrProxy::GetFormsInfoByModule(
|
||||
const std::string &bundleName,
|
||||
const std::string &moduleName,
|
||||
const std::string &bundleName,
|
||||
const std::string &moduleName,
|
||||
std::vector<FormInfo> &formInfo)
|
||||
{
|
||||
return true;
|
||||
@ -150,8 +150,8 @@ bool BundleMgrService::GetFormsInfoByApp(const std::string &bundleName, std::vec
|
||||
return true;
|
||||
}
|
||||
bool BundleMgrService::GetFormsInfoByModule(
|
||||
const std::string &bundleName,
|
||||
const std::string &moduleName,
|
||||
const std::string &bundleName,
|
||||
const std::string &moduleName,
|
||||
std::vector<FormInfo> &formInfo)
|
||||
{
|
||||
FormInfo form;
|
||||
|
@ -184,7 +184,7 @@ public:
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Obtains information about the shortcuts of the application.
|
||||
* @brief Obtains information about the shortcuts of the application.
|
||||
* @param bundleName Indicates the name of the bundle to shortcut.
|
||||
* @param form Indicates the callback a list to shortcutinfo.
|
||||
* @return Returns true if shortcutinfo get success
|
||||
@ -396,7 +396,7 @@ public:
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Obtains information about the shortcuts of the application.
|
||||
* @brief Obtains information about the shortcuts of the application.
|
||||
* @param bundleName Indicates the name of the bundle to shortcut.
|
||||
* @param form Indicates the callback a list to shortcutinfo.
|
||||
* @return Returns true if shortcutinfo get success
|
||||
|
@ -130,8 +130,8 @@ public:
|
||||
* @return Returns ERR_OK on success, others on failure.
|
||||
*/
|
||||
int NotifyWhetherVisibleForms(
|
||||
const std::vector<int64_t> &formIds,
|
||||
const sptr<IRemoteObject> &callerToken,
|
||||
const std::vector<int64_t> &formIds,
|
||||
const sptr<IRemoteObject> &callerToken,
|
||||
const int32_t formVisibleType)
|
||||
{
|
||||
if (formIds.size() == 1) {
|
||||
@ -139,7 +139,7 @@ public:
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief temp form to normal form.
|
||||
* @param formId The Id of the form.
|
||||
@ -196,7 +196,7 @@ public:
|
||||
return ERR_OK;
|
||||
} else {
|
||||
return ERR_INVALID_VALUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -207,8 +207,8 @@ public:
|
||||
* @return Returns ERR_OK on success, others on failure.
|
||||
*/
|
||||
int LifecycleUpdate(
|
||||
const std::vector<int64_t> &formIds,
|
||||
const sptr<IRemoteObject> &callerToken,
|
||||
const std::vector<int64_t> &formIds,
|
||||
const sptr<IRemoteObject> &callerToken,
|
||||
const int32_t updateType)
|
||||
{
|
||||
if (formIds.size() == 0) {
|
||||
|
@ -48,7 +48,7 @@ public:
|
||||
private:
|
||||
static std::mutex mutex;
|
||||
static sptr<MockFormSupplyCallback> instance;
|
||||
|
||||
|
||||
DISALLOW_COPY_AND_MOVE(MockFormSupplyCallback);
|
||||
};
|
||||
} // namespace AppExecFwk
|
||||
|
@ -55,7 +55,7 @@ void AbilityLifecycleExecutorTest::TearDown(void)
|
||||
/**
|
||||
* @tc.number: AaFwk_AbilityLifecycleExecutor_GetState_0100
|
||||
* @tc.name: GetState
|
||||
* @tc.desc: Verify that the return value of getstate is UNINITIALIZED.
|
||||
* @tc.desc: Verify that the return value of getstate is UNINITIALIZED.
|
||||
*/
|
||||
HWTEST_F(AbilityLifecycleExecutorTest, AaFwk_AbilityLifecycleExecutor_GetState_0100, Function | MediumTest | Level1)
|
||||
{
|
||||
@ -71,8 +71,8 @@ HWTEST_F(AbilityLifecycleExecutorTest, AaFwk_AbilityLifecycleExecutor_GetState_0
|
||||
/**
|
||||
* @tc.number: AaFwk_AbilityLifecycleExecutor_DispatchLifecycleState_0100
|
||||
* @tc.name: DispatchLifecycleState
|
||||
* @tc.desc: Test whether attachbasecontext is called normally,
|
||||
* and verify whether the return value of getdatabasedir is ACTIVE.
|
||||
* @tc.desc: Test whether attachbasecontext is called normally,
|
||||
* and verify whether the return value of getdatabasedir is ACTIVE.
|
||||
*/
|
||||
HWTEST_F(AbilityLifecycleExecutorTest, AaFwk_AbilityLifecycleExecutor_DispatchLifecycleState_0100, Function | MediumTest | Level1)
|
||||
{
|
||||
@ -90,8 +90,8 @@ HWTEST_F(AbilityLifecycleExecutorTest, AaFwk_AbilityLifecycleExecutor_DispatchLi
|
||||
/**
|
||||
* @tc.number: AaFwk_AbilityLifecycleExecutor_DispatchLifecycleState_0200
|
||||
* @tc.name: DispatchLifecycleState
|
||||
* @tc.desc: Test whether attachbasecontext is called normally,
|
||||
* and verify whether the return value of getdatabasedir is BACKGROUND.
|
||||
* @tc.desc: Test whether attachbasecontext is called normally,
|
||||
* and verify whether the return value of getdatabasedir is BACKGROUND.
|
||||
*/
|
||||
HWTEST_F(AbilityLifecycleExecutorTest, AaFwk_AbilityLifecycleExecutor_DispatchLifecycleState_0200, Function | MediumTest | Level1)
|
||||
{
|
||||
@ -109,8 +109,8 @@ HWTEST_F(AbilityLifecycleExecutorTest, AaFwk_AbilityLifecycleExecutor_DispatchLi
|
||||
/**
|
||||
* @tc.number: AaFwk_AbilityLifecycleExecutor_DispatchLifecycleState_0300
|
||||
* @tc.name: DispatchLifecycleState
|
||||
* @tc.desc: Test whether attachbasecontext is called normally,
|
||||
* and verify whether the return value of getdatabasedir is INACTIVE.
|
||||
* @tc.desc: Test whether attachbasecontext is called normally,
|
||||
* and verify whether the return value of getdatabasedir is INACTIVE.
|
||||
*/
|
||||
HWTEST_F(AbilityLifecycleExecutorTest, AaFwk_AbilityLifecycleExecutor_DispatchLifecycleState_0300, Function | MediumTest | Level1)
|
||||
{
|
||||
@ -128,8 +128,8 @@ HWTEST_F(AbilityLifecycleExecutorTest, AaFwk_AbilityLifecycleExecutor_DispatchLi
|
||||
/**
|
||||
* @tc.number: AaFwk_AbilityLifecycleExecutor_DispatchLifecycleState_0400
|
||||
* @tc.name: DispatchLifecycleState
|
||||
* @tc.desc: Test whether attachbasecontext is called normally,
|
||||
* and verify whether the return value of getdatabasedir is INITIAL.
|
||||
* @tc.desc: Test whether attachbasecontext is called normally,
|
||||
* and verify whether the return value of getdatabasedir is INITIAL.
|
||||
*/
|
||||
HWTEST_F(AbilityLifecycleExecutorTest, AaFwk_AbilityLifecycleExecutor_DispatchLifecycleState_0400, Function | MediumTest | Level1)
|
||||
{
|
||||
@ -147,8 +147,8 @@ HWTEST_F(AbilityLifecycleExecutorTest, AaFwk_AbilityLifecycleExecutor_DispatchLi
|
||||
/**
|
||||
* @tc.number: AaFwk_AbilityLifecycleExecutor_DispatchLifecycleState_0500
|
||||
* @tc.name: DispatchLifecycleState
|
||||
* @tc.desc: Test whether attachbasecontext is called normally,
|
||||
* and verify whether the return value of getdatabasedir is UNINITIALIZED.
|
||||
* @tc.desc: Test whether attachbasecontext is called normally,
|
||||
* and verify whether the return value of getdatabasedir is UNINITIALIZED.
|
||||
*/
|
||||
HWTEST_F(AbilityLifecycleExecutorTest, AaFwk_AbilityLifecycleExecutor_DispatchLifecycleState_0500, Function | MediumTest | Level1)
|
||||
{
|
||||
|
@ -67,7 +67,7 @@ void DataAbilityHelperForObserverTest::TearDown(void)
|
||||
HWTEST_F(DataAbilityHelperForObserverTest, AaFwk_DataAbilityHelper_GetFileTypes_0100, Function | MediumTest | Level1)
|
||||
{
|
||||
GTEST_LOG_(INFO) << "AaFwk_DataAbilityHelper_GetFileTypes_0100 start";
|
||||
|
||||
|
||||
std::shared_ptr<MockAbilitySchedulerTools> mockTools = MockAbilitySchedulerTools::GetInstance();
|
||||
mockTools->SetMockStatus(true);
|
||||
std::shared_ptr<Context> context = std::make_shared<AbilityContext>();
|
||||
@ -100,7 +100,7 @@ HWTEST_F(DataAbilityHelperForObserverTest, AaFwk_DataAbilityHelper_GetFileTypes_
|
||||
HWTEST_F(DataAbilityHelperForObserverTest, AaFwk_DataAbilityHelper_GetFileTypes_0200, Function | MediumTest | Level1)
|
||||
{
|
||||
GTEST_LOG_(INFO) << "AaFwk_DataAbilityHelper_GetFileTypes_0200 start";
|
||||
|
||||
|
||||
std::shared_ptr<MockAbilitySchedulerTools> mockTools = MockAbilitySchedulerTools::GetInstance();
|
||||
mockTools->SetMockStatus(true);
|
||||
std::shared_ptr<Context> context = std::make_shared<AbilityContext>();
|
||||
@ -133,7 +133,7 @@ HWTEST_F(DataAbilityHelperForObserverTest, AaFwk_DataAbilityHelper_GetFileTypes_
|
||||
HWTEST_F(DataAbilityHelperForObserverTest, AaFwk_DataAbilityHelper_OpenFile_0100, Function | MediumTest | Level1)
|
||||
{
|
||||
GTEST_LOG_(INFO) << "AaFwk_DataAbilityHelper_OpenFile_0100 start";
|
||||
|
||||
|
||||
std::shared_ptr<MockAbilitySchedulerTools> mockTools = MockAbilitySchedulerTools::GetInstance();
|
||||
mockTools->SetMockStatus(true);
|
||||
std::shared_ptr<Context> context = std::make_shared<AbilityContext>();
|
||||
@ -163,7 +163,7 @@ HWTEST_F(DataAbilityHelperForObserverTest, AaFwk_DataAbilityHelper_OpenFile_0100
|
||||
HWTEST_F(DataAbilityHelperForObserverTest, AaFwk_DataAbilityHelper_OpenFile_0200, Function | MediumTest | Level1)
|
||||
{
|
||||
GTEST_LOG_(INFO) << "AaFwk_DataAbilityHelper_OpenFile_0200 start";
|
||||
|
||||
|
||||
std::shared_ptr<MockAbilitySchedulerTools> mockTools = MockAbilitySchedulerTools::GetInstance();
|
||||
mockTools->SetMockStatus(true);
|
||||
std::shared_ptr<Context> context = std::make_shared<AbilityContext>();
|
||||
@ -193,7 +193,7 @@ HWTEST_F(DataAbilityHelperForObserverTest, AaFwk_DataAbilityHelper_OpenFile_0200
|
||||
HWTEST_F(DataAbilityHelperForObserverTest, AaFwk_DataAbilityHelper_Insert_0100, Function | MediumTest | Level1)
|
||||
{
|
||||
GTEST_LOG_(INFO) << "AaFwk_DataAbilityHelper_Insert_0100 start";
|
||||
|
||||
|
||||
std::shared_ptr<MockAbilitySchedulerTools> mockTools = MockAbilitySchedulerTools::GetInstance();
|
||||
mockTools->SetMockStatus(true);
|
||||
std::shared_ptr<Context> context = std::make_shared<AbilityContext>();
|
||||
@ -224,7 +224,7 @@ HWTEST_F(DataAbilityHelperForObserverTest, AaFwk_DataAbilityHelper_Insert_0100,
|
||||
HWTEST_F(DataAbilityHelperForObserverTest, AaFwk_DataAbilityHelper_Insert_0200, Function | MediumTest | Level1)
|
||||
{
|
||||
GTEST_LOG_(INFO) << "AaFwk_DataAbilityHelper_Insert_0200 start";
|
||||
|
||||
|
||||
std::shared_ptr<MockAbilitySchedulerTools> mockTools = MockAbilitySchedulerTools::GetInstance();
|
||||
mockTools->SetMockStatus(true);
|
||||
std::shared_ptr<Context> context = std::make_shared<AbilityContext>();
|
||||
@ -255,7 +255,7 @@ HWTEST_F(DataAbilityHelperForObserverTest, AaFwk_DataAbilityHelper_Insert_0200,
|
||||
HWTEST_F(DataAbilityHelperForObserverTest, AaFwk_DataAbilityHelper_Update_0100, Function | MediumTest | Level1)
|
||||
{
|
||||
GTEST_LOG_(INFO) << "AaFwk_DataAbilityHelper_Update_0100 start";
|
||||
|
||||
|
||||
std::shared_ptr<MockAbilitySchedulerTools> mockTools = MockAbilitySchedulerTools::GetInstance();
|
||||
mockTools->SetMockStatus(true);
|
||||
std::shared_ptr<Context> context = std::make_shared<AbilityContext>();
|
||||
@ -287,7 +287,7 @@ HWTEST_F(DataAbilityHelperForObserverTest, AaFwk_DataAbilityHelper_Update_0100,
|
||||
HWTEST_F(DataAbilityHelperForObserverTest, AaFwk_DataAbilityHelper_Update_0200, Function | MediumTest | Level1)
|
||||
{
|
||||
GTEST_LOG_(INFO) << "AaFwk_DataAbilityHelper_Update_0200 start";
|
||||
|
||||
|
||||
std::shared_ptr<MockAbilitySchedulerTools> mockTools = MockAbilitySchedulerTools::GetInstance();
|
||||
mockTools->SetMockStatus(true);
|
||||
std::shared_ptr<Context> context = std::make_shared<AbilityContext>();
|
||||
@ -319,7 +319,7 @@ HWTEST_F(DataAbilityHelperForObserverTest, AaFwk_DataAbilityHelper_Update_0200,
|
||||
HWTEST_F(DataAbilityHelperForObserverTest, AaFwk_DataAbilityHelper_Delete_0100, Function | MediumTest | Level1)
|
||||
{
|
||||
GTEST_LOG_(INFO) << "AaFwk_DataAbilityHelper_Delete_0100 start";
|
||||
|
||||
|
||||
std::shared_ptr<MockAbilitySchedulerTools> mockTools = MockAbilitySchedulerTools::GetInstance();
|
||||
mockTools->SetMockStatus(true);
|
||||
std::shared_ptr<Context> context = std::make_shared<AbilityContext>();
|
||||
@ -349,7 +349,7 @@ HWTEST_F(DataAbilityHelperForObserverTest, AaFwk_DataAbilityHelper_Delete_0100,
|
||||
HWTEST_F(DataAbilityHelperForObserverTest, AaFwk_DataAbilityHelper_Delete_0200, Function | MediumTest | Level1)
|
||||
{
|
||||
GTEST_LOG_(INFO) << "AaFwk_DataAbilityHelper_Delete_0200 start";
|
||||
|
||||
|
||||
std::shared_ptr<MockAbilitySchedulerTools> mockTools = MockAbilitySchedulerTools::GetInstance();
|
||||
mockTools->SetMockStatus(true);
|
||||
std::shared_ptr<Context> context = std::make_shared<AbilityContext>();
|
||||
@ -379,7 +379,7 @@ HWTEST_F(DataAbilityHelperForObserverTest, AaFwk_DataAbilityHelper_Delete_0200,
|
||||
HWTEST_F(DataAbilityHelperForObserverTest, AaFwk_DataAbilityHelper_Query_0100, Function | MediumTest | Level1)
|
||||
{
|
||||
GTEST_LOG_(INFO) << "AaFwk_DataAbilityHelper_Query_0100 start";
|
||||
|
||||
|
||||
std::shared_ptr<MockAbilitySchedulerTools> mockTools = MockAbilitySchedulerTools::GetInstance();
|
||||
mockTools->SetMockStatus(true);
|
||||
std::shared_ptr<Context> context = std::make_shared<AbilityContext>();
|
||||
@ -411,7 +411,7 @@ HWTEST_F(DataAbilityHelperForObserverTest, AaFwk_DataAbilityHelper_Query_0100, F
|
||||
HWTEST_F(DataAbilityHelperForObserverTest, AaFwk_DataAbilityHelper_Query_0200, Function | MediumTest | Level1)
|
||||
{
|
||||
GTEST_LOG_(INFO) << "AaFwk_DataAbilityHelper_Query_0200 start";
|
||||
|
||||
|
||||
std::shared_ptr<MockAbilitySchedulerTools> mockTools = MockAbilitySchedulerTools::GetInstance();
|
||||
mockTools->SetMockStatus(true);
|
||||
std::shared_ptr<Context> context = std::make_shared<AbilityContext>();
|
||||
@ -443,7 +443,7 @@ HWTEST_F(DataAbilityHelperForObserverTest, AaFwk_DataAbilityHelper_Query_0200, F
|
||||
HWTEST_F(DataAbilityHelperForObserverTest, AaFwk_DataAbilityHelper_GetType_0100, Function | MediumTest | Level1)
|
||||
{
|
||||
GTEST_LOG_(INFO) << "AaFwk_DataAbilityHelper_GetType_0100 start";
|
||||
|
||||
|
||||
std::shared_ptr<MockAbilitySchedulerTools> mockTools = MockAbilitySchedulerTools::GetInstance();
|
||||
mockTools->SetMockStatus(true);
|
||||
std::shared_ptr<Context> context = std::make_shared<AbilityContext>();
|
||||
@ -472,7 +472,7 @@ HWTEST_F(DataAbilityHelperForObserverTest, AaFwk_DataAbilityHelper_GetType_0100,
|
||||
HWTEST_F(DataAbilityHelperForObserverTest, AaFwk_DataAbilityHelper_GetType_0200, Function | MediumTest | Level1)
|
||||
{
|
||||
GTEST_LOG_(INFO) << "AaFwk_DataAbilityHelper_GetType_0200 start";
|
||||
|
||||
|
||||
std::shared_ptr<MockAbilitySchedulerTools> mockTools = MockAbilitySchedulerTools::GetInstance();
|
||||
mockTools->SetMockStatus(true);
|
||||
std::shared_ptr<Context> context = std::make_shared<AbilityContext>();
|
||||
@ -501,7 +501,7 @@ HWTEST_F(DataAbilityHelperForObserverTest, AaFwk_DataAbilityHelper_GetType_0200,
|
||||
HWTEST_F(DataAbilityHelperForObserverTest, AaFwk_DataAbilityHelper_OpenRawFile_0100, Function | MediumTest | Level1)
|
||||
{
|
||||
GTEST_LOG_(INFO) << "AaFwk_DataAbilityHelper_OpenRawFile_0100 start";
|
||||
|
||||
|
||||
std::shared_ptr<MockAbilitySchedulerTools> mockTools = MockAbilitySchedulerTools::GetInstance();
|
||||
mockTools->SetMockStatus(true);
|
||||
std::shared_ptr<Context> context = std::make_shared<AbilityContext>();
|
||||
@ -531,7 +531,7 @@ HWTEST_F(DataAbilityHelperForObserverTest, AaFwk_DataAbilityHelper_OpenRawFile_0
|
||||
HWTEST_F(DataAbilityHelperForObserverTest, AaFwk_DataAbilityHelper_OpenRawFile_0200, Function | MediumTest | Level1)
|
||||
{
|
||||
GTEST_LOG_(INFO) << "AaFwk_DataAbilityHelper_OpenRawFile_0200 start";
|
||||
|
||||
|
||||
std::shared_ptr<MockAbilitySchedulerTools> mockTools = MockAbilitySchedulerTools::GetInstance();
|
||||
mockTools->SetMockStatus(true);
|
||||
std::shared_ptr<Context> context = std::make_shared<AbilityContext>();
|
||||
@ -561,7 +561,7 @@ HWTEST_F(DataAbilityHelperForObserverTest, AaFwk_DataAbilityHelper_OpenRawFile_0
|
||||
HWTEST_F(DataAbilityHelperForObserverTest, AaFwk_DataAbilityHelper_Reload_0100, Function | MediumTest | Level1)
|
||||
{
|
||||
GTEST_LOG_(INFO) << "AaFwk_DataAbilityHelper_Reload_0100 start";
|
||||
|
||||
|
||||
std::shared_ptr<MockAbilitySchedulerTools> mockTools = MockAbilitySchedulerTools::GetInstance();
|
||||
mockTools->SetMockStatus(true);
|
||||
std::shared_ptr<Context> context = std::make_shared<AbilityContext>();
|
||||
@ -588,7 +588,7 @@ HWTEST_F(DataAbilityHelperForObserverTest, AaFwk_DataAbilityHelper_Reload_0100,
|
||||
HWTEST_F(DataAbilityHelperForObserverTest, AaFwk_DataAbilityHelper_Reload_0200, Function | MediumTest | Level1)
|
||||
{
|
||||
GTEST_LOG_(INFO) << "AaFwk_DataAbilityHelper_Reload_0200 start";
|
||||
|
||||
|
||||
std::shared_ptr<MockAbilitySchedulerTools> mockTools = MockAbilitySchedulerTools::GetInstance();
|
||||
mockTools->SetMockStatus(true);
|
||||
std::shared_ptr<Context> context = std::make_shared<AbilityContext>();
|
||||
@ -615,7 +615,7 @@ HWTEST_F(DataAbilityHelperForObserverTest, AaFwk_DataAbilityHelper_Reload_0200,
|
||||
HWTEST_F(DataAbilityHelperForObserverTest, AaFwk_DataAbilityHelper_BatchInsert_0100, Function | MediumTest | Level1)
|
||||
{
|
||||
GTEST_LOG_(INFO) << "AaFwk_DataAbilityHelper_BatchInsert_0100 start";
|
||||
|
||||
|
||||
std::shared_ptr<MockAbilitySchedulerTools> mockTools = MockAbilitySchedulerTools::GetInstance();
|
||||
mockTools->SetMockStatus(true);
|
||||
std::shared_ptr<Context> context = std::make_shared<AbilityContext>();
|
||||
@ -642,7 +642,7 @@ HWTEST_F(DataAbilityHelperForObserverTest, AaFwk_DataAbilityHelper_BatchInsert_0
|
||||
HWTEST_F(DataAbilityHelperForObserverTest, AaFwk_DataAbilityHelper_BatchInsert_0200, Function | MediumTest | Level1)
|
||||
{
|
||||
GTEST_LOG_(INFO) << "AaFwk_DataAbilityHelper_BatchInsert_0200 start";
|
||||
|
||||
|
||||
std::shared_ptr<MockAbilitySchedulerTools> mockTools = MockAbilitySchedulerTools::GetInstance();
|
||||
mockTools->SetMockStatus(true);
|
||||
std::shared_ptr<Context> context = std::make_shared<AbilityContext>();
|
||||
@ -669,7 +669,7 @@ HWTEST_F(DataAbilityHelperForObserverTest, AaFwk_DataAbilityHelper_BatchInsert_0
|
||||
HWTEST_F(DataAbilityHelperForObserverTest, AaFwk_DataAbilityHelper_NormalizeUri_0100, Function | MediumTest | Level1)
|
||||
{
|
||||
GTEST_LOG_(INFO) << "AaFwk_DataAbilityHelper_NormalizeUri_0100 start";
|
||||
|
||||
|
||||
std::shared_ptr<MockAbilitySchedulerTools> mockTools = MockAbilitySchedulerTools::GetInstance();
|
||||
mockTools->SetMockStatus(true);
|
||||
std::shared_ptr<Context> context = std::make_shared<AbilityContext>();
|
||||
@ -677,7 +677,7 @@ HWTEST_F(DataAbilityHelperForObserverTest, AaFwk_DataAbilityHelper_NormalizeUri_
|
||||
std::make_shared<Uri>("dataability://device_id/com.domainname.dataability.persondata/person/10");
|
||||
std::shared_ptr<DataAbilityHelper> dataAbilityHelper = DataAbilityHelper::Creator(context, uri);
|
||||
// Test to AbilityThread interface
|
||||
auto returnNormalizeUri = [&](const Uri &uri) {
|
||||
auto returnNormalizeUri = [&](const Uri &uri) {
|
||||
Uri uriValue("dataability://device_id/com.domainname.dataability.");
|
||||
return uriValue;
|
||||
};
|
||||
@ -686,7 +686,7 @@ HWTEST_F(DataAbilityHelperForObserverTest, AaFwk_DataAbilityHelper_NormalizeUri_
|
||||
.WillOnce(testing::Invoke(returnNormalizeUri));
|
||||
|
||||
dataAbilityHelper->NormalizeUri(*uri);
|
||||
|
||||
|
||||
GTEST_LOG_(INFO) << "AaFwk_DataAbilityHelper_NormalizeUri_0100 end";
|
||||
}
|
||||
|
||||
@ -698,7 +698,7 @@ HWTEST_F(DataAbilityHelperForObserverTest, AaFwk_DataAbilityHelper_NormalizeUri_
|
||||
HWTEST_F(DataAbilityHelperForObserverTest, AaFwk_DataAbilityHelper_NormalizeUri_0200, Function | MediumTest | Level3)
|
||||
{
|
||||
GTEST_LOG_(INFO) << "AaFwk_DataAbilityHelper_NormalizeUri_0200 start";
|
||||
|
||||
|
||||
std::shared_ptr<MockAbilitySchedulerTools> mockTools = MockAbilitySchedulerTools::GetInstance();
|
||||
mockTools->SetMockStatus(true);
|
||||
std::shared_ptr<Context> context = std::make_shared<AbilityContext>();
|
||||
@ -706,7 +706,7 @@ HWTEST_F(DataAbilityHelperForObserverTest, AaFwk_DataAbilityHelper_NormalizeUri_
|
||||
std::make_shared<Uri>("dataability://device_id/com.domainname.dataability.persondata/person/10");
|
||||
std::shared_ptr<DataAbilityHelper> dataAbilityHelper = DataAbilityHelper::Creator(context);
|
||||
// Test to AbilityThread interface
|
||||
auto returnNormalizeUri = [&](const Uri &uri) {
|
||||
auto returnNormalizeUri = [&](const Uri &uri) {
|
||||
Uri uriValue("dataability://device_id/com.domainname.dataability.");
|
||||
return uriValue;
|
||||
};
|
||||
@ -727,7 +727,7 @@ HWTEST_F(DataAbilityHelperForObserverTest, AaFwk_DataAbilityHelper_NormalizeUri_
|
||||
HWTEST_F(DataAbilityHelperForObserverTest, AaFwk_DataAbilityHelper_DenormalizeUri_0100, Function | MediumTest | Level1)
|
||||
{
|
||||
GTEST_LOG_(INFO) << "AaFwk_DataAbilityHelper_DenormalizeUri_0100 start";
|
||||
|
||||
|
||||
std::shared_ptr<MockAbilitySchedulerTools> mockTools = MockAbilitySchedulerTools::GetInstance();
|
||||
mockTools->SetMockStatus(true);
|
||||
std::shared_ptr<Context> context = std::make_shared<AbilityContext>();
|
||||
@ -735,7 +735,7 @@ HWTEST_F(DataAbilityHelperForObserverTest, AaFwk_DataAbilityHelper_DenormalizeUr
|
||||
std::make_shared<Uri>("dataability://device_id/com.domainname.dataability.persondata/person/10");
|
||||
std::shared_ptr<DataAbilityHelper> dataAbilityHelper = DataAbilityHelper::Creator(context, uri);
|
||||
// Test to AbilityThread interface
|
||||
auto returnDenormalizeUri = [&](const Uri &uri) {
|
||||
auto returnDenormalizeUri = [&](const Uri &uri) {
|
||||
Uri uriValue("dataability://device_id/com.domainname.dataability.");
|
||||
return uriValue;
|
||||
};
|
||||
@ -756,7 +756,7 @@ HWTEST_F(DataAbilityHelperForObserverTest, AaFwk_DataAbilityHelper_DenormalizeUr
|
||||
HWTEST_F(DataAbilityHelperForObserverTest, AaFwk_DataAbilityHelper_DenormalizeUri_0200, Function | MediumTest | Level3)
|
||||
{
|
||||
GTEST_LOG_(INFO) << "AaFwk_DataAbilityHelper_DenormalizeUri_0200 start";
|
||||
|
||||
|
||||
std::shared_ptr<MockAbilitySchedulerTools> mockTools = MockAbilitySchedulerTools::GetInstance();
|
||||
mockTools->SetMockStatus(true);
|
||||
std::shared_ptr<Context> context = std::make_shared<AbilityContext>();
|
||||
@ -764,7 +764,7 @@ HWTEST_F(DataAbilityHelperForObserverTest, AaFwk_DataAbilityHelper_DenormalizeUr
|
||||
std::make_shared<Uri>("dataability://device_id/com.domainname.dataability.persondata/person/10");
|
||||
std::shared_ptr<DataAbilityHelper> dataAbilityHelper = DataAbilityHelper::Creator(context);
|
||||
// Test to AbilityThread interface
|
||||
auto returnDenormalizeUri = [&](const Uri &uri) {
|
||||
auto returnDenormalizeUri = [&](const Uri &uri) {
|
||||
Uri uriValue("dataability://device_id/com.domainname.dataability.");
|
||||
return uriValue;
|
||||
};
|
||||
|
@ -412,12 +412,12 @@ HWTEST_F(FormAbilityTest, AaFwk_Ability_DeleteForm_0100, Function | MediumTest |
|
||||
.SetElementName(deviceId2, bundleName2, abilityName2)
|
||||
.SetParam(Constants::PARAM_FORM_TEMPORARY_KEY, tempFormFlg2);
|
||||
std::shared_ptr<MockPageAbility::FormCallback> callback_2;
|
||||
|
||||
|
||||
ability_->appCallbacks_.insert(std::make_pair(120L, callback1));
|
||||
ability_->userReqParams_.insert(std::make_pair(120L, want1));
|
||||
ability_->appCallbacks_.insert(std::make_pair(121L, callback_2));
|
||||
ability_->userReqParams_.insert(std::make_pair(121L, want2));
|
||||
|
||||
|
||||
int64_t formId = 120L;
|
||||
ability_->DeleteForm(formId);
|
||||
|
||||
@ -497,7 +497,7 @@ HWTEST_F(FormAbilityTest, AaFwk_Ability_DeleteForm_0400, Function | MediumTest |
|
||||
.SetElementName(deviceId2, bundleName2, abilityName2)
|
||||
.SetParam(Constants::PARAM_FORM_TEMPORARY_KEY, tempFormFlg2);
|
||||
std::shared_ptr<MockPageAbility::FormCallback> callback2;
|
||||
|
||||
|
||||
ability_->appCallbacks_.insert(std::make_pair(120L, callback1));
|
||||
ability_->userReqParams_.insert(std::make_pair(120L, want1));
|
||||
ability_->appCallbacks_.insert(std::make_pair(121L, callback2));
|
||||
@ -1098,7 +1098,7 @@ HWTEST_F(FormAbilityTest, AaFwk_Ability_FmsDeathCallback_OnDeathReceived_0200, F
|
||||
.SetElementName(deviceId2, bundleName2, abilityName2)
|
||||
.SetParam(Constants::PARAM_FORM_TEMPORARY_KEY, tempFormFlg2);
|
||||
std::shared_ptr<MockPageAbility::FormCallback> callback2;
|
||||
|
||||
|
||||
FormMgr::GetInstance().RegisterDeathCallback(ability_);
|
||||
|
||||
int64_t formId1 = 200L;
|
||||
@ -1157,7 +1157,7 @@ HWTEST_F(FormAbilityTest, AaFwk_Ability_FmsDeathCallback_OnDeathReceived_0300, F
|
||||
.SetElementName(deviceId2, bundleName2, abilityName2)
|
||||
.SetParam(Constants::PARAM_FORM_TEMPORARY_KEY, tempFormFlg2);
|
||||
std::shared_ptr<MockPageAbility::FormCallback> callback2;
|
||||
|
||||
|
||||
FormMgr::GetInstance().RegisterDeathCallback(ability_);
|
||||
|
||||
int64_t formId1 = 200L;
|
||||
|
@ -224,7 +224,7 @@ HWTEST_F(FormProviderClientTest, AaFwk_FormProviderClient_EventNotify_0100, Func
|
||||
|
||||
// callerToken
|
||||
const sptr<IRemoteObject> callerToken = MockFormSupplyCallback::GetInstance();
|
||||
|
||||
|
||||
// want
|
||||
Want want;
|
||||
want.SetParam(Constants::PARAM_FORM_MANAGER_SERVICE_BUNDLENAME_KEY, FORM_MANAGER_SERVICE_BUNDLE_NAME)
|
||||
@ -259,7 +259,7 @@ HWTEST_F(FormProviderClientTest, AaFwk_FormProviderClient_EventNotify_0200, Func
|
||||
|
||||
// callerToken
|
||||
const sptr<IRemoteObject> callerToken = MockFormSupplyCallback::GetInstance();
|
||||
|
||||
|
||||
// want
|
||||
Want want;
|
||||
want.SetParam(Constants::PARAM_FORM_MANAGER_SERVICE_BUNDLENAME_KEY, FORM_MANAGER_SERVICE_BUNDLE_NAME)
|
||||
|
@ -35,7 +35,7 @@ bool UserObject::Equals(IObject &other)
|
||||
|
||||
UserObject *otherObj = static_cast<UserObject *>(IUserObject::Query(&other));
|
||||
if (otherObj == nullptr) {
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
if (value_->GetClassName() == otherObj->value_->GetClassName()) {
|
||||
return otherObj->value_->Equals(value_);
|
||||
|
@ -30,7 +30,7 @@ namespace OHOS {
|
||||
namespace AAFwk {
|
||||
class WantParamsBaseTest : public testing::Test {
|
||||
public:
|
||||
WantParamsBaseTest()
|
||||
WantParamsBaseTest()
|
||||
{}
|
||||
~WantParamsBaseTest()
|
||||
{
|
||||
@ -76,7 +76,7 @@ HWTEST_F(WantParamsBaseTest, AaFwk_WantParams_Parcelable_0100, Function | Medium
|
||||
wantParamsIn_->Marshalling(in);
|
||||
std::shared_ptr<WantParams> wantParamsOut_(WantParams::Unmarshalling(in));
|
||||
EXPECT_EQ(valueStr, String::Unbox(IString::Query(wantParamsOut_->GetParam(keyStr))));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -95,7 +95,7 @@ HWTEST_F(WantParamsBaseTest, AaFwk_WantParams_Parcelable_0200, Function | Medium
|
||||
wantParamsIn_->Marshalling(in);
|
||||
std::shared_ptr<WantParams> wantParamsOut_(WantParams::Unmarshalling(in));
|
||||
EXPECT_EQ(valueBool, Boolean::Unbox(IBoolean::Query(wantParamsOut_->GetParam(keyStr))));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -117,7 +117,7 @@ HWTEST_F(WantParamsBaseTest, AaFwk_WantParams_Parcelable_0300, Function | Medium
|
||||
right = Integer::Unbox(IInteger::Query(wantParamsOut_->GetParam(keyStr)));
|
||||
EXPECT_EQ(valueInteger, right);
|
||||
|
||||
wantParamsOut_ = nullptr;
|
||||
wantParamsOut_ = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -72,7 +72,7 @@ public:
|
||||
return -1;
|
||||
}
|
||||
fd = fileno(fd2);
|
||||
|
||||
|
||||
return fd;
|
||||
}
|
||||
|
||||
|
@ -37,7 +37,7 @@ public:
|
||||
DemoAbilityManagerClientData() {};
|
||||
virtual ~DemoAbilityManagerClientData() {};
|
||||
|
||||
std::map<std::string, sptr<AAFwk::IAbilityScheduler>> data;
|
||||
std::map<std::string, sptr<AAFwk::IAbilityScheduler>> data;
|
||||
};
|
||||
|
||||
static DemoAbilityManagerClientData demoAbilityMgrClientData;
|
||||
@ -52,9 +52,9 @@ sptr<AAFwk::IAbilityScheduler> AAFwk::AbilityManagerClient::AcquireDataAbility(
|
||||
sptr<AppExecFwk::AbilityThread> abilityThread = AppExecFwk::MockCreateAbilityThread();
|
||||
sptr<AAFwk::AbilitySchedulerProxy> remoteProxy(new (std::nothrow) AAFwk::AbilitySchedulerProxy(abilityThread));
|
||||
demoAbilityMgrClientData.data.emplace(uri.ToString(), remoteProxy);
|
||||
|
||||
|
||||
retval = remoteProxy;
|
||||
|
||||
|
||||
if (retval == nullptr) {
|
||||
GTEST_LOG_(INFO) << "mock_ability_thread_for_data_observer:mock result retval is nullptr called";
|
||||
}
|
||||
|
@ -122,7 +122,7 @@ HWTEST_F(DataAbilityOperationModuleTest, AaFwk_DataAbilityOperation_AssertBuilde
|
||||
|
||||
int count = operation->GetExpectedCount();
|
||||
EXPECT_EQ(count, 2);
|
||||
|
||||
|
||||
GTEST_LOG_(INFO) << "AaFwk_DataAbilityOperation_AssertBuilder_0100";
|
||||
}
|
||||
|
||||
@ -144,7 +144,7 @@ HWTEST_F(DataAbilityOperationModuleTest, AaFwk_DataAbilityOperation_DeleteBuilde
|
||||
EXPECT_NE(operation, nullptr);
|
||||
bool isDeleteOperation = operation->IsDeleteOperation();
|
||||
EXPECT_TRUE(isDeleteOperation);
|
||||
|
||||
|
||||
GTEST_LOG_(INFO) << "AaFwk_DataAbilityOperation_DeleteBuilder_0100";
|
||||
}
|
||||
|
||||
|
@ -575,7 +575,7 @@ public:
|
||||
|
||||
virtual int UnRegisterMissionListener(const std::string &deviceId,
|
||||
const sptr<IRemoteMissionListener> &listener) = 0;
|
||||
|
||||
|
||||
/**
|
||||
* Set ability controller.
|
||||
*
|
||||
|
@ -328,13 +328,13 @@ public:
|
||||
|
||||
// ipc id for dataAbilityObServer Reguster
|
||||
SCHEDULE_REGISTEROBSERVER,
|
||||
|
||||
|
||||
// ipc id for dataAbilityObServer UnReguster
|
||||
SCHEDULE_UNREGISTEROBSERVER,
|
||||
|
||||
// ipc id for dataAbilityObServer change
|
||||
|
||||
// ipc id for dataAbilityObServer change
|
||||
SCHEDULE_NOTIFYCHANGE,
|
||||
|
||||
|
||||
// ipc id for scheduling multi window changed
|
||||
MULTI_WIN_CHANGED,
|
||||
|
||||
@ -348,8 +348,8 @@ public:
|
||||
|
||||
// ipc id for scheduling DenormalizeUri
|
||||
SCHEDULE_DENORMALIZEURI,
|
||||
|
||||
// ipc id for scheduling ExecuteBatch
|
||||
|
||||
// ipc id for scheduling ExecuteBatch
|
||||
SCHEDULE_EXECUTEBATCH,
|
||||
|
||||
// ipc id for notify continuation result
|
||||
|
@ -536,7 +536,7 @@ public:
|
||||
|
||||
virtual int UnRegisterMissionListener(const std::string &deviceId,
|
||||
const sptr<IRemoteMissionListener> &listener) override;
|
||||
|
||||
|
||||
/**
|
||||
* Set ability controller.
|
||||
*
|
||||
|
@ -4433,7 +4433,7 @@ int AbilityStackManager::GetMissionSnapshot(int32_t missionId, MissionPixelMap &
|
||||
CHECK_POINTER_AND_RETURN_LOG(topAbilityRecord, REMOVE_MISSION_ID_NOT_EXIST, "top ability is invalid.");
|
||||
auto windowInfo = topAbilityRecord->GetWindowInfo();
|
||||
int windowID = 0;
|
||||
if(windowInfo){
|
||||
if (windowInfo) {
|
||||
windowID = windowInfo->windowToken_;
|
||||
HILOG_INFO("windowID is %{public}d", windowID);
|
||||
}
|
||||
|
@ -495,7 +495,7 @@ public:
|
||||
GET_ALL_FORMS_INFO,
|
||||
GET_FORMS_INFO_BY_APP,
|
||||
GET_FORMS_INFO_BY_MODULE,
|
||||
GET_MODULE_USAGE_RECORD,
|
||||
GET_MODULE_USAGE_RECORD,
|
||||
GET_SHORTCUT_INFO,
|
||||
GET_ALL_COMMON_EVENT_INFO,
|
||||
GET_BUNDLE_INSTALLER,
|
||||
|
@ -118,9 +118,9 @@ void AbilityDumpTest::OnStartAms()
|
||||
if (g_abilityMs->state_ == ServiceRunningState::STATE_RUNNING) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
g_abilityMs->state_ = ServiceRunningState::STATE_RUNNING;
|
||||
|
||||
|
||||
g_abilityMs->eventLoop_ = AppExecFwk::EventRunner::Create(AbilityConfig::NAME_ABILITY_MGR_SERVICE);
|
||||
EXPECT_TRUE(g_abilityMs->eventLoop_);
|
||||
|
||||
@ -139,7 +139,7 @@ void AbilityDumpTest::OnStartAms()
|
||||
|
||||
g_abilityMs->pendingWantManager_ = std::make_shared<PendingWantManager>();
|
||||
EXPECT_TRUE(g_abilityMs->pendingWantManager_);
|
||||
|
||||
|
||||
int userId = g_abilityMs->GetUserId();
|
||||
g_abilityMs->SetStackManager(userId, true);
|
||||
g_abilityMs->systemAppManager_ = std::make_shared<KernalSystemAppManager>(userId);
|
||||
@ -189,7 +189,7 @@ void AbilityDumpTest::StartAbilityes()
|
||||
if (currentTopAbilityRecord) {
|
||||
currentTopAbilityRecord->SetAbilityState(AbilityState::ACTIVE);
|
||||
}
|
||||
|
||||
|
||||
startAbility6();
|
||||
startAbility1();
|
||||
startAbility2();
|
||||
|
@ -120,9 +120,9 @@ void AbilityManagerServiceTest::OnStartAms()
|
||||
if (abilityMs_->state_ == ServiceRunningState::STATE_RUNNING) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
abilityMs_->state_ = ServiceRunningState::STATE_RUNNING;
|
||||
|
||||
|
||||
abilityMs_->eventLoop_ = AppExecFwk::EventRunner::Create(AbilityConfig::NAME_ABILITY_MGR_SERVICE);
|
||||
EXPECT_TRUE(abilityMs_->eventLoop_);
|
||||
|
||||
@ -730,7 +730,7 @@ HWTEST_F(AbilityManagerServiceTest, Interface_017, TestSize.Level1)
|
||||
wantLuncher.SetElement(elementLun);
|
||||
abilityMs_->StartAbility(wantLuncher);
|
||||
WaitUntilTaskFinished();
|
||||
|
||||
|
||||
Want want;
|
||||
ElementName element("device", "com.ix.music", "MusicAbility");
|
||||
want.SetElement(element);
|
||||
@ -2013,7 +2013,7 @@ HWTEST_F(AbilityManagerServiceTest, handleloadtimeout_001, TestSize.Level1)
|
||||
AbilityRecordInfo barAbilityInfo;
|
||||
barAbility->GetAbilityRecordInfo(barAbilityInfo);
|
||||
auto dialogtoken = barAbility->GetToken();
|
||||
|
||||
|
||||
OHOS::sptr<IAbilityScheduler> scheduler = new AbilityScheduler();
|
||||
EXPECT_EQ(abilityMs_->AttachAbilityThread(scheduler, dialogtoken), OHOS::ERR_OK);
|
||||
EXPECT_TRUE(barAbility->GetAbilityInfo().bundleName == AbilityConfig::SYSTEM_UI_BUNDLE_NAME);
|
||||
@ -2254,12 +2254,12 @@ HWTEST_F(AbilityManagerServiceTest, handleloadtimeout_008, TestSize.Level1)
|
||||
auto abilityToken = ability->GetToken();
|
||||
|
||||
EXPECT_TRUE(ability->GetAbilityInfo().bundleName == COM_IX_HIWORLD);
|
||||
|
||||
|
||||
ElementName elementTv("device", "com.ix.hiTv", "TvAbility");
|
||||
want.SetElement(elementTv);
|
||||
auto resultTv = StartAbility(want);
|
||||
EXPECT_EQ(OHOS::ERR_OK, resultTv);
|
||||
|
||||
|
||||
// helloAbility inactive
|
||||
stackManager->CompleteInactive(ability);
|
||||
|
||||
@ -2305,7 +2305,7 @@ HWTEST_F(AbilityManagerServiceTest, handleloadtimeout_009, TestSize.Level1)
|
||||
want.SetElement(elementTv);
|
||||
auto resultTv = StartAbility(want);
|
||||
EXPECT_EQ(OHOS::ERR_OK, resultTv);
|
||||
|
||||
|
||||
// helloAbility inactive
|
||||
stackManager->CompleteInactive(ability);
|
||||
|
||||
@ -2403,7 +2403,7 @@ HWTEST_F(AbilityManagerServiceTest, handleloadtimeout_011, TestSize.Level1)
|
||||
auto abilityTv = stackManagerTv->GetCurrentTopAbility();
|
||||
|
||||
abilityMs_->HandleLoadTimeOut(INT32_MAX);
|
||||
|
||||
|
||||
auto newStackManager = abilityMs_->GetStackManager();
|
||||
auto newAbility = newStackManager->GetCurrentTopAbility();
|
||||
EXPECT_TRUE(newAbility->GetAbilityInfo().bundleName == "com.ix.hiTv");
|
||||
|
@ -46,7 +46,7 @@ public:
|
||||
MOCK_METHOD2(GetPendingRequestWant, int(const sptr<IWantSender> &target, std::shared_ptr<Want> &want));
|
||||
MOCK_METHOD1(GetSystemMemoryAttr, void(AppExecFwk::SystemMemoryAttr &memoryInfo));
|
||||
MOCK_METHOD2(GetWantSenderInfo, int(const sptr<IWantSender> &target, std::shared_ptr<WantSenderInfo> &info));
|
||||
|
||||
|
||||
MOCK_METHOD3(StartContinuation, int(const Want &want, const sptr<IRemoteObject> &abilityToken, int32_t status));
|
||||
MOCK_METHOD2(NotifyContinuationResult, int(int32_t missionId, const int32_t result));
|
||||
MOCK_METHOD5(ContinueMission, int(const std::string &srcDeviceId, const std::string &dstDeviceId,
|
||||
|
@ -79,7 +79,7 @@ void AbilityStackManagerTest::OnStartabilityMs()
|
||||
}
|
||||
|
||||
abilityMs_->state_ = ServiceRunningState::STATE_RUNNING;
|
||||
|
||||
|
||||
abilityMs_->eventLoop_ = AppExecFwk::EventRunner::Create(AbilityConfig::NAME_ABILITY_MGR_SERVICE);
|
||||
EXPECT_TRUE(abilityMs_->eventLoop_);
|
||||
|
||||
@ -98,7 +98,7 @@ void AbilityStackManagerTest::OnStartabilityMs()
|
||||
|
||||
abilityMs_->pendingWantManager_ = std::make_shared<PendingWantManager>();
|
||||
EXPECT_TRUE(abilityMs_->pendingWantManager_);
|
||||
|
||||
|
||||
int userId = abilityMs_->GetUserId();
|
||||
abilityMs_->SetStackManager(userId, true);
|
||||
abilityMs_->systemAppManager_ = std::make_shared<KernalSystemAppManager>(userId);
|
||||
@ -1502,7 +1502,7 @@ HWTEST_F(AbilityStackManagerTest, ability_stack_manager_operating_042, TestSize.
|
||||
stackManager_->UninstallApp("com.ix.hiMusic");
|
||||
// process died
|
||||
stackManager_->OnAbilityDied(thirdTopAbility);
|
||||
|
||||
|
||||
auto topAbility = stackManager_->GetCurrentTopAbility();
|
||||
EXPECT_TRUE(topAbility);
|
||||
EXPECT_EQ("MusicAbility", topAbility->GetAbilityInfo().name);
|
||||
@ -2487,7 +2487,7 @@ HWTEST_F(AbilityStackManagerTest, ability_stack_manager_operating_067, TestSize.
|
||||
MissionOption missionOption;
|
||||
missionOption.missionId = musicMissionRecord->GetMissionRecordId();
|
||||
missionOption.winModeKey = AbilityWindowConfiguration::MULTI_WINDOW_DISPLAY_FLOATING;
|
||||
|
||||
|
||||
auto ref = stackManager_->MoveMissionToFloatingStack(missionOption);
|
||||
EXPECT_EQ(ref, ERR_NONE);
|
||||
|
||||
@ -3240,7 +3240,7 @@ HWTEST_F(AbilityStackManagerTest, ability_stack_manager_operating_087, TestSize.
|
||||
auto ref = stackManager_->GenerateMissinOptionsOfSplitScreen(primary, secondary, options);
|
||||
EXPECT_EQ(ERR_INVALID_DATA, ref);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Feature: AbilityStackManager
|
||||
* Function: GenerateMissinOptionsOfSplitScreen
|
||||
@ -3353,12 +3353,12 @@ HWTEST_F(AbilityStackManagerTest, ability_stack_manager_operating_091, TestSize.
|
||||
EXPECT_EQ(0, result);
|
||||
auto firstTopAbility = stackManager_->GetCurrentTopAbility();
|
||||
firstTopAbility->SetAbilityState(OHOS::AAFwk::ACTIVE);
|
||||
|
||||
|
||||
result = stackManager_->StartAbility(musicAbilityRequest_);
|
||||
EXPECT_EQ(0, result);
|
||||
auto musicAbility = stackManager_->GetCurrentTopAbility();
|
||||
musicAbility->SetAbilityState(OHOS::AAFwk::ACTIVE);
|
||||
|
||||
|
||||
// start split screen
|
||||
auto abilityStartSetting = AbilityStartSetting::GetEmptySetting();
|
||||
// Set floating window identification
|
||||
@ -3904,7 +3904,7 @@ HWTEST_F(AbilityStackManagerTest, ability_stack_manager_operating_0108, TestSize
|
||||
|
||||
TerminatingAbility musicTerminateAbility;
|
||||
musicTerminateAbility.abilityRecord = musicAbilityRecord;
|
||||
|
||||
|
||||
TerminatingAbility musicSaTerminateAbility;
|
||||
musicSaTerminateAbility.abilityRecord = musicSaAbilityRecord;
|
||||
|
||||
@ -4077,7 +4077,7 @@ HWTEST_F(AbilityStackManagerTest, ability_stack_manager_operating_0112, TestSize
|
||||
|
||||
TerminatingAbility musicTerminateAbility;
|
||||
musicTerminateAbility.abilityRecord = musicAbilityRecord;
|
||||
|
||||
|
||||
TerminatingAbility radioSaTerminateAbility;
|
||||
radioSaTerminateAbility.abilityRecord = radioAbilityRecord;
|
||||
|
||||
@ -4281,7 +4281,7 @@ HWTEST_F(AbilityStackManagerTest, ability_stack_manager_operating_0117, TestSize
|
||||
EXPECT_TRUE(abilityStartSetting);
|
||||
radioAbilityRequest_.startSetting = abilityStartSetting;
|
||||
|
||||
|
||||
|
||||
result = stackManager_->StartAbility(radioTonAbilityRequest_);
|
||||
EXPECT_EQ(0, result);
|
||||
auto radioAbility = stackManager_->GetCurrentTopAbility();
|
||||
@ -4542,7 +4542,7 @@ HWTEST_F(AbilityStackManagerTest, ability_stack_manager_operating_0125, TestSize
|
||||
option.missionId = 2;
|
||||
option.winModeKey = AbilityWindowConfiguration::MULTI_WINDOW_DISPLAY_PRIMARY;
|
||||
targetMissionRecord->SetMissionOption(option);
|
||||
|
||||
|
||||
stackManager_->MoveMissionAndAbility(currentAbility, targetAbility, targetMissionRecord);
|
||||
|
||||
auto ability = targetMissionRecord->GetTopAbilityRecord();
|
||||
@ -4695,7 +4695,7 @@ HWTEST_F(AbilityStackManagerTest, ability_stack_manager_operating_0129, TestSize
|
||||
EXPECT_TRUE(ability);
|
||||
|
||||
ability->SetMovingBackgroundFlag(true);
|
||||
|
||||
|
||||
stackManager_->CompleteActive(ability);
|
||||
EXPECT_EQ(ability->GetAbilityState(), AbilityState::ACTIVE);
|
||||
}
|
||||
@ -4723,7 +4723,7 @@ HWTEST_F(AbilityStackManagerTest, ability_stack_manager_operating_0130, TestSize
|
||||
EXPECT_TRUE(ability);
|
||||
|
||||
ability->SetMovingBackgroundFlag(true);
|
||||
|
||||
|
||||
stackManager_->CompleteInactive(ability);
|
||||
|
||||
EXPECT_EQ(ability->GetAbilityState(), AbilityState::MOVING_BACKGROUND);
|
||||
@ -4755,9 +4755,9 @@ HWTEST_F(AbilityStackManagerTest, ability_stack_manager_operating_0131, TestSize
|
||||
ability->SetAbilityState(AbilityState::MOVING_BACKGROUND);
|
||||
|
||||
ability->SetMovingBackgroundFlag(true);
|
||||
|
||||
|
||||
stackManager_->CompleteBackground(ability);
|
||||
|
||||
|
||||
EXPECT_EQ(ability->GetAbilityState(), AbilityState::BACKGROUND);
|
||||
}
|
||||
|
||||
|
@ -89,7 +89,7 @@ void AbilityWithApplicationsTest::OnStartabilityAms()
|
||||
}
|
||||
|
||||
abilityMs_->state_ = ServiceRunningState::STATE_RUNNING;
|
||||
|
||||
|
||||
abilityMs_->eventLoop_ = AppExecFwk::EventRunner::Create(AbilityConfig::NAME_ABILITY_MGR_SERVICE);
|
||||
EXPECT_TRUE(abilityMs_->eventLoop_);
|
||||
|
||||
@ -108,7 +108,7 @@ void AbilityWithApplicationsTest::OnStartabilityAms()
|
||||
|
||||
abilityMs_->pendingWantManager_ = std::make_shared<PendingWantManager>();
|
||||
EXPECT_TRUE(abilityMs_->pendingWantManager_);
|
||||
|
||||
|
||||
int userId = abilityMs_->GetUserId();
|
||||
abilityMs_->SetStackManager(userId, true);
|
||||
abilityMs_->systemAppManager_ = std::make_shared<KernalSystemAppManager>(userId);
|
||||
|
@ -98,7 +98,7 @@ void AbilityMsAppmsTest::OnStartabilityAms()
|
||||
}
|
||||
|
||||
abilityMs_->state_ = ServiceRunningState::STATE_RUNNING;
|
||||
|
||||
|
||||
abilityMs_->eventLoop_ = AppExecFwk::EventRunner::Create(AbilityConfig::NAME_ABILITY_MGR_SERVICE);
|
||||
EXPECT_TRUE(abilityMs_->eventLoop_);
|
||||
|
||||
@ -117,7 +117,7 @@ void AbilityMsAppmsTest::OnStartabilityAms()
|
||||
|
||||
abilityMs_->pendingWantManager_ = std::make_shared<PendingWantManager>();
|
||||
EXPECT_TRUE(abilityMs_->pendingWantManager_);
|
||||
|
||||
|
||||
int userId = abilityMs_->GetUserId();
|
||||
abilityMs_->SetStackManager(userId, true);
|
||||
abilityMs_->systemAppManager_ = std::make_shared<KernalSystemAppManager>(userId);
|
||||
|
@ -253,7 +253,7 @@ HWTEST_F(AppSchedulerTest, AppScheduler_oprator_008, TestSize.Level1)
|
||||
HWTEST_F(AppSchedulerTest, AppScheduler_oprator_009, TestSize.Level1)
|
||||
{
|
||||
DelayedSingleton<AppScheduler>::GetInstance()->appMgrClient_ = std::make_unique<AppExecFwk::AppMgrClient>();
|
||||
|
||||
|
||||
std::string deviceName = "device";
|
||||
std::string abilityName = "FirstAbility";
|
||||
std::string appName = "FirstApp";
|
||||
|
@ -98,7 +98,7 @@ void LifecycleTest::OnStartabilityAms()
|
||||
}
|
||||
|
||||
abilityMs_->state_ = ServiceRunningState::STATE_RUNNING;
|
||||
|
||||
|
||||
abilityMs_->eventLoop_ = AppExecFwk::EventRunner::Create(AbilityConfig::NAME_ABILITY_MGR_SERVICE);
|
||||
EXPECT_TRUE(abilityMs_->eventLoop_);
|
||||
|
||||
@ -117,7 +117,7 @@ void LifecycleTest::OnStartabilityAms()
|
||||
|
||||
abilityMs_->pendingWantManager_ = std::make_shared<PendingWantManager>();
|
||||
EXPECT_TRUE(abilityMs_->pendingWantManager_);
|
||||
|
||||
|
||||
int userId = abilityMs_->GetUserId();
|
||||
abilityMs_->SetStackManager(userId, true);
|
||||
abilityMs_->systemAppManager_ = std::make_shared<KernalSystemAppManager>(userId);
|
||||
|
@ -468,7 +468,7 @@ HWTEST_F(MissionStackTest, MS_oprator_019, TestSize.Level1)
|
||||
|
||||
auto missionRecordOne = std::make_shared<MissionRecord>("test_one");
|
||||
auto missionRecordTwo = std::make_shared<MissionRecord>("test_two");
|
||||
|
||||
|
||||
MissionOption option;
|
||||
option.winModeKey = AbilityWindowConfiguration::MULTI_WINDOW_DISPLAY_PRIMARY;
|
||||
missionRecordOne->SetMissionOption(option);
|
||||
@ -500,7 +500,7 @@ HWTEST_F(MissionStackTest, MS_oprator_020, TestSize.Level1)
|
||||
|
||||
auto missionRecordOne = std::make_shared<MissionRecord>("test_one");
|
||||
auto missionRecordTwo = std::make_shared<MissionRecord>("test_two");
|
||||
|
||||
|
||||
EXPECT_EQ(0, (int)missionStack_->missions_.size());
|
||||
|
||||
missionStack_->AddMissionRecordToEnd(missionRecordOne);
|
||||
@ -527,7 +527,7 @@ HWTEST_F(MissionStackTest, MS_oprator_021, TestSize.Level1)
|
||||
|
||||
auto missionRecordOne = std::make_shared<MissionRecord>("test_one");
|
||||
auto missionRecordTwo = std::make_shared<MissionRecord>("test_two");
|
||||
|
||||
|
||||
MissionOption option;
|
||||
option.winModeKey = AbilityWindowConfiguration::MULTI_WINDOW_DISPLAY_PRIMARY;
|
||||
missionRecordOne->SetMissionOption(option);
|
||||
|
@ -130,9 +130,9 @@ void TerminateAbilityTest::OnStartAms()
|
||||
if (g_aams->state_ == ServiceRunningState::STATE_RUNNING) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
g_aams->state_ = ServiceRunningState::STATE_RUNNING;
|
||||
|
||||
|
||||
g_aams->eventLoop_ = AppExecFwk::EventRunner::Create(AbilityConfig::NAME_ABILITY_MGR_SERVICE);
|
||||
EXPECT_TRUE(g_aams->eventLoop_);
|
||||
|
||||
@ -151,7 +151,7 @@ void TerminateAbilityTest::OnStartAms()
|
||||
|
||||
g_aams->pendingWantManager_ = std::make_shared<PendingWantManager>();
|
||||
EXPECT_TRUE(g_aams->pendingWantManager_);
|
||||
|
||||
|
||||
int userId = g_aams->GetUserId();
|
||||
g_aams->SetStackManager(userId, true);
|
||||
g_aams->systemAppManager_ = std::make_shared<KernalSystemAppManager>(userId);
|
||||
@ -224,7 +224,7 @@ bool TerminateAbilityTest::StartAbility(
|
||||
GTEST_LOG_(ERROR) << "new token is nullptr";
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
abilityScheduler = new AbilityScheduler();
|
||||
if (g_aams->AttachAbilityThread(abilityScheduler, token) != 0) {
|
||||
GTEST_LOG_(ERROR) << "fail to AttachAbilityThread";
|
||||
@ -772,7 +772,7 @@ HWTEST_F(TerminateAbilityTest, AAFWK_g_aamsTerminateAbility_014, TestSize.Level1
|
||||
std::shared_ptr<AbilityRecord> testAbilityRecordB = stackManager->GetCurrentTopAbility();
|
||||
|
||||
EXPECT_EQ(g_aams->AttachAbilityThread(new AbilityScheduler(), tokenB), 0);
|
||||
|
||||
|
||||
testAbilityRecordA->SetAbilityState(OHOS::AAFwk::AbilityState::INACTIVE);
|
||||
testAbilityRecordB->SetAbilityState(OHOS::AAFwk::AbilityState::ACTIVE);
|
||||
|
||||
|
@ -319,7 +319,7 @@ HWTEST_F(AbilityRecordModuleTest, AbilityScheduler_001, TestSize.Level3)
|
||||
for (int i = 0; i < COUNT; ++i) {
|
||||
|
||||
EXPECT_CALL(*mockAbilityScheduerStub, ScheduleSaveAbilityState()).Times(1);
|
||||
|
||||
|
||||
// Activate
|
||||
auto mockActivateHandler = [&](const Want &want, const LifeCycleStateInfo &lifeCycleStateInfo) {
|
||||
testResult = (lifeCycleStateInfo.state == AbilityLifeCycleState::ABILITY_STATE_ACTIVE);
|
||||
|
@ -118,9 +118,9 @@ void DumpModuleTest::OnStartAms()
|
||||
if (g_abilityMs->state_ == ServiceRunningState::STATE_RUNNING) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
g_abilityMs->state_ = ServiceRunningState::STATE_RUNNING;
|
||||
|
||||
|
||||
g_abilityMs->eventLoop_ = AppExecFwk::EventRunner::Create(AbilityConfig::NAME_ABILITY_MGR_SERVICE);
|
||||
EXPECT_TRUE(g_abilityMs->eventLoop_);
|
||||
|
||||
@ -135,7 +135,7 @@ void DumpModuleTest::OnStartAms()
|
||||
|
||||
g_abilityMs->pendingWantManager_ = std::make_shared<PendingWantManager>();
|
||||
EXPECT_TRUE(g_abilityMs->pendingWantManager_);
|
||||
|
||||
|
||||
int userId = g_abilityMs->GetUserId();
|
||||
g_abilityMs->SetStackManager(userId, true);
|
||||
g_abilityMs->systemAppManager_ = std::make_shared<KernalSystemAppManager>(userId);
|
||||
|
@ -16,20 +16,20 @@
|
||||
<configuration ver="2.0">
|
||||
<target name="aa_command_dump_system_test">
|
||||
<depend resource="aa/." pushpath="/data/test/resource/aa/" findpath="res" presetcmd="" />
|
||||
<preparer>
|
||||
<option name="push" value="aa/. -> /data/test/resource/aa/" src="res" />
|
||||
<preparer>
|
||||
<option name="push" value="aa/. -> /data/test/resource/aa/" src="res" />
|
||||
</preparer>
|
||||
</target>
|
||||
<target name="aa_command_start_system_test">
|
||||
<depend resource="aa/." pushpath="/data/test/resource/aa/" findpath="res" presetcmd="" />
|
||||
<preparer>
|
||||
<option name="push" value="aa/. -> /data/test/resource/aa/" src="res" />
|
||||
<preparer>
|
||||
<option name="push" value="aa/. -> /data/test/resource/aa/" src="res" />
|
||||
</preparer>
|
||||
</target>
|
||||
<target name="aa_command_stop_service_system_test">
|
||||
<depend resource="aa/." pushpath="/data/test/resource/aa/" findpath="res" presetcmd="" />
|
||||
<preparer>
|
||||
<option name="push" value="aa/. -> /data/test/resource/aa/" src="res" />
|
||||
<preparer>
|
||||
<option name="push" value="aa/. -> /data/test/resource/aa/" src="res" />
|
||||
</preparer>
|
||||
</target>
|
||||
</configuration>
|
@ -56,7 +56,7 @@ public:
|
||||
using SuccessCallback = std::function<void()>;
|
||||
// A callback that is called when the operation fails.
|
||||
using FailureCallback = std::function<void()>;
|
||||
|
||||
|
||||
using ProgressCallback = std::function<void(int64_t)>;
|
||||
|
||||
// This class represents information of an entry (file or directory) in
|
||||
|
Loading…
Reference in New Issue
Block a user