From 7e23067898c653afc2deb3e7d16337c8426c41d8 Mon Sep 17 00:00:00 2001 From: xinking129 Date: Tue, 14 Mar 2023 10:24:31 +0800 Subject: [PATCH] fix code Signed-off-by: xinking129 --- ability/ability_runtime/BUILD.gn | 1 + .../ActsRegisterJsErrorRely/AppScope/app.json | 19 + .../resources/base/element/string.json | 8 + .../resources/base/media/app_icon.png | Bin 0 -> 6790 bytes .../ActsRegisterJsErrorRely/BUILD.gn | 43 ++ .../src/main/ets/entryability/EntryAbility.ts | 167 +++++++ .../entry/src/main/ets/pages/Index.ets | 31 ++ .../entry/src/main/module.json | 37 ++ .../main/resources/base/element/color.json | 8 + .../main/resources/base/element/string.json | 16 + .../src/main/resources/base/media/icon.png | Bin 0 -> 6790 bytes .../resources/base/profile/main_pages.json | 5 + .../main/resources/en_US/element/string.json | 16 + .../main/resources/zh_CN/element/string.json | 16 + .../signature/openharmony_sx.p7b | Bin 0 -> 3550 bytes .../ActsRegisterJsErrorTest/AppScope/app.json | 19 + .../resources/base/element/string.json | 8 + .../resources/base/media/app_icon.png | Bin 0 -> 6790 bytes .../ActsRegisterJsErrorTest/BUILD.gn | 43 ++ .../ActsRegisterJsErrorTest/Test.json | 31 ++ .../ets/TestRunner/OpenHarmonyTestRunner.ts | 85 ++++ .../entry/src/main/ets/test/Ability.test.ets | 435 ++++++++++++++++++ .../entry/src/main/ets/test/List.test.ets | 19 + .../src/main/ets/testability/TestAbility.ets | 72 +++ .../src/main/ets/testability/pages/Index.ets | 49 ++ .../entry/src/main/module.json | 42 ++ .../main/resources/base/element/color.json | 8 + .../main/resources/base/element/string.json | 16 + .../src/main/resources/base/media/icon.png | Bin 0 -> 6790 bytes .../resources/base/profile/test_pages.json | 5 + .../signature/openharmony_sx.p7b | Bin 0 -> 3550 bytes .../ability_runtime/registerjserror/BUILD.gn | 24 + 32 files changed, 1223 insertions(+) create mode 100644 ability/ability_runtime/registerjserror/ActsRegisterJsErrorRely/AppScope/app.json create mode 100644 ability/ability_runtime/registerjserror/ActsRegisterJsErrorRely/AppScope/resources/base/element/string.json create mode 100644 ability/ability_runtime/registerjserror/ActsRegisterJsErrorRely/AppScope/resources/base/media/app_icon.png create mode 100644 ability/ability_runtime/registerjserror/ActsRegisterJsErrorRely/BUILD.gn create mode 100644 ability/ability_runtime/registerjserror/ActsRegisterJsErrorRely/entry/src/main/ets/entryability/EntryAbility.ts create mode 100644 ability/ability_runtime/registerjserror/ActsRegisterJsErrorRely/entry/src/main/ets/pages/Index.ets create mode 100644 ability/ability_runtime/registerjserror/ActsRegisterJsErrorRely/entry/src/main/module.json create mode 100644 ability/ability_runtime/registerjserror/ActsRegisterJsErrorRely/entry/src/main/resources/base/element/color.json create mode 100644 ability/ability_runtime/registerjserror/ActsRegisterJsErrorRely/entry/src/main/resources/base/element/string.json create mode 100644 ability/ability_runtime/registerjserror/ActsRegisterJsErrorRely/entry/src/main/resources/base/media/icon.png create mode 100644 ability/ability_runtime/registerjserror/ActsRegisterJsErrorRely/entry/src/main/resources/base/profile/main_pages.json create mode 100644 ability/ability_runtime/registerjserror/ActsRegisterJsErrorRely/entry/src/main/resources/en_US/element/string.json create mode 100644 ability/ability_runtime/registerjserror/ActsRegisterJsErrorRely/entry/src/main/resources/zh_CN/element/string.json create mode 100644 ability/ability_runtime/registerjserror/ActsRegisterJsErrorRely/signature/openharmony_sx.p7b create mode 100644 ability/ability_runtime/registerjserror/ActsRegisterJsErrorTest/AppScope/app.json create mode 100644 ability/ability_runtime/registerjserror/ActsRegisterJsErrorTest/AppScope/resources/base/element/string.json create mode 100644 ability/ability_runtime/registerjserror/ActsRegisterJsErrorTest/AppScope/resources/base/media/app_icon.png create mode 100644 ability/ability_runtime/registerjserror/ActsRegisterJsErrorTest/BUILD.gn create mode 100644 ability/ability_runtime/registerjserror/ActsRegisterJsErrorTest/Test.json create mode 100644 ability/ability_runtime/registerjserror/ActsRegisterJsErrorTest/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts create mode 100644 ability/ability_runtime/registerjserror/ActsRegisterJsErrorTest/entry/src/main/ets/test/Ability.test.ets create mode 100644 ability/ability_runtime/registerjserror/ActsRegisterJsErrorTest/entry/src/main/ets/test/List.test.ets create mode 100644 ability/ability_runtime/registerjserror/ActsRegisterJsErrorTest/entry/src/main/ets/testability/TestAbility.ets create mode 100644 ability/ability_runtime/registerjserror/ActsRegisterJsErrorTest/entry/src/main/ets/testability/pages/Index.ets create mode 100644 ability/ability_runtime/registerjserror/ActsRegisterJsErrorTest/entry/src/main/module.json create mode 100644 ability/ability_runtime/registerjserror/ActsRegisterJsErrorTest/entry/src/main/resources/base/element/color.json create mode 100644 ability/ability_runtime/registerjserror/ActsRegisterJsErrorTest/entry/src/main/resources/base/element/string.json create mode 100644 ability/ability_runtime/registerjserror/ActsRegisterJsErrorTest/entry/src/main/resources/base/media/icon.png create mode 100644 ability/ability_runtime/registerjserror/ActsRegisterJsErrorTest/entry/src/main/resources/base/profile/test_pages.json create mode 100644 ability/ability_runtime/registerjserror/ActsRegisterJsErrorTest/signature/openharmony_sx.p7b create mode 100644 ability/ability_runtime/registerjserror/BUILD.gn diff --git a/ability/ability_runtime/BUILD.gn b/ability/ability_runtime/BUILD.gn index 11f2b5b68..117bb98a4 100644 --- a/ability/ability_runtime/BUILD.gn +++ b/ability/ability_runtime/BUILD.gn @@ -53,6 +53,7 @@ group("ability_runtime") { "freeinstalltest:freeinstalltest", "newwant:newwant", "non_concurrent:non_concurrent", + "registerjserror:registerjserror", "stage:stage", "want:want", "workercontextcover:workercontextcover", diff --git a/ability/ability_runtime/registerjserror/ActsRegisterJsErrorRely/AppScope/app.json b/ability/ability_runtime/registerjserror/ActsRegisterJsErrorRely/AppScope/app.json new file mode 100644 index 000000000..bb4fec732 --- /dev/null +++ b/ability/ability_runtime/registerjserror/ActsRegisterJsErrorRely/AppScope/app.json @@ -0,0 +1,19 @@ +{ + "app": { + "bundleName": "com.example.actsregisterjserrorrely", + "vendor": "example", + "versionCode": 1000000, + "versionName": "1.0.0", + "icon": "$media:app_icon", + "label": "$string:app_name", + "distributedNotificationEnabled": true, + "keepAlive" : true, + "singleUser": true, + "minAPIVersion": 10, + "targetAPIVersion": 10, + "car": { + "apiCompatibleVersion": 10, + "singleUser": false + } + } +} diff --git a/ability/ability_runtime/registerjserror/ActsRegisterJsErrorRely/AppScope/resources/base/element/string.json b/ability/ability_runtime/registerjserror/ActsRegisterJsErrorRely/AppScope/resources/base/element/string.json new file mode 100644 index 000000000..d03b9c66c --- /dev/null +++ b/ability/ability_runtime/registerjserror/ActsRegisterJsErrorRely/AppScope/resources/base/element/string.json @@ -0,0 +1,8 @@ +{ + "string": [ + { + "name": "app_name", + "value": "ActsRegisterJsErrorRely" + } + ] +} diff --git a/ability/ability_runtime/registerjserror/ActsRegisterJsErrorRely/AppScope/resources/base/media/app_icon.png b/ability/ability_runtime/registerjserror/ActsRegisterJsErrorRely/AppScope/resources/base/media/app_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c GIT binary patch literal 6790 zcmX|G1ymHk)?T_}Vd;>R?p|tHQo6fg38|$UVM!6BLrPFWk?s;$LOP{GmJpBl$qoSA!PUg~PA65-S00{{S`XKG6NkG0RgjEntPrmV+?0|00mu7;+5 zrdpa{2QLqPJ4Y{j7=Mrl{BaxrkdY69+c~(w{Fv-v&aR%aEI&JYSeRTLWm!zbv;?)_ ziZB;fwGbbeL5Q}YLx`J$lp~A09KK8t_z}PZ=4ZzgdeKtgoc+o5EvN9A1K1_<>M?MBqb#!ASf&# zEX?<)!RH(7>1P+j=jqG(58}TVN-$psA6K}atCuI!KTJD&FMmH-78ZejBm)0qc{ESp z|LuG1{QnBUJRg_E=h1#XMWt2%fcoN@l7eAS!Es?Q+;XsRNPhiiE=@AqlLkJzF`O18 zbsbSmKN=aaq8k3NFYZfDWpKmM!coBU0(XnL8R{4=i|wi{!uWYM2je{U{B*K2PVdu&=E zTq*-XsEsJ$u5H4g6DIm2Y!DN`>^v|AqlwuCD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+X=6NnsI@mxnwm;tf5;_Uxg?jZ8m-m0}&6+DA!qam(p$mN5R})yA_7m$q@| zFEd|dpS595rxQr-n#GjI5i-AhnUE>Cr;jpCqSrD~EwK_DqI^7%3#p5)%T_od!t3SOmH9MyXeeGO2(UQL;ax|x?Ncixmeo1=$ z{-);Au{*tfzOG?KQ~K|ak8-HQ?`Pekhe2WM(8s{xv-p>Zmu_6{G!-oE$7$mY`MOJorI=+mMx?H;`pr!;fVYz?5~yXBACruWB`Ph zZM}90_<^OBxIhyZ9BW$`>6JvO;%VFpqVr8|7t3~AmxYak6?`Pp#c;**_SYmi`&z23 z`p6_~ePvH)C6x-G9$hgL=eVALq`-AiamN>!3~Lxw&{H(b{B(7xSRm6<3<{%{yXiH# zos5Rv1L+8fUKJLo%P>4I&$}y { + if (err.code) { + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.ERROR); + hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? ''); + return; + } + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', 'Succeeded in loading the content. Data: %{public}s', JSON.stringify(data) ?? ''); + }); + } + + onWindowStageDestroy() { + // Main window is destroyed, release UI related resources + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageDestroy'); + } + + onForeground() { + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onForeground'); + let observer = undefined; + if (globalThis.want.action == "Acts_RegisterJsErrorCallback_0100") { + observer = { + onUnhandledException(strMsg){ + commonEventData.parameters.message = strMsg; + console.info("====>Acts_RegisterJsErrorCallback_0100 onUnhandledException Message: " + strMsg); + commonEvent.publish("ACTS_RegisterEvent_First", commonEventData, (err) => { + console.info("====>Acts_RegisterJsErrorCallback_0100 publish err:" + JSON.stringify(err)); + setTimeout(()=>{ + globalThis.context.terminateSelf().then(()=>{ + console.info("====>Acts_RegisterJsErrorCallback_0100 rely terminateSelf end"); + }).catch((err)=>{ + console.info("====>Acts_RegisterJsErrorCallback_0100 rely terminateSelf err: " + + JSON.stringify(err)); + }); + }, 100); + }) + } + } + + ErrorManager.on("error", observer); + setTimeout(() => { + globalThis.contest.terminateSelf(); + }, 300); + } else if (globalThis.want.action == "Acts_RegisterJsErrorCallback_0200") { + observer = { + onUnhandledException(strMsg: String){ + commonEventData.parameters.message = strMsg; + console.info("====>Acts_RegisterJsErrorCallback_0200 onUnhandledException Message: " + strMsg); + commonEvent.publish("ACTS_RegisterEvent_First", commonEventData, (err) => { + console.info("====>Acts_RegisterJsErrorCallback_0200 onUnhandledException publish err: " + + JSON.stringify(err)); + }) + }, + onException(errObject: Error){ + commonEventData.parameters.message = errObject; + console.info("====>Acts_RegisterJsErrorCallback_0200 onException Message: " + JSON.stringify(errObject)); + commonEvent.publish("ACTS_RegisterEvent_Second", commonEventData, (err) => { + console.info("====>Acts_RegisterJsErrorCallback_0200 onException publish err: " + + JSON.stringify(err)); + setTimeout(()=>{ + globalThis.context.terminateSelf().then(()=>{ + console.info("====>Acts_RegisterJsErrorCallback_0200 rely terminateSelf end"); + }).catch((err)=>{ + console.info("====>Acts_RegisterJsErrorCallback_0200 rely terminateSelf err: " + + JSON.stringify(err)); + }) + }, 100) + }) + } + } + ErrorManager.on("error", observer); + setTimeout(() => { + globalThis.contest.terminateSelf(); + }, 300); + } else if (globalThis.want.action == "Acts_UnregisterJsErrorCallback_0800") { + observer = { + onUnhandledException(strMsg: String){ + commonEventData.parameters.message = strMsg; + console.info("====>Acts_UnregisterJsErrorCallback_0800 onUnhandledException Message: " + strMsg); + commonEvent.publish("ACTS_RegisterEvent_First", commonEventData, (err) => { + console.info("====>Acts_UnregisterJsErrorCallback_0800 onUnhandledException publish err: " + + JSON.stringify(err)); + }) + }, + onException(errObject: Error){ + commonEventData.parameters.message = errObject; + console.info("====>Acts_UnregisterJsErrorCallback_0800 onException Message: " + JSON.stringify(errObject)); + commonEvent.publish("ACTS_RegisterEvent_Second", commonEventData, (err) => { + console.info("====>Acts_UnregisterJsErrorCallback_0800 onException publish err: " + + JSON.stringify(err)); + setTimeout(()=>{ + globalThis.context.terminateSelf().then(()=>{ + console.info("====>Acts_UnregisterJsErrorCallback_0800 rely terminateSelf end"); + }).catch((err)=>{ + console.info("====>Acts_UnregisterJsErrorCallback_0800 rely terminateSelf err: " + + JSON.stringify(err)); + }) + }, 100) + }) + } + } + ErrorManager.on("error", observer); + let observerId = ErrorManager.on("error", observer); + ErrorManager.off("error", observerId).then(()=>{ + console.info("====>Acts_UnregisterJsErrorCallback_0800 rely off end"); + }).catch((err)=>{ + console.info("====>Acts_UnregisterJsErrorCallback_0800 rely off err: " + + JSON.stringify(err)); + }) + setTimeout(() => { + globalThis.contest.terminateSelf(); + }, 300); + } + } + + onBackground() { + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onBackground'); + } +} diff --git a/ability/ability_runtime/registerjserror/ActsRegisterJsErrorRely/entry/src/main/ets/pages/Index.ets b/ability/ability_runtime/registerjserror/ActsRegisterJsErrorRely/entry/src/main/ets/pages/Index.ets new file mode 100644 index 000000000..ad7ec009d --- /dev/null +++ b/ability/ability_runtime/registerjserror/ActsRegisterJsErrorRely/entry/src/main/ets/pages/Index.ets @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct Index { + @State message: string = 'Hello World' + + build() { + Row() { + Column() { + Text(this.message) + .fontSize(50) + .fontWeight(FontWeight.Bold) + } + .width('100%') + } + .height('100%') + } +} \ No newline at end of file diff --git a/ability/ability_runtime/registerjserror/ActsRegisterJsErrorRely/entry/src/main/module.json b/ability/ability_runtime/registerjserror/ActsRegisterJsErrorRely/entry/src/main/module.json new file mode 100644 index 000000000..744de4947 --- /dev/null +++ b/ability/ability_runtime/registerjserror/ActsRegisterJsErrorRely/entry/src/main/module.json @@ -0,0 +1,37 @@ +{ + "module": { + "name": "entry", + "type": "entry", + "description": "$string:module_desc", + "mainElement": "EntryAbility", + "deviceTypes": [ + "default", + "tablet" + ], + "deliveryWithInstall": true, + "installationFree": false, + "pages": "$profile:main_pages", + "abilities": [ + { + "name": "EntryAbility", + "srcEntrance": "./ets/entryability/EntryAbility.ts", + "description": "$string:EntryAbility_desc", + "icon": "$media:icon", + "label": "$string:EntryAbility_label", + "startWindowIcon": "$media:icon", + "startWindowBackground": "$color:start_window_background", + "visible": true, + "skills": [ + { + "entities": [ + "entity.system.home" + ], + "actions": [ + "action.system.home" + ] + } + ] + } + ] + } +} \ No newline at end of file diff --git a/ability/ability_runtime/registerjserror/ActsRegisterJsErrorRely/entry/src/main/resources/base/element/color.json b/ability/ability_runtime/registerjserror/ActsRegisterJsErrorRely/entry/src/main/resources/base/element/color.json new file mode 100644 index 000000000..d66f9a7d4 --- /dev/null +++ b/ability/ability_runtime/registerjserror/ActsRegisterJsErrorRely/entry/src/main/resources/base/element/color.json @@ -0,0 +1,8 @@ +{ + "color": [ + { + "name": "start_window_background", + "value": "#FFFFFF" + } + ] +} \ No newline at end of file diff --git a/ability/ability_runtime/registerjserror/ActsRegisterJsErrorRely/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/registerjserror/ActsRegisterJsErrorRely/entry/src/main/resources/base/element/string.json new file mode 100644 index 000000000..f94595515 --- /dev/null +++ b/ability/ability_runtime/registerjserror/ActsRegisterJsErrorRely/entry/src/main/resources/base/element/string.json @@ -0,0 +1,16 @@ +{ + "string": [ + { + "name": "module_desc", + "value": "module description" + }, + { + "name": "EntryAbility_desc", + "value": "description" + }, + { + "name": "EntryAbility_label", + "value": "label" + } + ] +} \ No newline at end of file diff --git a/ability/ability_runtime/registerjserror/ActsRegisterJsErrorRely/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/registerjserror/ActsRegisterJsErrorRely/entry/src/main/resources/base/media/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c GIT binary patch literal 6790 zcmX|G1ymHk)?T_}Vd;>R?p|tHQo6fg38|$UVM!6BLrPFWk?s;$LOP{GmJpBl$qoSA!PUg~PA65-S00{{S`XKG6NkG0RgjEntPrmV+?0|00mu7;+5 zrdpa{2QLqPJ4Y{j7=Mrl{BaxrkdY69+c~(w{Fv-v&aR%aEI&JYSeRTLWm!zbv;?)_ ziZB;fwGbbeL5Q}YLx`J$lp~A09KK8t_z}PZ=4ZzgdeKtgoc+o5EvN9A1K1_<>M?MBqb#!ASf&# zEX?<)!RH(7>1P+j=jqG(58}TVN-$psA6K}atCuI!KTJD&FMmH-78ZejBm)0qc{ESp z|LuG1{QnBUJRg_E=h1#XMWt2%fcoN@l7eAS!Es?Q+;XsRNPhiiE=@AqlLkJzF`O18 zbsbSmKN=aaq8k3NFYZfDWpKmM!coBU0(XnL8R{4=i|wi{!uWYM2je{U{B*K2PVdu&=E zTq*-XsEsJ$u5H4g6DIm2Y!DN`>^v|AqlwuCD;w45K0@eqauiqWf7l&o)+YLHm~|L~ z7$0v5mkobriU!H<@mVJHLlmQqzQ3d6Rh_-|%Yy2li*tHO>_vcnuZ7OR_xkAIuIU&x z-|8Y0wj|6|a6_I(v91y%k_kNw6pnkNdxjqG8!%Vz_d%c_!X+6-;1`GC9_FpjoHev5fEV7RhJ>r=mh-jp$fqbqRJ=obwdgLDVP5+s zy1=_DWG0Y-Jb3t^WXmkr(d9~08k-|#Ly zaNOmT(^9tIb&eb4%CzIT zAm3CUtWSr1t4?h1kk#NBi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ability_runtime/registerjserror/ActsRegisterJsErrorTest/AppScope/app.json new file mode 100644 index 000000000..ddb0ba7d3 --- /dev/null +++ b/ability/ability_runtime/registerjserror/ActsRegisterJsErrorTest/AppScope/app.json @@ -0,0 +1,19 @@ +{ + "app": { + "bundleName": "com.example.actsregisterjserrortest", + "vendor": "example", + "versionCode": 1000000, + "versionName": "1.0.0", + "icon": "$media:app_icon", + "label": "$string:app_name", + "distributedNotificationEnabled": true, + "keepAlive" : true, + "singleUser": true, + "minAPIVersion": 10, + "targetAPIVersion": 10, + "car": { + "apiCompatibleVersion": 10, + "singleUser": false + } + } +} diff --git a/ability/ability_runtime/registerjserror/ActsRegisterJsErrorTest/AppScope/resources/base/element/string.json b/ability/ability_runtime/registerjserror/ActsRegisterJsErrorTest/AppScope/resources/base/element/string.json new file mode 100644 index 000000000..efd3fb72b --- /dev/null +++ b/ability/ability_runtime/registerjserror/ActsRegisterJsErrorTest/AppScope/resources/base/element/string.json @@ -0,0 +1,8 @@ +{ + "string": [ + { + "name": "app_name", + "value": "ActsRegisterJsErrorTest" + } + ] +} diff --git a/ability/ability_runtime/registerjserror/ActsRegisterJsErrorTest/AppScope/resources/base/media/app_icon.png b/ability/ability_runtime/registerjserror/ActsRegisterJsErrorTest/AppScope/resources/base/media/app_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c GIT binary patch literal 6790 zcmX|G1ymHk)?T_}Vd;>R?p|tHQo6fg38|$UVM!6BLrPFWk?s;$LOP{GmJpBl$qoSA!PUg~PA65-S00{{S`XKG6NkG0RgjEntPrmV+?0|00mu7;+5 zrdpa{2QLqPJ4Y{j7=Mrl{BaxrkdY69+c~(w{Fv-v&aR%aEI&JYSeRTLWm!zbv;?)_ ziZB;fwGbbeL5Q}YLx`J$lp~A09KK8t_z}PZ=4ZzgdeKtgoc+o5EvN9A1K1_<>M?MBqb#!ASf&# zEX?<)!RH(7>1P+j=jqG(58}TVN-$psA6K}atCuI!K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%! zIR^b1`zHx|*1GU?tbBx23weFLz5H?y_Q%N&t$}k?w+``2A=aotj0;2v$~AL z{scF-cL{wsdrmPvf#a9OHyYLcwQD4Kcm)`LLwMh4WT~p29f7M!iafJSU`IV}QY5Wa z(n44-9oA}?J{a+ah*@31WTs#&J#o1`H98#6IQf;Wv0N_!);f&9g7o-k(lW5rWnDUR zQBFIRG+X=6NnsI@mxnwm;tf5;_Uxg?jZ8m-m0}&6+DA!qam(p$mN5R})yA_7m$q@| zFEd|dpS595rxQr-n#GjI5i-AhnUE>Cr;jpCqSrD~EwK_DqI^7%3#p5)%T_od!t3SOmH9MyXeeGO2(UQL;ax|x?Ncixmeo1=$ z{-);Au{*tfzOG?KQ~K|ak8-HQ?`Pekhe2WM(8s{xv-p>Zmu_6{G!-oE$7$mY`MOJorI=+mMx?H;`pr!;fVYz?5~yXBACruWB`Ph zZM}90_<^OBxIhyZ9BW$`>6JvO;%VFpqVr8|7t3~AmxYak6?`Pp#c;**_SYmi`&z23 z`p6_~ePvH)C6x-G9$hgL=eVALq`-AiamN>!3~Lxw&{H(b{B(7xSRm6<3<{%{yXiH# zos5Rv1L+8fUKJLo%P>4I&$}y { + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', 'executeShellCommand : err : %{public}s', JSON.stringify(err) ?? ''); + hilog.info(0x0000, 'testTag', 'executeShellCommand : data : %{public}s', d.stdResult ?? ''); + hilog.info(0x0000, 'testTag', 'executeShellCommand : data : %{public}s', d.exitCode ?? ''); + }) + hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner onRun end'); + } +} \ No newline at end of file diff --git a/ability/ability_runtime/registerjserror/ActsRegisterJsErrorTest/entry/src/main/ets/test/Ability.test.ets b/ability/ability_runtime/registerjserror/ActsRegisterJsErrorTest/entry/src/main/ets/test/Ability.test.ets new file mode 100644 index 000000000..08cde5f43 --- /dev/null +++ b/ability/ability_runtime/registerjserror/ActsRegisterJsErrorTest/entry/src/main/ets/test/Ability.test.ets @@ -0,0 +1,435 @@ +/* + * Copyright (c) 2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' +import ErrorManager from "@ohos.app.ability.errorManager" +import commonEvent from '@ohos.commonEvent' +const CASE_TIME_OUT=5000; +var ACTS_Register = { + events: ["ACTS_RegisterEvent_First", "ACTS_RegisterEvent_Second"] +}; + +export default function abilityTest() { + describe('ActsAbilityTest', function () { + let observer; + beforeAll(function () { + observer = { + onUnhandledException(strMsg){ + console.info("====>Acts_RegisterJsErrorCallback onUnhandledException Message:" + strMsg); + }, + onException(errObject){ + console.info("====>Acts_RegisterJsErrorCallback onException Message:" + errObject); + } + } + }) + beforeEach(function () {}) + afterEach(function () {}) + afterAll(function () {}) + + /* + * @tc.number: Acts_RegisterJsErrorCallback_0100 + * @tc.name: JsError callback enhancement + * @tc.desc: Js registers onUnhandledException callback to listen. There is a callback notification when + * JS is abnormal. + */ + it('Acts_RegisterJsErrorCallback_0100',0, async function (done) { + let subscriber; + let flag = false; + console.info("====>Acts_RegisterJsErrorCallback_0100 start"); + commonEvent.createSubscriber(ACTS_Register).then(async (data) => { + console.debug("====>Acts_RegisterJsErrorCallback_0100 Create Subscribe"); + subscriber = data; + commonEvent.subscribe(subscriber, subscribeCallBack); + globalThis.abilityContext.startAbility( + { + bundleName: "com.example.actsregisterjserrorrely", + abilityName: "EntryAbility", + action: "Acts_RegisterJsErrorCallback_0100" + },(err)=>{ + console.debug("====>Acts_RegisterJsErrorCallback_0100 startAbility err:"+JSON.stringify(err)); + expect(err.code).assertEqual(0); + }) + }) + + function subscribeCallBack(err, data) { + console.debug("====>Acts_RegisterJsErrorCallback_0100 subscribeCallBack data:" + JSON.stringify(data)); + if(data.event == "ACTS_RegisterEvent_First") { + flag = true; + expect(data.parameters.message).assertContain("Error message:Cannot read property terminateSelf"); + commonEvent.unsubscribe(subscriber, unSubscribeCallback); + } + } + + function unSubscribeCallback() { + console.debug("====>Acts_RegisterJsErrorCallback_0100 unSubscribeCallback"); + setTimeout(() => {done();}, 800); + } + + setTimeout(()=>{ + if(flag==false){ + expect().assertFail(); + commonEvent.unsubscribe(subscriber, unSubscribeCallback); + } + },CASE_TIME_OUT) + }) + + /* + * @tc.number: Acts_RegisterJsErrorCallback_0200 + * @tc.name: JsError callback enhancement + * @tc.desc: Js registers onUnhandledException and onException callback to listen. There is a callback + * notification when JS is abnormal. + */ + it('Acts_RegisterJsErrorCallback_0200',0, async function (done) { + let subscriber; + let flag = false; + console.info("====>Acts_RegisterJsErrorCallback_0200 start") + commonEvent.createSubscriber(ACTS_Register).then(async (data) => { + console.debug("====>Acts_RegisterJsErrorCallback_0200 Create Subscribe"); + subscriber = data; + commonEvent.subscribe(subscriber, subscribeCallBack); + globalThis.abilityContext.startAbility( + { + bundleName: "com.example.actsregisterjserrorrely", + abilityName: "EntryAbility", + action: "Acts_RegisterJsErrorCallback_0200" + },(err)=>{ + console.debug("====>Acts_RegisterJsErrorCallback_0200 startAbility err:"+JSON.stringify(err)); + expect(err.code).assertEqual(0); + }) + }) + + var msg = {"ACTS_RegisterEvent_First": false, "ACTS_RegisterEvent_Second": false} + function subscribeCallBack(err, data) { + if (data.event === 'ACTS_RegisterEvent_First') { + console.debug("====>Acts_RegisterJsErrorCallback_0200 subscribeCallBack First data:" + JSON.stringify(data)); + expect(data.parameters.message).assertContain("Error message:Cannot read property terminateSelf"); + msg["ACTS_RegisterEvent_First"] = true; + } else if (data.event === 'ACTS_RegisterEvent_Second') { + console.debug("====>Acts_RegisterJsErrorCallback_0200 subscribeCallBack Second data:" + JSON.stringify(data)); + expect(data.parameters.message.name).assertEqual("TypeError"); + expect(data.parameters.message.message).assertEqual("Cannot read property terminateSelf of undefined"); + expect(data.parameters.message.stack).assertContain("at anonymous"); + msg["ACTS_RegisterEvent_Second"] = true; + } + + if (msg["ACTS_RegisterEvent_First"] == true && msg["ACTS_RegisterEvent_Second"] == true) { + flag = true; + commonEvent.unsubscribe(subscriber, unSubscribeCallback); + } + } + + function unSubscribeCallback() { + setTimeout(() => { + console.debug("====>Acts_RegisterJsErrorCallback_0200 unSubscribeCallback"); + done(); + }, 800); + } + + setTimeout(()=>{ + if(flag==false){ + expect().assertFail(); + commonEvent.unsubscribe(subscriber, unSubscribeCallback); + } + },CASE_TIME_OUT) + }) + + /* + * @tc.number: Acts_RegisterJsErrorCallback_0300 + * @tc.name: JsError callback enhancement + * @tc.desc: When registering JS exception listening interface parameter type is undefined, returns an error. + */ + it('Acts_RegisterJsErrorCallback_0300',0, async function (done) { + console.info("====>Acts_RegisterJsErrorCallback_0300 start"); + try { + ErrorManager.on(undefined, observer); + expect().assertFail(); + done(); + } catch (err) { + console.info("====>Acts_RegisterJsErrorCallback_0300 catch " + JSON.stringify(err.code)); + expect(err.code).assertEqual(401); + console.info("====>Acts_RegisterJsErrorCallback_0300 end"); + done(); + } + }) + + /* + * @tc.number: Acts_RegisterJsErrorCallback_0400 + * @tc.name: JsError callback enhancement + * @tc.desc: When registering JS exception listening interface parameter type is null, returns an error. + */ + it('Acts_RegisterJsErrorCallback_0400',0, async function (done) { + console.info("====>Acts_RegisterJsErrorCallback_0400 start"); + try { + ErrorManager.on(null, observer); + expect().assertFail(); + done(); + } catch (err) { + console.info("====>Acts_RegisterJsErrorCallback_0400 catch " + JSON.stringify(err)); + expect(err.code).assertEqual(401); + console.info("====>Acts_RegisterJsErrorCallback_0400 end"); + done(); + } + }) + + /* + * @tc.number: Acts_RegisterJsErrorCallback_0500 + * @tc.name: JsError callback enhancement + * @tc.desc: When registering JS exception listening interface parameter observer is undefined, no abnormal + * error in interface execution. + */ + it('Acts_RegisterJsErrorCallback_0500',0, async function (done) { + console.info("====>Acts_RegisterJsErrorCallback_0500 start"); + try { + ErrorManager.on("error", undefined); + expect(true).assertTrue(); + console.info("====>Acts_RegisterJsErrorCallback_0500 end"); + done(); + } catch (err) { + console.info("====>Acts_RegisterJsErrorCallback_0500 catch " + JSON.stringify(err)); + expect().assertFail(); + done(); + } + }) + + /* + * @tc.number: Acts_RegisterJsErrorCallback_0600 + * @tc.name: JsError callback enhancement + * @tc.desc: When registering JS exception listening interface parameter observer is null, no abnormal + * error in interface execution. + */ + it('Acts_RegisterJsErrorCallback_0600',0, async function (done) { + console.info("====>Acts_RegisterJsErrorCallback_0600 start"); + try { + ErrorManager.on("error", null); + expect(true).assertTrue(); + console.info("====>Acts_RegisterJsErrorCallback_0600 end"); + done(); + } catch (err) { + console.info("====>Acts_RegisterJsErrorCallback_0600 catch " + JSON.stringify(err)); + expect().assertFail(); + done(); + } + }) + + /* + * @tc.number: Acts_UnregisterJsErrorCallback_0100 + * @tc.name: JsError callback enhancement + * @tc.desc: When unregistering JS exception listening interface parameter type is undefined, returns an error. + */ + it('Acts_UnregisterJsErrorCallback_0100',0, async function (done) { + console.info("====>Acts_UnregisterJsErrorCallback_0100 start"); + let observerId = ErrorManager.on("error", observer); + try { + ErrorManager.off(undefined, observerId).then(()=>{ + console.info("====>Acts_UnregisterJsErrorCallback_0100 success"); + expect().assertFail(); + done(); + }).catch((err)=>{ + console.info("====>Acts_UnregisterJsErrorCallback_0100 err:" + JSON.stringify(err)); + expect(err.code).assertEqual(401); + done(); + }) + } catch (err) { + console.info("====>Acts_UnregisterJsErrorCallback_0100 catch:" + JSON.stringify(err)); + expect(err.code).assertEqual(401); + console.info("====>Acts_UnregisterJsErrorCallback_0100 end"); + done(); + } + }) + + /* + * @tc.number: Acts_UnregisterJsErrorCallback_0200 + * @tc.name: JsError callback enhancement + * @tc.desc: When unregistering JS exception listening interface parameter type is null, returns an error. + */ + it('Acts_UnregisterJsErrorCallback_0200',0, async function (done) { + console.info("====>Acts_UnregisterJsErrorCallback_0200 start"); + let observerId = ErrorManager.on("error", observer); + try { + ErrorManager.off(null, observerId).then(()=>{ + console.info("====>Acts_UnregisterJsErrorCallback_0200 success"); + expect().assertFail(); + done(); + }).catch((err)=>{ + console.info("====>Acts_UnregisterJsErrorCallback_0200 err:" + JSON.stringify(err)); + expect(err.code).assertEqual(401); + done(); + }) + } catch (err) { + console.info("====>Acts_UnregisterJsErrorCallback_0200 catch:" + JSON.stringify(err)); + expect(err.code).assertEqual(401); + console.info("====>Acts_UnregisterJsErrorCallback_0200 end"); + done(); + } + }) + + /* + * @tc.number: Acts_UnregisterJsErrorCallback_0300 + * @tc.name: JsError callback enhancement + * @tc.desc: When unregistering JS exception listening interface parameter observerId is undefined, returns error. + */ + it('Acts_UnregisterJsErrorCallback_0300',0, async function (done) { + console.info("====>Acts_UnregisterJsErrorCallback_0300 start"); + ErrorManager.off("error", undefined).then(()=>{ + console.info("====>Acts_UnregisterJsErrorCallback_0300 success"); + expect().assertFail(); + done(); + }).catch((err)=>{ + console.info("====>Acts_UnregisterJsErrorCallback_0300 err:" + JSON.stringify(err)); + expect(err.code).assertEqual(401); + done(); + }) + }) + + /* + * @tc.number: Acts_UnregisterJsErrorCallback_0400 + * @tc.name: JsError callback enhancement + * @tc.desc: When unregistering JS exception listening interface parameter observerId is null, returns error. + */ + it('Acts_UnregisterJsErrorCallback_0400',0, async function (done) { + console.info("====>Acts_UnregisterJsErrorCallback_0400 start"); + ErrorManager.off("error", null).then(()=>{ + console.info("====>Acts_UnregisterJsErrorCallback_0400 success"); + expect().assertFail(); + done(); + }).catch((err)=>{ + console.info("====>Acts_UnregisterJsErrorCallback_0400 err:" + JSON.stringify(err)); + expect(err.code).assertEqual(401); + done(); + }) + }) + + /* + * @tc.number: Acts_UnregisterJsErrorCallback_0500 + * @tc.name: JsError callback enhancement + * @tc.desc: When unregistering JS exception listening interface parameter observerId is -1, returns error. + */ + it('Acts_UnregisterJsErrorCallback_0500',0, async function (done) { + console.info("====>Acts_UnregisterJsErrorCallback_0500 start"); + ErrorManager.off("error", -1).then(()=>{ + console.info("====>Acts_UnregisterJsErrorCallback_0500 success"); + expect().assertFail(); + done(); + }).catch((err)=>{ + console.info("====>Acts_UnregisterJsErrorCallback_0500 err:" + JSON.stringify(err)); + expect(err.code).assertEqual(401); + done(); + }) + }) + + /* + * @tc.number: Acts_UnregisterJsErrorCallback_0600 + * @tc.name: JsError callback enhancement + * @tc.desc: When unregistering JS exception listening interface parameter observerId is 10000, returns error. + */ + it('Acts_UnregisterJsErrorCallback_0600',0, async function (done) { + console.info("====>Acts_UnregisterJsErrorCallback_0600 start"); + ErrorManager.off("error", 10000).then(()=>{ + console.info("====>Acts_UnregisterJsErrorCallback_0600 success"); + expect().assertFail(); + done(); + }).catch((err)=>{ + console.info("====>Acts_UnregisterJsErrorCallback_0600 err:" + JSON.stringify(err)); + expect(err.code).assertEqual(16000003); + done(); + }) + }) + + /* + * @tc.number: Acts_UnregisterJsErrorCallback_0700 + * @tc.name: JsError callback enhancement + * @tc.desc: When the parameter objectId of the unregistered JS exception listening interface is the correct + * registered value, the interface executes correctly. + */ + it('Acts_UnregisterJsErrorCallback_0700',0, async function (done) { + console.info("====>Acts_UnregisterJsErrorCallback_0700 start"); + let observerId = ErrorManager.on("error", observer); + try { + ErrorManager.off("error", observerId).then(()=>{ + console.info("====>Acts_UnregisterJsErrorCallback_0700 end"); + expect(true).assertTrue(); + done(); + }).catch((err)=>{ + console.info("====>Acts_UnregisterJsErrorCallback_0700 err:" + JSON.stringify(err)); + expect().assertFail(); + done(); + }) + } catch (err) { + console.info("====>Acts_UnregisterJsErrorCallback_0700 catch:" + JSON.stringify(err)); + expect().assertFail(); + done(); + } + }) + + /* + * @tc.number: Acts_UnregisterJsErrorCallback_0800 + * @tc.name: JsError callback enhancement + * @tc.desc: When unregistered as the correct registered value, the interface executes correctly and the JS + * layer does not trigger an exception error callback. + */ + it('Acts_UnregisterJsErrorCallback_0800',0, async function (done) { + let subscriber; + let flag = false; + console.info("====>Acts_UnregisterJsErrorCallback_0800 start") + commonEvent.createSubscriber(ACTS_Register).then(async (data) => { + console.debug("====>Acts_UnregisterJsErrorCallback_0800 Create Subscribe"); + subscriber = data; + commonEvent.subscribe(subscriber, subscribeCallBack); + globalThis.abilityContext.startAbility( + { + bundleName: "com.example.actsregisterjserrorrely", + abilityName: "EntryAbility", + action: "Acts_UnregisterJsErrorCallback_0800" + },(err)=>{ + console.debug("====>Acts_UnregisterJsErrorCallback_0800 startAbility err:"+JSON.stringify(err)); + expect(err.code).assertEqual(0); + }) + }) + + var msg = {"ACTS_RegisterEvent_First": false, "ACTS_RegisterEvent_Second": false} + function subscribeCallBack(err, data) { + if (data.event === 'ACTS_RegisterEvent_First') { + console.debug("====>Acts_UnregisterJsErrorCallback_0800 subscribeCallBack First data:" + JSON.stringify(data)); + expect(data.parameters.message).assertContain("Error message:Cannot read property terminateSelf"); + msg["ACTS_RegisterEvent_First"] = true; + } else if (data.event === 'ACTS_RegisterEvent_Second') { + console.debug("====>Acts_UnregisterJsErrorCallback_0800 subscribeCallBack Second data:" + JSON.stringify(data)); + expect(data.parameters.message.name).assertEqual("TypeError"); + expect(data.parameters.message.message).assertEqual("Cannot read property terminateSelf of undefined"); + expect(data.parameters.message.stack).assertContain("at anonymous"); + msg["ACTS_RegisterEvent_Second"] = true; + } + + if (msg["ACTS_RegisterEvent_First"] == true && msg["ACTS_RegisterEvent_Second"] == true) { + flag = true; + commonEvent.unsubscribe(subscriber, unSubscribeCallback); + } + } + + function unSubscribeCallback() { + setTimeout(() => { + console.debug("====>Acts_UnregisterJsErrorCallback_0800 unSubscribeCallback"); + done(); + }, 800); + } + + setTimeout(()=>{ + if(flag==false){ + expect().assertFail(); + commonEvent.unsubscribe(subscriber, unSubscribeCallback); + } + },CASE_TIME_OUT) + }) + }) +} \ No newline at end of file diff --git a/ability/ability_runtime/registerjserror/ActsRegisterJsErrorTest/entry/src/main/ets/test/List.test.ets b/ability/ability_runtime/registerjserror/ActsRegisterJsErrorTest/entry/src/main/ets/test/List.test.ets new file mode 100644 index 000000000..cb2e22661 --- /dev/null +++ b/ability/ability_runtime/registerjserror/ActsRegisterJsErrorTest/entry/src/main/ets/test/List.test.ets @@ -0,0 +1,19 @@ +/* + * Copyright (c) 2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import abilityTest from './Ability.test' + +export default function testsuite() { + abilityTest() +} \ No newline at end of file diff --git a/ability/ability_runtime/registerjserror/ActsRegisterJsErrorTest/entry/src/main/ets/testability/TestAbility.ets b/ability/ability_runtime/registerjserror/ActsRegisterJsErrorTest/entry/src/main/ets/testability/TestAbility.ets new file mode 100644 index 000000000..6a6c40788 --- /dev/null +++ b/ability/ability_runtime/registerjserror/ActsRegisterJsErrorTest/entry/src/main/ets/testability/TestAbility.ets @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import hilog from '@ohos.hilog'; +import Ability from '@ohos.app.ability.UIAbility' +import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry' +import { Hypium } from '@ohos/hypium' +import testsuite from '../test/List.test' +import Window from '@ohos.window' + +export default class TestAbility extends Ability { + onCreate(want, launchParam) { + globalThis.abilityContext = this.context; + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onCreate'); + hilog.info(0x0000, 'testTag', '%{public}s', 'want param:' + JSON.stringify(want) ?? ''); + hilog.info(0x0000, 'testTag', '%{public}s', 'launchParam:'+ JSON.stringify(launchParam) ?? ''); + var abilityDelegator: any + abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() + var abilityDelegatorArguments: any + abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'start run testcase!!!'); + Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite) + } + + onDestroy() { + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onDestroy'); + } + + onWindowStageCreate(windowStage: Window.WindowStage) { + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onWindowStageCreate'); + windowStage.loadContent('testability/pages/Index', (err, data) => { + if (err.code) { + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.ERROR); + hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? ''); + return; + } + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', 'Succeeded in loading the content. Data: %{public}s', + JSON.stringify(data) ?? ''); + }); + } + + onWindowStageDestroy() { + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onWindowStageDestroy'); + } + + onForeground() { + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onForeground'); + } + + onBackground() { + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onBackground'); + } +} \ No newline at end of file diff --git a/ability/ability_runtime/registerjserror/ActsRegisterJsErrorTest/entry/src/main/ets/testability/pages/Index.ets b/ability/ability_runtime/registerjserror/ActsRegisterJsErrorTest/entry/src/main/ets/testability/pages/Index.ets new file mode 100644 index 000000000..431674fc5 --- /dev/null +++ b/ability/ability_runtime/registerjserror/ActsRegisterJsErrorTest/entry/src/main/ets/testability/pages/Index.ets @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import hilog from '@ohos.hilog'; + +@Entry +@Component +struct Index { + aboutToAppear() { + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility index aboutToAppear'); + } + @State message: string = 'Hello World' + build() { + Row() { + Column() { + Text(this.message) + .fontSize(50) + .fontWeight(FontWeight.Bold) + Button() { + Text('next page') + .fontSize(20) + .fontWeight(FontWeight.Bold) + }.type(ButtonType.Capsule) + .margin({ + top: 20 + }) + .backgroundColor('#0D9FFB') + .width('35%') + .height('5%') + .onClick(()=>{ + }) + } + .width('100%') + } + .height('100%') + } + } \ No newline at end of file diff --git a/ability/ability_runtime/registerjserror/ActsRegisterJsErrorTest/entry/src/main/module.json b/ability/ability_runtime/registerjserror/ActsRegisterJsErrorTest/entry/src/main/module.json new file mode 100644 index 000000000..bfb8e0432 --- /dev/null +++ b/ability/ability_runtime/registerjserror/ActsRegisterJsErrorTest/entry/src/main/module.json @@ -0,0 +1,42 @@ +{ + "module": { + "name": "entry_test", + "type": "feature", + "description": "$string:module_test_desc", + "mainElement": "TestAbility", + "deviceTypes": [ + "default", + "tablet" + ], + "deliveryWithInstall": true, + "installationFree": false, + "pages": "$profile:test_pages", + "abilities": [ + { + "name": "TestAbility", + "srcEntrance": "./ets/testability/TestAbility.ets", + "description": "$string:TestAbility_desc", + "icon": "$media:icon", + "label": "$string:TestAbility_label", + "visible": true, + "startWindowIcon": "$media:icon", + "startWindowBackground": "$color:start_window_background", + "skills": [ + { + "actions": [ + "action.system.home" + ], + "entities": [ + "entity.system.home" + ] + } + ] + } + ], + "requestPermissions": [ + { + "name": "ohos.permission.START_ABILITIES_FROM_BACKGROUND" + } + ] + } +} diff --git a/ability/ability_runtime/registerjserror/ActsRegisterJsErrorTest/entry/src/main/resources/base/element/color.json b/ability/ability_runtime/registerjserror/ActsRegisterJsErrorTest/entry/src/main/resources/base/element/color.json new file mode 100644 index 000000000..3c712962d --- /dev/null +++ b/ability/ability_runtime/registerjserror/ActsRegisterJsErrorTest/entry/src/main/resources/base/element/color.json @@ -0,0 +1,8 @@ +{ + "color": [ + { + "name": "start_window_background", + "value": "#FFFFFF" + } + ] +} \ No newline at end of file diff --git a/ability/ability_runtime/registerjserror/ActsRegisterJsErrorTest/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/registerjserror/ActsRegisterJsErrorTest/entry/src/main/resources/base/element/string.json new file mode 100644 index 000000000..65d8fa5a7 --- /dev/null +++ b/ability/ability_runtime/registerjserror/ActsRegisterJsErrorTest/entry/src/main/resources/base/element/string.json @@ -0,0 +1,16 @@ +{ + "string": [ + { + "name": "module_test_desc", + "value": "test ability description" + }, + { + "name": "TestAbility_desc", + "value": "the test ability" + }, + { + "name": "TestAbility_label", + "value": "test label" + } + ] +} \ No newline at end of file diff --git a/ability/ability_runtime/registerjserror/ActsRegisterJsErrorTest/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/registerjserror/ActsRegisterJsErrorTest/entry/src/main/resources/base/media/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c GIT binary patch literal 6790 zcmX|G1ymHk)?T_}Vd;>R?p|tHQo6fg38|$UVM!6BLrPFWk?s;$LOP{GmJpBl$qoSA!PUg~PA65-S00{{S`XKG6NkG0RgjEntPrmV+?0|00mu7;+5 zrdpa{2QLqPJ4Y{j7=Mrl{BaxrkdY69+c~(w{Fv-v&aR%aEI&JYSeRTLWm!zbv;?)_ ziZB;fwGbbeL5Q}YLx`J$lp~A09KK8t_z}PZ=4ZzgdeKtgoc+o5EvN9A1K1_<>M?MBqb#!ASf&# zEX?<)!RH(7>1P+j=jqG(58}TVN-$psA6K}atCuI!KTJD&FMmH-78ZejBm)0qc{ESp z|LuG1{QnBUJRg_E=h1#XMWt2%fcoN@l7eAS!Es?Q+;XsRNPhiiE=@AqlLkJzF`O18 zbsbSmKN=aaq8k3NFYZfDWpKmM!coBU0(XnL8R{4=i|wi{!uWYM2je{U{B*K2PVdu&=E zTq*-XsEsJ$u5H4g6DIm2Y!DN`>^v|AqlwuCD;w45K0@eqauiqWf7l&o)+YLHm~|L~ z7$0v5mkobriU!H<@mVJHLlmQqzQ3d6Rh_-|%Yy2li*tHO>_vcnuZ7OR_xkAIuIU&x z-|8Y0wj|6|a6_I(v91y%k_kNw6pnkNdxjqG8!%Vz_d%c_!X+6-;1`GC9_FpjoHev5fEV7RhJ>r=mh-jp$fqbqRJ=obwdgLDVP5+s zy1=_DWG0Y-Jb3t^WXmkr(d9~08k-|#Ly zaNOmT(^9tIb&eb4%CzIT zAm3CUtWSr1t4?h1kk#NBi{U|pJslvME{q|_eS^3En>SOqSxyuN1x;Is@8~m?*>}** znrRFArP!K_52RpX*&JHMR<^lVdm8ypJ}0R(SD(51j;6@ni$6bQ+2XL+R^|NnSp5}(kzvMZ^(@4fD_{QVu$(&K6H|C37TG1Am9Re{<<3gd zh@`>;BqkXMW&p0T6rt|iB$)~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