diff --git a/ability/ability_runtime/actsqueryfunctiontest/actsgetcurrenttopabilitystagebtest/entry/src/main/ets/Ability1/Ability1.ts b/ability/ability_runtime/actsqueryfunctiontest/actsgetcurrenttopabilitystagebtest/entry/src/main/ets/Ability1/Ability1.ts index bb7ab237930ac0e040e63c455d5041b312ddda2b..ea11ae24a115a0c9567172fb9410cccf7ac88512 100644 --- a/ability/ability_runtime/actsqueryfunctiontest/actsgetcurrenttopabilitystagebtest/entry/src/main/ets/Ability1/Ability1.ts +++ b/ability/ability_runtime/actsqueryfunctiontest/actsgetcurrenttopabilitystagebtest/entry/src/main/ets/Ability1/Ability1.ts @@ -36,6 +36,13 @@ export default class MainAbility extends Ability { globalThis.ability3Context = this.context windowStage.setUIContent(this.context, "pages/index1", null) + windowStage.on('windowStageEvent', (data) => { + console.log(`ActsGetCurrentTopAbilityStagebTest onWindwoStage is : ${JSON.stringify(data)}`) + if (data == 2 ) { + console.log(`ActsGetCurrentTopAbilityStagebTest getWindowStageActive is sucess`) + commonEvent.publish("GetCurrentTopAbility", publishCallBackOne); + } + }) } onWindowStageDestroy() { @@ -46,7 +53,6 @@ export default class MainAbility extends Ability { onForeground() { // Ability has brought to foreground console.log("Ability1 onForeground") - commonEvent.publish("GetCurrentTopAbility", publishCallBackOne); } diff --git a/ability/ability_runtime/apitest/entry/src/main/ets/MainAbility/MainAbility.ts b/ability/ability_runtime/apitest/entry/src/main/ets/MainAbility/MainAbility.ts index e7b2eeb8fed9163f149f712f9c74e1aa1903c8bf..8b5bc48b90423cec8e0e26410461ac25a913028e 100644 --- a/ability/ability_runtime/apitest/entry/src/main/ets/MainAbility/MainAbility.ts +++ b/ability/ability_runtime/apitest/entry/src/main/ets/MainAbility/MainAbility.ts @@ -37,6 +37,21 @@ export default class TestAbility extends Ability { onWindowStageCreate(windowStage) { console.log('TestAbility onWindowStageCreate') windowStage.setUIContent(this.context, 'MainAbility/pages/index', null) + console.log('TestAbility onWindowStageCreate') + globalThis.onWindowStageActive = false; + let count = 0; + windowStage.setUIContent(this.context, 'MainAbility/pages/index', null) + windowStage.on('windowStageEvent', (data) => { + console.log(`ActsApiTest onWindwoStage is : ${JSON.stringify(data)}`) + if (data == 2 ) { + console.log(`ActsApiTest onWindwoStage count is : ${count}`) + count++; + if (count == 2) { + console.log(`ActsApiTest onWindwoStage count is : ${count}`) + globalThis.onWindowStageActive = true; + } + } + }) } onWindowStageDestroy() { diff --git a/ability/ability_runtime/apitest/entry/src/main/ets/test/Ability.test.ets b/ability/ability_runtime/apitest/entry/src/main/ets/test/Ability.test.ets index 7784ab65062026af5f68b2ea4dd9c84516d5e0cd..f1a78a73901535a8f71d3704a4986bf29a309193 100644 --- a/ability/ability_runtime/apitest/entry/src/main/ets/test/Ability.test.ets +++ b/ability/ability_runtime/apitest/entry/src/main/ets/test/Ability.test.ets @@ -31,7 +31,18 @@ export default function abilityTest() { describe('ActsChangeAbilityStagetest', function () { beforeAll(async function (done) { console.info('beforeAll called') - await sleep(2000) + let delay = 3000; + let start = new Date().getTime(); + while (true) { + if (globalThis.onWindowStageActive) { + console.log(`ActsApiTest getWindwoStageActive is success`) + break; + } + if (new Date().getTime() - start > delay) { + console.log(`ActsApiTest getWindwoStageActive is failed`) + break; + } + } await globalThis.abilitydelegator.getCurrentTopAbility().then((data) => { mainability = data done() diff --git a/ability/ability_runtime/non_concurrent/BUILD.gn b/ability/ability_runtime/non_concurrent/BUILD.gn index e734985f082014b5bcf6cbde442fd583aa5139ee..baccf60e023a77fc58dc59f1313154c0acd110f9 100644 --- a/ability/ability_runtime/non_concurrent/BUILD.gn +++ b/ability/ability_runtime/non_concurrent/BUILD.gn @@ -19,8 +19,6 @@ group("non_concurrent") { deps = [ "acts_systemappa_test:ActsSystemAppATest", "acts_systemappone_rely_test:ActsSystemAppOneRelyHap", - "actsthirdappatest:ActsThirdAppATest", - "actsthirdapponerelytest:ActsThirdAppOneRelyHap", ] } } diff --git a/ability/ability_runtime/non_concurrent/actsthirdappatest/AppScope/app.json b/ability/ability_runtime/non_concurrent/actsthirdappatest/AppScope/app.json deleted file mode 100755 index abbd9955c832c1806c83c5eb2b17271f5977bcc9..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/non_concurrent/actsthirdappatest/AppScope/app.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "app": { - "bundleName": "com.example.actsabilitypermissionthirdtest", - "vendor": "example", - "versionCode": 1000000, - "versionName": "1.0.0", - "icon": "$media:app_icon", - "label": "$string:app_name", - "distributedNotificationEnabled": true, - "keepAlive" : true, - "singleUser": true, - "minAPIVersion": 9, - "targetAPIVersion": 9, - "car": { - "apiCompatibleVersion": 9, - "singleUser": false - } - } - } \ No newline at end of file diff --git a/ability/ability_runtime/non_concurrent/actsthirdappatest/AppScope/resources/base/element/string.json b/ability/ability_runtime/non_concurrent/actsthirdappatest/AppScope/resources/base/element/string.json deleted file mode 100755 index 0d3507c0d180557b94bc5f0071ba146b4909fe51..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/non_concurrent/actsthirdappatest/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/actsthirdappatest/AppScope/resources/base/media/app_icon.png b/ability/ability_runtime/non_concurrent/actsthirdappatest/AppScope/resources/base/media/app_icon.png deleted file mode 100755 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/non_concurrent/actsthirdappatest/AppScope/resources/base/media/app_icon.png and /dev/null differ diff --git a/ability/ability_runtime/non_concurrent/actsthirdappatest/BUILD.gn b/ability/ability_runtime/non_concurrent/actsthirdappatest/BUILD.gn deleted file mode 100755 index 55e5f826042836c5b7402778a1d33c54078b4779..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/non_concurrent/actsthirdappatest/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("ActsThirdAppATest") { - hap_profile = "entry/src/main/module.json" - js_build_mode = "debug" - deps = [ - ":actsthirdappatest_ets_assets", - ":actsthirdappatest_resources", - ] - ets2abc = true - certificate_profile = "signature/openharmony_sx.p7b" - hap_name = "ActsThirdAppATest" - subsystem_name = "ability" - part_name = "ability_runtime" -} - -ohos_app_scope("actsthirdappatest_app_profile") { - app_profile = "AppScope/app.json" - sources = [ "AppScope/resources" ] -} - -ohos_js_assets("actsthirdappatest_ets_assets") { - source_dir = "entry/src/main/ets" -} - -ohos_resources("actsthirdappatest_resources") { - sources = [ "entry/src/main/resources" ] - deps = [ ":actsthirdappatest_app_profile" ] - hap_profile = "entry/src/main/module.json" -} diff --git a/ability/ability_runtime/non_concurrent/actsthirdappatest/Test.json b/ability/ability_runtime/non_concurrent/actsthirdappatest/Test.json deleted file mode 100755 index e8f26a5ec2c0e6f99be45520754c02eb0a64c109..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/non_concurrent/actsthirdappatest/Test.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "description": "Configuration for aceceshi Tests", - "driver": { - "type": "OHJSUnitTest", - "test-timeout": "300000", - "bundle-name": "com.example.actsabilitypermissionthirdtest", - "module-name": "entry", - "shell-timeout": "300000" - }, - "kits": [ - { - "type": "ShellKit", - "run-command": [ - "power-shell setmode 602" - ] - }, - { - "type": "ShellKit", - "run-command": [ - "remount" - ] - }, - { - "type": "ShellKit", - "run-command": [ - "acm create -n 101 -t normal", - "acm switch -i 101" - ], - "teardown-command": [ - "acm delete -i 101" - ] - }, - { - "type": "ShellKit", - "run-command": [ - "acm switch -i 100" - ] - }, - { - "type": "PushKit", - "push": [ - "ActsThirdAppATest.hap->/data/app/ActsThirdAppATest.hap", - "ActsThirdAppOneRelyHap.hap->/data/app/ActsThirdAppOneRelyHap.hap" - ] - }, - { - "type": "ShellKit", - "run-command": [ - "bm install -u100 -p /data/app/ActsThirdAppATest.hap", - "bm install -u101 -p /data/app/ActsThirdAppOneRelyHap.hap" - ], - "teardown-command": [ - "bm uninstall -n com.example.actsabilitypermissionthirdtest" - ] - }, - { - "type": "ShellKit", - "run-command": [ - "chmod 644 /data/*.hap" - ] - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/non_concurrent/actsthirdappatest/entry/src/main/ets/Application/AbilityStage.ts b/ability/ability_runtime/non_concurrent/actsthirdappatest/entry/src/main/ets/Application/AbilityStage.ts deleted file mode 100755 index 518c7f953cd22b92ad31e3f8772a65d8d95b9de4..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/non_concurrent/actsthirdappatest/entry/src/main/ets/Application/AbilityStage.ts +++ /dev/null @@ -1,21 +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") - } -} \ No newline at end of file diff --git a/ability/ability_runtime/non_concurrent/actsthirdappatest/entry/src/main/ets/MainAbility2/MainAbility2.ts b/ability/ability_runtime/non_concurrent/actsthirdappatest/entry/src/main/ets/MainAbility2/MainAbility2.ts deleted file mode 100755 index 570d85445cb110a1817470d768a3c1a06768bee4..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/non_concurrent/actsthirdappatest/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, "pages/index/index2", null) - globalThis.ability2Context = this.context; - commonEvent.publish("ACTS_ThirdPartyAbilityPermission_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/actsthirdappatest/entry/src/main/ets/TestAbility/TestAbility.ts b/ability/ability_runtime/non_concurrent/actsthirdappatest/entry/src/main/ets/TestAbility/TestAbility.ts deleted file mode 100755 index d466fc86120520db850d208180f76c5303169f65..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/non_concurrent/actsthirdappatest/entry/src/main/ets/TestAbility/TestAbility.ts +++ /dev/null @@ -1,53 +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 AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry' -import { Hypium } from '@ohos/hypium' -import testsuite from '../test/List.test' - -export default class TestAbility extends Ability { - onCreate(want, launchParam) { - console.log('TestAbility onCreate') - globalThis.abilityContext = this.context; - } - - onDestroy() { - console.log('TestAbility onDestroy') - } - - onWindowStageCreate(windowStage) { - console.log('TestAbility onWindowStageCreate') - windowStage.setUIContent(this.context, 'TestAbility/pages/index', null) - var abilityDelegator: any - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - var abilityDelegatorArguments: any - abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() - console.info('start run testcase!!!') - Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite) - } - - 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/actsthirdappatest/entry/src/main/ets/TestAbility/pages/index.ets b/ability/ability_runtime/non_concurrent/actsthirdappatest/entry/src/main/ets/TestAbility/pages/index.ets deleted file mode 100755 index 8696b447105ac93a6df1472539ab155300de7677..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/non_concurrent/actsthirdappatest/entry/src/main/ets/TestAbility/pages/index.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('页面1') - .fontSize(50) - .fontWeight(FontWeight.Bold) - } - .width('100%') - .height('100%') - } -} \ No newline at end of file diff --git a/ability/ability_runtime/non_concurrent/actsthirdappatest/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts b/ability/ability_runtime/non_concurrent/actsthirdappatest/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts deleted file mode 100755 index 303a1dd007800ea611d2cf41ee3bf7a2bad5d59a..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/non_concurrent/actsthirdappatest/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts +++ /dev/null @@ -1,73 +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' - ]) - 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 + '.TestAbility' - let lMonitor = { - abilityName: testAbilityName, - onAbilityCreate: onAbilityCreateCallback, - }; - abilityDelegator.addAbilityMonitor(lMonitor, addAbilityMonitorCallback) - var cmd = 'aa start -d 0 -a TestAbility' + ' -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/non_concurrent/actsthirdappatest/entry/src/main/ets/pages/index/index2.ets b/ability/ability_runtime/non_concurrent/actsthirdappatest/entry/src/main/ets/pages/index/index2.ets deleted file mode 100755 index 4827dd0d3d7a5301526dad69ddf7a2037f087f69..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/non_concurrent/actsthirdappatest/entry/src/main/ets/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 Index2 { - 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/actsthirdappatest/entry/src/main/ets/test/AbilityPermission.test.ets b/ability/ability_runtime/non_concurrent/actsthirdappatest/entry/src/main/ets/test/AbilityPermission.test.ets deleted file mode 100755 index b76f99e9319e13eb863f324b3f4dd1819aa59c18..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/non_concurrent/actsthirdappatest/entry/src/main/ets/test/AbilityPermission.test.ets +++ /dev/null @@ -1,177 +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 { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' -import commonEvent from '@ohos.commonEvent' -var AbilityPermission1 = { - events: ["ACTS_ThirdPartyAbilityPermission_0100_Start_CommonEvent"] -} -var AbilityPermission3 = { - events: ["ACTS_ThirdPartyAbilityPermission_0300_Start_CommonEvent"] -} -var AbilityPermission6 = { - events: ["ACTS_ThirdPartyAbilityPermission_0600_Start_CommonEvent"] -} -const START_ABILITY_TIMEOUT = 3000; - -export default function abilityPermissionTest() { - describe('ActsAbilityPermissionTest', function () { - var userA=100; - var userB=101; - /* - * @tc.number: ACTS_ThirdPartyAbilityPermission_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_ThirdPartyAbilityPermission_0100', 0, async function (done) { - console.log("ACTS_ThirdPartyAbilityPermission_0100====>callback start====>") - var Subscriber; - var flag = true; - - function SubscribeCallBack(err, data) { - console.debug("ACTS_ThirdPartyAbilityPermission_0100====>Subscribe CallBack data:" + JSON.stringify(data)); - expect(data.event == 'ACTS_ThirdPartyAbilityPermission_0100_Start_CommonEvent').assertTrue() - commonEvent.unsubscribe(Subscriber, UnSubscribeCallback); - } - - commonEvent.createSubscriber(AbilityPermission1).then(async (data) => { - console.debug("ACTS_ThirdPartyAbilityPermission_0100====>Create Subscriber====>"); - Subscriber = data; - commonEvent.subscribe(Subscriber, SubscribeCallBack); - console.debug("====>start startAbility_100====>"); - await globalThis.abilityContext.startAbilityWithAccount( - { - bundleName: 'com.example.actsabilitypermissionthirdtest', - abilityName: 'MainAbility2' - }, userA, () => { - console.debug("====>startAbility end_100====>"); - }) - }) - - function UnSubscribeCallback() { - flag = false - console.debug("ACTS_ThirdPartyAbilityPermission_0100====>UnSubscribe CallBack====>"+flag); - done(); - } - setTimeout(()=>{ - if (flag == true) { - expect().assertFail(); - console.debug('in ACTS_ThirdPartyAbilityPermission_0100====>timeout====>'+flag); - commonEvent.unsubscribe(Subscriber, UnSubscribeCallback) - } - console.debug('ACTS_ThirdPartyAbilityPermission_0100====>timeout====>'); - }, START_ABILITY_TIMEOUT); - }) - /* - * @tc.number: ACTS_ThirdPartyAbilityPermission_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_ThirdPartyAbilityPermission_0300', 0, async function (done) { - console.log("ACTS_ThirdPartyAbilityPermission_0300====>callback start====>") - var Subscriber - var flag = 0; - console.debug("====>get AccountManager finish===="); - - function SubscribeCallBack(err, data) { - console.debug("ACTS_ThirdPartyAbilityPermission_0300====>Subscribe CallBack data:" + JSON.stringify(data)); - expect(data.event == 'ACTS_ThirdPartyAbilityPermission_0300_Start_CommonEvent').assertTrue() - commonEvent.unsubscribe(Subscriber, UnSubscribeCallback) - } - - commonEvent.createSubscriber(AbilityPermission3).then(async (data) => { - console.debug("ACTS_ThirdPartyAbilityPermission_0300====>Create Subscriber====>"); - Subscriber = data; - commonEvent.subscribe(Subscriber, SubscribeCallBack); - console.debug("====>start startAbility_0300====>"); - await globalThis.abilityContext.startAbilityWithAccount( - { - bundleName: 'com.example.actsthirdappuonehundredone', - abilityName: 'MainAbility' - }, userB ).then().catch((err) => { - console.debug("ACTS_ThirdPartyAbilityPermission_0300====>" + err) - console.debug("====>startAbility end_0300====>"); - }) - }) - function UnSubscribeCallback() { - if(flag == 0) { - expect().assertFail(); - } - console.debug("ACTS_ThirdPartyAbilityPermission_0300====>UnSubscribe CallBack====>"); - done(); - } - function timeout() { - console.debug('ACTS_ThirdPartyAbilityPermission_0300====>timeout====>'); - if(flag == 0){ - flag = 1; - commonEvent.unsubscribe(Subscriber, UnSubscribeCallback) - } - } - setTimeout(timeout, START_ABILITY_TIMEOUT); - }) - - /* - * @tc.number: ACTS_ThirdPartyAbilityPermission_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_ThirdPartyAbilityPermission_0600', 0, async function (done) { - console.log("ACTS_ThirdPartyAbilityPermission_0600====>callback start====>") - let Subscriber - let connId - function onConnectCallbackC(element, remote) { - console.log('ACTS_ThirdPartyAbilityPermission_0600_Start_CommonEvent onConnectCallback====>'+ - ' element=' + JSON.stringify(element)); - console.log('ACTS_ThirdPartyAbilityPermission_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.example.actsthirdappuonehundredone', - abilityName: 'ServiceAbility', - action: "StartAbilityPromise" - }, userB, { - onConnect: onConnectCallbackC, - onDisconnect: onDisconnectCallbackC, - onFailed: onFailedCallbackC - }) - console.debug("====>number is====>" + JSON.stringify(connId)); - setTimeout(() =>{ - console.debug('in ACTS_ThirdPartyAbilityPermission_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/actsthirdappatest/entry/src/main/ets/test/List.test.ets b/ability/ability_runtime/non_concurrent/actsthirdappatest/entry/src/main/ets/test/List.test.ets deleted file mode 100755 index 967e540db3afe80dc6dbabe06f1488f3ff34725a..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/non_concurrent/actsthirdappatest/entry/src/main/ets/test/List.test.ets +++ /dev/null @@ -1,19 +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 abilityPermissionText from './AbilityPermission.test.ets' - -export default function testsuite() { - abilityPermissionText() -} \ No newline at end of file diff --git a/ability/ability_runtime/non_concurrent/actsthirdappatest/entry/src/main/module.json b/ability/ability_runtime/non_concurrent/actsthirdappatest/entry/src/main/module.json deleted file mode 100755 index cc21d8f40e4da254d8052325cfd87bc4ac42343c..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/non_concurrent/actsthirdappatest/entry/src/main/module.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "module": { - "name": "entry", - "type": "entry", - "srcEntrance": "./ets/Application/AbilityStage.ts", - "description": "$string:entry_desc", - "mainElement": "MainAbility", - "deviceTypes": [ - "default", - "tablet" - ], - "deliveryWithInstall": true, - "installationFree": false, - "pages": "$profile:main_pages", - "uiSyntax": "ets", - "metadata": [ - { - "name": "ArkTSPartialUpdate", - "value": "false" - } - ], - "abilities": [ - { - "name": "TestAbility", - "srcEntrance": "./ets/TestAbility/TestAbility.ts", - "description": "$string:TestAbility_desc", - "icon": "$media:icon", - "label": "$string:TestAbility_label", - "visible": true, - "launchType": "standard", - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "action.system.home" - ] - } - ] - }, - { - "name": "MainAbility2", - "srcEntrance": "./ets/MainAbility2/MainAbility2.ts", - "description": "$string:MainAbility2_desc", - "icon": "$media:icon", - "label": "$string:MainAbility2_label", - "launchType": "standard" - } - ] - } -} diff --git a/ability/ability_runtime/non_concurrent/actsthirdappatest/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/non_concurrent/actsthirdappatest/entry/src/main/resources/base/element/string.json deleted file mode 100755 index 4316d006d2b44028ddfd4c08ca6ad6c2f4104655..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/non_concurrent/actsthirdappatest/entry/src/main/resources/base/element/string.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "string": [ - { - "name": "entry_desc", - "value": "description" - }, - { - "name": "entry_test_desc", - "value": "i am an entry for tv" - }, - { - "name": "TestAbility_desc", - "value": "description" - }, - { - "name": "TestAbility_label", - "value": "label" - }, - { - "name": "MainAbility2_desc", - "value": "description" - }, - { - "name": "MainAbility2_label", - "value": "label" - }, - { - "name": "Service_desc", - "value": "description" - }, - { - "name": "Service_label", - "value": "label" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/non_concurrent/actsthirdappatest/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/non_concurrent/actsthirdappatest/entry/src/main/resources/base/media/icon.png deleted file mode 100755 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/non_concurrent/actsthirdappatest/entry/src/main/resources/base/media/icon.png and /dev/null differ diff --git a/ability/ability_runtime/non_concurrent/actsthirdappatest/entry/src/main/resources/base/profile/main_pages.json b/ability/ability_runtime/non_concurrent/actsthirdappatest/entry/src/main/resources/base/profile/main_pages.json deleted file mode 100755 index 811dc7b52a811fa568820af95eea7762ae3ca5cc..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/non_concurrent/actsthirdappatest/entry/src/main/resources/base/profile/main_pages.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "src": [ - "pages/index/index2", - "TestAbility/pages/index" - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/non_concurrent/actsthirdappatest/signature/openharmony_sx.p7b b/ability/ability_runtime/non_concurrent/actsthirdappatest/signature/openharmony_sx.p7b deleted file mode 100755 index a51eeb213f705970c4e887336a4535d0a8bee74d..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/non_concurrent/actsthirdappatest/signature/openharmony_sx.p7b and /dev/null differ diff --git a/ability/ability_runtime/non_concurrent/actsthirdapponerelytest/AppScope/app.json b/ability/ability_runtime/non_concurrent/actsthirdapponerelytest/AppScope/app.json deleted file mode 100755 index ef625aa89907c897c893344c03a9a64e08033a93..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/non_concurrent/actsthirdapponerelytest/AppScope/app.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "app": { - "bundleName": "com.example.actsthirdappuonehundredone", - "vendor": "example", - "versionCode": 1000000, - "versionName": "1.0.0", - "icon": "$media:app_icon", - "label": "$string:app_name", - "distributedNotificationEnabled": true, - "keepAlive" : true, - "singleUser": true, - "minAPIVersion": 9, - "targetAPIVersion": 9, - "car": { - "apiCompatibleVersion": 9, - "singleUser": false - } - } -} \ No newline at end of file diff --git a/ability/ability_runtime/non_concurrent/actsthirdapponerelytest/AppScope/resources/base/element/string.json b/ability/ability_runtime/non_concurrent/actsthirdapponerelytest/AppScope/resources/base/element/string.json deleted file mode 100755 index be09cccde1bc7369ef47a5cd45d2b06884c88602..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/non_concurrent/actsthirdapponerelytest/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/actsthirdapponerelytest/AppScope/resources/base/media/app_icon.png b/ability/ability_runtime/non_concurrent/actsthirdapponerelytest/AppScope/resources/base/media/app_icon.png deleted file mode 100755 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/non_concurrent/actsthirdapponerelytest/AppScope/resources/base/media/app_icon.png and /dev/null differ diff --git a/ability/ability_runtime/non_concurrent/actsthirdapponerelytest/BUILD.gn b/ability/ability_runtime/non_concurrent/actsthirdapponerelytest/BUILD.gn deleted file mode 100755 index f5225073acef5a5533cde9373fd1b68c94b60c04..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/non_concurrent/actsthirdapponerelytest/BUILD.gn +++ /dev/null @@ -1,42 +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("ActsThirdAppOneRelyHap") { - hap_profile = "entry/src/main/module.json" - js_build_mode = "debug" - hap_name = "ActsThirdAppOneRelyHap" - testonly = true - deps = [ - ":actsthirdapponerelytest_js_assets", - ":actsthirdapponerelytest_resources", - ] - ets2abc = true - certificate_profile = "signature/openharmony_sx.p7b" -} - -ohos_app_scope("actsthirdapponerelytest_app_profile") { - app_profile = "AppScope/app.json" - sources = [ "AppScope/resources" ] -} - -ohos_js_assets("actsthirdapponerelytest_js_assets") { - source_dir = "entry/src/main/ets" -} - -ohos_resources("actsthirdapponerelytest_resources") { - sources = [ "entry/src/main/resources" ] - deps = [ ":actsthirdapponerelytest_app_profile" ] - hap_profile = "entry/src/main/module.json" -} diff --git a/ability/ability_runtime/non_concurrent/actsthirdapponerelytest/entry/src/main/ets/Application/AbilityStage.ts b/ability/ability_runtime/non_concurrent/actsthirdapponerelytest/entry/src/main/ets/Application/AbilityStage.ts deleted file mode 100755 index a41751fb10f96d4103d1120e59c5c5f5aa089e72..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/non_concurrent/actsthirdapponerelytest/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/actsthirdapponerelytest/entry/src/main/ets/MainAbility/MainAbility.ts b/ability/ability_runtime/non_concurrent/actsthirdapponerelytest/entry/src/main/ets/MainAbility/MainAbility.ts deleted file mode 100755 index 1957f1056d8bc727d5613ee8930578fd09877f26..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/non_concurrent/actsthirdapponerelytest/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_ThirdPartyAbilityPermission_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_ThirdPartyAbilityPermission_0300_Start_CommonEvent", PublishCallBackOne3); - windowStage.setUIContent(this.context, "pages/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/actsthirdapponerelytest/entry/src/main/ets/pages/index/index.ets b/ability/ability_runtime/non_concurrent/actsthirdapponerelytest/entry/src/main/ets/pages/index/index.ets deleted file mode 100755 index 845ac99a65c818dddc9fdd0db462499ef02cdb11..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/non_concurrent/actsthirdapponerelytest/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/actsthirdapponerelytest/entry/src/main/ets/pages/second/second.ets b/ability/ability_runtime/non_concurrent/actsthirdapponerelytest/entry/src/main/ets/pages/second/second.ets deleted file mode 100755 index 33d9ae45245db03fd252ef7c1a85c9e284028e0d..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/non_concurrent/actsthirdapponerelytest/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/actsthirdapponerelytest/entry/src/main/module.json b/ability/ability_runtime/non_concurrent/actsthirdapponerelytest/entry/src/main/module.json deleted file mode 100755 index 1c418141ce162490c369aa4f6edb6f2d0f3a75ba..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/non_concurrent/actsthirdapponerelytest/entry/src/main/module.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "module": { - "name": "com.example.actsthirdappuonehundredone", - "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", - "metadata": [ - { - "name": "ArkTSPartialUpdate", - "value": "false" - } - ], - "abilities": [ - { - "name": "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/actsthirdapponerelytest/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/non_concurrent/actsthirdapponerelytest/entry/src/main/resources/base/element/string.json deleted file mode 100755 index d75325f3cf0a50c1dfe4dbc5162c8737276c3dd9..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/non_concurrent/actsthirdapponerelytest/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/actsthirdapponerelytest/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/non_concurrent/actsthirdapponerelytest/entry/src/main/resources/base/media/icon.png deleted file mode 100755 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/non_concurrent/actsthirdapponerelytest/entry/src/main/resources/base/media/icon.png and /dev/null differ diff --git a/ability/ability_runtime/non_concurrent/actsthirdapponerelytest/entry/src/main/resources/base/profile/main_pages.json b/ability/ability_runtime/non_concurrent/actsthirdapponerelytest/entry/src/main/resources/base/profile/main_pages.json deleted file mode 100755 index 6898b31d2085f478ee1ed9d933a5910cbf901d92..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/non_concurrent/actsthirdapponerelytest/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/actsthirdapponerelytest/signature/openharmony_sx.p7b b/ability/ability_runtime/non_concurrent/actsthirdapponerelytest/signature/openharmony_sx.p7b deleted file mode 100755 index a17c87cfc0e75981bfd604b8640a24ba00d0921a..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/non_concurrent/actsthirdapponerelytest/signature/openharmony_sx.p7b and /dev/null differ diff --git a/ability/ability_runtime/want/actsgetwantalltest/src/main/js/test/ActsGetWantAllTest.js b/ability/ability_runtime/want/actsgetwantalltest/src/main/js/test/ActsGetWantAllTest.js index 76a50eb19ab85b5c7ee45ac690ef99889b2d4f72..b1af462a13d618340649e226de2f10e425b4729e 100644 --- a/ability/ability_runtime/want/actsgetwantalltest/src/main/js/test/ActsGetWantAllTest.js +++ b/ability/ability_runtime/want/actsgetwantalltest/src/main/js/test/ActsGetWantAllTest.js @@ -15,7 +15,7 @@ import featureAbility from '@ohos.ability.featureAbility' import wantConstant from '@ohos.ability.wantConstant' -import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' +import { describe, beforeAll, it, expect } from '@ohos/hypium' export default function ActsGetWantTest() { describe('ActsGetWantTest', function () { beforeAll(async (done) => { @@ -23,8 +23,6 @@ describe('ActsGetWantTest', function () { done(); }) - var TIMEOUT_NUMBER = 2500; - // @tc.number: ACTS_GetWant_0100 // @tc.name: getWant : get want in current ability // @tc.desc:Start the ability through startabilityforresult, @@ -68,9 +66,7 @@ describe('ActsGetWantTest', function () { expect(data.want.parameters.mykey6["subKey1"]).assertEqual("STRING"); expect(data.want.parameters.mykey6["subKey2"]).assertEqual(10); expect(data.want.parameters.mykey6["subKey3"]).assertEqual(true); - setTimeout(()=>{ - done(); - }, TIMEOUT_NUMBER); + done(); }).catch((error) => { console.log('ACTS_GetWant_0100 error: ' + JSON.stringify(error)) expect.assertFail() @@ -118,9 +114,7 @@ describe('ActsGetWantTest', function () { expect(data.want.parameters.mykey5[0]).assertEqual("str"); expect(data.want.parameters.mykey5[1]).assertEqual("STR"); expect(data.want.parameters.mykey5[2]).assertEqual("helloopenharmony"); - setTimeout(()=>{ - done(); - }, TIMEOUT_NUMBER); + done(); }) }) @@ -152,9 +146,7 @@ describe('ActsGetWantTest', function () { }, }).then((data) => { checkOnAbilityResult0300(data); - setTimeout(()=>{ - done(); - }, TIMEOUT_NUMBER); + done(); }).catch((error) => { console.log('ACTS_GetWant_0300 error: ' + JSON.stringify(error)) expect.assertFail() @@ -237,9 +229,7 @@ describe('ActsGetWantTest', function () { expect(data.want.parameters.mykey5[1]).assertEqual("STR"); expect(data.want.parameters.mykey5[2]).assertEqual("helloopenharmonyhelloopenharmonyhelloopenharmony"); console.info('====> ACTS_GetWant_0500 before done=====>') - setTimeout(()=>{ - done(); - }, TIMEOUT_NUMBER); + done(); }).catch((error) => { console.log('ACTS_GetWant_0500 error: ' + JSON.stringify(error)) expect.assertFail() @@ -297,9 +287,7 @@ describe('ActsGetWantTest', function () { expect(data.want.parameters.mykey5[1]).assertEqual("STR"); expect(data.want.parameters.mykey5[2]).assertEqual("helloopenharmonyhelloopenharmonyhelloopenharmony"); console.info('====> ACTS_GetWant_0600 before done=====>') - setTimeout(()=>{ - done(); - }, TIMEOUT_NUMBER); + done(); }) }) @@ -352,9 +340,7 @@ describe('ActsGetWantTest', function () { expect(data.want.parameters.mykey5[1]).assertEqual("STR"); expect(data.want.parameters.mykey5[2]).assertEqual("helloopenharmonyhelloopenharmonyhelloopenharmony"); console.info('====> ACTS_GetWant_0700 before done=====>') - setTimeout(()=>{ - done(); - }, TIMEOUT_NUMBER); + done(); }).catch((error) => { console.log('ACTS_GetWant_0700 error: ' + JSON.stringify(error)) expect.assertFail() @@ -391,9 +377,7 @@ describe('ActsGetWantTest', function () { }, (err, data) => { checkOnAbilityResult0800(data); - setTimeout(()=>{ - done(); - }, TIMEOUT_NUMBER); + done(); }) }) @@ -471,9 +455,7 @@ describe('ActsGetWantTest', function () { expect(data.want.parameters.mykey5[1]).assertEqual("STR"); expect(data.want.parameters.mykey5[2]).assertEqual("helloopenharmonyhelloopenharmonyhelloopenharmony"); console.info('====> ACTS_GetWant_0900 before done=====>') - setTimeout(()=>{ - done(); - }, TIMEOUT_NUMBER); + done(); }).catch((error) => { console.log('ACTS_GetWant_0900 error: ' + JSON.stringify(error)) expect.assertFail() @@ -510,9 +492,7 @@ describe('ActsGetWantTest', function () { }, (err, data) => { checkOnAbilityResult1000(data); - setTimeout(()=>{ - done(); - }, TIMEOUT_NUMBER); + done(); }) }) @@ -568,9 +548,7 @@ describe('ActsGetWantTest', function () { }, }).then((data) => { checkOnAbilityResult1100(data); - setTimeout(()=>{ - done(); - }, TIMEOUT_NUMBER); + done(); }).catch((error) => { console.log('ACTS_GetWant_1100 error: ' + JSON.stringify(error)) expect.assertFail() @@ -650,9 +628,7 @@ describe('ActsGetWantTest', function () { expect(data.want.parameters.mykey5[1]).assertEqual("STR"); expect(data.want.parameters.mykey5[2]).assertEqual("helloopenharmonyhelloopenharmonyhelloopenharmony"); console.info('====> ACTS_GetWant_1200 before done=====>') - setTimeout(()=>{ - done(); - }, TIMEOUT_NUMBER); + done(); }) }) @@ -705,9 +681,7 @@ describe('ActsGetWantTest', function () { expect(data.want.parameters.mykey5[1]).assertEqual("STR"); expect(data.want.parameters.mykey5[2]).assertEqual("helloopenharmonyhelloopenharmonyhelloopenharmony"); console.info('====> ACTS_GetWant_1300 before done=====>') - setTimeout(()=>{ - done(); - }, TIMEOUT_NUMBER); + done(); }).catch((error) => { console.log('ACTS_GetWant_1300 error: ' + JSON.stringify(error)) expect.assertFail() @@ -744,9 +718,7 @@ describe('ActsGetWantTest', function () { }, (err, data) => { checkOnAbilityResult1400(data); - setTimeout(()=>{ - done(); - }, TIMEOUT_NUMBER); + done(); }) }) @@ -803,9 +775,7 @@ describe('ActsGetWantTest', function () { }, }).then((data) => { checkOnAbilityResult1500(data); - setTimeout(()=>{ - done(); - }, TIMEOUT_NUMBER); + done(); }).catch((error) => { console.log('ACTS_GetWant_1500 error: ' + JSON.stringify(error)) expect.assertFail() @@ -888,9 +858,7 @@ describe('ActsGetWantTest', function () { expect(data.want.parameters.mykey5[1]).assertEqual("STR"); expect(data.want.parameters.mykey5[2]).assertEqual("helloopenharmonyhelloopenharmonyhelloopenharmony"); console.info('====> ACTS_GetWant_1600 setTimeout before done.=====>') - setTimeout(()=>{ - done(); - }, TIMEOUT_NUMBER); + done(); }) }) @@ -943,9 +911,7 @@ describe('ActsGetWantTest', function () { expect(data.want.parameters.mykey5[1]).assertEqual("STR"); expect(data.want.parameters.mykey5[2]).assertEqual("helloopenharmonyhelloopenharmonyhelloopenharmony"); console.info('====> ACTS_GetWant_1700 setTimeout before done.=====>') - setTimeout(()=>{ - done(); - }, TIMEOUT_NUMBER); + done(); }).catch((error) => { console.log('ACTS_GetWant_1700 error: ' + JSON.stringify(error)) expect.assertFail() @@ -981,9 +947,7 @@ describe('ActsGetWantTest', function () { }, }).then((data) => { checkOnAbilityResult1900(data); - setTimeout(()=>{ - done(); - }, TIMEOUT_NUMBER); + done(); }).catch((error) => { console.log('ACTS_GetWant_1900 error: ' + JSON.stringify(error)) expect.assertFail() @@ -1044,9 +1008,7 @@ describe('ActsGetWantTest', function () { }, }).then((data) => { checkOnAbilityResult2100(data); - setTimeout(()=>{ - done(); - }, TIMEOUT_NUMBER); + done(); }).catch((error) => { console.log('ACTS_GetWant_2100 error: ' + JSON.stringify(error)) expect.assertFail() @@ -1108,9 +1070,7 @@ describe('ActsGetWantTest', function () { }, (err, data) => { checkOnAbilityResult2200(data); - setTimeout(()=>{ - done(); - }, TIMEOUT_NUMBER); + done(); }) }) @@ -1167,9 +1127,7 @@ describe('ActsGetWantTest', function () { }, }).then((data) => { checkOnAbilityResult2300(data); - setTimeout(()=>{ - done(); - }, TIMEOUT_NUMBER); + done(); }).catch((error) => { console.log('ACTS_GetWant_2300 error: ' + JSON.stringify(error)) expect.assertFail() @@ -1231,9 +1189,7 @@ describe('ActsGetWantTest', function () { }, (err, data) => { checkOnAbilityResult2400(data); - setTimeout(()=>{ - done(); - }, TIMEOUT_NUMBER); + done(); }) }) @@ -1292,9 +1248,7 @@ describe('ActsGetWantTest', function () { }, }).then((data) => { checkOnAbilityResult2500(data); - setTimeout(()=>{ - done(); - }, TIMEOUT_NUMBER); + done(); }).catch((error) => { console.log('ACTS_GetWant_2500 error: ' + JSON.stringify(error)) expect.assertFail() @@ -1358,9 +1312,7 @@ describe('ActsGetWantTest', function () { }, (err, data) => { checkOnAbilityResult2600(data); - setTimeout(()=>{ - done(); - }, TIMEOUT_NUMBER); + done(); }) });