diff --git a/ability/ability_runtime/context/BUILD.gn b/ability/ability_runtime/context/BUILD.gn index 5c1dee281f9c533274abe3c18d6baaa2b4789119..6c4935d9fc2bfcbbd1def7eefce08624a0fa63d9 100644 --- a/ability/ability_runtime/context/BUILD.gn +++ b/ability/ability_runtime/context/BUILD.gn @@ -9,7 +9,7 @@ # 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. +# limitations under the License. import("//test/xts/tools/build/suite.gni") @@ -18,6 +18,9 @@ group("context") { if (is_standard_system) { deps = [ "actscontexttest:ActsContextTest", + "actscreatemodulecontextassist:ActsCreateModuleContextAssist", + "actscreatemodulecontextassistone:ActsCreateModuleContextAssistOne", + "actscreatemodulecontexttest:ActsCreateModuleContextTest", "scene/defpermission:DefPermission", ] } diff --git a/ability/ability_runtime/context/actscreatemodulecontextassist/AppScope/app.json b/ability/ability_runtime/context/actscreatemodulecontextassist/AppScope/app.json new file mode 100644 index 0000000000000000000000000000000000000000..fdb2973d57fa29e7ac012eaf58685358bddb02fa --- /dev/null +++ b/ability/ability_runtime/context/actscreatemodulecontextassist/AppScope/app.json @@ -0,0 +1,21 @@ +{ + "app": { + "bundleName": "com.example.createmodulecontexttest", + "vendor": "huawei", + "versionCode": 1000000, + "versionName": "1.0.0", + "debug": false, + "icon" : "$media:icon", + "label" : "$string:app_name", + "description" : "$string:description_application", + "distributedNotificationEnabled": true, + "keepAlive" : true, + "singleUser": true, + "minAPIVersion": 9, + "targetAPIVersion": 9, + "car": { + "apiCompatibleVersion": 9, + "singleUser": false + } + } +} diff --git a/ability/ability_runtime/context/actscreatemodulecontextassist/AppScope/resources/base/element/string.json b/ability/ability_runtime/context/actscreatemodulecontextassist/AppScope/resources/base/element/string.json new file mode 100644 index 0000000000000000000000000000000000000000..7a1e60df49d818c68d318759bfab1d84ea794c50 --- /dev/null +++ b/ability/ability_runtime/context/actscreatemodulecontextassist/AppScope/resources/base/element/string.json @@ -0,0 +1,8 @@ +{ + "string": [ + { + "name": "app_name", + "value": "AACommandPrintSyncTest" + } + ] +} diff --git a/ability/ability_runtime/context/actscreatemodulecontextassist/AppScope/resources/base/media/app_icon.png b/ability/ability_runtime/context/actscreatemodulecontextassist/AppScope/resources/base/media/app_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c Binary files /dev/null and b/ability/ability_runtime/context/actscreatemodulecontextassist/AppScope/resources/base/media/app_icon.png differ diff --git a/ability/ability_runtime/context/actscreatemodulecontextassist/BUILD.gn b/ability/ability_runtime/context/actscreatemodulecontextassist/BUILD.gn new file mode 100644 index 0000000000000000000000000000000000000000..f03025b0897b89a17fb64ef7f5570d821e0b4849 --- /dev/null +++ b/ability/ability_runtime/context/actscreatemodulecontextassist/BUILD.gn @@ -0,0 +1,43 @@ +# Copyright (c) 2022 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("//test/xts/tools/build/suite.gni") + +ohos_hap_assist_suite("ActsCreateModuleContextAssist") { + hap_profile = "entry/src/main/module.json" + js_build_mode = "debug" + deps = [ + ":createmodulecontext_js_assets", + ":createmodulecontext_resources", + ] + ets2abc = true + certificate_profile = "signature/openharmony_sx.p7b" + hap_name = "ActsCreateModuleContextAssist" + subsystem_name = "ability" + part_name = "ability_runtime" +} + +ohos_app_scope("createmodulecontext_app_profile") { + app_profile = "AppScope/app.json" + sources = [ "AppScope/resources" ] +} + +ohos_js_assets("createmodulecontext_js_assets") { + source_dir = "entry/src/main/ets" +} + +ohos_resources("createmodulecontext_resources") { + sources = [ "entry/src/main/resources" ] + deps = [ ":createmodulecontext_app_profile" ] + hap_profile = "entry/src/main/module.json" +} diff --git a/ability/ability_runtime/context/actscreatemodulecontextassist/entry/src/main/ets/Application/AbilityStage.ts b/ability/ability_runtime/context/actscreatemodulecontextassist/entry/src/main/ets/Application/AbilityStage.ts new file mode 100644 index 0000000000000000000000000000000000000000..5073f074333769e258d7b97d27aa750302f91fbe --- /dev/null +++ b/ability/ability_runtime/context/actscreatemodulecontextassist/entry/src/main/ets/Application/AbilityStage.ts @@ -0,0 +1,22 @@ +/* +* Copyright (c) 2022 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 AbilityStage from "@ohos.application.AbilityStage" + +export default class MyAbilityStage extends AbilityStage { + onCreate() { + console.log("[Demo] MyAbilityStage onCreate") + } +} \ No newline at end of file diff --git a/ability/ability_runtime/context/actscreatemodulecontextassist/entry/src/main/ets/MainAbility/MainAbility.ts b/ability/ability_runtime/context/actscreatemodulecontextassist/entry/src/main/ets/MainAbility/MainAbility.ts new file mode 100644 index 0000000000000000000000000000000000000000..2f1389c76e39a641715b88eb6163d50366ceb508 --- /dev/null +++ b/ability/ability_runtime/context/actscreatemodulecontextassist/entry/src/main/ets/MainAbility/MainAbility.ts @@ -0,0 +1,45 @@ +/* +* Copyright (c) 2022 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 Ability from '@ohos.application.Ability' + +export default class MainAbility extends Ability { + async onCreate(want, launchParam) { + globalThis.abilityContext = this.context; + console.log('MainAbility onCreate') + } + + onDestroy() { + console.log('MainAbility onDestroy') + } + + onWindowStageCreate(windowStage) { + console.log('MainAbility onWindowStageCreate') + windowStage.setUIContent(this.context, 'pages/index', null) + + } + + onWindowStageDestroy() { + console.log('MainAbility onWindowStageDestroy') + } + + onForeground() { + console.log('MainAbility onForeground') + } + + onBackground() { + console.log('MainAbility onBackground') + } +}; \ No newline at end of file diff --git a/ability/ability_runtime/context/actscreatemodulecontextassist/entry/src/main/ets/pages/index.ets b/ability/ability_runtime/context/actscreatemodulecontextassist/entry/src/main/ets/pages/index.ets new file mode 100644 index 0000000000000000000000000000000000000000..83cc6acd855717c6f038570f27469d87775999ff --- /dev/null +++ b/ability/ability_runtime/context/actscreatemodulecontextassist/entry/src/main/ets/pages/index.ets @@ -0,0 +1,44 @@ +/* +* Copyright (c) 2022 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) + 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/context/actscreatemodulecontextassist/entry/src/main/module.json b/ability/ability_runtime/context/actscreatemodulecontextassist/entry/src/main/module.json new file mode 100644 index 0000000000000000000000000000000000000000..d38b3764e33a56728d3cbefefaf375bab458ad4e --- /dev/null +++ b/ability/ability_runtime/context/actscreatemodulecontextassist/entry/src/main/module.json @@ -0,0 +1,37 @@ +{ + "module": { + "name": "feature", + "type": "feature", + "srcEntrance": "./ets/Application/AbilityStage.ts", + "description": "$string:entry_test_desc", + "mainElement": "MainAbility", + "deviceTypes": [ + "phone", + "tablet" + ], + "deliveryWithInstall": true, + "installationFree": false, + "pages": "$profile:main_pages", + "uiSyntax": "ets", + "abilities": [ + { + "name": "MainAbility", + "srcEntrance": "./ets/MainAbility/MainAbility.ts", + "description": "$string:MainAbility_desc", + "icon": "$media:icon", + "label": "$string:MainAbility_label", + "visible": true, + "skills": [ + { + "entities": [ + "entity.system.home" + ], + "actions": [ + "action.system.home" + ] + } + ] + } + ] + } +} \ No newline at end of file diff --git a/ability/ability_runtime/context/actscreatemodulecontextassist/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/context/actscreatemodulecontextassist/entry/src/main/resources/base/element/string.json new file mode 100644 index 0000000000000000000000000000000000000000..a3b7f1a4253e2cbc68577cdc1f00e891f82ac432 --- /dev/null +++ b/ability/ability_runtime/context/actscreatemodulecontextassist/entry/src/main/resources/base/element/string.json @@ -0,0 +1,24 @@ +{ + "string": [ + { + "name": "entry_test_desc", + "value": "description" + }, + { + "name": "MainAbility_desc", + "value": "description" + }, + { + "name": "MainAbility_label", + "value": "label" + }, + { + "name": "app_name", + "value": "AACommandPrintSyncTest" + }, + { + "name": "description_application", + "value": "demo for test" + } + ] +} \ No newline at end of file diff --git a/ability/ability_runtime/context/actscreatemodulecontextassist/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/context/actscreatemodulecontextassist/entry/src/main/resources/base/media/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c Binary files /dev/null and b/ability/ability_runtime/context/actscreatemodulecontextassist/entry/src/main/resources/base/media/icon.png differ diff --git a/ability/ability_runtime/context/actscreatemodulecontextassist/entry/src/main/resources/base/profile/main_pages.json b/ability/ability_runtime/context/actscreatemodulecontextassist/entry/src/main/resources/base/profile/main_pages.json new file mode 100644 index 0000000000000000000000000000000000000000..e291133c8b3c329611da5af30c299ec10589c7c2 --- /dev/null +++ b/ability/ability_runtime/context/actscreatemodulecontextassist/entry/src/main/resources/base/profile/main_pages.json @@ -0,0 +1,5 @@ +{ + "src": [ + "pages/index" + ] +} \ No newline at end of file diff --git a/ability/ability_runtime/context/actscreatemodulecontextassist/signature/openharmony_sx.p7b b/ability/ability_runtime/context/actscreatemodulecontextassist/signature/openharmony_sx.p7b new file mode 100644 index 0000000000000000000000000000000000000000..66b4457a8a81fb8d3356cf46d67226c850944858 Binary files /dev/null and b/ability/ability_runtime/context/actscreatemodulecontextassist/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/context/actscreatemodulecontextassistone/AppScope/app.json b/ability/ability_runtime/context/actscreatemodulecontextassistone/AppScope/app.json new file mode 100644 index 0000000000000000000000000000000000000000..c89708540211aeb93bdccca563d594b1123c6fe8 --- /dev/null +++ b/ability/ability_runtime/context/actscreatemodulecontextassistone/AppScope/app.json @@ -0,0 +1,21 @@ +{ + "app": { + "bundleName": "com.example.createmodulecontextassistone", + "vendor": "huawei", + "versionCode": 1000000, + "versionName": "1.0.0", + "debug": false, + "icon" : "$media:icon", + "label" : "$string:app_name", + "description" : "$string:description_application", + "distributedNotificationEnabled": true, + "keepAlive" : true, + "singleUser": true, + "minAPIVersion": 9, + "targetAPIVersion": 9, + "car": { + "apiCompatibleVersion": 9, + "singleUser": false + } + } +} diff --git a/ability/ability_runtime/context/actscreatemodulecontextassistone/AppScope/resources/base/element/string.json b/ability/ability_runtime/context/actscreatemodulecontextassistone/AppScope/resources/base/element/string.json new file mode 100644 index 0000000000000000000000000000000000000000..7a1e60df49d818c68d318759bfab1d84ea794c50 --- /dev/null +++ b/ability/ability_runtime/context/actscreatemodulecontextassistone/AppScope/resources/base/element/string.json @@ -0,0 +1,8 @@ +{ + "string": [ + { + "name": "app_name", + "value": "AACommandPrintSyncTest" + } + ] +} diff --git a/ability/ability_runtime/context/actscreatemodulecontextassistone/AppScope/resources/base/media/app_icon.png b/ability/ability_runtime/context/actscreatemodulecontextassistone/AppScope/resources/base/media/app_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c Binary files /dev/null and b/ability/ability_runtime/context/actscreatemodulecontextassistone/AppScope/resources/base/media/app_icon.png differ diff --git a/ability/ability_runtime/context/actscreatemodulecontextassistone/BUILD.gn b/ability/ability_runtime/context/actscreatemodulecontextassistone/BUILD.gn new file mode 100644 index 0000000000000000000000000000000000000000..beeb1fadb1fda63d6106ac1f1fd54587adf0dfea --- /dev/null +++ b/ability/ability_runtime/context/actscreatemodulecontextassistone/BUILD.gn @@ -0,0 +1,43 @@ +# Copyright (c) 2022 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("//test/xts/tools/build/suite.gni") + +ohos_hap_assist_suite("ActsCreateModuleContextAssistOne") { + hap_profile = "entry/src/main/module.json" + js_build_mode = "debug" + deps = [ + ":createmodulecontext_js_assets", + ":createmodulecontext_resources", + ] + ets2abc = true + certificate_profile = "signature/openharmony_sx.p7b" + hap_name = "ActsCreateModuleContextAssistOne" + subsystem_name = "ability" + part_name = "ability_runtime" +} + +ohos_app_scope("createmodulecontext_app_profile") { + app_profile = "AppScope/app.json" + sources = [ "AppScope/resources" ] +} + +ohos_js_assets("createmodulecontext_js_assets") { + source_dir = "entry/src/main/ets" +} + +ohos_resources("createmodulecontext_resources") { + sources = [ "entry/src/main/resources" ] + deps = [ ":createmodulecontext_app_profile" ] + hap_profile = "entry/src/main/module.json" +} diff --git a/ability/ability_runtime/context/actscreatemodulecontextassistone/entry/src/main/ets/Application/AbilityStage.ts b/ability/ability_runtime/context/actscreatemodulecontextassistone/entry/src/main/ets/Application/AbilityStage.ts new file mode 100644 index 0000000000000000000000000000000000000000..5073f074333769e258d7b97d27aa750302f91fbe --- /dev/null +++ b/ability/ability_runtime/context/actscreatemodulecontextassistone/entry/src/main/ets/Application/AbilityStage.ts @@ -0,0 +1,22 @@ +/* +* Copyright (c) 2022 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 AbilityStage from "@ohos.application.AbilityStage" + +export default class MyAbilityStage extends AbilityStage { + onCreate() { + console.log("[Demo] MyAbilityStage onCreate") + } +} \ No newline at end of file diff --git a/ability/ability_runtime/context/actscreatemodulecontextassistone/entry/src/main/ets/MainAbility/MainAbility.ts b/ability/ability_runtime/context/actscreatemodulecontextassistone/entry/src/main/ets/MainAbility/MainAbility.ts new file mode 100644 index 0000000000000000000000000000000000000000..2f1389c76e39a641715b88eb6163d50366ceb508 --- /dev/null +++ b/ability/ability_runtime/context/actscreatemodulecontextassistone/entry/src/main/ets/MainAbility/MainAbility.ts @@ -0,0 +1,45 @@ +/* +* Copyright (c) 2022 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 Ability from '@ohos.application.Ability' + +export default class MainAbility extends Ability { + async onCreate(want, launchParam) { + globalThis.abilityContext = this.context; + console.log('MainAbility onCreate') + } + + onDestroy() { + console.log('MainAbility onDestroy') + } + + onWindowStageCreate(windowStage) { + console.log('MainAbility onWindowStageCreate') + windowStage.setUIContent(this.context, 'pages/index', null) + + } + + onWindowStageDestroy() { + console.log('MainAbility onWindowStageDestroy') + } + + onForeground() { + console.log('MainAbility onForeground') + } + + onBackground() { + console.log('MainAbility onBackground') + } +}; \ No newline at end of file diff --git a/ability/ability_runtime/context/actscreatemodulecontextassistone/entry/src/main/ets/pages/index.ets b/ability/ability_runtime/context/actscreatemodulecontextassistone/entry/src/main/ets/pages/index.ets new file mode 100644 index 0000000000000000000000000000000000000000..83cc6acd855717c6f038570f27469d87775999ff --- /dev/null +++ b/ability/ability_runtime/context/actscreatemodulecontextassistone/entry/src/main/ets/pages/index.ets @@ -0,0 +1,44 @@ +/* +* Copyright (c) 2022 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) + 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/context/actscreatemodulecontextassistone/entry/src/main/module.json b/ability/ability_runtime/context/actscreatemodulecontextassistone/entry/src/main/module.json new file mode 100644 index 0000000000000000000000000000000000000000..19ae5ecd7dec29ea1ebbe906cc1061736e761ecb --- /dev/null +++ b/ability/ability_runtime/context/actscreatemodulecontextassistone/entry/src/main/module.json @@ -0,0 +1,37 @@ +{ + "module": { + "name": "entry_assist", + "type": "entry", + "srcEntrance": "./ets/Application/AbilityStage.ts", + "description": "$string:entry_test_desc", + "mainElement": "MainAbility", + "deviceTypes": [ + "phone", + "tablet" + ], + "deliveryWithInstall": true, + "installationFree": false, + "pages": "$profile:main_pages", + "uiSyntax": "ets", + "abilities": [ + { + "name": "MainAbility", + "srcEntrance": "./ets/MainAbility/MainAbility.ts", + "description": "$string:MainAbility_desc", + "icon": "$media:icon", + "label": "$string:MainAbility_label", + "visible": true, + "skills": [ + { + "entities": [ + "entity.system.home" + ], + "actions": [ + "action.system.home" + ] + } + ] + } + ] + } +} \ No newline at end of file diff --git a/ability/ability_runtime/context/actscreatemodulecontextassistone/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/context/actscreatemodulecontextassistone/entry/src/main/resources/base/element/string.json new file mode 100644 index 0000000000000000000000000000000000000000..a3b7f1a4253e2cbc68577cdc1f00e891f82ac432 --- /dev/null +++ b/ability/ability_runtime/context/actscreatemodulecontextassistone/entry/src/main/resources/base/element/string.json @@ -0,0 +1,24 @@ +{ + "string": [ + { + "name": "entry_test_desc", + "value": "description" + }, + { + "name": "MainAbility_desc", + "value": "description" + }, + { + "name": "MainAbility_label", + "value": "label" + }, + { + "name": "app_name", + "value": "AACommandPrintSyncTest" + }, + { + "name": "description_application", + "value": "demo for test" + } + ] +} \ No newline at end of file diff --git a/ability/ability_runtime/context/actscreatemodulecontextassistone/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/context/actscreatemodulecontextassistone/entry/src/main/resources/base/media/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c Binary files /dev/null and b/ability/ability_runtime/context/actscreatemodulecontextassistone/entry/src/main/resources/base/media/icon.png differ diff --git a/ability/ability_runtime/context/actscreatemodulecontextassistone/entry/src/main/resources/base/profile/main_pages.json b/ability/ability_runtime/context/actscreatemodulecontextassistone/entry/src/main/resources/base/profile/main_pages.json new file mode 100644 index 0000000000000000000000000000000000000000..e291133c8b3c329611da5af30c299ec10589c7c2 --- /dev/null +++ b/ability/ability_runtime/context/actscreatemodulecontextassistone/entry/src/main/resources/base/profile/main_pages.json @@ -0,0 +1,5 @@ +{ + "src": [ + "pages/index" + ] +} \ No newline at end of file diff --git a/ability/ability_runtime/context/actscreatemodulecontextassistone/signature/openharmony_sx.p7b b/ability/ability_runtime/context/actscreatemodulecontextassistone/signature/openharmony_sx.p7b new file mode 100644 index 0000000000000000000000000000000000000000..66b4457a8a81fb8d3356cf46d67226c850944858 Binary files /dev/null and b/ability/ability_runtime/context/actscreatemodulecontextassistone/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/context/actscreatemodulecontexttest/AppScope/app.json b/ability/ability_runtime/context/actscreatemodulecontexttest/AppScope/app.json new file mode 100644 index 0000000000000000000000000000000000000000..fdb2973d57fa29e7ac012eaf58685358bddb02fa --- /dev/null +++ b/ability/ability_runtime/context/actscreatemodulecontexttest/AppScope/app.json @@ -0,0 +1,21 @@ +{ + "app": { + "bundleName": "com.example.createmodulecontexttest", + "vendor": "huawei", + "versionCode": 1000000, + "versionName": "1.0.0", + "debug": false, + "icon" : "$media:icon", + "label" : "$string:app_name", + "description" : "$string:description_application", + "distributedNotificationEnabled": true, + "keepAlive" : true, + "singleUser": true, + "minAPIVersion": 9, + "targetAPIVersion": 9, + "car": { + "apiCompatibleVersion": 9, + "singleUser": false + } + } +} diff --git a/ability/ability_runtime/context/actscreatemodulecontexttest/AppScope/resources/base/element/string.json b/ability/ability_runtime/context/actscreatemodulecontexttest/AppScope/resources/base/element/string.json new file mode 100644 index 0000000000000000000000000000000000000000..7a1e60df49d818c68d318759bfab1d84ea794c50 --- /dev/null +++ b/ability/ability_runtime/context/actscreatemodulecontexttest/AppScope/resources/base/element/string.json @@ -0,0 +1,8 @@ +{ + "string": [ + { + "name": "app_name", + "value": "AACommandPrintSyncTest" + } + ] +} diff --git a/ability/ability_runtime/context/actscreatemodulecontexttest/AppScope/resources/base/media/app_icon.png b/ability/ability_runtime/context/actscreatemodulecontexttest/AppScope/resources/base/media/app_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c Binary files /dev/null and b/ability/ability_runtime/context/actscreatemodulecontexttest/AppScope/resources/base/media/app_icon.png differ diff --git a/ability/ability_runtime/context/actscreatemodulecontexttest/BUILD.gn b/ability/ability_runtime/context/actscreatemodulecontexttest/BUILD.gn new file mode 100644 index 0000000000000000000000000000000000000000..e244c407cf93e4840649bdc95132601ec6a27a28 --- /dev/null +++ b/ability/ability_runtime/context/actscreatemodulecontexttest/BUILD.gn @@ -0,0 +1,43 @@ +# Copyright (c) 2022 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("//test/xts/tools/build/suite.gni") + +ohos_js_hap_suite("ActsCreateModuleContextTest") { + hap_profile = "entry/src/main/module.json" + js_build_mode = "debug" + deps = [ + ":createmodulecontext_js_assets", + ":createmodulecontext_resources", + ] + ets2abc = true + certificate_profile = "signature/openharmony_sx.p7b" + hap_name = "ActsCreateModuleContextTest" + subsystem_name = "ability" + part_name = "ability_runtime" +} + +ohos_app_scope("createmodulecontext_app_profile") { + app_profile = "AppScope/app.json" + sources = [ "AppScope/resources" ] +} + +ohos_js_assets("createmodulecontext_js_assets") { + source_dir = "entry/src/main/ets" +} + +ohos_resources("createmodulecontext_resources") { + sources = [ "entry/src/main/resources" ] + deps = [ ":createmodulecontext_app_profile" ] + hap_profile = "entry/src/main/module.json" +} diff --git a/ability/ability_runtime/context/actscreatemodulecontexttest/Test.json b/ability/ability_runtime/context/actscreatemodulecontexttest/Test.json new file mode 100644 index 0000000000000000000000000000000000000000..d6f74daa1268a2b46bdac93bdff79a7770882d94 --- /dev/null +++ b/ability/ability_runtime/context/actscreatemodulecontexttest/Test.json @@ -0,0 +1,21 @@ +{ + "description": "Configuration for aceceshi Tests", + "driver": { + "type": "OHJSUnitTest", + "test-timeout": "600000", + "bundle-name": "com.example.createmodulecontexttest", + "module-name": "entry_test", + "shell-timeout": "600000" + }, + "kits": [ + { + "test-file-name": [ + "ActsCreateModuleContextTest.hap", + "ActsCreateModuleContextAssist.hap", + "ActsCreateModuleContextAssistOne.hap" + ], + "type": "AppInstallKit", + "cleanup-apps": true + } + ] +} diff --git a/ability/ability_runtime/context/actscreatemodulecontexttest/entry/src/main/ets/Application/AbilityStage.ts b/ability/ability_runtime/context/actscreatemodulecontexttest/entry/src/main/ets/Application/AbilityStage.ts new file mode 100644 index 0000000000000000000000000000000000000000..2b1035b73f5f61109e5ce372b42bebd105bb68d3 --- /dev/null +++ b/ability/ability_runtime/context/actscreatemodulecontexttest/entry/src/main/ets/Application/AbilityStage.ts @@ -0,0 +1,23 @@ +/* +* Copyright (c) 2022 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 AbilityStage from "@ohos.application.AbilityStage" + +export default class MyAbilityStage extends AbilityStage { + onCreate() { + console.log("[Demo] MyAbilityStage onCreate") + globalThis.abilityStageContext = this.context + } +} \ No newline at end of file diff --git a/ability/ability_runtime/context/actscreatemodulecontexttest/entry/src/main/ets/MainAbility/MainAbility.ts b/ability/ability_runtime/context/actscreatemodulecontexttest/entry/src/main/ets/MainAbility/MainAbility.ts new file mode 100644 index 0000000000000000000000000000000000000000..07eefcc2c8f98aa12043bb97840478e7f980b9c8 --- /dev/null +++ b/ability/ability_runtime/context/actscreatemodulecontexttest/entry/src/main/ets/MainAbility/MainAbility.ts @@ -0,0 +1,51 @@ +/* +* Copyright (c) 2022 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 Ability from '@ohos.application.Ability' +import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry' +import { Hypium } from '@ohos/hypium' +import testsuite from '../test/List.test' + +export default class MainAbility extends Ability { + async onCreate(want, launchParam) { + globalThis.abilityContext = this.context; + console.log('MainAbility onCreate') + let abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() + let abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() + Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite) + } + + onDestroy() { + console.log('MainAbility onDestroy') + } + + onWindowStageCreate(windowStage) { + console.log('MainAbility onWindowStageCreate') + windowStage.setUIContent(this.context, 'pages/index', null) + + } + + onWindowStageDestroy() { + console.log('MainAbility onWindowStageDestroy') + } + + onForeground() { + console.log('MainAbility onForeground') + } + + onBackground() { + console.log('MainAbility onBackground') + } +}; \ No newline at end of file diff --git a/ability/ability_runtime/context/actscreatemodulecontexttest/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts b/ability/ability_runtime/context/actscreatemodulecontexttest/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts new file mode 100644 index 0000000000000000000000000000000000000000..1762cda6dd8f03996989e42dfeb364161e91c0b7 --- /dev/null +++ b/ability/ability_runtime/context/actscreatemodulecontexttest/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts @@ -0,0 +1,75 @@ +/* +* Copyright (c) 2022 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 TestRunner from '@ohos.application.testRunner' +import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry' + +var abilityDelegator = undefined +var abilityDelegatorArguments = undefined + +function translateParamsToString(parameters) { + const keySet = new Set([ + '-s class', '-s notClass', '-s suite', '-s it', + '-s level', '-s testType', '-s size', '-s timeout', + '-s dryRun' + ]) + let targetParams = ''; + for (const key in parameters) { + if (keySet.has(key)) { + targetParams = `${targetParams} ${key} ${parameters[key]}` + } + } + return targetParams.trim() +} + +async function onAbilityCreateCallback() { + console.log("onAbilityCreateCallback"); +} + +async function addAbilityMonitorCallback(err: any) { + console.info("addAbilityMonitorCallback : " + JSON.stringify(err)) +} + +export default class OpenHarmonyTestRunner implements TestRunner { + constructor() { + } + + onPrepare() { + console.info("OpenHarmonyTestRunner OnPrepare ") + } + + async onRun() { + console.log('OpenHarmonyTestRunner onRun run') + abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() + abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() + globalThis.abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() + var MainAbilityName = abilityDelegatorArguments.bundleName + '.MainAbility' + let lMonitor = { + abilityName: MainAbilityName, + onAbilityCreate: onAbilityCreateCallback, + }; + abilityDelegator.addAbilityMonitor(lMonitor, addAbilityMonitorCallback) + var cmd = 'aa start -d 0 -a MainAbility' + ' -b ' + abilityDelegatorArguments.bundleName + cmd += ' '+translateParamsToString(abilityDelegatorArguments.parameters) + console.info('cmd : '+cmd) + abilityDelegator.executeShellCommand(cmd, + (err: any, d: any) => { + console.info('executeShellCommand : err : ' + JSON.stringify(err)); + console.info('executeShellCommand : data : ' + d.stdResult); + console.info('executeShellCommand : data : ' + d.exitCode); + }) + console.info('OpenHarmonyTestRunner onRun end') + } +}; \ No newline at end of file diff --git a/ability/ability_runtime/context/actscreatemodulecontexttest/entry/src/main/ets/pages/index.ets b/ability/ability_runtime/context/actscreatemodulecontexttest/entry/src/main/ets/pages/index.ets new file mode 100644 index 0000000000000000000000000000000000000000..83cc6acd855717c6f038570f27469d87775999ff --- /dev/null +++ b/ability/ability_runtime/context/actscreatemodulecontexttest/entry/src/main/ets/pages/index.ets @@ -0,0 +1,44 @@ +/* +* Copyright (c) 2022 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) + 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/context/actscreatemodulecontexttest/entry/src/main/ets/test/CreateModuleContext.test.ets b/ability/ability_runtime/context/actscreatemodulecontexttest/entry/src/main/ets/test/CreateModuleContext.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..c7fdf38b3b58e230bcd111147d48b35590a6b4fa --- /dev/null +++ b/ability/ability_runtime/context/actscreatemodulecontexttest/entry/src/main/ets/test/CreateModuleContext.test.ets @@ -0,0 +1,197 @@ +/* + * Copyright (c) 2022 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, it, expect } from "@ohos/hypium"; + +let createModuleContext: any; +let bundleName: any; + +export default function actsCreateModuleContextTest() { + describe("CreateModuleContext", function () { + /** + * @tc.number: SUB_AA_CreateModuleContext_0100 + * @tc.name: AbilityContext calls createModuleContext, passing in the moduleName of + * the current application hap1 + * @tc.desc: Verify that the context of the application can be obtained + * @tc.level: 1 + */ + it("SUB_AA_CreateModuleContext_0100", 0, async function (done) { + console.info("SUB_AA_AbilityStage_0100 begin"); + + createModuleContext = + globalThis.abilityContext.createModuleContext("entry_test"); + + bundleName = createModuleContext.applicationInfo.name; + + expect(bundleName).assertEqual("com.example.createmodulecontexttest"); + done(); + }); + + /** + * @tc.number: SUB_AA_CreateModuleContext_0200 + * @tc.name: AbilityContext calls createModuleContext, passing in the moduleName of + * the current application hap2 + * @tc.desc: Verify that the context of the application can be obtained + * @tc.level: 3 + */ + it("SUB_AA_CreateModuleContext_0200", 0, async function (done) { + console.log("SUB_AA_AbilityStage_0100 begin"); + + createModuleContext = + globalThis.abilityContext.createModuleContext("feature"); + + bundleName = createModuleContext.applicationInfo.name; + + expect(bundleName).assertEqual("com.example.createmodulecontexttest"); + done(); + }); + + /** + * @tc.number: SUB_AA_CreateModuleContext_0300 + * @tc.name: AbilityContext calls createModuleContext, passing in the moduleName of + * the cross-application hap1 + * @tc.desc: Verify that the context of the application can not be obtained + * @tc.level: 3 + */ + it("SUB_AA_CreateModuleContext_0300", 0, async function (done) { + console.info("SUB_AA_CreateModuleContext_0300 begin"); + + createModuleContext = + globalThis.abilityContext.createModuleContext("entry_assist"); + + expect(createModuleContext).assertUndefined(); + done(); + }); + + /** + * @tc.number: SUB_AA_CreateModuleContext_0400 + * @tc.name: AbilityContext calls createModuleContext, passing in a non-existing moduleName + * @tc.desc: Verify that the context of the application can not be obtained + * @tc.level: 3 + */ + it("SUB_AA_CreateModuleContext_0400", 0, async function (done) { + console.info("SUB_AA_CreateModuleContext_0400 begin"); + + createModuleContext = + globalThis.abilityContext.createModuleContext("abc"); + + expect(createModuleContext).assertUndefined(); + done(); + }); + + /** + * @tc.number: SUB_AA_CreateModuleContext_0500 + * @tc.name: AbilityContext calls createModuleContext, and the incoming moduleName is undefined + * @tc.desc: Verify that the context of the application can not be obtained + * @tc.level: 3 + */ + it("SUB_AA_CreateModuleContext_0500", 0, async function (done) { + console.info("SUB_AA_CreateModuleContext_0500 begin"); + + createModuleContext = + globalThis.abilityContext.createModuleContext(undefined); + + expect(createModuleContext).assertUndefined(); + done(); + }); + + /** + * @tc.number: SUB_AA_CreateModuleContext_0600 + * @tc.name: AbilityStageContext calls createModuleContext, passing in the moduleName of + * the current application hap1 + * @tc.desc: Verify that the context of the application can be obtained + * @tc.level: 3 + */ + it("SUB_AA_CreateModuleContext_0600", 0, async function (done) { + console.info("SUB_AA_CreateModuleContext_0600 begin"); + + createModuleContext = + globalThis.abilityStageContext.createModuleContext("entry_test"); + + bundleName = createModuleContext.applicationInfo.name; + + expect(bundleName).assertEqual("com.example.createmodulecontexttest"); + done(); + }); + + /** + * @tc.number: SUB_AA_CreateModuleContext_0700 + * @tc.name: AbilityStageContext calls createModuleContext, passing in the moduleName of + * the current application hap2 + * @tc.desc: Verify that the context of the application can be obtained + * @tc.level: 3 + */ + it("SUB_AA_CreateModuleContext_0700", 0, async function (done) { + console.info("SUB_AA_CreateModuleContext_0700 begin"); + + createModuleContext = + globalThis.abilityStageContext.createModuleContext("feature"); + + bundleName = createModuleContext.applicationInfo.name; + + expect(bundleName).assertEqual("com.example.createmodulecontexttest"); + done(); + }); + + /** + * @tc.number: SUB_AA_CreateModuleContext_0800 + * @tc.name: AbilityStageContext calls createModuleContext, passing in the moduleName of + * the cross-application hap1 + * @tc.desc: Verify that the context of the application can not be obtained + * @tc.level: 3 + */ + it("SUB_AA_CreateModuleContext_0800", 0, async function (done) { + console.info("SUB_AA_CreateModuleContext_0800 begin"); + + createModuleContext = + globalThis.abilityContext.createModuleContext("entry_assist"); + + expect(createModuleContext).assertUndefined(); + done(); + }); + + /** + * @tc.number: SUB_AA_CreateModuleContext_0900 + * @tc.name: AbilityStageContext calls createModuleContext, passing in a non-existing moduleName + * @tc.desc: Verify that the context of the application can not be obtained + * @tc.level: 3 + */ + it("SUB_AA_CreateModuleContext_0900", 0, async function (done) { + console.info("SUB_AA_CreateModuleContext_0900 begin"); + + createModuleContext = + globalThis.abilityContext.createModuleContext("createmodue"); + + expect(createModuleContext).assertUndefined(); + done(); + }); + + /** + * @tc.number: SUB_AA_CreateModuleContext_1000 + * @tc.name: AbilityStageContext calls createModuleContext, and the incoming moduleName is undefined + * @tc.desc: Verify that the context of the application can not be obtained + * @tc.level: 3 + */ + it("SUB_AA_CreateModuleContext_1000", 0, async function (done) { + console.info("SUB_AA_CreateModuleContext_1000 begin"); + + createModuleContext = + globalThis.abilityStageContext.createModuleContext(undefined); + + expect(createModuleContext).assertUndefined(); + done(); + }); + }); +} diff --git a/ability/ability_runtime/context/actscreatemodulecontexttest/entry/src/main/ets/test/List.test.ets b/ability/ability_runtime/context/actscreatemodulecontexttest/entry/src/main/ets/test/List.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..ffe188ed88a460e4448caa363b820cddaac19c60 --- /dev/null +++ b/ability/ability_runtime/context/actscreatemodulecontexttest/entry/src/main/ets/test/List.test.ets @@ -0,0 +1,20 @@ +/* +* Copyright (c) 2022 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 actsCreateModuleContextTest from './CreateModuleContext.test' + +export default function testsuite() { + actsCreateModuleContextTest() +} \ No newline at end of file diff --git a/ability/ability_runtime/context/actscreatemodulecontexttest/entry/src/main/module.json b/ability/ability_runtime/context/actscreatemodulecontexttest/entry/src/main/module.json new file mode 100644 index 0000000000000000000000000000000000000000..05d80b3ffb7a5dc4712aeb00c20f51800315942f --- /dev/null +++ b/ability/ability_runtime/context/actscreatemodulecontexttest/entry/src/main/module.json @@ -0,0 +1,37 @@ +{ + "module": { + "name": "entry_test", + "type": "entry", + "srcEntrance": "./ets/Application/AbilityStage.ts", + "description": "$string:entry_test_desc", + "mainElement": "MainAbility", + "deviceTypes": [ + "phone", + "tablet" + ], + "deliveryWithInstall": true, + "installationFree": false, + "pages": "$profile:main_pages", + "uiSyntax": "ets", + "abilities": [ + { + "name": "MainAbility", + "srcEntrance": "./ets/MainAbility/MainAbility.ts", + "description": "$string:MainAbility_desc", + "icon": "$media:icon", + "label": "$string:MainAbility_label", + "visible": true, + "skills": [ + { + "entities": [ + "entity.system.home" + ], + "actions": [ + "action.system.home" + ] + } + ] + } + ] + } +} \ No newline at end of file diff --git a/ability/ability_runtime/context/actscreatemodulecontexttest/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/context/actscreatemodulecontexttest/entry/src/main/resources/base/element/string.json new file mode 100644 index 0000000000000000000000000000000000000000..a3b7f1a4253e2cbc68577cdc1f00e891f82ac432 --- /dev/null +++ b/ability/ability_runtime/context/actscreatemodulecontexttest/entry/src/main/resources/base/element/string.json @@ -0,0 +1,24 @@ +{ + "string": [ + { + "name": "entry_test_desc", + "value": "description" + }, + { + "name": "MainAbility_desc", + "value": "description" + }, + { + "name": "MainAbility_label", + "value": "label" + }, + { + "name": "app_name", + "value": "AACommandPrintSyncTest" + }, + { + "name": "description_application", + "value": "demo for test" + } + ] +} \ No newline at end of file diff --git a/ability/ability_runtime/context/actscreatemodulecontexttest/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/context/actscreatemodulecontexttest/entry/src/main/resources/base/media/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c Binary files /dev/null and b/ability/ability_runtime/context/actscreatemodulecontexttest/entry/src/main/resources/base/media/icon.png differ diff --git a/ability/ability_runtime/context/actscreatemodulecontexttest/entry/src/main/resources/base/profile/main_pages.json b/ability/ability_runtime/context/actscreatemodulecontexttest/entry/src/main/resources/base/profile/main_pages.json new file mode 100644 index 0000000000000000000000000000000000000000..e291133c8b3c329611da5af30c299ec10589c7c2 --- /dev/null +++ b/ability/ability_runtime/context/actscreatemodulecontexttest/entry/src/main/resources/base/profile/main_pages.json @@ -0,0 +1,5 @@ +{ + "src": [ + "pages/index" + ] +} \ No newline at end of file diff --git a/ability/ability_runtime/context/actscreatemodulecontexttest/signature/openharmony_sx.p7b b/ability/ability_runtime/context/actscreatemodulecontexttest/signature/openharmony_sx.p7b new file mode 100644 index 0000000000000000000000000000000000000000..66b4457a8a81fb8d3356cf46d67226c850944858 Binary files /dev/null and b/ability/ability_runtime/context/actscreatemodulecontexttest/signature/openharmony_sx.p7b differ