diff --git a/ability/ability_runtime/BUILD.gn b/ability/ability_runtime/BUILD.gn index 6826687756b77b458fcd5ea58dfd8b6610183d4f..ca0642c44f158d7405b337899c523a280e1209bc 100644 --- a/ability/ability_runtime/BUILD.gn +++ b/ability/ability_runtime/BUILD.gn @@ -59,7 +59,6 @@ group("ability_runtime") { "freeinstalltest:freeinstalltest", "getrunningprocessinformation:getrunningprocessinformation", "newwant:newwant", - "non_concurrent:non_concurrent", "registerjserror:registerjserror", "shareextensionability:actsshareextensionability", "stage:stage", diff --git a/ability/ability_runtime/non_concurrent/BUILD.gn b/ability/ability_runtime/non_concurrent/BUILD.gn deleted file mode 100644 index baccf60e023a77fc58dc59f1313154c0acd110f9..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/non_concurrent/BUILD.gn +++ /dev/null @@ -1,24 +0,0 @@ -# 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") - -group("non_concurrent") { - testonly = true - if (is_standard_system) { - deps = [ - "acts_systemappa_test:ActsSystemAppATest", - "acts_systemappone_rely_test:ActsSystemAppOneRelyHap", - ] - } -} diff --git a/ability/ability_runtime/non_concurrent/acts_systemappa_test/AppScope/app.json b/ability/ability_runtime/non_concurrent/acts_systemappa_test/AppScope/app.json deleted file mode 100644 index 696423b19864104bbf18473713e2e9306c3dbaf3..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/non_concurrent/acts_systemappa_test/AppScope/app.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "app": { - "bundleName": "com.acts.abilitypermissiontest", - "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": 8, - "targetAPIVersion": 8, - "car": { - "apiCompatibleVersion": 8, - "singleUser": false - } - } -} \ No newline at end of file diff --git a/ability/ability_runtime/non_concurrent/acts_systemappa_test/AppScope/resources/base/element/string.json b/ability/ability_runtime/non_concurrent/acts_systemappa_test/AppScope/resources/base/element/string.json deleted file mode 100644 index be09cccde1bc7369ef47a5cd45d2b06884c88602..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/non_concurrent/acts_systemappa_test/AppScope/resources/base/element/string.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "ohosProject" - } - ] -} diff --git a/ability/ability_runtime/non_concurrent/acts_systemappa_test/AppScope/resources/base/media/app_icon.png b/ability/ability_runtime/non_concurrent/acts_systemappa_test/AppScope/resources/base/media/app_icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/non_concurrent/acts_systemappa_test/AppScope/resources/base/media/app_icon.png and /dev/null differ diff --git a/ability/ability_runtime/non_concurrent/acts_systemappa_test/BUILD.gn b/ability/ability_runtime/non_concurrent/acts_systemappa_test/BUILD.gn deleted file mode 100644 index 2cb4c55484a719f7c608868a03a4643b395750a6..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/non_concurrent/acts_systemappa_test/BUILD.gn +++ /dev/null @@ -1,43 +0,0 @@ -# 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("ActsSystemAppATest") { - hap_profile = "entry/src/main/module.json" - js_build_mode = "debug" - deps = [ - ":actssystemappatest_js_assets", - ":actssystemappatest_resources", - ] - ets2abc = true - certificate_profile = "signature/openharmony_sx.p7b" - hap_name = "ActsSystemAppATest" - subsystem_name = "ability" - part_name = "ability_runtime" -} - -ohos_app_scope("actssystemappatest_app_profile") { - app_profile = "AppScope/app.json" - sources = [ "AppScope/resources" ] -} - -ohos_js_assets("actssystemappatest_js_assets") { - source_dir = "entry/src/main/ets" -} - -ohos_resources("actssystemappatest_resources") { - sources = [ "entry/src/main/resources" ] - deps = [ ":actssystemappatest_app_profile" ] - hap_profile = "entry/src/main/module.json" -} diff --git a/ability/ability_runtime/non_concurrent/acts_systemappa_test/Test.json b/ability/ability_runtime/non_concurrent/acts_systemappa_test/Test.json deleted file mode 100644 index 6a07c444b1f66a43eed90132ec9d31999a6671e7..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/non_concurrent/acts_systemappa_test/Test.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "description": "Configuration for hjunit demo Tests", - "driver": { - "type": "OHJSUnitTest", - "test-timeout": "300000", - "bundle-name": "com.acts.abilitypermissiontest", - "module-name": "com.acts.abilitypermissiontest", - "shell-timeout": "600000", - "testcase-timeout": 70000 - }, - "kits": [ - { - "test-file-name": [ - "ActsSystemAppATest.hap" - ], - "type": "AppInstallKit", - "cleanup-apps": true - }, - { - "type": "ShellKit", - "run-command": [ - "remount" - ] - }, - { - "type": "PushKit", - "push": [ - "ActsSystemAppATest.hap->/system/app/ActsSystemAppATest.hap" - ] - }, - { - "type": "ShellKit", - "run-command": [ - "acm create -n 101 -t normal", - "acm switch -i 101" - ] - }, - { - "type": "PushKit", - "push": [ - "ActsSystemAppOneRelyHap.hap->/system/app/ActsSystemAppOneRelyHap.hap" - ] - }, - { - "test-file-name": [ - "ActsSystemAppOneRelyHap.hap" - ], - "type": "AppInstallKit", - "cleanup-apps": true - }, - { - "type": "ShellKit", - "run-command": [ - "acm switch -i 100" - ] - }, - { - "type": "ShellKit", - "run-command": [ - "chmod 644 /data/*.hap" - ] - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/ets/Application/AbilityStage.ts b/ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/ets/Application/AbilityStage.ts deleted file mode 100644 index a41751fb10f96d4103d1120e59c5c5f5aa089e72..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/ets/Application/AbilityStage.ts +++ /dev/null @@ -1,23 +0,0 @@ -/* -* 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.app.ability.AbilityStage" - -export default class MyAbilityStage extends AbilityStage { - onCreate() { - console.log("MyAbilityStage onCreate") - globalThis.stageOnCreateRun = 1; - globalThis.stageContext = this.context; - } -} \ No newline at end of file diff --git a/ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/ets/MainAbility/MainAbility.ts b/ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/ets/MainAbility/MainAbility.ts deleted file mode 100644 index ac09453e21fed27b9747ee6f42f2a5e71d33a12a..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/ets/MainAbility/MainAbility.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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.app.ability.UIAbility' - -export default class MainAbility extends Ability { - - onCreate(want, launchParam) { - // Ability is creating, initialize resources for this ability - console.log("MainAbility onCreate") - globalThis.abilityWant = want; - } - - onDestroy() { - // Ability is destroying, release resources for this ability - console.log("MainAbility onDestroy") - } - - onWindowStageCreate(windowStage) { - // Main window is created, set main page for this ability - console.log("MainAbility onWindowStageCreate") - globalThis.abilityContext = this.context - windowStage.setUIContent(this.context, "MainAbility/pages/index/index", null) - } - - onWindowStageDestroy() { - // Main window is destroyed, release UI related resources - console.log("MainAbility onWindowStageDestroy") - } - - onForeground() { - // Ability has brought to foreground - console.log("MainAbility onForeground") - } - - onBackground() { - // Ability has back to background - console.log("MainAbility onBackground") - } -}; diff --git a/ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/ets/MainAbility/pages/index/index.ets b/ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/ets/MainAbility/pages/index/index.ets deleted file mode 100644 index 1ce55a7aae38319f46b7b1b10fdc70e883414cdd..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/ets/MainAbility/pages/index/index.ets +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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 router from '@ohos.router'; -import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry' -import { Hypium } from '@ohos/hypium' -import testsuite from '../../../test/List.test' - -@Entry -@Component -struct Index { - - aboutToAppear() { - console.info("start run testcase!!!!") - var abilityDelegator: any - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - var abilityDelegatorArguments: any - abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() - console.info('start run testcase!!!') - Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite) - } - - build() { - Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { - Text('Hello World') - .fontSize(50) - .fontWeight(FontWeight.Bold) - } - .width('100%') - .height('100%') - } -} \ No newline at end of file diff --git a/ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/ets/MainAbility/pages/index/index2.ets b/ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/ets/MainAbility/pages/index/index2.ets deleted file mode 100644 index f595421dee25894d57787e07ff8b111256599843..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/ets/MainAbility/pages/index/index2.ets +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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 { - build() { - Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { - Text('页面2') - .fontSize(50) - .fontWeight(FontWeight.Bold) - } - .width('100%') - .height('100%') - } -} \ No newline at end of file diff --git a/ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/ets/MainAbility/pages/second/second.ets b/ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/ets/MainAbility/pages/second/second.ets deleted file mode 100644 index 33d9ae45245db03fd252ef7c1a85c9e284028e0d..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/ets/MainAbility/pages/second/second.ets +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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 router from '@system.router'; - -@Entry -@Component -struct Second { - private content: string = "Second Page" - - build() { - Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { - Text(`${this.content}`) - .fontSize(50) - .fontWeight(FontWeight.Bold) - Button() { - Text('back to index') - .fontSize(20) - .fontWeight(FontWeight.Bold) - }.type(ButtonType.Capsule) - .margin({ - top: 20 - }) - .backgroundColor('#0D9FFB') - .onClick(() => { - router.back() - }) - } - .width('100%') - .height('100%') - } -} \ No newline at end of file diff --git a/ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/ets/MainAbility2/MainAbility2.ts b/ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/ets/MainAbility2/MainAbility2.ts deleted file mode 100644 index dc615727eddf9a326d381cab0ed2d65b4aaa13b9..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/ets/MainAbility2/MainAbility2.ts +++ /dev/null @@ -1,57 +0,0 @@ -/* - * 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.app.ability.UIAbility' -import commonEvent from '@ohos.commonEvent' -function PublishCallBackOne1() { - console.debug("====>Publish CallBack ACTS_ThirdPartyAbilityPermission_0100_CommonEvent====>"); - globalThis.ability2Context.terminateSelf(); - console.debug("====>close this context====>") -} - - -export default class MainAbility2 extends Ability { - - onCreate(want, launchParam) { - console.log("MainAbility2 onCreate") - } - - onDestroy() { - // Ability is destroying, release resources for this ability - console.log("MainAbility2 onDestroy") - } - - onWindowStageCreate(windowStage) { - // Main window is created, set main page for this ability - console.log("MainAbility2 onWindowStageCreate") - windowStage.setUIContent(this.context, "MainAbility/pages/index/index2", null) - globalThis.ability2Context = this.context; - commonEvent.publish("ACTS_AbilityPermission_0100_Start_CommonEvent", PublishCallBackOne1); - } - - onWindowStageDestroy() { - // Main window is destroyed, release UI related resources - console.log("MainAbility2 onWindowStageDestroy") - } - - onForeground() { - // Ability has brought to foreground - console.log("MainAbility2 onForeground") - } - - onBackground() { - // Ability has back to background - console.log("MainAbility2 onBackground") - } -}; diff --git a/ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/ets/TestAbility/TestAbility.ts b/ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/ets/TestAbility/TestAbility.ts deleted file mode 100644 index 8028a70f8af44690b95a08bd177bca6b09f24687..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/ets/TestAbility/TestAbility.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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.app.ability.UIAbility' - -export default class TestAbility extends Ability { - onCreate(want, launchParam) { - console.log('TestAbility onCreate') - } - - onDestroy() { - console.log('TestAbility onDestroy') - } - - onWindowStageCreate(windowStage) { - console.log('TestAbility onWindowStageCreate') - windowStage.loadContent("TestAbility/pages/index", (err, data) => { - if (err.code) { - console.error('Failed to load the content. Cause:' + JSON.stringify(err)); - return; - } - console.info('Succeeded in loading the content. Data: ' + JSON.stringify(data)) - }); - - globalThis.abilityContext = this.context; - } - - onWindowStageDestroy() { - console.log('TestAbility onWindowStageDestroy') - } - - onForeground() { - console.log('TestAbility onForeground') - } - - onBackground() { - console.log('TestAbility onBackground') - } -}; \ No newline at end of file diff --git a/ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/ets/TestAbility/pages/index.ets b/ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/ets/TestAbility/pages/index.ets deleted file mode 100644 index b93567f962921124b282f78c8ef123965d1460c9..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/ets/TestAbility/pages/index.ets +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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 router from '@ohos.router'; - -@Entry -@Component -struct Index { - aboutToAppear() { - console.info('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/non_concurrent/acts_systemappa_test/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts b/ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts deleted file mode 100644 index 81ceac5bbd1d2e064765c786ecabd3be168200f2..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts +++ /dev/null @@ -1,78 +0,0 @@ -/* - * 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() - var testAbilityName = abilityDelegatorArguments.bundleName + '.MainAbility' - let lMonitor = { - abilityName: testAbilityName, - onAbilityCreate: onAbilityCreateCallback, - }; - abilityDelegator.addAbilityMonitor(lMonitor, addAbilityMonitorCallback) - var cmd = 'aa start -d 0 -a com.acts.abilitypermissiontest.MainAbility' + ' -b ' + abilityDelegatorArguments.bundleName - cmd += ' '+translateParamsToString(abilityDelegatorArguments.parameters) - var debug = abilityDelegatorArguments.parameters["-D"] - if (debug == 'true') - { - cmd += ' -D' - } - 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/non_concurrent/acts_systemappa_test/entry/src/main/ets/test/AbilityPermission.test.ets b/ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/ets/test/AbilityPermission.test.ets deleted file mode 100644 index b5d185a49395f70817e617a8601d56d786d5b68e..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/ets/test/AbilityPermission.test.ets +++ /dev/null @@ -1,195 +0,0 @@ -/* - * 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. - */ -// @ts-nocheck -import osaccount from '@ohos.account.osAccount' -import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium" -import commonEvent from '@ohos.commonEvent' -var AbilityPermission1 = { - events: ["ACTS_AbilityPermission_0100_Start_CommonEvent"] -} -var AbilityPermission3 = { - events: ["ACTS_AbilityPermission_0300_Start_CommonEvent"] -} -var AbilityPermission6 = { - events: ["ACTS_AbilityPermission_0600_Start_CommonEvent"] -} -const START_ABILITY_TIMEOUT = 3000; -export default function abilityPermissionTest() { - describe('ActsAbilityPermissionTest', function () { - var osAccountManager = osaccount.getAccountManager(); - var userA; - var userB; - beforeAll(async function(done){ - osAccountManager.getOsAccountLocalIdFromProcess().then((data)=>{ - userA = data - userB=userA+1 - console.log("userA=====>"+userA) - done() - }); - - }) - afterAll(async function(done){ - await osAccountManager.removeOsAccount(userB, (err)=>{ - console.debug("====>remove localId: " + userB + " err:" + JSON.stringify(err)); - expect(err.code).assertEqual(0); - done(); - }) - }) - - /* - * @tc.number: ACTS_AbilityPermission_0100 - * @tc.name: In non-concurrent mode, if the target application is not the current user, it is forbidden to start - * @tc.desc: Start an ability that belongs to the current user with the current user - */ - it('ACTS_AbilityPermission_0100', 0, async function (done) { - console.log("ACTS_AbilityPermission_0100====>callback start====>") - var Subscriber; - var flag = true; - - function SubscribeCallBack(err, data) { - console.debug("ACTS_AbilityPermission_0100====>Subscribe CallBack data:====>" + JSON.stringify(data)); - expect(data.event == 'ACTS_AbilityPermission_0100_Start_CommonEvent').assertTrue() - commonEvent.unsubscribe(Subscriber, UnSubscribeCallback); - } - - commonEvent.createSubscriber(AbilityPermission1).then(async (data) => { - console.debug("ACTS_AbilityPermission_0100====>Create Subscriber====>"); - Subscriber = data; - commonEvent.subscribe(Subscriber, SubscribeCallBack); - console.debug("====>start startAbility_100====>"); - await globalThis.abilityContext.startAbilityWithAccount( - { - bundleName: 'com.acts.abilitypermissiontest', - abilityName: 'com.acts.abilitypermissiontest.MainAbility2' - }, userA, () => { - console.debug("====>startAbility end_100====>"); - }) - }) - - function UnSubscribeCallback() { - flag = false - console.debug("ACTS_AbilityPermission_0100====>UnSubscribe CallBack====>"+flag); - done(); - } - setTimeout(()=>{ - if (flag == true) { - expect().assertFail(); - console.debug('in ACTS_AbilityPermission_0100====>timeout====>'+flag); - commonEvent.unsubscribe(Subscriber, UnSubscribeCallback) - } - console.debug('ACTS_AbilityPermission_0100====>timeout====>'); - }, START_ABILITY_TIMEOUT); - }) - - /* - * @tc.number: ACTS_AbilityPermission_0300 - * @tc.name: In non-concurrent mode, if the target application is not the current user, it is forbidden to start - * @tc.desc: Start an ability under user U101 with the current user - */ - it('ACTS_AbilityPermission_0300', 0, async function (done) { - console.log("ACTS_AbilityPermission_0300====>callback start====>") - var Subscriber - var flag = 0; - console.debug("====>get AccountManager finish===="); - - function SubscribeCallBack(err, data) { - console.debug("ACTS_AbilityPermission_0300====>Subscribe CallBack data:====>" + JSON.stringify(data)); - expect(data.event == 'ACTS_AbilityPermission_0300_Start_CommonEvent').assertTrue() - commonEvent.unsubscribe(Subscriber, UnSubscribeCallback) - } - - commonEvent.createSubscriber(AbilityPermission3).then(async (data) => { - console.debug("ACTS_AbilityPermission_0300====>Create Subscriber====>"); - Subscriber = data; - commonEvent.subscribe(Subscriber, SubscribeCallBack); - console.debug("====>start startAbility_0300====>"); - await globalThis.abilityContext.startAbilityWithAccount( - { - bundleName: 'com.acts.systemapponerely', - abilityName: 'com.acts.systemapponerely.MainAbility' - }, userA ).then().catch((err) => { - console.debug("ACTS_AbilityPermission_0300====>" + err) - - console.debug("====>startAbility end_0300====>"); - }) - }) - function UnSubscribeCallback() { - if(flag == 0) { - expect().assertFail(); - } - console.debug("ACTS_AbilityPermission_0300====>UnSubscribe CallBack====>"); - done(); - } - function timeout() { - console.debug('ACTS_AbilityPermission_0300====>timeout====>'); - if(flag == 0){ - flag = 1; - commonEvent.unsubscribe(Subscriber, UnSubscribeCallback) - } - } - setTimeout(timeout, START_ABILITY_TIMEOUT); - }) - - /* - * @tc.number: ACTS_AbilityPermission_0600 - * @tc.name: In non-concurrent mode, if the target application is not the current user, it is forbidden to start - * @tc.desc: Bind a U101 Ability with the current user - */ - it('ACTS_AbilityPermission_0600', 0, async function (done) { - console.log("ACTS_AbilityPermission_0600====>callback start====>") - let Subscriber - let connId - function onConnectCallbackC(element, remote) { - console.log('ACTS_AbilityPermission_0600_Start_CommonEvent onConnectCallback====> element=' + JSON.stringify(element)); - console.log('ACTS_AbilityPermission_0600_Start_CommonEvent onConnectCallback====> remote=' + JSON.stringify(remote)); - expect().assertFail(); - } - function onDisconnectCallbackC(element) { - console.log('onDisconnectCallback====> element=' + JSON.stringify(element)); - } - function onFailedCallbackC(code) { - console.log('onFailedCallback====> code=' + JSON.stringify(code)) - } - function SubscribeCallBackF(err, data) { - console.debug("====>0600 Subscribe CallBack data:====>" + JSON.stringify(data)); - } - function UnSubscribeCallbackF() { - console.debug("====>UnSubscribeCallback====>"); - } - commonEvent.createSubscriber(AbilityPermission6).then(async (data) => { - console.debug("====>Create Subscriber====>"); - Subscriber = data; - commonEvent.subscribe(Subscriber, SubscribeCallBackF); - }) - console.debug("====>0600start connectAbility====>"); - connId = await globalThis.abilityContext.connectAbilityWithAccount( - { - bundleName: 'com.acts.systemapponerely', - abilityName: 'com.acts.systemapponerely.ServiceAbility', - action: "StartAbilityPromise" - }, userA, { - onConnect: onConnectCallbackC, - onDisconnect: onDisconnectCallbackC, - onFailed: onFailedCallbackC - }) - console.debug("====>number is====>" + JSON.stringify(connId)); - setTimeout(() =>{ - console.debug('in ACTS_AbilityPermission_0600_Start_CommonEvent timeout'); - commonEvent.unsubscribe(Subscriber, UnSubscribeCallbackF) - done() - }, START_ABILITY_TIMEOUT); - }) - }) -} \ No newline at end of file diff --git a/ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/ets/test/List.test.ets b/ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/ets/test/List.test.ets deleted file mode 100644 index 1c60435f0efe55d2075f48b6a2c3cc809b99171c..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/ets/test/List.test.ets +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (c) 2021 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 abilityPermissionText from './AbilityPermission.test.ets' - -export default function testsuite() { - abilityPermissionText() -} \ No newline at end of file diff --git a/ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/module.json b/ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/module.json deleted file mode 100644 index c2b8726c3a7bc861bc30d954dbfcf2499704ec61..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/module.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "module": { - "name": "com.acts.abilitypermissiontest", - "type": "entry", - "srcEntrance": "./ets/Application/AbilityStage.ts", - "description": "$string:phone_entry_dsc", - "mainElement": "MainAbility", - "deviceTypes": [ - "default", - "tablet" - ], - "deliveryWithInstall": true, - "installationFree": false, - "uiSyntax": "ets", - "pages": "$profile:main_pages", - "abilities": [ - { - "name": "com.acts.abilitypermissiontest.MainAbility", - "srcEntrance": "./ets/MainAbility/MainAbility.ts", - "description": "$string:phone_entry_main", - "icon": "$media:icon", - "label": "$string:entry_label", - "visible": true, - "orientation": "portrait", - "skills": [ - { - "actions": [ - "action.system.home" - ], - "entities": [ - "entity.system.home" - ] - } - ] - }, - { - "name": "com.acts.abilitypermissiontest.MainAbility2", - "srcEntrance": "./ets/MainAbility2/MainAbility2.ts", - "description": "$string:phone_entry_main", - "icon": "$media:icon", - "label": "$string:entry_label", - "visible": true, - "orientation": "portrait", - "skills": [ - { - "actions": [ - "action.system.home" - ], - "entities": [ - "entity.system.home" - ] - } - ] - } - ], - "requestPermissions": [ - { - "name":"ohos.permission.CLEAN_BACKGROUND_PROCESSES", - "reason":"need use ohos.permission.CLEAN_BACKGROUND_PROCESSES" - }, - { - "name":"ohos.permission.GET_BUNDLE_INFO", - "reason":"need use ohos.permission.GET_BUNDLE_INFO" - } - ] - } -} diff --git a/ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/resources/base/element/string.json deleted file mode 100644 index d75325f3cf0a50c1dfe4dbc5162c8737276c3dd9..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "string": [ - { - "name": "phone_entry_dsc", - "value": "i am an entry for phone" - }, - { - "name": "phone_entry_main", - "value": "the phone entry ability" - }, - { - "name": "entry_label", - "value": "ActsContextTest" - }, - { - "name": "form_description", - "value": "my form" - }, - { - "name": "serviceability_description", - "value": "my whether" - }, - { - "name": "description_application", - "value": "demo for test" - }, - { - "name": "app_name", - "value": "Demo" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/resources/base/media/icon.png and /dev/null differ diff --git a/ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/resources/base/profile/main_pages.json b/ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/resources/base/profile/main_pages.json deleted file mode 100644 index 02221db61d317863114ff0ca4dd2b33586abff12..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/non_concurrent/acts_systemappa_test/entry/src/main/resources/base/profile/main_pages.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "src": [ - "MainAbility/pages/index/index", - "MainAbility/pages/second/second" - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/non_concurrent/acts_systemappa_test/signature/openharmony_sx.p7b b/ability/ability_runtime/non_concurrent/acts_systemappa_test/signature/openharmony_sx.p7b deleted file mode 100755 index 27bfebd1cc7288ea20efaf96c9e51a127a540878..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/non_concurrent/acts_systemappa_test/signature/openharmony_sx.p7b and /dev/null differ diff --git a/ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/AppScope/app.json b/ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/AppScope/app.json deleted file mode 100644 index 22ec98ecb01a4963ad71d567ca114da5b95b328a..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/AppScope/app.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "app": { - "bundleName": "com.acts.pmvendorappa", - "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": 8, - "targetAPIVersion": 8, - "car": { - "apiCompatibleVersion": 8, - "singleUser": false - } - } -} \ No newline at end of file diff --git a/ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/AppScope/resources/base/element/string.json b/ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/AppScope/resources/base/element/string.json deleted file mode 100644 index be09cccde1bc7369ef47a5cd45d2b06884c88602..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/AppScope/resources/base/element/string.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "ohosProject" - } - ] -} diff --git a/ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/AppScope/resources/base/media/app_icon.png b/ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/AppScope/resources/base/media/app_icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/AppScope/resources/base/media/app_icon.png and /dev/null differ diff --git a/ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/BUILD.gn b/ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/BUILD.gn deleted file mode 100644 index 84954ad9ad9c0ca637a7dc41e98922409bfef162..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/BUILD.gn +++ /dev/null @@ -1,45 +0,0 @@ -# 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("ActsSystemAppOneRelyHap") { - hap_profile = "entry/src/main/module.json" - js_build_mode = "debug" - hap_name = "ActsSystemAppOneRelyHap" - - testonly = true - deps = [ - ":acts_systemappone_rely_test_js_assets", - ":acts_systemappone_rely_test_resources", - ] - ets2abc = true - certificate_profile = "signature/openharmony_sx.p7b" - subsystem_name = "ability" - part_name = "ability_runtime" -} - -ohos_app_scope("acts_systemappone_rely_test_app_profile") { - app_profile = "AppScope/app.json" - sources = [ "AppScope/resources" ] -} - -ohos_js_assets("acts_systemappone_rely_test_js_assets") { - source_dir = "entry/src/main/ets" -} - -ohos_resources("acts_systemappone_rely_test_resources") { - sources = [ "entry/src/main/resources" ] - deps = [ ":acts_systemappone_rely_test_app_profile" ] - hap_profile = "entry/src/main/module.json" -} diff --git a/ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/entry/src/main/ets/Application/AbilityStage.ts b/ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/entry/src/main/ets/Application/AbilityStage.ts deleted file mode 100644 index a41751fb10f96d4103d1120e59c5c5f5aa089e72..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/entry/src/main/ets/Application/AbilityStage.ts +++ /dev/null @@ -1,23 +0,0 @@ -/* -* 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.app.ability.AbilityStage" - -export default class MyAbilityStage extends AbilityStage { - onCreate() { - console.log("MyAbilityStage onCreate") - globalThis.stageOnCreateRun = 1; - globalThis.stageContext = this.context; - } -} \ No newline at end of file diff --git a/ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/entry/src/main/ets/MainAbility/MainAbility.ts b/ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/entry/src/main/ets/MainAbility/MainAbility.ts deleted file mode 100644 index ffb2d64d5eab0a4bed80c28e29398c2bd7ff6afc..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/entry/src/main/ets/MainAbility/MainAbility.ts +++ /dev/null @@ -1,59 +0,0 @@ -/* - * 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.app.ability.UIAbility' -import commonEvent from '@ohos.commonEvent' -function PublishCallBackOne3() { - console.debug("====>Publish CallBack ACTS_StartAbility_0300_CommonEvent====>"); - setTimeout(globalThis.abilityContext.terminateSelfWithResult(()=>{ - console.debug("====>terminateSelfWithResult succese====>") - }),1000) -} - -export default class MainAbility extends Ability { - - onCreate(want, launchParam) { - // Ability is creating, initialize resources for this ability - console.log("MainAbility onCreate") - globalThis.abilityWant = want; - } - - onDestroy() { - // Ability is destroying, release resources for this ability - console.log("MainAbility onDestroy") - } - - onWindowStageCreate(windowStage) { - // Main window is created, set main page for this ability - console.log("MainAbility onWindowStageCreate") - globalThis.abilityContext = this.context - commonEvent.publish("ACTS_AbilityPermission_0300_Start_CommonEvent", PublishCallBackOne3); - windowStage.setUIContent(this.context, "pages/index/index", null) - } - - onWindowStageDestroy() { - // Main window is destroyed, release UI related resources - console.log("MainAbility onWindowStageDestroy") - } - - onForeground() { - // Ability has brought to foreground - console.log("MainAbility onForeground") - } - - onBackground() { - // Ability has back to background - console.log("MainAbility onBackground") - } -}; diff --git a/ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/entry/src/main/ets/pages/index/index.ets b/ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/entry/src/main/ets/pages/index/index.ets deleted file mode 100644 index 845ac99a65c818dddc9fdd0db462499ef02cdb11..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/entry/src/main/ets/pages/index/index.ets +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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 router from '@system.router'; - -async function routePage() { - let options = { - uri: 'pages/second' - } - try { - await router.push(options) - } catch (err) { - console.error(`fail callback, code: ${err.code}, msg: ${err.msg}`) - } -} - -@Entry -@Component -struct Index { - build() { - Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { - Text('Hello World') - .fontSize(50) - .fontWeight(FontWeight.Bold) - } - .width('100%') - .height('100%') - } -} \ No newline at end of file diff --git a/ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/entry/src/main/ets/pages/second/second.ets b/ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/entry/src/main/ets/pages/second/second.ets deleted file mode 100644 index 33d9ae45245db03fd252ef7c1a85c9e284028e0d..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/entry/src/main/ets/pages/second/second.ets +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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 router from '@system.router'; - -@Entry -@Component -struct Second { - private content: string = "Second Page" - - build() { - Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { - Text(`${this.content}`) - .fontSize(50) - .fontWeight(FontWeight.Bold) - Button() { - Text('back to index') - .fontSize(20) - .fontWeight(FontWeight.Bold) - }.type(ButtonType.Capsule) - .margin({ - top: 20 - }) - .backgroundColor('#0D9FFB') - .onClick(() => { - router.back() - }) - } - .width('100%') - .height('100%') - } -} \ No newline at end of file diff --git a/ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/entry/src/main/module.json b/ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/entry/src/main/module.json deleted file mode 100644 index dfd61805bf6456e738d12390ca1a45dd95b4ac7b..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/entry/src/main/module.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "module": { - "name": "com.acts.systemapponerely", - "type": "entry", - "srcEntrance": "./ets/Application/AbilityStage.ts", - "description": "$string:phone_entry_dsc", - "mainElement": "MainAbility", - "deviceTypes": [ - "default", - "tablet" - ], - "deliveryWithInstall": true, - "installationFree": false, - "uiSyntax": "ets", - "pages": "$profile:main_pages", - "abilities": [ - { - "name": "com.acts.systemapponerely.MainAbility", - "srcEntrance": "./ets/MainAbility/MainAbility.ts", - "description": "$string:phone_entry_main", - "icon": "$media:icon", - "label": "$string:entry_label", - "visible": true, - "orientation": "portrait", - "skills": [ - { - "actions": [ - "action.system.home" - ], - "entities": [ - "entity.system.home" - ] - } - ] - } - ] - } -} diff --git a/ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/entry/src/main/resources/base/element/string.json deleted file mode 100644 index d75325f3cf0a50c1dfe4dbc5162c8737276c3dd9..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "string": [ - { - "name": "phone_entry_dsc", - "value": "i am an entry for phone" - }, - { - "name": "phone_entry_main", - "value": "the phone entry ability" - }, - { - "name": "entry_label", - "value": "ActsContextTest" - }, - { - "name": "form_description", - "value": "my form" - }, - { - "name": "serviceability_description", - "value": "my whether" - }, - { - "name": "description_application", - "value": "demo for test" - }, - { - "name": "app_name", - "value": "Demo" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/entry/src/main/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/entry/src/main/resources/base/media/icon.png and /dev/null differ diff --git a/ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/entry/src/main/resources/base/profile/main_pages.json b/ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/entry/src/main/resources/base/profile/main_pages.json deleted file mode 100644 index 6898b31d2085f478ee1ed9d933a5910cbf901d92..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/entry/src/main/resources/base/profile/main_pages.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "src": [ - "pages/index/index", - "pages/second/second" - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/signature/openharmony_sx.p7b b/ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/signature/openharmony_sx.p7b deleted file mode 100755 index ed7021225f11a1b8f0d987d9c786930a0a2a7ef0..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/non_concurrent/acts_systemappone_rely_test/signature/openharmony_sx.p7b and /dev/null differ