diff --git a/ability/ability_runtime/BUILD.gn b/ability/ability_runtime/BUILD.gn index 1dc531055bad1ee3d01e842e6936ce13f90fb0c2..c94523228f9517d53caaba0031c3d36b439f4987 100644 --- a/ability/ability_runtime/BUILD.gn +++ b/ability/ability_runtime/BUILD.gn @@ -31,6 +31,7 @@ group("ability_runtime") { "actsshellcommandfunctionalitytest:actsshellcommandfunctionalitytest", "actsstartrunnertest:ActsStartRunnerTest", "actsstserviceabilityclientcase:ActsStServiceAbilityClientCaseTest", + "actssupportfunction:actssupportfunction", "actsusers:actsusers", "amscontextualinforquery:amscontextualinforquery", "amsdatauriutils:ActsAmsDataUriUtilsTest", @@ -49,7 +50,6 @@ group("ability_runtime") { "non_concurrent:non_concurrent", "processmultiinstance:processmultiinstance", "stage:stage", - "supportfunctiontest:supportfunctiontest", "want:want", "workercontextcover:workercontextcover", diff --git a/ability/ability_runtime/supportfunctiontest/BUILD.gn b/ability/ability_runtime/actssupportfunction/BUILD.gn similarity index 90% rename from ability/ability_runtime/supportfunctiontest/BUILD.gn rename to ability/ability_runtime/actssupportfunction/BUILD.gn index c72da9c5d97d31ff56f002514944f22ca84ef030..f8ce4d0871a287dec9ea923194c8494ff50a2956 100644 --- a/ability/ability_runtime/supportfunctiontest/BUILD.gn +++ b/ability/ability_runtime/actssupportfunction/BUILD.gn @@ -13,14 +13,14 @@ import("//test/xts/tools/build/suite.gni") -group("supportfunctiontest") { +group("actssupportfunction") { testonly = true if (is_standard_system) { deps = [ + "actssupportfunctiontest:ActsSupportFunctionTest", "fasupportfunction:fasupportfunction", "fasupportfunctionthree:fasupportfunctionthree", "stagesupportfunction:StageSupportFunction", - "supportfunction:SupportFunction", ] } } diff --git a/ability/ability_runtime/supportfunctiontest/supportfunction/AppScope/app.json b/ability/ability_runtime/actssupportfunction/actssupportfunctiontest/AppScope/app.json similarity index 100% rename from ability/ability_runtime/supportfunctiontest/supportfunction/AppScope/app.json rename to ability/ability_runtime/actssupportfunction/actssupportfunctiontest/AppScope/app.json diff --git a/ability/ability_runtime/supportfunctiontest/supportfunction/AppScope/resources/base/element/string.json b/ability/ability_runtime/actssupportfunction/actssupportfunctiontest/AppScope/resources/base/element/string.json similarity index 100% rename from ability/ability_runtime/supportfunctiontest/supportfunction/AppScope/resources/base/element/string.json rename to ability/ability_runtime/actssupportfunction/actssupportfunctiontest/AppScope/resources/base/element/string.json diff --git a/ability/ability_runtime/supportfunctiontest/stagesupportfunction/AppScope/resources/base/media/app_icon.png b/ability/ability_runtime/actssupportfunction/actssupportfunctiontest/AppScope/resources/base/media/app_icon.png similarity index 100% rename from ability/ability_runtime/supportfunctiontest/stagesupportfunction/AppScope/resources/base/media/app_icon.png rename to ability/ability_runtime/actssupportfunction/actssupportfunctiontest/AppScope/resources/base/media/app_icon.png diff --git a/ability/ability_runtime/supportfunctiontest/supportfunction/BUILD.gn b/ability/ability_runtime/actssupportfunction/actssupportfunctiontest/BUILD.gn similarity index 72% rename from ability/ability_runtime/supportfunctiontest/supportfunction/BUILD.gn rename to ability/ability_runtime/actssupportfunction/actssupportfunctiontest/BUILD.gn index c31241538903ec1e0aa45ec930f73e9ae7753f4d..03a9f1596b8a127a6361f2da442924c551ab1edc 100644 --- a/ability/ability_runtime/supportfunctiontest/supportfunction/BUILD.gn +++ b/ability/ability_runtime/actssupportfunction/actssupportfunctiontest/BUILD.gn @@ -13,30 +13,30 @@ import("//test/xts/tools/build/suite.gni") -ohos_js_hap_suite("SupportFunction") { +ohos_js_hap_suite("ActsSupportFunctionTest") { hap_profile = "entry/src/main/module.json" deps = [ - ":supportfunction_js_assets", - ":supportfunction_resources", + ":actssupportfunctiontest_js_assets", + ":actssupportfunctiontest_resources", ] ets2abc = true certificate_profile = "signature/openharmony_sx.p7b" - hap_name = "SupportFunction" + hap_name = "ActsSupportFunctionTest" subsystem_name = "ability" part_name = "ability_runtime" } -ohos_app_scope("supportfunction_app_profile") { +ohos_app_scope("actssupportfunctiontest_app_profile") { app_profile = "AppScope/app.json" sources = [ "AppScope/resources" ] } -ohos_js_assets("supportfunction_js_assets") { +ohos_js_assets("actssupportfunctiontest_js_assets") { source_dir = "entry/src/main/ets" } -ohos_resources("supportfunction_resources") { +ohos_resources("actssupportfunctiontest_resources") { sources = [ "entry/src/main/resources" ] - deps = [ ":supportfunction_app_profile" ] + deps = [ ":actssupportfunctiontest_app_profile" ] hap_profile = "entry/src/main/module.json" } diff --git a/ability/ability_runtime/supportfunctiontest/supportfunction/Test.json b/ability/ability_runtime/actssupportfunction/actssupportfunctiontest/Test.json similarity index 92% rename from ability/ability_runtime/supportfunctiontest/supportfunction/Test.json rename to ability/ability_runtime/actssupportfunction/actssupportfunctiontest/Test.json index bf003cf81a6992e70943ef729672faaf99c478e2..43943c705dbd0648f1ae9d0a88188ac6fd8125d5 100644 --- a/ability/ability_runtime/supportfunctiontest/supportfunction/Test.json +++ b/ability/ability_runtime/actssupportfunction/actssupportfunctiontest/Test.json @@ -11,7 +11,7 @@ "kits": [ { "test-file-name": [ - "SupportFunction.hap", + "ActsSupportFunctionTest.hap", "FaSupportFunction.hap", "FaSupportFunctionTwo.hap", "FaSupportFunctionThree.hap", diff --git a/ability/ability_runtime/supportfunctiontest/supportfunction/entry/src/main/ets/Application/MyAbilityStage.ts b/ability/ability_runtime/actssupportfunction/actssupportfunctiontest/entry/src/main/ets/Application/MyAbilityStage.ts similarity index 100% rename from ability/ability_runtime/supportfunctiontest/supportfunction/entry/src/main/ets/Application/MyAbilityStage.ts rename to ability/ability_runtime/actssupportfunction/actssupportfunctiontest/entry/src/main/ets/Application/MyAbilityStage.ts diff --git a/ability/ability_runtime/supportfunctiontest/supportfunction/entry/src/main/ets/MainAbility/MainAbility.ts b/ability/ability_runtime/actssupportfunction/actssupportfunctiontest/entry/src/main/ets/MainAbility/MainAbility.ts similarity index 100% rename from ability/ability_runtime/supportfunctiontest/supportfunction/entry/src/main/ets/MainAbility/MainAbility.ts rename to ability/ability_runtime/actssupportfunction/actssupportfunctiontest/entry/src/main/ets/MainAbility/MainAbility.ts diff --git a/ability/ability_runtime/supportfunctiontest/supportfunction/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts b/ability/ability_runtime/actssupportfunction/actssupportfunctiontest/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts similarity index 100% rename from ability/ability_runtime/supportfunctiontest/supportfunction/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts rename to ability/ability_runtime/actssupportfunction/actssupportfunctiontest/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts diff --git a/ability/ability_runtime/supportfunctiontest/supportfunction/entry/src/main/ets/pages/index.ets b/ability/ability_runtime/actssupportfunction/actssupportfunctiontest/entry/src/main/ets/pages/index.ets similarity index 100% rename from ability/ability_runtime/supportfunctiontest/supportfunction/entry/src/main/ets/pages/index.ets rename to ability/ability_runtime/actssupportfunction/actssupportfunctiontest/entry/src/main/ets/pages/index.ets diff --git a/ability/ability_runtime/supportfunctiontest/supportfunction/entry/src/main/ets/test/AbilityIsTerminating.test.ets b/ability/ability_runtime/actssupportfunction/actssupportfunctiontest/entry/src/main/ets/test/AbilityIsTerminating.test.ets similarity index 100% rename from ability/ability_runtime/supportfunctiontest/supportfunction/entry/src/main/ets/test/AbilityIsTerminating.test.ets rename to ability/ability_runtime/actssupportfunction/actssupportfunctiontest/entry/src/main/ets/test/AbilityIsTerminating.test.ets diff --git a/ability/ability_runtime/supportfunctiontest/supportfunction/entry/src/main/ets/test/FaSetDisplayOrientation.test.ets b/ability/ability_runtime/actssupportfunction/actssupportfunctiontest/entry/src/main/ets/test/FaSetDisplayOrientation.test.ets similarity index 100% rename from ability/ability_runtime/supportfunctiontest/supportfunction/entry/src/main/ets/test/FaSetDisplayOrientation.test.ets rename to ability/ability_runtime/actssupportfunction/actssupportfunctiontest/entry/src/main/ets/test/FaSetDisplayOrientation.test.ets diff --git a/ability/ability_runtime/supportfunctiontest/supportfunction/entry/src/main/ets/test/FaShowOnLock.test.ets b/ability/ability_runtime/actssupportfunction/actssupportfunctiontest/entry/src/main/ets/test/FaShowOnLock.test.ets similarity index 100% rename from ability/ability_runtime/supportfunctiontest/supportfunction/entry/src/main/ets/test/FaShowOnLock.test.ets rename to ability/ability_runtime/actssupportfunction/actssupportfunctiontest/entry/src/main/ets/test/FaShowOnLock.test.ets diff --git a/ability/ability_runtime/supportfunctiontest/supportfunction/entry/src/main/ets/test/List.test.ets b/ability/ability_runtime/actssupportfunction/actssupportfunctiontest/entry/src/main/ets/test/List.test.ets similarity index 100% rename from ability/ability_runtime/supportfunctiontest/supportfunction/entry/src/main/ets/test/List.test.ets rename to ability/ability_runtime/actssupportfunction/actssupportfunctiontest/entry/src/main/ets/test/List.test.ets diff --git a/ability/ability_runtime/supportfunctiontest/supportfunction/entry/src/main/module.json b/ability/ability_runtime/actssupportfunction/actssupportfunctiontest/entry/src/main/module.json similarity index 100% rename from ability/ability_runtime/supportfunctiontest/supportfunction/entry/src/main/module.json rename to ability/ability_runtime/actssupportfunction/actssupportfunctiontest/entry/src/main/module.json diff --git a/ability/ability_runtime/supportfunctiontest/fasupportfunction/entry/src/main/resources/base/element/color.json b/ability/ability_runtime/actssupportfunction/actssupportfunctiontest/entry/src/main/resources/base/element/color.json similarity index 100% rename from ability/ability_runtime/supportfunctiontest/fasupportfunction/entry/src/main/resources/base/element/color.json rename to ability/ability_runtime/actssupportfunction/actssupportfunctiontest/entry/src/main/resources/base/element/color.json diff --git a/ability/ability_runtime/supportfunctiontest/supportfunction/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/actssupportfunction/actssupportfunctiontest/entry/src/main/resources/base/element/string.json similarity index 100% rename from ability/ability_runtime/supportfunctiontest/supportfunction/entry/src/main/resources/base/element/string.json rename to ability/ability_runtime/actssupportfunction/actssupportfunctiontest/entry/src/main/resources/base/element/string.json diff --git a/ability/ability_runtime/supportfunctiontest/fasupportfunction/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/actssupportfunction/actssupportfunctiontest/entry/src/main/resources/base/media/icon.png similarity index 100% rename from ability/ability_runtime/supportfunctiontest/fasupportfunction/entry/src/main/resources/base/media/icon.png rename to ability/ability_runtime/actssupportfunction/actssupportfunctiontest/entry/src/main/resources/base/media/icon.png diff --git a/ability/ability_runtime/supportfunctiontest/stagesupportfunction/entry/src/main/resources/base/profile/main_pages.json b/ability/ability_runtime/actssupportfunction/actssupportfunctiontest/entry/src/main/resources/base/profile/main_pages.json similarity index 100% rename from ability/ability_runtime/supportfunctiontest/stagesupportfunction/entry/src/main/resources/base/profile/main_pages.json rename to ability/ability_runtime/actssupportfunction/actssupportfunctiontest/entry/src/main/resources/base/profile/main_pages.json diff --git a/ability/ability_runtime/supportfunctiontest/fasupportfunction/signature/openharmony_sx.p7b b/ability/ability_runtime/actssupportfunction/actssupportfunctiontest/signature/openharmony_sx.p7b similarity index 100% rename from ability/ability_runtime/supportfunctiontest/fasupportfunction/signature/openharmony_sx.p7b rename to ability/ability_runtime/actssupportfunction/actssupportfunctiontest/signature/openharmony_sx.p7b diff --git a/ability/ability_runtime/supportfunctiontest/fasupportfunction/BUILD.gn b/ability/ability_runtime/actssupportfunction/fasupportfunction/BUILD.gn similarity index 100% rename from ability/ability_runtime/supportfunctiontest/fasupportfunction/BUILD.gn rename to ability/ability_runtime/actssupportfunction/fasupportfunction/BUILD.gn diff --git a/ability/ability_runtime/supportfunctiontest/fasupportfunction/entry/BUILD.gn b/ability/ability_runtime/actssupportfunction/fasupportfunction/entry/BUILD.gn similarity index 100% rename from ability/ability_runtime/supportfunctiontest/fasupportfunction/entry/BUILD.gn rename to ability/ability_runtime/actssupportfunction/fasupportfunction/entry/BUILD.gn diff --git a/ability/ability_runtime/supportfunctiontest/fasupportfunction/entry/src/main/config.json b/ability/ability_runtime/actssupportfunction/fasupportfunction/entry/src/main/config.json similarity index 100% rename from ability/ability_runtime/supportfunctiontest/fasupportfunction/entry/src/main/config.json rename to ability/ability_runtime/actssupportfunction/fasupportfunction/entry/src/main/config.json diff --git a/ability/ability_runtime/supportfunctiontest/fasupportfunction/entry/src/main/ets/MainAbility/app.ets b/ability/ability_runtime/actssupportfunction/fasupportfunction/entry/src/main/ets/MainAbility/app.ets similarity index 100% rename from ability/ability_runtime/supportfunctiontest/fasupportfunction/entry/src/main/ets/MainAbility/app.ets rename to ability/ability_runtime/actssupportfunction/fasupportfunction/entry/src/main/ets/MainAbility/app.ets diff --git a/ability/ability_runtime/supportfunctiontest/fasupportfunction/entry/src/main/ets/MainAbility/pages/index.ets b/ability/ability_runtime/actssupportfunction/fasupportfunction/entry/src/main/ets/MainAbility/pages/index.ets similarity index 100% rename from ability/ability_runtime/supportfunctiontest/fasupportfunction/entry/src/main/ets/MainAbility/pages/index.ets rename to ability/ability_runtime/actssupportfunction/fasupportfunction/entry/src/main/ets/MainAbility/pages/index.ets diff --git a/ability/ability_runtime/supportfunctiontest/fasupportfunction/entry/src/main/ets/MainAbility2/app.ets b/ability/ability_runtime/actssupportfunction/fasupportfunction/entry/src/main/ets/MainAbility2/app.ets similarity index 100% rename from ability/ability_runtime/supportfunctiontest/fasupportfunction/entry/src/main/ets/MainAbility2/app.ets rename to ability/ability_runtime/actssupportfunction/fasupportfunction/entry/src/main/ets/MainAbility2/app.ets diff --git a/ability/ability_runtime/supportfunctiontest/fasupportfunction/entry/src/main/ets/MainAbility2/pages/index.ets b/ability/ability_runtime/actssupportfunction/fasupportfunction/entry/src/main/ets/MainAbility2/pages/index.ets similarity index 100% rename from ability/ability_runtime/supportfunctiontest/fasupportfunction/entry/src/main/ets/MainAbility2/pages/index.ets rename to ability/ability_runtime/actssupportfunction/fasupportfunction/entry/src/main/ets/MainAbility2/pages/index.ets diff --git a/ability/ability_runtime/supportfunctiontest/fasupportfunction/entry/src/main/ets/MainAbility3/app.ets b/ability/ability_runtime/actssupportfunction/fasupportfunction/entry/src/main/ets/MainAbility3/app.ets similarity index 100% rename from ability/ability_runtime/supportfunctiontest/fasupportfunction/entry/src/main/ets/MainAbility3/app.ets rename to ability/ability_runtime/actssupportfunction/fasupportfunction/entry/src/main/ets/MainAbility3/app.ets diff --git a/ability/ability_runtime/supportfunctiontest/fasupportfunction/entry/src/main/ets/MainAbility3/pages/index.ets b/ability/ability_runtime/actssupportfunction/fasupportfunction/entry/src/main/ets/MainAbility3/pages/index.ets similarity index 100% rename from ability/ability_runtime/supportfunctiontest/fasupportfunction/entry/src/main/ets/MainAbility3/pages/index.ets rename to ability/ability_runtime/actssupportfunction/fasupportfunction/entry/src/main/ets/MainAbility3/pages/index.ets diff --git a/ability/ability_runtime/supportfunctiontest/fasupportfunction/entry/src/main/ets/MainAbility4/app.ets b/ability/ability_runtime/actssupportfunction/fasupportfunction/entry/src/main/ets/MainAbility4/app.ets similarity index 100% rename from ability/ability_runtime/supportfunctiontest/fasupportfunction/entry/src/main/ets/MainAbility4/app.ets rename to ability/ability_runtime/actssupportfunction/fasupportfunction/entry/src/main/ets/MainAbility4/app.ets diff --git a/ability/ability_runtime/supportfunctiontest/fasupportfunction/entry/src/main/ets/MainAbility4/pages/index.ets b/ability/ability_runtime/actssupportfunction/fasupportfunction/entry/src/main/ets/MainAbility4/pages/index.ets similarity index 100% rename from ability/ability_runtime/supportfunctiontest/fasupportfunction/entry/src/main/ets/MainAbility4/pages/index.ets rename to ability/ability_runtime/actssupportfunction/fasupportfunction/entry/src/main/ets/MainAbility4/pages/index.ets diff --git a/ability/ability_runtime/supportfunctiontest/fasupportfunction/entry/src/main/ets/MainAbility5/app.ets b/ability/ability_runtime/actssupportfunction/fasupportfunction/entry/src/main/ets/MainAbility5/app.ets similarity index 100% rename from ability/ability_runtime/supportfunctiontest/fasupportfunction/entry/src/main/ets/MainAbility5/app.ets rename to ability/ability_runtime/actssupportfunction/fasupportfunction/entry/src/main/ets/MainAbility5/app.ets diff --git a/ability/ability_runtime/supportfunctiontest/fasupportfunction/entry/src/main/ets/MainAbility5/pages/index.ets b/ability/ability_runtime/actssupportfunction/fasupportfunction/entry/src/main/ets/MainAbility5/pages/index.ets similarity index 100% rename from ability/ability_runtime/supportfunctiontest/fasupportfunction/entry/src/main/ets/MainAbility5/pages/index.ets rename to ability/ability_runtime/actssupportfunction/fasupportfunction/entry/src/main/ets/MainAbility5/pages/index.ets diff --git a/ability/ability_runtime/supportfunctiontest/fasupportfunction/entry/src/main/ets/MainAbility6/app.ets b/ability/ability_runtime/actssupportfunction/fasupportfunction/entry/src/main/ets/MainAbility6/app.ets similarity index 100% rename from ability/ability_runtime/supportfunctiontest/fasupportfunction/entry/src/main/ets/MainAbility6/app.ets rename to ability/ability_runtime/actssupportfunction/fasupportfunction/entry/src/main/ets/MainAbility6/app.ets diff --git a/ability/ability_runtime/supportfunctiontest/fasupportfunction/entry/src/main/ets/MainAbility6/pages/index.ets b/ability/ability_runtime/actssupportfunction/fasupportfunction/entry/src/main/ets/MainAbility6/pages/index.ets similarity index 100% rename from ability/ability_runtime/supportfunctiontest/fasupportfunction/entry/src/main/ets/MainAbility6/pages/index.ets rename to ability/ability_runtime/actssupportfunction/fasupportfunction/entry/src/main/ets/MainAbility6/pages/index.ets diff --git a/ability/ability_runtime/supportfunctiontest/fasupportfunction/fasupportfunctiontwo/src/main/resources/base/element/color.json b/ability/ability_runtime/actssupportfunction/fasupportfunction/entry/src/main/resources/base/element/color.json similarity index 100% rename from ability/ability_runtime/supportfunctiontest/fasupportfunction/fasupportfunctiontwo/src/main/resources/base/element/color.json rename to ability/ability_runtime/actssupportfunction/fasupportfunction/entry/src/main/resources/base/element/color.json diff --git a/ability/ability_runtime/supportfunctiontest/fasupportfunction/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/actssupportfunction/fasupportfunction/entry/src/main/resources/base/element/string.json similarity index 100% rename from ability/ability_runtime/supportfunctiontest/fasupportfunction/entry/src/main/resources/base/element/string.json rename to ability/ability_runtime/actssupportfunction/fasupportfunction/entry/src/main/resources/base/element/string.json diff --git a/ability/ability_runtime/supportfunctiontest/fasupportfunction/fasupportfunctiontwo/src/main/resources/base/media/icon.png b/ability/ability_runtime/actssupportfunction/fasupportfunction/entry/src/main/resources/base/media/icon.png similarity index 100% rename from ability/ability_runtime/supportfunctiontest/fasupportfunction/fasupportfunctiontwo/src/main/resources/base/media/icon.png rename to ability/ability_runtime/actssupportfunction/fasupportfunction/entry/src/main/resources/base/media/icon.png diff --git a/ability/ability_runtime/supportfunctiontest/fasupportfunction/fasupportfunctiontwo/BUILD.gn b/ability/ability_runtime/actssupportfunction/fasupportfunction/fasupportfunctiontwo/BUILD.gn similarity index 100% rename from ability/ability_runtime/supportfunctiontest/fasupportfunction/fasupportfunctiontwo/BUILD.gn rename to ability/ability_runtime/actssupportfunction/fasupportfunction/fasupportfunctiontwo/BUILD.gn diff --git a/ability/ability_runtime/supportfunctiontest/fasupportfunction/fasupportfunctiontwo/src/main/config.json b/ability/ability_runtime/actssupportfunction/fasupportfunction/fasupportfunctiontwo/src/main/config.json similarity index 100% rename from ability/ability_runtime/supportfunctiontest/fasupportfunction/fasupportfunctiontwo/src/main/config.json rename to ability/ability_runtime/actssupportfunction/fasupportfunction/fasupportfunctiontwo/src/main/config.json diff --git a/ability/ability_runtime/supportfunctiontest/fasupportfunction/fasupportfunctiontwo/src/main/ets/MainAbility/app.ets b/ability/ability_runtime/actssupportfunction/fasupportfunction/fasupportfunctiontwo/src/main/ets/MainAbility/app.ets similarity index 100% rename from ability/ability_runtime/supportfunctiontest/fasupportfunction/fasupportfunctiontwo/src/main/ets/MainAbility/app.ets rename to ability/ability_runtime/actssupportfunction/fasupportfunction/fasupportfunctiontwo/src/main/ets/MainAbility/app.ets diff --git a/ability/ability_runtime/supportfunctiontest/fasupportfunction/fasupportfunctiontwo/src/main/ets/MainAbility/pages/index.ets b/ability/ability_runtime/actssupportfunction/fasupportfunction/fasupportfunctiontwo/src/main/ets/MainAbility/pages/index.ets similarity index 100% rename from ability/ability_runtime/supportfunctiontest/fasupportfunction/fasupportfunctiontwo/src/main/ets/MainAbility/pages/index.ets rename to ability/ability_runtime/actssupportfunction/fasupportfunction/fasupportfunctiontwo/src/main/ets/MainAbility/pages/index.ets diff --git a/ability/ability_runtime/supportfunctiontest/fasupportfunctionthree/entry/src/main/resources/base/element/color.json b/ability/ability_runtime/actssupportfunction/fasupportfunction/fasupportfunctiontwo/src/main/resources/base/element/color.json similarity index 100% rename from ability/ability_runtime/supportfunctiontest/fasupportfunctionthree/entry/src/main/resources/base/element/color.json rename to ability/ability_runtime/actssupportfunction/fasupportfunction/fasupportfunctiontwo/src/main/resources/base/element/color.json diff --git a/ability/ability_runtime/supportfunctiontest/fasupportfunction/fasupportfunctiontwo/src/main/resources/base/element/string.json b/ability/ability_runtime/actssupportfunction/fasupportfunction/fasupportfunctiontwo/src/main/resources/base/element/string.json similarity index 100% rename from ability/ability_runtime/supportfunctiontest/fasupportfunction/fasupportfunctiontwo/src/main/resources/base/element/string.json rename to ability/ability_runtime/actssupportfunction/fasupportfunction/fasupportfunctiontwo/src/main/resources/base/element/string.json diff --git a/ability/ability_runtime/supportfunctiontest/fasupportfunctionthree/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/actssupportfunction/fasupportfunction/fasupportfunctiontwo/src/main/resources/base/media/icon.png similarity index 100% rename from ability/ability_runtime/supportfunctiontest/fasupportfunctionthree/entry/src/main/resources/base/media/icon.png rename to ability/ability_runtime/actssupportfunction/fasupportfunction/fasupportfunctiontwo/src/main/resources/base/media/icon.png diff --git a/ability/ability_runtime/supportfunctiontest/fasupportfunctionthree/signature/openharmony_sx.p7b b/ability/ability_runtime/actssupportfunction/fasupportfunction/signature/openharmony_sx.p7b similarity index 100% rename from ability/ability_runtime/supportfunctiontest/fasupportfunctionthree/signature/openharmony_sx.p7b rename to ability/ability_runtime/actssupportfunction/fasupportfunction/signature/openharmony_sx.p7b diff --git a/ability/ability_runtime/supportfunctiontest/fasupportfunctionthree/BUILD.gn b/ability/ability_runtime/actssupportfunction/fasupportfunctionthree/BUILD.gn similarity index 100% rename from ability/ability_runtime/supportfunctiontest/fasupportfunctionthree/BUILD.gn rename to ability/ability_runtime/actssupportfunction/fasupportfunctionthree/BUILD.gn diff --git a/ability/ability_runtime/supportfunctiontest/fasupportfunctionthree/entry/BUILD.gn b/ability/ability_runtime/actssupportfunction/fasupportfunctionthree/entry/BUILD.gn similarity index 100% rename from ability/ability_runtime/supportfunctiontest/fasupportfunctionthree/entry/BUILD.gn rename to ability/ability_runtime/actssupportfunction/fasupportfunctionthree/entry/BUILD.gn diff --git a/ability/ability_runtime/supportfunctiontest/fasupportfunctionthree/entry/src/main/config.json b/ability/ability_runtime/actssupportfunction/fasupportfunctionthree/entry/src/main/config.json similarity index 100% rename from ability/ability_runtime/supportfunctiontest/fasupportfunctionthree/entry/src/main/config.json rename to ability/ability_runtime/actssupportfunction/fasupportfunctionthree/entry/src/main/config.json diff --git a/ability/ability_runtime/supportfunctiontest/fasupportfunctionthree/entry/src/main/ets/MainAbility/app.ets b/ability/ability_runtime/actssupportfunction/fasupportfunctionthree/entry/src/main/ets/MainAbility/app.ets similarity index 100% rename from ability/ability_runtime/supportfunctiontest/fasupportfunctionthree/entry/src/main/ets/MainAbility/app.ets rename to ability/ability_runtime/actssupportfunction/fasupportfunctionthree/entry/src/main/ets/MainAbility/app.ets diff --git a/ability/ability_runtime/supportfunctiontest/fasupportfunctionthree/entry/src/main/ets/MainAbility/pages/index.ets b/ability/ability_runtime/actssupportfunction/fasupportfunctionthree/entry/src/main/ets/MainAbility/pages/index.ets similarity index 100% rename from ability/ability_runtime/supportfunctiontest/fasupportfunctionthree/entry/src/main/ets/MainAbility/pages/index.ets rename to ability/ability_runtime/actssupportfunction/fasupportfunctionthree/entry/src/main/ets/MainAbility/pages/index.ets diff --git a/ability/ability_runtime/supportfunctiontest/stagesupportfunction/entry/src/main/resources/base/element/color.json b/ability/ability_runtime/actssupportfunction/fasupportfunctionthree/entry/src/main/resources/base/element/color.json similarity index 100% rename from ability/ability_runtime/supportfunctiontest/stagesupportfunction/entry/src/main/resources/base/element/color.json rename to ability/ability_runtime/actssupportfunction/fasupportfunctionthree/entry/src/main/resources/base/element/color.json diff --git a/ability/ability_runtime/supportfunctiontest/fasupportfunctionthree/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/actssupportfunction/fasupportfunctionthree/entry/src/main/resources/base/element/string.json similarity index 100% rename from ability/ability_runtime/supportfunctiontest/fasupportfunctionthree/entry/src/main/resources/base/element/string.json rename to ability/ability_runtime/actssupportfunction/fasupportfunctionthree/entry/src/main/resources/base/element/string.json diff --git a/ability/ability_runtime/supportfunctiontest/stagesupportfunction/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/actssupportfunction/fasupportfunctionthree/entry/src/main/resources/base/media/icon.png similarity index 100% rename from ability/ability_runtime/supportfunctiontest/stagesupportfunction/entry/src/main/resources/base/media/icon.png rename to ability/ability_runtime/actssupportfunction/fasupportfunctionthree/entry/src/main/resources/base/media/icon.png diff --git a/ability/ability_runtime/supportfunctiontest/stagesupportfunction/signature/openharmony_sx.p7b b/ability/ability_runtime/actssupportfunction/fasupportfunctionthree/signature/openharmony_sx.p7b similarity index 100% rename from ability/ability_runtime/supportfunctiontest/stagesupportfunction/signature/openharmony_sx.p7b rename to ability/ability_runtime/actssupportfunction/fasupportfunctionthree/signature/openharmony_sx.p7b diff --git a/ability/ability_runtime/supportfunctiontest/stagesupportfunction/AppScope/app.json b/ability/ability_runtime/actssupportfunction/stagesupportfunction/AppScope/app.json similarity index 100% rename from ability/ability_runtime/supportfunctiontest/stagesupportfunction/AppScope/app.json rename to ability/ability_runtime/actssupportfunction/stagesupportfunction/AppScope/app.json diff --git a/ability/ability_runtime/supportfunctiontest/stagesupportfunction/AppScope/resources/base/element/string.json b/ability/ability_runtime/actssupportfunction/stagesupportfunction/AppScope/resources/base/element/string.json similarity index 100% rename from ability/ability_runtime/supportfunctiontest/stagesupportfunction/AppScope/resources/base/element/string.json rename to ability/ability_runtime/actssupportfunction/stagesupportfunction/AppScope/resources/base/element/string.json diff --git a/ability/ability_runtime/supportfunctiontest/supportfunction/AppScope/resources/base/media/app_icon.png b/ability/ability_runtime/actssupportfunction/stagesupportfunction/AppScope/resources/base/media/app_icon.png similarity index 100% rename from ability/ability_runtime/supportfunctiontest/supportfunction/AppScope/resources/base/media/app_icon.png rename to ability/ability_runtime/actssupportfunction/stagesupportfunction/AppScope/resources/base/media/app_icon.png diff --git a/ability/ability_runtime/supportfunctiontest/stagesupportfunction/BUILD.gn b/ability/ability_runtime/actssupportfunction/stagesupportfunction/BUILD.gn similarity index 100% rename from ability/ability_runtime/supportfunctiontest/stagesupportfunction/BUILD.gn rename to ability/ability_runtime/actssupportfunction/stagesupportfunction/BUILD.gn diff --git a/ability/ability_runtime/supportfunctiontest/stagesupportfunction/entry/src/main/ets/Application/MyAbilityStage.ts b/ability/ability_runtime/actssupportfunction/stagesupportfunction/entry/src/main/ets/Application/MyAbilityStage.ts similarity index 100% rename from ability/ability_runtime/supportfunctiontest/stagesupportfunction/entry/src/main/ets/Application/MyAbilityStage.ts rename to ability/ability_runtime/actssupportfunction/stagesupportfunction/entry/src/main/ets/Application/MyAbilityStage.ts diff --git a/ability/ability_runtime/supportfunctiontest/stagesupportfunction/entry/src/main/ets/MainAbility/MainAbility.ts b/ability/ability_runtime/actssupportfunction/stagesupportfunction/entry/src/main/ets/MainAbility/MainAbility.ts similarity index 100% rename from ability/ability_runtime/supportfunctiontest/stagesupportfunction/entry/src/main/ets/MainAbility/MainAbility.ts rename to ability/ability_runtime/actssupportfunction/stagesupportfunction/entry/src/main/ets/MainAbility/MainAbility.ts diff --git a/ability/ability_runtime/supportfunctiontest/stagesupportfunction/entry/src/main/ets/pages/index.ets b/ability/ability_runtime/actssupportfunction/stagesupportfunction/entry/src/main/ets/pages/index.ets similarity index 100% rename from ability/ability_runtime/supportfunctiontest/stagesupportfunction/entry/src/main/ets/pages/index.ets rename to ability/ability_runtime/actssupportfunction/stagesupportfunction/entry/src/main/ets/pages/index.ets diff --git a/ability/ability_runtime/supportfunctiontest/stagesupportfunction/entry/src/main/module.json b/ability/ability_runtime/actssupportfunction/stagesupportfunction/entry/src/main/module.json similarity index 100% rename from ability/ability_runtime/supportfunctiontest/stagesupportfunction/entry/src/main/module.json rename to ability/ability_runtime/actssupportfunction/stagesupportfunction/entry/src/main/module.json diff --git a/ability/ability_runtime/supportfunctiontest/supportfunction/entry/src/main/resources/base/element/color.json b/ability/ability_runtime/actssupportfunction/stagesupportfunction/entry/src/main/resources/base/element/color.json similarity index 100% rename from ability/ability_runtime/supportfunctiontest/supportfunction/entry/src/main/resources/base/element/color.json rename to ability/ability_runtime/actssupportfunction/stagesupportfunction/entry/src/main/resources/base/element/color.json diff --git a/ability/ability_runtime/supportfunctiontest/stagesupportfunction/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/actssupportfunction/stagesupportfunction/entry/src/main/resources/base/element/string.json similarity index 100% rename from ability/ability_runtime/supportfunctiontest/stagesupportfunction/entry/src/main/resources/base/element/string.json rename to ability/ability_runtime/actssupportfunction/stagesupportfunction/entry/src/main/resources/base/element/string.json diff --git a/ability/ability_runtime/supportfunctiontest/supportfunction/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/actssupportfunction/stagesupportfunction/entry/src/main/resources/base/media/icon.png similarity index 100% rename from ability/ability_runtime/supportfunctiontest/supportfunction/entry/src/main/resources/base/media/icon.png rename to ability/ability_runtime/actssupportfunction/stagesupportfunction/entry/src/main/resources/base/media/icon.png diff --git a/ability/ability_runtime/supportfunctiontest/supportfunction/entry/src/main/resources/base/profile/main_pages.json b/ability/ability_runtime/actssupportfunction/stagesupportfunction/entry/src/main/resources/base/profile/main_pages.json similarity index 100% rename from ability/ability_runtime/supportfunctiontest/supportfunction/entry/src/main/resources/base/profile/main_pages.json rename to ability/ability_runtime/actssupportfunction/stagesupportfunction/entry/src/main/resources/base/profile/main_pages.json diff --git a/ability/ability_runtime/supportfunctiontest/supportfunction/signature/openharmony_sx.p7b b/ability/ability_runtime/actssupportfunction/stagesupportfunction/signature/openharmony_sx.p7b similarity index 100% rename from ability/ability_runtime/supportfunctiontest/supportfunction/signature/openharmony_sx.p7b rename to ability/ability_runtime/actssupportfunction/stagesupportfunction/signature/openharmony_sx.p7b diff --git a/ability/ability_runtime/faapicover/faapicoverhaptest/BUILD.gn b/ability/ability_runtime/faapicover/faapicoverhaptest/BUILD.gn index fb3b654aa223c68396c1983fb461c79231d9ff4c..8f1238c2ac74eae2e72b85f656c2b830d75b092c 100644 --- a/ability/ability_runtime/faapicover/faapicoverhaptest/BUILD.gn +++ b/ability/ability_runtime/faapicover/faapicoverhaptest/BUILD.gn @@ -23,6 +23,8 @@ ohos_js_hap_suite("ActsFaApiCoverTest") { ets2abc = true certificate_profile = "./signature/openharmony_sx.p7b" hap_name = "ActsFaApiCoverTest" + subsystem_name = "ability" + part_name = "ability_runtime" } ohos_js_assets("faapicoverhaptest_ets_assets") { source_dir = "./entry/src/main/ets/MainAbility" diff --git a/ability/ability_runtime/faapicover/faapicoverhaptest/entry/src/main/config.json b/ability/ability_runtime/faapicover/faapicoverhaptest/entry/src/main/config.json index d08659fd7bdde0e92f9d540dae5bb1804ffd4b79..378a138d5e422f7d931eac414e418db8a4aab215 100644 --- a/ability/ability_runtime/faapicover/faapicoverhaptest/entry/src/main/config.json +++ b/ability/ability_runtime/faapicover/faapicoverhaptest/entry/src/main/config.json @@ -33,7 +33,7 @@ "orientation": "unspecified", "visible": true, "srcPath": "MainAbility", - "name": "com.example.faapicoverhaptest.MainAbility", + "name": ".MainAbility", "srcLanguage": "ets", "icon": "$media:icon", "description": "$string:MainAbility_desc", @@ -46,7 +46,7 @@ "orientation": "unspecified", "formsEnabled": false, "name": ".TestAbility", - "srcLanguage": "js", + "srcLanguage": "ets", "srcPath": "TestAbility", "icon": "$media:icon", "description": "$string:TestAbility_desc", @@ -62,7 +62,7 @@ "deliveryWithInstall": true, "moduleName": "entry" }, - "package": "com.example.entry", + "package": "com.example.faapicoverhaptest", "srcPath": "", "name": ".entry", "js": [ @@ -81,6 +81,10 @@ } }, { + "mode": { + "syntax": "ets", + "type": "pageAbility" + }, "pages": [ "pages/index" ], diff --git a/ability/ability_runtime/faapicover/faapicoverhaptest/entry/src/main/ets/TestAbility/app.ets b/ability/ability_runtime/faapicover/faapicoverhaptest/entry/src/main/ets/TestAbility/app.ets index 1405dd359f629939894b86e2b285cb2cc1b37aa6..870e5798acfde4ef19d493a53a5ce12506d880bb 100644 --- a/ability/ability_runtime/faapicover/faapicoverhaptest/entry/src/main/ets/TestAbility/app.ets +++ b/ability/ability_runtime/faapicover/faapicoverhaptest/entry/src/main/ets/TestAbility/app.ets @@ -13,7 +13,7 @@ * limitations under the License. */ import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry' -import { Hypium } from 'hypium/index' +import { Hypium } from '@ohos/hypium' import testsuite from '../test/List.test' export default { diff --git a/ability/ability_runtime/faapicover/faapicoverhaptest/entry/src/main/ets/test/VerificationTest.ets b/ability/ability_runtime/faapicover/faapicoverhaptest/entry/src/main/ets/test/VerificationTest.ets index a3578ae3b9b4fdf39629e5933e7db8432ce94992..3250494c2423e7bab5a5c77495019b5032f8bb71 100644 --- a/ability/ability_runtime/faapicover/faapicoverhaptest/entry/src/main/ets/test/VerificationTest.ets +++ b/ability/ability_runtime/faapicover/faapicoverhaptest/entry/src/main/ets/test/VerificationTest.ets @@ -19,11 +19,32 @@ import commonEvent from '@ohos.commonEvent'; import appManager from "@ohos.application.appManager"; import wantConstant from '@ohos.ability.wantConstant'; import rpc from "@ohos.rpc"; +import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry'; var TAG export default function verificationTest(){ describe('VerificationTestTest', function() { + + let sleepTimeOne = 1000; + let TAG1 = "SUB_AA_OpenHarmony == "; + let abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator(); + afterEach(async (done) => { + console.log(TAG1 + "afterEach called"); + let cmd = "aa force-stop ohos.acts.aafwk.test.faauxiliary"; + await abilityDelegator.executeShellCommand(cmd).then((data) => { + console.log(TAG1 + "executeShellCommand : data : " + data.stdResult); + console.log(TAG1 + "executeShellCommand : data : " + data.exitCode); + }).catch((error) => { + console.log(TAG1 + "executeShellCommand error : " + JSON.stringify(error)); + }) + + setTimeout(() => { + console.log(TAG1 + "afterEach end"); + done(); + }, sleepTimeOne); + }) + /* * @tc.number SUB_AA_OpenHarmony_Test_HasWindowFocus_0100 * @tc.name Start ability to judge whether there is window focus. @@ -65,7 +86,7 @@ export default function verificationTest(){ abilityName: 'ohos.acts.aafwk.test.faauxiliary.MainAbility' } } - ability_featureAbility.startAbility(wantNum).then((data) => { + await ability_featureAbility.startAbility(wantNum).then((data) => { console.info(TAG + "startAbility data = " + JSON.stringify(data)); }).catch((err) => { console.info(TAG + "startAbility err = " + JSON.stringify(err)); @@ -162,7 +183,7 @@ export default function verificationTest(){ flags: wantConstant.Flags.FLAG_ABILITY_CONTINUATION } } - ability_featureAbility.startAbility(wantNum1).then((data) => { + await ability_featureAbility.startAbility(wantNum1).then((data) => { console.info(TAG + "startAbility data = " + JSON.stringify(data)); }).catch((err) => { number3 = err.code @@ -176,7 +197,7 @@ export default function verificationTest(){ flags: wantConstant.Flags.FLAG_ABILITY_MISSION_TOP } } - ability_featureAbility.startAbility(wantNum2).then((data) => { + await ability_featureAbility.startAbility(wantNum2).then((data) => { console.info(TAG + "startAbility data = " + JSON.stringify(data)); }).catch((err) => { console.info(TAG + "startAbility err = " + JSON.stringify(err)); @@ -191,7 +212,7 @@ export default function verificationTest(){ flags: wantConstant.Flags.FLAG_INSTALL_ON_DEMAND } } - ability_featureAbility.startAbility(wantNum3).then((data) => { + await ability_featureAbility.startAbility(wantNum3).then((data) => { console.info(TAG + "startAbility data = " + JSON.stringify(data)); }).catch((err) => { console.info(TAG + "startAbility err = " + JSON.stringify(err)); @@ -205,6 +226,79 @@ export default function verificationTest(){ } }) + /* + * @tc.number SUB_AA_OpenHarmony_Test_GetWindow_0100 + * @tc.name Call GetWindow interface. + * @tc.desc Function test + * @tc.level 3 + */ + it('SUB_AA_OpenHarmony_Test_GetWindow_0100', 0, async function(done) { + TAG = 'SUB_AA_OpenHarmony_Test_GetWindow_0100 ==>'; + try { + ability_featureAbility.getWindow((err, data) => { + console.info(TAG + "getWindow err = " + JSON.stringify(err)); + console.info(TAG + "getWindow data = " + data); + done(); + }) + } catch (err) { + console.info(TAG + "getWindow catch err = " + JSON.stringify(err)); + done(); + } + }) + + /* + * @tc.number SUB_AA_OpenHarmony_Test_TerminateSelfWithResult_0100 + * @tc.name CTerminate ability through TerminateSelfWithResult. + * @tc.desc Function test + * @tc.level 3 + */ + it('SUB_AA_OpenHarmony_Test_TerminateSelfWithResult_0100', 0, async function(done) { + TAG = 'SUB_AA_OpenHarmony_Test_TerminateSelfWithResult_0100 ==>'; + try { + let resultCode = undefined + let subscriber = null + let subscribeInfo = { + events: ["Fa_Auxiliary_MainAbility6_onDestroy"] + } + function SubscribeInfoCallback(err, data) { + console.info(TAG + "===SubscribeInfoCallback===" + JSON.stringify(data)) + if (data.event == "Fa_Auxiliary_MainAbility6_onDestroy") { + setTimeout(()=>{ + expect(resultCode).assertEqual(661); + commonEvent.unsubscribe(subscriber, UnSubscribeInfoCallback) + }, 1000) + } + } + function UnSubscribeInfoCallback(err, data) { + console.info(TAG + "===UnSubscribeInfoCallback===") + done() + } + commonEvent.createSubscriber(subscribeInfo, (err, data) => { + console.info(TAG + "===CreateSubscriberCallback===") + subscriber = data + commonEvent.subscribe(subscriber, SubscribeInfoCallback) + }) + + let wantNum = { + want: { + bundleName: 'ohos.acts.aafwk.test.faauxiliary', + abilityName: 'ohos.acts.aafwk.test.faauxiliary.MainAbility6' + } + } + await ability_featureAbility.startAbilityForResult(wantNum).then((data) => { + console.info(TAG + "startAbilityForResult data = " + JSON.stringify(data)); + resultCode = data.resultCode + }).catch((err) => { + console.info(TAG + "startAbilityForResult err = " + JSON.stringify(err)); + expect().assertFail(); + done(); + }); + } catch (err) { + console.info(TAG + "getWindow catch err = " + JSON.stringify(err)); + done(); + } + }) + /* * @tc.number SUB_AA_OpenHarmony_Test_ServiceAbility_0100 * @tc.name Start and stop serviceability. @@ -241,7 +335,7 @@ export default function verificationTest(){ abilityName: 'ohos.acts.aafwk.test.faauxiliary.ServiceAbility' } } - ability_featureAbility.startAbility(wantNum).then((data) => { + await ability_featureAbility.startAbility(wantNum).then((data) => { console.info(TAG + "startAbility data = " + JSON.stringify(data)); }).catch((err) => { console.info(TAG + "startAbility err = " + JSON.stringify(err)); @@ -274,11 +368,11 @@ export default function verificationTest(){ let subscribeInfo = { events: ["Fa_Auxiliary_ServiceAbility2_onConnect", "Fa_Auxiliary_ServiceAbility2_onDisconnect"] } - function SubscribeInfoCallback(err, data) { + async function SubscribeInfoCallback(err, data) { console.info(TAG + "===SubscribeInfoCallback===" + JSON.stringify(data)) if (data.event == "Fa_Auxiliary_ServiceAbility2_onConnect") { liseList.push("onConnect") - ability_featureAbility.disconnectAbility(num).then((data) => { + await ability_featureAbility.disconnectAbility(num).then((data) => { console.info(TAG + "disconnectAbility data = " + JSON.stringify(data)); }).catch((err) => { console.info(TAG + "disconnectAbility err = " + JSON.stringify(err)); @@ -346,78 +440,5 @@ export default function verificationTest(){ done(); } }) - - /* - * @tc.number SUB_AA_OpenHarmony_Test_GetWindow_0100 - * @tc.name Call GetWindow interface. - * @tc.desc Function test - * @tc.level 3 - */ - it('SUB_AA_OpenHarmony_Test_GetWindow_0100', 0, async function(done) { - TAG = 'SUB_AA_OpenHarmony_Test_GetWindow_0100 ==>'; - try { - ability_featureAbility.getWindow((err, data) => { - console.info(TAG + "getWindow err = " + JSON.stringify(err)); - console.info(TAG + "getWindow data = " + data); - done(); - }) - } catch (err) { - console.info(TAG + "getWindow catch err = " + JSON.stringify(err)); - done(); - } - }) - - /* - * @tc.number SUB_AA_OpenHarmony_Test_TerminateSelfWithResult_0100 - * @tc.name CTerminate ability through TerminateSelfWithResult. - * @tc.desc Function test - * @tc.level 3 - */ - it('SUB_AA_OpenHarmony_Test_TerminateSelfWithResult_0100', 0, async function(done) { - TAG = 'SUB_AA_OpenHarmony_Test_TerminateSelfWithResult_0100 ==>'; - try { - let resultCode = undefined - let subscriber = null - let subscribeInfo = { - events: ["Fa_Auxiliary_MainAbility6_onDestroy"] - } - function SubscribeInfoCallback(err, data) { - console.info(TAG + "===SubscribeInfoCallback===" + JSON.stringify(data)) - if (data.event == "Fa_Auxiliary_MainAbility6_onDestroy") { - setTimeout(()=>{ - expect(resultCode).assertEqual(661); - commonEvent.unsubscribe(subscriber, UnSubscribeInfoCallback) - }, 1000) - } - } - function UnSubscribeInfoCallback(err, data) { - console.info(TAG + "===UnSubscribeInfoCallback===") - done() - } - commonEvent.createSubscriber(subscribeInfo, (err, data) => { - console.info(TAG + "===CreateSubscriberCallback===") - subscriber = data - commonEvent.subscribe(subscriber, SubscribeInfoCallback) - }) - - let wantNum = { - want: { - bundleName: 'ohos.acts.aafwk.test.faauxiliary', - abilityName: 'ohos.acts.aafwk.test.faauxiliary.MainAbility6' - } - } - ability_featureAbility.startAbilityForResult(wantNum).then((data) => { - console.info(TAG + "startAbilityForResult data = " + JSON.stringify(data)); - resultCode = data.resultCode - }).catch((err) => { - console.info(TAG + "startAbilityForResult err = " + JSON.stringify(err)); - expect().assertFail(); - done(); - }); - } catch (err) { - console.info(TAG + "getWindow catch err = " + JSON.stringify(err)); - done(); - } - }) }) }