From f035dddcfea7022693becbf70f9b556f55aef303 Mon Sep 17 00:00:00 2001 From: zhongjianfei Date: Tue, 18 Jan 2022 11:15:41 +0800 Subject: [PATCH] zhongjianfei@huawei.com Signed-off-by: zhongjianfei Change-Id: I6c2c41a762faabf4f4fce36d6373ac5eb83f8653 --- .../ability/native/include/ability_impl.h | 2 +- .../native/include/data_ability_result.h | 36 ++++++------ .../native/include/form_js_event_handler.h | 2 +- .../native/include/page_ability_impl.h | 2 +- .../include/mock_ability_manager_service.h | 2 +- .../mock/include/mock_bundle_manager_form.cpp | 8 +-- .../mock/include/mock_bundle_manager_form.h | 4 +- .../test/mock/include/mock_form_mgr_service.h | 12 ++-- .../mock/include/mock_form_supply_callback.h | 2 +- .../ability_lifecycle_executor_test.cpp | 22 +++---- .../unittest/data_ability_helper_test.cpp | 58 +++++++++---------- .../test/unittest/form_ability_test.cpp | 10 ++-- .../unittest/form_provider_client_test.cpp | 4 +- .../ohos/aafwk/base/user_object_wrapper.cpp | 2 +- .../test/unittest/common/want_params_test.cpp | 8 +-- .../test/mock/DemoAbility/mock_ability_test.h | 2 +- .../mock_ability_manager_client.h | 6 +- .../data_ability_operation_module_test.cpp | 4 +- .../include/ability_manager_interface.h | 2 +- .../include/ability_scheduler_interface.h | 12 ++-- .../include/ability_manager_proxy.h | 2 +- .../abilitymgr/src/ability_stack_manager.cpp | 2 +- .../include/bundlemgr/bundle_mgr_interface.h | 2 +- .../ability_dump_test/ability_dump_test.cpp | 8 +-- .../ability_manager_service_test.cpp | 16 ++--- .../ability_manager_stub_impl_mock.h | 2 +- .../ability_stack_manager_test.cpp | 30 +++++----- .../ability_with_applications_test.cpp | 4 +- .../abilityms_appms_test.cpp | 4 +- .../app_scheduler_test/app_scheduler_test.cpp | 2 +- .../phone/lifecycle_test/lifecycle_test.cpp | 4 +- .../mission_stack_test/mission_stack_test.cpp | 6 +- .../terminate_ability_test.cpp | 10 ++-- .../ability_record_module_test.cpp | 2 +- .../dump_module_test/dump_module_test.cpp | 6 +- test/resource/tools/ohos_test.xml | 12 ++-- tools/zip/include/zip_reader.h | 2 +- 37 files changed, 157 insertions(+), 157 deletions(-) diff --git a/frameworks/kits/ability/native/include/ability_impl.h b/frameworks/kits/ability/native/include/ability_impl.h index c1240698e9..eb2b473130 100755 --- a/frameworks/kits/ability/native/include/ability_impl.h +++ b/frameworks/kits/ability/native/include/ability_impl.h @@ -52,7 +52,7 @@ public: * @param useNewMission new mission flag. */ static void SetUseNewMission(bool useNewMission); - + /** * @brief Get if use new mission. * diff --git a/frameworks/kits/ability/native/include/data_ability_result.h b/frameworks/kits/ability/native/include/data_ability_result.h index f6e8fe8e90..7dc4304db2 100644 --- a/frameworks/kits/ability/native/include/data_ability_result.h +++ b/frameworks/kits/ability/native/include/data_ability_result.h @@ -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 diff --git a/frameworks/kits/ability/native/include/form_js_event_handler.h b/frameworks/kits/ability/native/include/form_js_event_handler.h index 8c70f8dc1e..6de3d57b3c 100644 --- a/frameworks/kits/ability/native/include/form_js_event_handler.h +++ b/frameworks/kits/ability/native/include/form_js_event_handler.h @@ -24,7 +24,7 @@ namespace OHOS { namespace AppExecFwk { class FormJsEventHandler : public EventHandler { public: - FormJsEventHandler(const std::shared_ptr &runner, + FormJsEventHandler(const std::shared_ptr &runner, const std::shared_ptr& ability, const FormJsInfo& formJsInfo); ~FormJsEventHandler() = default; diff --git a/frameworks/kits/ability/native/include/page_ability_impl.h b/frameworks/kits/ability/native/include/page_ability_impl.h index 7782fbe69d..2ddaee1894 100644 --- a/frameworks/kits/ability/native/include/page_ability_impl.h +++ b/frameworks/kits/ability/native/include/page_ability_impl.h @@ -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. diff --git a/frameworks/kits/ability/native/test/mock/include/mock_ability_manager_service.h b/frameworks/kits/ability/native/test/mock/include/mock_ability_manager_service.h index 5cb3a9f402..39a54671e2 100755 --- a/frameworks/kits/ability/native/test/mock/include/mock_ability_manager_service.h +++ b/frameworks/kits/ability/native/test/mock/include/mock_ability_manager_service.h @@ -140,7 +140,7 @@ public: MOCK_METHOD1(GetProcessRunningInfos, int(std::vector &info)); MOCK_METHOD2(GetWantSenderInfo, int(const sptr &target, std::shared_ptr &info)); - + int RemoveMission(int id) override; int RemoveStack(int id) override; diff --git a/frameworks/kits/ability/native/test/mock/include/mock_bundle_manager_form.cpp b/frameworks/kits/ability/native/test/mock/include/mock_bundle_manager_form.cpp index 78551e8bc7..15b92e02b9 100644 --- a/frameworks/kits/ability/native/test/mock/include/mock_bundle_manager_form.cpp +++ b/frameworks/kits/ability/native/test/mock/include/mock_bundle_manager_form.cpp @@ -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) { 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 form; diff --git a/frameworks/kits/ability/native/test/mock/include/mock_bundle_manager_form.h b/frameworks/kits/ability/native/test/mock/include/mock_bundle_manager_form.h index a00e7c19e7..40b7dab2c9 100644 --- a/frameworks/kits/ability/native/test/mock/include/mock_bundle_manager_form.h +++ b/frameworks/kits/ability/native/test/mock/include/mock_bundle_manager_form.h @@ -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 diff --git a/frameworks/kits/ability/native/test/mock/include/mock_form_mgr_service.h b/frameworks/kits/ability/native/test/mock/include/mock_form_mgr_service.h index 748b2c4208..af854af336 100644 --- a/frameworks/kits/ability/native/test/mock/include/mock_form_mgr_service.h +++ b/frameworks/kits/ability/native/test/mock/include/mock_form_mgr_service.h @@ -130,8 +130,8 @@ public: * @return Returns ERR_OK on success, others on failure. */ int NotifyWhetherVisibleForms( - const std::vector &formIds, - const sptr &callerToken, + const std::vector &formIds, + const sptr &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 &formIds, - const sptr &callerToken, + const std::vector &formIds, + const sptr &callerToken, const int32_t updateType) { if (formIds.size() == 0) { diff --git a/frameworks/kits/ability/native/test/mock/include/mock_form_supply_callback.h b/frameworks/kits/ability/native/test/mock/include/mock_form_supply_callback.h index 4c1b5198df..d21007196b 100644 --- a/frameworks/kits/ability/native/test/mock/include/mock_form_supply_callback.h +++ b/frameworks/kits/ability/native/test/mock/include/mock_form_supply_callback.h @@ -48,7 +48,7 @@ public: private: static std::mutex mutex; static sptr instance; - + DISALLOW_COPY_AND_MOVE(MockFormSupplyCallback); }; } // namespace AppExecFwk diff --git a/frameworks/kits/ability/native/test/unittest/ability_lifecycle_executor_test.cpp b/frameworks/kits/ability/native/test/unittest/ability_lifecycle_executor_test.cpp index 029a332446..69fe2d829b 100644 --- a/frameworks/kits/ability/native/test/unittest/ability_lifecycle_executor_test.cpp +++ b/frameworks/kits/ability/native/test/unittest/ability_lifecycle_executor_test.cpp @@ -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) { diff --git a/frameworks/kits/ability/native/test/unittest/data_ability_helper_test.cpp b/frameworks/kits/ability/native/test/unittest/data_ability_helper_test.cpp index dd227924b8..5767493533 100644 --- a/frameworks/kits/ability/native/test/unittest/data_ability_helper_test.cpp +++ b/frameworks/kits/ability/native/test/unittest/data_ability_helper_test.cpp @@ -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 mockTools = MockAbilitySchedulerTools::GetInstance(); mockTools->SetMockStatus(true); std::shared_ptr context = std::make_shared(); @@ -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 mockTools = MockAbilitySchedulerTools::GetInstance(); mockTools->SetMockStatus(true); std::shared_ptr context = std::make_shared(); @@ -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 mockTools = MockAbilitySchedulerTools::GetInstance(); mockTools->SetMockStatus(true); std::shared_ptr context = std::make_shared(); @@ -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 mockTools = MockAbilitySchedulerTools::GetInstance(); mockTools->SetMockStatus(true); std::shared_ptr context = std::make_shared(); @@ -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 mockTools = MockAbilitySchedulerTools::GetInstance(); mockTools->SetMockStatus(true); std::shared_ptr context = std::make_shared(); @@ -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 mockTools = MockAbilitySchedulerTools::GetInstance(); mockTools->SetMockStatus(true); std::shared_ptr context = std::make_shared(); @@ -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 mockTools = MockAbilitySchedulerTools::GetInstance(); mockTools->SetMockStatus(true); std::shared_ptr context = std::make_shared(); @@ -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 mockTools = MockAbilitySchedulerTools::GetInstance(); mockTools->SetMockStatus(true); std::shared_ptr context = std::make_shared(); @@ -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 mockTools = MockAbilitySchedulerTools::GetInstance(); mockTools->SetMockStatus(true); std::shared_ptr context = std::make_shared(); @@ -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 mockTools = MockAbilitySchedulerTools::GetInstance(); mockTools->SetMockStatus(true); std::shared_ptr context = std::make_shared(); @@ -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 mockTools = MockAbilitySchedulerTools::GetInstance(); mockTools->SetMockStatus(true); std::shared_ptr context = std::make_shared(); @@ -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 mockTools = MockAbilitySchedulerTools::GetInstance(); mockTools->SetMockStatus(true); std::shared_ptr context = std::make_shared(); @@ -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 mockTools = MockAbilitySchedulerTools::GetInstance(); mockTools->SetMockStatus(true); std::shared_ptr context = std::make_shared(); @@ -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 mockTools = MockAbilitySchedulerTools::GetInstance(); mockTools->SetMockStatus(true); std::shared_ptr context = std::make_shared(); @@ -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 mockTools = MockAbilitySchedulerTools::GetInstance(); mockTools->SetMockStatus(true); std::shared_ptr context = std::make_shared(); @@ -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 mockTools = MockAbilitySchedulerTools::GetInstance(); mockTools->SetMockStatus(true); std::shared_ptr context = std::make_shared(); @@ -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 mockTools = MockAbilitySchedulerTools::GetInstance(); mockTools->SetMockStatus(true); std::shared_ptr context = std::make_shared(); @@ -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 mockTools = MockAbilitySchedulerTools::GetInstance(); mockTools->SetMockStatus(true); std::shared_ptr context = std::make_shared(); @@ -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 mockTools = MockAbilitySchedulerTools::GetInstance(); mockTools->SetMockStatus(true); std::shared_ptr context = std::make_shared(); @@ -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 mockTools = MockAbilitySchedulerTools::GetInstance(); mockTools->SetMockStatus(true); std::shared_ptr context = std::make_shared(); @@ -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 mockTools = MockAbilitySchedulerTools::GetInstance(); mockTools->SetMockStatus(true); std::shared_ptr context = std::make_shared(); @@ -677,7 +677,7 @@ HWTEST_F(DataAbilityHelperForObserverTest, AaFwk_DataAbilityHelper_NormalizeUri_ std::make_shared("dataability://device_id/com.domainname.dataability.persondata/person/10"); std::shared_ptr 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 mockTools = MockAbilitySchedulerTools::GetInstance(); mockTools->SetMockStatus(true); std::shared_ptr context = std::make_shared(); @@ -706,7 +706,7 @@ HWTEST_F(DataAbilityHelperForObserverTest, AaFwk_DataAbilityHelper_NormalizeUri_ std::make_shared("dataability://device_id/com.domainname.dataability.persondata/person/10"); std::shared_ptr 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 mockTools = MockAbilitySchedulerTools::GetInstance(); mockTools->SetMockStatus(true); std::shared_ptr context = std::make_shared(); @@ -735,7 +735,7 @@ HWTEST_F(DataAbilityHelperForObserverTest, AaFwk_DataAbilityHelper_DenormalizeUr std::make_shared("dataability://device_id/com.domainname.dataability.persondata/person/10"); std::shared_ptr 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 mockTools = MockAbilitySchedulerTools::GetInstance(); mockTools->SetMockStatus(true); std::shared_ptr context = std::make_shared(); @@ -764,7 +764,7 @@ HWTEST_F(DataAbilityHelperForObserverTest, AaFwk_DataAbilityHelper_DenormalizeUr std::make_shared("dataability://device_id/com.domainname.dataability.persondata/person/10"); std::shared_ptr 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; }; diff --git a/frameworks/kits/ability/native/test/unittest/form_ability_test.cpp b/frameworks/kits/ability/native/test/unittest/form_ability_test.cpp index aad5d943bb..3549b48d6e 100644 --- a/frameworks/kits/ability/native/test/unittest/form_ability_test.cpp +++ b/frameworks/kits/ability/native/test/unittest/form_ability_test.cpp @@ -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 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 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 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 callback2; - + FormMgr::GetInstance().RegisterDeathCallback(ability_); int64_t formId1 = 200L; diff --git a/frameworks/kits/ability/native/test/unittest/form_provider_client_test.cpp b/frameworks/kits/ability/native/test/unittest/form_provider_client_test.cpp index 92ba7ef193..79c0c40871 100644 --- a/frameworks/kits/ability/native/test/unittest/form_provider_client_test.cpp +++ b/frameworks/kits/ability/native/test/unittest/form_provider_client_test.cpp @@ -224,7 +224,7 @@ HWTEST_F(FormProviderClientTest, AaFwk_FormProviderClient_EventNotify_0100, Func // callerToken const sptr 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 callerToken = MockFormSupplyCallback::GetInstance(); - + // want Want want; want.SetParam(Constants::PARAM_FORM_MANAGER_SERVICE_BUNDLENAME_KEY, FORM_MANAGER_SERVICE_BUNDLE_NAME) diff --git a/frameworks/kits/base/cpp/src/ohos/aafwk/base/user_object_wrapper.cpp b/frameworks/kits/base/cpp/src/ohos/aafwk/base/user_object_wrapper.cpp index 97488a565c..f8aa58e926 100644 --- a/frameworks/kits/base/cpp/src/ohos/aafwk/base/user_object_wrapper.cpp +++ b/frameworks/kits/base/cpp/src/ohos/aafwk/base/user_object_wrapper.cpp @@ -35,7 +35,7 @@ bool UserObject::Equals(IObject &other) UserObject *otherObj = static_cast(IUserObject::Query(&other)); if (otherObj == nullptr) { - return false; + return false; } if (value_->GetClassName() == otherObj->value_->GetClassName()) { return otherObj->value_->Equals(value_); diff --git a/frameworks/kits/content/cpp/test/unittest/common/want_params_test.cpp b/frameworks/kits/content/cpp/test/unittest/common/want_params_test.cpp index 443f7d4345..197f5ac07b 100644 --- a/frameworks/kits/content/cpp/test/unittest/common/want_params_test.cpp +++ b/frameworks/kits/content/cpp/test/unittest/common/want_params_test.cpp @@ -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 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 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; } } diff --git a/frameworks/kits/test/mock/DemoAbility/mock_ability_test.h b/frameworks/kits/test/mock/DemoAbility/mock_ability_test.h index 2211492767..fe32ccc474 100644 --- a/frameworks/kits/test/mock/DemoAbility/mock_ability_test.h +++ b/frameworks/kits/test/mock/DemoAbility/mock_ability_test.h @@ -72,7 +72,7 @@ public: return -1; } fd = fileno(fd2); - + return fd; } diff --git a/frameworks/kits/test/mock/DemoObServer/mock_ability_manager_client.h b/frameworks/kits/test/mock/DemoObServer/mock_ability_manager_client.h index fc44c7dda0..96997c597d 100644 --- a/frameworks/kits/test/mock/DemoObServer/mock_ability_manager_client.h +++ b/frameworks/kits/test/mock/DemoObServer/mock_ability_manager_client.h @@ -37,7 +37,7 @@ public: DemoAbilityManagerClientData() {}; virtual ~DemoAbilityManagerClientData() {}; - std::map> data; + std::map> data; }; static DemoAbilityManagerClientData demoAbilityMgrClientData; @@ -52,9 +52,9 @@ sptr AAFwk::AbilityManagerClient::AcquireDataAbility( sptr abilityThread = AppExecFwk::MockCreateAbilityThread(); sptr 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"; } diff --git a/frameworks/kits/test/moduletest/cpp/abilitytest/data_ability_operation_module_test.cpp b/frameworks/kits/test/moduletest/cpp/abilitytest/data_ability_operation_module_test.cpp index c645ec882c..f02cd40c97 100644 --- a/frameworks/kits/test/moduletest/cpp/abilitytest/data_ability_operation_module_test.cpp +++ b/frameworks/kits/test/moduletest/cpp/abilitytest/data_ability_operation_module_test.cpp @@ -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"; } diff --git a/interfaces/innerkits/ability_manager/include/ability_manager_interface.h b/interfaces/innerkits/ability_manager/include/ability_manager_interface.h index 1b51ee12fa..3ac78e0ec5 100755 --- a/interfaces/innerkits/ability_manager/include/ability_manager_interface.h +++ b/interfaces/innerkits/ability_manager/include/ability_manager_interface.h @@ -575,7 +575,7 @@ public: virtual int UnRegisterMissionListener(const std::string &deviceId, const sptr &listener) = 0; - + /** * Set ability controller. * diff --git a/interfaces/innerkits/ability_manager/include/ability_scheduler_interface.h b/interfaces/innerkits/ability_manager/include/ability_scheduler_interface.h index d66d702097..b6301dc843 100644 --- a/interfaces/innerkits/ability_manager/include/ability_scheduler_interface.h +++ b/interfaces/innerkits/ability_manager/include/ability_scheduler_interface.h @@ -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 diff --git a/services/abilitymgr/include/ability_manager_proxy.h b/services/abilitymgr/include/ability_manager_proxy.h index f417e70f58..1f576801c8 100755 --- a/services/abilitymgr/include/ability_manager_proxy.h +++ b/services/abilitymgr/include/ability_manager_proxy.h @@ -536,7 +536,7 @@ public: virtual int UnRegisterMissionListener(const std::string &deviceId, const sptr &listener) override; - + /** * Set ability controller. * diff --git a/services/abilitymgr/src/ability_stack_manager.cpp b/services/abilitymgr/src/ability_stack_manager.cpp index 45eb0cc89b..bce2de61c8 100644 --- a/services/abilitymgr/src/ability_stack_manager.cpp +++ b/services/abilitymgr/src/ability_stack_manager.cpp @@ -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); } diff --git a/services/abilitymgr/test/mock/libs/appexecfwk_core/include/bundlemgr/bundle_mgr_interface.h b/services/abilitymgr/test/mock/libs/appexecfwk_core/include/bundlemgr/bundle_mgr_interface.h index 648a2fa206..d911ef15d0 100644 --- a/services/abilitymgr/test/mock/libs/appexecfwk_core/include/bundlemgr/bundle_mgr_interface.h +++ b/services/abilitymgr/test/mock/libs/appexecfwk_core/include/bundlemgr/bundle_mgr_interface.h @@ -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, diff --git a/services/abilitymgr/test/unittest/phone/ability_dump_test/ability_dump_test.cpp b/services/abilitymgr/test/unittest/phone/ability_dump_test/ability_dump_test.cpp index 9138ccb82b..d4ca810e65 100644 --- a/services/abilitymgr/test/unittest/phone/ability_dump_test/ability_dump_test.cpp +++ b/services/abilitymgr/test/unittest/phone/ability_dump_test/ability_dump_test.cpp @@ -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(); EXPECT_TRUE(g_abilityMs->pendingWantManager_); - + int userId = g_abilityMs->GetUserId(); g_abilityMs->SetStackManager(userId, true); g_abilityMs->systemAppManager_ = std::make_shared(userId); @@ -189,7 +189,7 @@ void AbilityDumpTest::StartAbilityes() if (currentTopAbilityRecord) { currentTopAbilityRecord->SetAbilityState(AbilityState::ACTIVE); } - + startAbility6(); startAbility1(); startAbility2(); diff --git a/services/abilitymgr/test/unittest/phone/ability_manager_service_test/ability_manager_service_test.cpp b/services/abilitymgr/test/unittest/phone/ability_manager_service_test/ability_manager_service_test.cpp index 1bea8f98dd..13a60978f6 100644 --- a/services/abilitymgr/test/unittest/phone/ability_manager_service_test/ability_manager_service_test.cpp +++ b/services/abilitymgr/test/unittest/phone/ability_manager_service_test/ability_manager_service_test.cpp @@ -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 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"); diff --git a/services/abilitymgr/test/unittest/phone/ability_manager_stub_test/ability_manager_stub_impl_mock.h b/services/abilitymgr/test/unittest/phone/ability_manager_stub_test/ability_manager_stub_impl_mock.h index 63830d69ee..c41f2b3dee 100755 --- a/services/abilitymgr/test/unittest/phone/ability_manager_stub_test/ability_manager_stub_impl_mock.h +++ b/services/abilitymgr/test/unittest/phone/ability_manager_stub_test/ability_manager_stub_impl_mock.h @@ -46,7 +46,7 @@ public: MOCK_METHOD2(GetPendingRequestWant, int(const sptr &target, std::shared_ptr &want)); MOCK_METHOD1(GetSystemMemoryAttr, void(AppExecFwk::SystemMemoryAttr &memoryInfo)); MOCK_METHOD2(GetWantSenderInfo, int(const sptr &target, std::shared_ptr &info)); - + MOCK_METHOD3(StartContinuation, int(const Want &want, const sptr &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, diff --git a/services/abilitymgr/test/unittest/phone/ability_stack_manager_test/ability_stack_manager_test.cpp b/services/abilitymgr/test/unittest/phone/ability_stack_manager_test/ability_stack_manager_test.cpp index 81a9e35663..4cf99861e8 100644 --- a/services/abilitymgr/test/unittest/phone/ability_stack_manager_test/ability_stack_manager_test.cpp +++ b/services/abilitymgr/test/unittest/phone/ability_stack_manager_test/ability_stack_manager_test.cpp @@ -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(); EXPECT_TRUE(abilityMs_->pendingWantManager_); - + int userId = abilityMs_->GetUserId(); abilityMs_->SetStackManager(userId, true); abilityMs_->systemAppManager_ = std::make_shared(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); } diff --git a/services/abilitymgr/test/unittest/phone/ability_with_applications_test/ability_with_applications_test.cpp b/services/abilitymgr/test/unittest/phone/ability_with_applications_test/ability_with_applications_test.cpp index 5c607239ce..69deb03c46 100644 --- a/services/abilitymgr/test/unittest/phone/ability_with_applications_test/ability_with_applications_test.cpp +++ b/services/abilitymgr/test/unittest/phone/ability_with_applications_test/ability_with_applications_test.cpp @@ -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(); EXPECT_TRUE(abilityMs_->pendingWantManager_); - + int userId = abilityMs_->GetUserId(); abilityMs_->SetStackManager(userId, true); abilityMs_->systemAppManager_ = std::make_shared(userId); diff --git a/services/abilitymgr/test/unittest/phone/abilityms_appms_test/abilityms_appms_test.cpp b/services/abilitymgr/test/unittest/phone/abilityms_appms_test/abilityms_appms_test.cpp index c9174c773c..575c012167 100644 --- a/services/abilitymgr/test/unittest/phone/abilityms_appms_test/abilityms_appms_test.cpp +++ b/services/abilitymgr/test/unittest/phone/abilityms_appms_test/abilityms_appms_test.cpp @@ -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(); EXPECT_TRUE(abilityMs_->pendingWantManager_); - + int userId = abilityMs_->GetUserId(); abilityMs_->SetStackManager(userId, true); abilityMs_->systemAppManager_ = std::make_shared(userId); diff --git a/services/abilitymgr/test/unittest/phone/app_scheduler_test/app_scheduler_test.cpp b/services/abilitymgr/test/unittest/phone/app_scheduler_test/app_scheduler_test.cpp index 01ce628162..1dcc730a1d 100644 --- a/services/abilitymgr/test/unittest/phone/app_scheduler_test/app_scheduler_test.cpp +++ b/services/abilitymgr/test/unittest/phone/app_scheduler_test/app_scheduler_test.cpp @@ -253,7 +253,7 @@ HWTEST_F(AppSchedulerTest, AppScheduler_oprator_008, TestSize.Level1) HWTEST_F(AppSchedulerTest, AppScheduler_oprator_009, TestSize.Level1) { DelayedSingleton::GetInstance()->appMgrClient_ = std::make_unique(); - + std::string deviceName = "device"; std::string abilityName = "FirstAbility"; std::string appName = "FirstApp"; diff --git a/services/abilitymgr/test/unittest/phone/lifecycle_test/lifecycle_test.cpp b/services/abilitymgr/test/unittest/phone/lifecycle_test/lifecycle_test.cpp index 448828a40f..faf28f22b8 100644 --- a/services/abilitymgr/test/unittest/phone/lifecycle_test/lifecycle_test.cpp +++ b/services/abilitymgr/test/unittest/phone/lifecycle_test/lifecycle_test.cpp @@ -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(); EXPECT_TRUE(abilityMs_->pendingWantManager_); - + int userId = abilityMs_->GetUserId(); abilityMs_->SetStackManager(userId, true); abilityMs_->systemAppManager_ = std::make_shared(userId); diff --git a/services/abilitymgr/test/unittest/phone/mission_stack_test/mission_stack_test.cpp b/services/abilitymgr/test/unittest/phone/mission_stack_test/mission_stack_test.cpp index b9885ce96b..7723987fb7 100644 --- a/services/abilitymgr/test/unittest/phone/mission_stack_test/mission_stack_test.cpp +++ b/services/abilitymgr/test/unittest/phone/mission_stack_test/mission_stack_test.cpp @@ -468,7 +468,7 @@ HWTEST_F(MissionStackTest, MS_oprator_019, TestSize.Level1) auto missionRecordOne = std::make_shared("test_one"); auto missionRecordTwo = std::make_shared("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("test_one"); auto missionRecordTwo = std::make_shared("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("test_one"); auto missionRecordTwo = std::make_shared("test_two"); - + MissionOption option; option.winModeKey = AbilityWindowConfiguration::MULTI_WINDOW_DISPLAY_PRIMARY; missionRecordOne->SetMissionOption(option); diff --git a/services/abilitymgr/test/unittest/phone/terminate_ability_test/terminate_ability_test.cpp b/services/abilitymgr/test/unittest/phone/terminate_ability_test/terminate_ability_test.cpp index cc10093f63..4039346634 100644 --- a/services/abilitymgr/test/unittest/phone/terminate_ability_test/terminate_ability_test.cpp +++ b/services/abilitymgr/test/unittest/phone/terminate_ability_test/terminate_ability_test.cpp @@ -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(); EXPECT_TRUE(g_aams->pendingWantManager_); - + int userId = g_aams->GetUserId(); g_aams->SetStackManager(userId, true); g_aams->systemAppManager_ = std::make_shared(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 testAbilityRecordB = stackManager->GetCurrentTopAbility(); EXPECT_EQ(g_aams->AttachAbilityThread(new AbilityScheduler(), tokenB), 0); - + testAbilityRecordA->SetAbilityState(OHOS::AAFwk::AbilityState::INACTIVE); testAbilityRecordB->SetAbilityState(OHOS::AAFwk::AbilityState::ACTIVE); diff --git a/services/test/moduletest/ability_record_test/ability_record_module_test.cpp b/services/test/moduletest/ability_record_test/ability_record_module_test.cpp index 46e23d75fc..855992b51b 100644 --- a/services/test/moduletest/ability_record_test/ability_record_module_test.cpp +++ b/services/test/moduletest/ability_record_test/ability_record_module_test.cpp @@ -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); diff --git a/services/test/moduletest/dump_module_test/dump_module_test.cpp b/services/test/moduletest/dump_module_test/dump_module_test.cpp index 894ad09e12..68943019ca 100644 --- a/services/test/moduletest/dump_module_test/dump_module_test.cpp +++ b/services/test/moduletest/dump_module_test/dump_module_test.cpp @@ -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(); EXPECT_TRUE(g_abilityMs->pendingWantManager_); - + int userId = g_abilityMs->GetUserId(); g_abilityMs->SetStackManager(userId, true); g_abilityMs->systemAppManager_ = std::make_shared(userId); diff --git a/test/resource/tools/ohos_test.xml b/test/resource/tools/ohos_test.xml index d94a2929fc..cf80c8cf29 100644 --- a/test/resource/tools/ohos_test.xml +++ b/test/resource/tools/ohos_test.xml @@ -16,20 +16,20 @@ - - - - - - \ No newline at end of file diff --git a/tools/zip/include/zip_reader.h b/tools/zip/include/zip_reader.h index f2da18cad5..540d052fcd 100644 --- a/tools/zip/include/zip_reader.h +++ b/tools/zip/include/zip_reader.h @@ -56,7 +56,7 @@ public: using SuccessCallback = std::function; // A callback that is called when the operation fails. using FailureCallback = std::function; - + using ProgressCallback = std::function; // This class represents information of an entry (file or directory) in