diff --git a/ability/ability_runtime/BUILD.gn b/ability/ability_runtime/BUILD.gn index 145241a631b793b6cec3608c0acdbd986377beb5..206c3dc94bbb8a29c8aaeeb5e30a139fdaf280cd 100644 --- a/ability/ability_runtime/BUILD.gn +++ b/ability/ability_runtime/BUILD.gn @@ -23,7 +23,6 @@ group("ability_runtime") { "abilitymontior:AbilityMonitorTest", "abilitymultiinstance:abilitymultiinstance", "actsabilitydelegatorcase:ActsAbilityDelegatorCaseTest", - "actsabilitylifecyclestatenew:ActsAbilityLifecycleStateNewTest", "actsabilitymanageretstest:ActsAbilityManagerEtsTest", "actsabilityusertest:ActsAbilityuserTest", "actscalltest:actscalltest", diff --git a/ability/ability_runtime/actsabilitylifecyclestatenew/BUILD.gn b/ability/ability_runtime/actsabilitylifecyclestatenew/BUILD.gn deleted file mode 100644 index 6d054cbb5d6f2de2fc981ff270c14d088e2f9651..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsabilitylifecyclestatenew/BUILD.gn +++ /dev/null @@ -1,31 +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("//test/xts/tools/build/suite.gni") - -ohos_js_hap_suite("ActsAbilityLifecycleStateNewTest") { - hap_profile = "./entry/src/main/config.json" - deps = [ - ":hjs_demo_js_assets", - ":hjs_demo_resources", - ] - certificate_profile = "./signature/openharmony_sx.p7b" - hap_name = "ActsAbilityLifecycleStateNewTest" -} -ohos_js_assets("hjs_demo_js_assets") { - source_dir = "./entry/src/main/js/default" -} -ohos_resources("hjs_demo_resources") { - sources = [ "./entry/src/main/js/resources" ] - hap_profile = "./entry/src/main/config.json" -} diff --git a/ability/ability_runtime/actsabilitylifecyclestatenew/Test.json b/ability/ability_runtime/actsabilitylifecyclestatenew/Test.json deleted file mode 100644 index 5d50464ea29f7c7969e7d6dda089c2049a1807c1..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsabilitylifecyclestatenew/Test.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "description": "Configuration for hjunit demo Tests", - "driver": { - "type": "JSUnitTest", - "test-timeout": "60000", - "package": "com.amsst.actsabilitylifecyclestatenewtest", - "shell-timeout": "60000" - }, - "kits": [ - { - "test-file-name": [ - "ActsAbilityLifecycleStateNewTest.hap" - ], - "type": "AppInstallKit", - "cleanup-apps": true - } - ] -} diff --git a/ability/ability_runtime/actsabilitylifecyclestatenew/entry/src/main/config.json b/ability/ability_runtime/actsabilitylifecyclestatenew/entry/src/main/config.json deleted file mode 100644 index 6edeb0cfb52c2bc2225d8cc2de304c79b76b1c98..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsabilitylifecyclestatenew/entry/src/main/config.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "app": { - "bundleName": "com.amsst.actsabilitylifecyclestatenewtest", - "vendor": "amsst", - "version": { - "code": 1, - "name": "1.0" - }, - "apiVersion": { - "compatible": 4, - "target": 5, - "releaseType": "Beta1" - } - }, - "deviceConfig": {}, - "module": { - "package": "com.amsst.actsabilitylifecyclestatenewtest", - "name": ".MyApplication", - "deviceType": [ - "phone" - ], - "distro": { - "deliveryWithInstall": true, - "moduleName": "entry", - "moduleType": "entry" - }, - "abilities": [ - { - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "action.system.home" - ] - } - ], - "name": "com.amsst.actsabilitylifecyclestatenewtest.MainAbility", - "icon": "$media:icon", - "description": "$string:mainability_description", - "label": "$string:app_name", - "type": "page", - "launchType": "standard", - "visible": true - } - ], - "reqPermissions": [ - { - "name": "ohos.permission.INSTALL_BUNDLE", - "reason": "need use ohos.permission.INSTALL_BUNDLE" - }, - { - "name":"ohos.permission.GET_BUNDLE_INFO", - "reason":"need use ohos.permission.GET_BUNDLE_INFO" - }, - { - "name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED", - "reason":"need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" - }, - { - "name":"ohos.permission.CHANGE_ABILITY_ENABLED_STATE", - "reason":"need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE" - }, - { - "name":"ohos.permission.REMOVE_CACHE_FILES", - "reason":"need use ohos.permission.REMOVE_CACHE_FILES" - }, - { - "name":"ohos.permission.LISTEN_BUNDLE_CHANGE", - "reason":"need use ohos.permission.LISTEN_BUNDLE_CHANGE" - }, - { - "name":"ohos.permission.MANAGE_LOCAL_ACCOUNTS", - "reason":"need use ohos.permission.MANAGE_LOCAL_ACCOUNTS" - } - ], - "js": [ - { - "pages": [ - "pages/index/index" - ], - "name": "default", - "window": { - "designWidth": 720, - "autoDesignWidth": false - } - } - ] - } -} diff --git a/ability/ability_runtime/actsabilitylifecyclestatenew/entry/src/main/js/default/app.js b/ability/ability_runtime/actsabilitylifecyclestatenew/entry/src/main/js/default/app.js deleted file mode 100644 index 2d316a0a089b332c5c28729be9ff937aa46618c5..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsabilitylifecyclestatenew/entry/src/main/js/default/app.js +++ /dev/null @@ -1,22 +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. - */ -export default { - onCreate() { - console.info('AceApplication onCreate'); - }, - onDestroy() { - console.info('AceApplication onDestroy'); - } -}; diff --git a/ability/ability_runtime/actsabilitylifecyclestatenew/entry/src/main/js/default/i18n/en-US.json b/ability/ability_runtime/actsabilitylifecyclestatenew/entry/src/main/js/default/i18n/en-US.json deleted file mode 100644 index e63c70d978a3a53be988388c87182f81785e170c..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsabilitylifecyclestatenew/entry/src/main/js/default/i18n/en-US.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "Hello", - "world": "World" - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsabilitylifecyclestatenew/entry/src/main/js/default/i18n/zh-CN.json b/ability/ability_runtime/actsabilitylifecyclestatenew/entry/src/main/js/default/i18n/zh-CN.json deleted file mode 100644 index de6ee5748322f44942c1b003319d8e66c837675f..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsabilitylifecyclestatenew/entry/src/main/js/default/i18n/zh-CN.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "您好", - "world": "世界" - } -} \ No newline at end of file diff --git a/ability/ability_runtime/actsabilitylifecyclestatenew/entry/src/main/js/default/pages/index/index.css b/ability/ability_runtime/actsabilitylifecyclestatenew/entry/src/main/js/default/pages/index/index.css deleted file mode 100644 index ac39915c295d19be6b0c23ae374d30b8f13bc066..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsabilitylifecyclestatenew/entry/src/main/js/default/pages/index/index.css +++ /dev/null @@ -1,12 +0,0 @@ -.container { - flex-direction: column; - justify-content: center; - align-items: center; -} - -.title { - font-size: 100px; -} -.titleST { - font-size: 32px; -} diff --git a/ability/ability_runtime/actsabilitylifecyclestatenew/entry/src/main/js/default/pages/index/index.hml b/ability/ability_runtime/actsabilitylifecyclestatenew/entry/src/main/js/default/pages/index/index.hml deleted file mode 100644 index b4f37c133bc59b87d07af1adceccb4468c133864..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsabilitylifecyclestatenew/entry/src/main/js/default/pages/index/index.hml +++ /dev/null @@ -1,8 +0,0 @@ -
- - {{ $t('strings.hello') }} {{ title }} - - - StAbility - -
diff --git a/ability/ability_runtime/actsabilitylifecyclestatenew/entry/src/main/js/default/pages/index/index.js b/ability/ability_runtime/actsabilitylifecyclestatenew/entry/src/main/js/default/pages/index/index.js deleted file mode 100644 index 8ea0eedbb7b0ca5759444d12e5761cb5c3fab9c5..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsabilitylifecyclestatenew/entry/src/main/js/default/pages/index/index.js +++ /dev/null @@ -1,44 +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 file from '@system.file' -import app from '@system.app' -import {Core, ExpectExtend, ReportExtend} from 'deccjsunit/index' - -export default { - data: { - title: "" - }, - onInit() { - this.title = this.$t('strings.world'); - }, - onShow() { - console.info('====onShow finish====<') - const core = Core.getInstance() - const expectExtend = new ExpectExtend({ - 'id': 'extend' - }) - const reportExtend = new ReportExtend(file) - core.addService('expect', expectExtend) - core.addService('report', reportExtend) - core.init() - const configService = core.getDefaultService('config') - configService.setConfig(this) - - require('../../../test/List.test') - core.execute() - }, - onReady() { - }, -} \ No newline at end of file diff --git a/ability/ability_runtime/actsabilitylifecyclestatenew/entry/src/main/js/resources/base/element/string.json b/ability/ability_runtime/actsabilitylifecyclestatenew/entry/src/main/js/resources/base/element/string.json deleted file mode 100644 index a3d6946ded2ae6c810549377cc0c386ad257eb53..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsabilitylifecyclestatenew/entry/src/main/js/resources/base/element/string.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "StSeAbClient" - }, - { - "name": "mainability_description", - "value": "JS_Phone_Empty Feature Ability" - } - ] -} \ No newline at end of file diff --git a/ability/ability_runtime/actsabilitylifecyclestatenew/entry/src/main/js/resources/base/media/icon.png b/ability/ability_runtime/actsabilitylifecyclestatenew/entry/src/main/js/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsabilitylifecyclestatenew/entry/src/main/js/resources/base/media/icon.png and /dev/null differ diff --git a/ability/ability_runtime/actsabilitylifecyclestatenew/entry/src/main/js/test/ActsAbilityLifecycleStateNewTest.test.js b/ability/ability_runtime/actsabilitylifecyclestatenew/entry/src/main/js/test/ActsAbilityLifecycleStateNewTest.test.js deleted file mode 100644 index 9b1befc04f377bae3f0b9abd22b9af029a7f61e3..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsabilitylifecyclestatenew/entry/src/main/js/test/ActsAbilityLifecycleStateNewTest.test.js +++ /dev/null @@ -1,100 +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 AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry' -import featureAbility from '@ohos.ability.featureAbility' - -import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index' - -describe('ActsGetAbilityStateTest', function () { - -let gSetTimeout = 1000 -beforeAll(async (done) => { - console.debug('= ACTS_AbeforeAll 1508 ==== { - setTimeout(function () { - done(); - }, gSetTimeout); -}) -afterEach(async (done) => { - setTimeout(function () { - done(); - }, gSetTimeout); -}) -afterAll((done) => { - console.debug('= ACTS_AafterAll ====start====ACTS_AGetAbilityState_0400') - try { - var ability; - var AbilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator(); - console.debug("====>ACTS_onAbilityForegroundCallback====AbilityDelegator=" + AbilityDelegator); - function onAbilityForegroundCallback(){ - console.debug("====>ACTS_onAbilityForegroundCallback===="); - AbilityDelegator.getCurrentTopAbility((err, data)=>{ - console.debug("====>ACTS_AGetCurrentTopAbility err:" + - JSON.stringify(err) + "data:" + JSON.stringify(data)); - ability = data; - }) - } - function onAbilityDestroyCallback(){ - console.debug("====>ACTS_onAbilityDestroyCallback===="); - var state = AbilityDelegator.getAbilityState(ability); - console.debug("====>ACTS_AGetAppState_0400 data:" + state); - expect(state==AbilityDelegatorRegistry.AbilityLifecycleState.DESTROY - || (state!=AbilityDelegatorRegistry.AbilityLifecycleState.BACKGROUND - || state!=AbilityDelegatorRegistry.AbilityLifecycleState.FOREGROUND - || state!=AbilityDelegatorRegistry.AbilityLifecycleState.CREATE - || state!=AbilityDelegatorRegistry.AbilityLifecycleState.UNINITIALIZED - )).assertTrue(); - console.debug("====>ACTS_AGetAppState_0400 end===="); - done(); - } - console.debug("ACTS_====>addAbilityMonitor finish b===="); - AbilityDelegator.addAbilityMonitor( - {abilityName: 'com.example.getAbilityState.MainAbility3', - onAbilityForeground:onAbilityForegroundCallback, - onAbilityDestroy:onAbilityDestroyCallback}).then(()=>{ - console.debug("ACTS_====>addAbilityMonitor finish e===="); - }) - featureAbility.startAbility( - { - bundleName: 'com.example.getAbilityState', - abilityName: 'com.example.getAbilityState.MainAbility3', - }, (err,data)=>{ - console.debug("ACTS_====>startAbility err:" + JSON.stringify(err)); - }) - } catch (error) { - console.debug("ACTS_AGetAbilityState_0400 catch (error):" + JSON.stringify(error)); - done(); - } -}) - -}) \ No newline at end of file diff --git a/ability/ability_runtime/actsabilitylifecyclestatenew/entry/src/main/js/test/List.test.js b/ability/ability_runtime/actsabilitylifecyclestatenew/entry/src/main/js/test/List.test.js deleted file mode 100644 index 92785bb3758908ec47c0a7266cb5405972861d45..0000000000000000000000000000000000000000 --- a/ability/ability_runtime/actsabilitylifecyclestatenew/entry/src/main/js/test/List.test.js +++ /dev/null @@ -1,15 +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. - */ -require('./ActsAbilityLifecycleStateNewTest.test.js') \ No newline at end of file diff --git a/ability/ability_runtime/actsabilitylifecyclestatenew/signature/openharmony_sx.p7b b/ability/ability_runtime/actsabilitylifecyclestatenew/signature/openharmony_sx.p7b deleted file mode 100644 index 66b4457a8a81fb8d3356cf46d67226c850944858..0000000000000000000000000000000000000000 Binary files a/ability/ability_runtime/actsabilitylifecyclestatenew/signature/openharmony_sx.p7b and /dev/null differ