diff --git a/aafwk/BUILD.gn b/aafwk/BUILD.gn
deleted file mode 100644
index 6caaa7fc8bd77ff6bbf72afe8fc0d81ceb626c02..0000000000000000000000000000000000000000
--- a/aafwk/BUILD.gn
+++ /dev/null
@@ -1,21 +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("//build/ohos_var.gni")
-
-group("aafwk") {
- testonly = true
- if (is_standard_system) {
- deps = [ "aafwk_standard:aafwk_standard" ]
- }
-}
diff --git a/aafwk/aafwk_standard/BUILD.gn b/aafwk/aafwk_standard/BUILD.gn
deleted file mode 100755
index 18fba1ae39ca34cdd42c1a02e4cb9cdde2165a54..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/BUILD.gn
+++ /dev/null
@@ -1,46 +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("//build/ohos_var.gni")
-
-group("aafwk_standard") {
- testonly = true
- if (is_standard_system) {
- deps = [
- "abilitymanager:actsabilitymanagertest",
- "abilitymultiinstance:abilitymultiinstance",
- "actsabilitydelegatorcase:ActsAbilityDelegatorCaseTest",
- "actsabilitylifecyclestatenew:ActsAbilityLifecycleStateNewTest",
- "actsabilitymanageretstest:ActsAbilityManagerEtsTest",
- "actscalltest:actscalltest",
- "actsstartcomponenttest:actsstartcomponenttest",
- "actsstserviceabilityclientcase:ActsStServiceAbilityClientCaseTest",
- "actsusers:actsusers",
- "amscontextualinforquery:amscontextualinforquery",
- "amsdatauriutils:ActsAmsDataUriUtilsTest",
- "amsdisplayIdtest:amsdisplayIdtest",
- "amsgetabilityprocessinfo:amsgetabilityprocessinfo",
- "context:context",
- "fa:fa",
- "featureability:featureability",
- "formmanager:formmanager",
- "killprocesswithaccountstage:killprocesswithaccountstage",
- "newwant:newwant",
- "non_concurrent:non_concurrent",
- "processmultiinstance:processmultiinstance",
- "stage:stage",
- "want:want",
- "zidltest:zidltest",
- ]
- }
-}
diff --git a/aafwk/aafwk_standard/abilitymanager/actsamscallbackfifthscene/entry/src/main/config.json b/aafwk/aafwk_standard/abilitymanager/actsamscallbackfifthscene/entry/src/main/config.json
deleted file mode 100644
index 587d73eda9baa9ad187ef6aba15e10f2c8fadad2..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/actsamscallbackfifthscene/entry/src/main/config.json
+++ /dev/null
@@ -1,83 +0,0 @@
-{
- "app": {
- "bundleName": "com.example.actsamscallbackfifthscene",
- "vendor": "example",
- "version": {
- "code": 1,
- "name": "1.0"
- },
- "apiVersion": {
- "compatible": 4,
- "target": 5,
- "releaseType": "Beta1"
- }
- },
- "deviceConfig": {},
- "module": {
- "package": "com.example.actsamscallbackfifthscene",
- "name": ".MyApplication",
- "deviceType": [
- "phone"
- ],
- "distro": {
- "deliveryWithInstall": true,
- "moduleName": "entry",
- "moduleType": "entry",
- "installationFree": true
- },
- "abilities": [
- {
- "visible": true,
- "name": "com.example.actsamscallbackfifthscene.MainAbility",
- "icon": "$media:icon",
- "description": "$string:mainability_description",
- "label": "$string:app_name",
- "type": "page",
- "isVisible": "true",
- "launchType": "singleton"
- }
- ],
- "reqPermissions": [
- {
- "name": "ohos.permission.INSTALL_BUNDLE",
- "reason": "need use ohos.permission.INSTALL_BUNDLE"
- },
- {
- "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.CLEAN_BACKGROUND_PROCESSES",
- "reason":"need use ohos.permission.CLEAN_BACKGROUND_PROCESSES"
- },
- {
- "name":"ohos.permission.MANAGE_MISSIONS",
- "reason":"need use ohos.permission.MANAGE_MISSIONS"
- }
- ],
- "js": [
- {
- "pages": [
- "pages/index/index"
- ],
- "name": "default",
- "window": {
- "designWidth": 720,
- "autoDesignWidth": false
- }
- }
- ]
- }
-}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/abilitymanager/actsamscallbackfifthscene/entry/src/main/js/default/app.js b/aafwk/aafwk_standard/abilitymanager/actsamscallbackfifthscene/entry/src/main/js/default/app.js
deleted file mode 100644
index 2a68c1992145a976957d7dcdd69a7e9c2e8e9877..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/actsamscallbackfifthscene/entry/src/main/js/default/app.js
+++ /dev/null
@@ -1,22 +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.
- */
-export default {
- onCreate() {
- console.info('AceApplication onCreate');
- },
- onDestroy() {
- console.info('AceApplication onDestroy');
- }
-};
diff --git a/aafwk/aafwk_standard/abilitymanager/actsamscallbackfifthscene/entry/src/main/js/default/pages/index/index.css b/aafwk/aafwk_standard/abilitymanager/actsamscallbackfifthscene/entry/src/main/js/default/pages/index/index.css
deleted file mode 100755
index caf729946975b79e55ab9e56e55bf860337b3f50..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/actsamscallbackfifthscene/entry/src/main/js/default/pages/index/index.css
+++ /dev/null
@@ -1,38 +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.
- */
-
-.container {
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- left: 0px;
- top: 0px;
- width: 100%;
- height: 100%;
-}
-
-.title {
- font-size: 60px;
- text-align: center;
- width: 100%;
- height: 40%;
- margin: 10px;
-}
-.btn {
- width: 50%;
- height: 100px;
- font-size: 40px;
-}
diff --git a/aafwk/aafwk_standard/abilitymanager/actsamscallbackfifthscene/entry/src/main/js/default/pages/index/index.hml b/aafwk/aafwk_standard/abilitymanager/actsamscallbackfifthscene/entry/src/main/js/default/pages/index/index.hml
deleted file mode 100755
index 61ea59d936e5a2971f1ea3d179c44a7f3f596c54..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/actsamscallbackfifthscene/entry/src/main/js/default/pages/index/index.hml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- {{ $t('strings.hello') }} {{title}}
-
-
-
diff --git a/aafwk/aafwk_standard/abilitymanager/actsamscallbackfifthscene/entry/src/main/js/resources/base/element/string.json b/aafwk/aafwk_standard/abilitymanager/actsamscallbackfifthscene/entry/src/main/js/resources/base/element/string.json
deleted file mode 100755
index f94ce7e64e455e1ebf22a4b2792c5b52c791d037..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/actsamscallbackfifthscene/entry/src/main/js/resources/base/element/string.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "string": [
- {
- "name": "app_name",
- "value": "JsHelloWorld"
- },
- {
- "name": "mainability_description",
- "value": "hap sample empty page"
- }
- ]
-}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/abilitymanager/actsamscallbackfifthscene/entry/src/main/js/test/MangerAbilityJsunit.test.js b/aafwk/aafwk_standard/abilitymanager/actsamscallbackfifthscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
deleted file mode 100644
index 7c1e767990428b700b6d26713631145707981a9c..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/actsamscallbackfifthscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
+++ /dev/null
@@ -1,144 +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 featureAbility from '@ohos.ability.featureability'
-import appManager from "@ohos.application.appManager"
-import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index'
-
-let abilityNameList = [
- "com.ohos.launcher.MainAbility",
- "com.ohos.callui.ServiceAbility",
- "com.example.SimulateFeatureAbilityFir",
- "com.example.VerifyIoThirdAbility",
- "com.example.SimulateFeatureAbilitySed",
- "com.example.actsamscallbackfifthscene.MainAbility"
-]
-
-let bundleNameList = [
- "com.ohos.launcher",
- "com.ohos.systemui",
- "com.ohos.callui",
- "com.ohos.contacts",
- "com.ohos.mms",
- "com.ohos.telephonydataability",
- "com.ohos.contactsdataability",
- "com.ix.simulate.feature",
- "com.ix.verify.io",
- "com.example.actsamscallbackfifthscene"
-]
-
-describe('ActsAmsCallBackFifthScene', function () {
- console.info('----ActsAmsCallBackFifthScene----');
- beforeAll(async function (done) {
- await featureAbility.startAbility(
- {
- want:
- {
- deviceId: "",
- bundleName: "com.ix.simulate.feature",
- abilityName: "com.example.SimulateFeatureAbilityFir",
- action: "action1",
- parameters:
- {},
- },
- }, (error, data) => {
- console.info('ActsAmsCallBackFifthScene SimulateFeatureAbilityFir start, error.code \
- ' + error.code + ', data length [' + data.length + ']');
- }
- );
-
- await featureAbility.startAbility(
- {
- want:
- {
- deviceId: "",
- bundleName: "com.ix.verify.io",
- abilityName: "com.example.VerifyIoThirdAbility",
- action: "action1",
- parameters:
- {},
- },
- }, (error, data) => {
- console.info('ActsAmsCallBackFifthScene VerifyIoThirdAbility start, error.code \
- ' + error.code + ', data length [' + data.length + ']');
- }
- );
-
- await featureAbility.startAbility(
- {
- want:
- {
- deviceId: "",
- bundleName: "com.ix.simulate.feature",
- abilityName: "com.example.SimulateFeatureAbilitySed",
- action: "action1",
- parameters:
- {},
- },
- }, (error, data) => {
- console.info('ActsAmsCallBackFifthScene SimulateFeatureAbilitySed start, error.code \
- ' + error.code + ', data length [' + data.length + ']');
- }
- );
- setTimeout(done, 5000);
- });
-
- function timeout(done) {
- expect().assertFail();
- console.debug('Acts_Ams_test=========timeout========');
- done();
- }
-
- function sleep(delay) {
- let start = new Date().getTime();
- while (true) {
- if (new Date().getTime() - start > delay) {
- break;
- }
- }
- }
-
- /*
- * @tc.number : Acts_Ams_test_6600
- * @tc.name : getProcessRunningInfos : Get All Running Processes Info
- * @tc.desc : Get All Running Processes Info(by CallBack)
- */
- it('Acts_Ams_test_6600', 0, async function (done) {
- console.info("sleep begin");
- sleep(5000);
- console.info("sleep end");
- appManager.getProcessRunningInfos(
- (error, info) => {
- console.info('Acts_Ams_test_6600 getProcessRunningInfos error.code \
- ' + error.code + ', data length [' + info.length + ']');
- expect(Array.isArray(info)).assertEqual(true);
- expect(info.length).assertLarger(0);
- for (let i = 0; i < info.length; i++) {
- console.info('Acts_Ams_test_6600 getProcessRunningInfo[' + i + "]: " + JSON.stringify(info[i]));
- expect(typeof (info[i].pid)).assertEqual("number");
- expect(info[i].pid).assertLarger(0);
-
- expect(typeof (info[i].processName)).assertEqual("string");
- expect(info[i].processName.length).assertLarger(0);
- expect(Array.isArray(info[i].bundleNames)).assertEqual(true);
- expect(info[i].bundleNames.length).assertEqual(0);
-
- expect(typeof (info[i].uid)).assertEqual("number");
- expect(info[i].uid).assertLarger(0);
- }
- done();
- }
- );
- })
-})
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/abilitymanager/actsamscallbackfirstscene/entry/src/main/config.json b/aafwk/aafwk_standard/abilitymanager/actsamscallbackfirstscene/entry/src/main/config.json
deleted file mode 100644
index 93d37f5c92c0122d2cb73a29a6db2ac3c596eb54..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/actsamscallbackfirstscene/entry/src/main/config.json
+++ /dev/null
@@ -1,87 +0,0 @@
-{
- "app": {
- "bundleName": "com.example.actsamscallbackfirstscene",
- "vendor": "example",
- "version": {
- "code": 1,
- "name": "1.0"
- },
- "apiVersion": {
- "compatible": 4,
- "target": 5,
- "releaseType": "Beta1"
- }
- },
- "deviceConfig": {},
- "module": {
- "package": "com.example.actsamscallbackfirstscene",
- "name": ".MyApplication",
- "deviceType": [
- "phone"
- ],
- "distro": {
- "deliveryWithInstall": true,
- "moduleName": "entry",
- "moduleType": "entry",
- "installationFree": true
- },
- "abilities": [
- {
- "visible": true,
- "name": "com.example.actsamscallbackfirstscene.MainAbility",
- "icon": "$media:icon",
- "description": "$string:mainability_description",
- "label": "$string:app_name",
- "type": "page",
- "isVisible": "true",
- "launchType": "singleton"
- }
- ],
- "reqPermissions": [
- {
- "name": "ohos.permission.INSTALL_BUNDLE",
- "reason": "need use ohos.permission.INSTALL_BUNDLE"
- },
- {
- "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.CLEAN_BACKGROUND_PROCESSES",
- "reason":"need use ohos.permission.CLEAN_BACKGROUND_PROCESSES"
- },
- {
- "name":"ohos.permission.MANAGE_MISSIONS",
- "reason":"need use ohos.permission.MANAGE_MISSIONS"
- },
- {
- "name":"ohos.permission.GET_RUNNING_INFO",
- "reason":"need use ohos.permission.GET_RUNNING_INFO"
- }
- ],
- "js": [
- {
- "pages": [
- "pages/index/index"
- ],
- "name": "default",
- "window": {
- "designWidth": 720,
- "autoDesignWidth": false
- }
- }
- ]
- }
-}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/abilitymanager/actsamscallbackfirstscene/entry/src/main/js/default/app.js b/aafwk/aafwk_standard/abilitymanager/actsamscallbackfirstscene/entry/src/main/js/default/app.js
deleted file mode 100644
index 2a68c1992145a976957d7dcdd69a7e9c2e8e9877..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/actsamscallbackfirstscene/entry/src/main/js/default/app.js
+++ /dev/null
@@ -1,22 +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.
- */
-export default {
- onCreate() {
- console.info('AceApplication onCreate');
- },
- onDestroy() {
- console.info('AceApplication onDestroy');
- }
-};
diff --git a/aafwk/aafwk_standard/abilitymanager/actsamscallbackfirstscene/entry/src/main/js/default/pages/index/index.css b/aafwk/aafwk_standard/abilitymanager/actsamscallbackfirstscene/entry/src/main/js/default/pages/index/index.css
deleted file mode 100755
index caf729946975b79e55ab9e56e55bf860337b3f50..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/actsamscallbackfirstscene/entry/src/main/js/default/pages/index/index.css
+++ /dev/null
@@ -1,38 +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.
- */
-
-.container {
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- left: 0px;
- top: 0px;
- width: 100%;
- height: 100%;
-}
-
-.title {
- font-size: 60px;
- text-align: center;
- width: 100%;
- height: 40%;
- margin: 10px;
-}
-.btn {
- width: 50%;
- height: 100px;
- font-size: 40px;
-}
diff --git a/aafwk/aafwk_standard/abilitymanager/actsamscallbackfirstscene/entry/src/main/js/default/pages/index/index.hml b/aafwk/aafwk_standard/abilitymanager/actsamscallbackfirstscene/entry/src/main/js/default/pages/index/index.hml
deleted file mode 100755
index 61ea59d936e5a2971f1ea3d179c44a7f3f596c54..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/actsamscallbackfirstscene/entry/src/main/js/default/pages/index/index.hml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- {{ $t('strings.hello') }} {{title}}
-
-
-
diff --git a/aafwk/aafwk_standard/abilitymanager/actsamscallbackfirstscene/entry/src/main/js/resources/base/element/string.json b/aafwk/aafwk_standard/abilitymanager/actsamscallbackfirstscene/entry/src/main/js/resources/base/element/string.json
deleted file mode 100755
index f94ce7e64e455e1ebf22a4b2792c5b52c791d037..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/actsamscallbackfirstscene/entry/src/main/js/resources/base/element/string.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "string": [
- {
- "name": "app_name",
- "value": "JsHelloWorld"
- },
- {
- "name": "mainability_description",
- "value": "hap sample empty page"
- }
- ]
-}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/abilitymanager/actsamscallbackfirstscene/entry/src/main/js/test/MangerAbilityJsunit.test.js b/aafwk/aafwk_standard/abilitymanager/actsamscallbackfirstscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
deleted file mode 100644
index 5e9e17c9348f517de1cbbeca97f329cf9677c03c..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/actsamscallbackfirstscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
+++ /dev/null
@@ -1,87 +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 featureAbility from '@ohos.ability.featureability'
-import appManager from "@ohos.application.appManager"
-import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit'
-
-describe('ActsAmsCallBackFirstScene', function () {
- console.info('----ActsAmsCallBackFirstScene----');
- beforeAll(async function (done) {
- await featureAbility.startAbility(
- {
- want:
- {
- deviceId: "",
- bundleName: "com.ix.simulate.feature",
- abilityName: "com.example.SimulateFeatureAbilityFir",
- action: "action1",
- parameters:
- {},
- },
- }, (error, data) => {
- console.info('ActsAmsCallBackFirstScene SimulateFeatureAbilityFir start, error.code \
- ' + error.code + ', data length [' + data.length + ']');
- }
- );
- done();
- });
-
- function timeout(done) {
- expect().assertFail();
- console.debug('Acts_Ams_test=========timeout========');
- done();
- }
-
- function sleep(delay) {
- var start = new Date().getTime();
- while (true) {
- if (new Date().getTime() - start > delay) {
- break;
- }
- }
- }
-
- /*
- * @tc.number : Acts_Ams_test_0200
- * @tc.name : getProcessRunningInfos : Get All Running Processes Info
- * @tc.desc : Get All Running Processes Info(by CallBack)
- */
- it('Acts_Ams_test_0200', 0, async function (done) {
- console.info("sleep begin");
- sleep(5000);
- console.info("sleep end");
- appManager.getProcessRunningInfos(
- (error, info) => {
- console.info('Acts_Ams_test_0200 getProcessRunningInfos error.code \
- ' + error.code + ', data length [' + info.length + ']');
- expect(Array.isArray(info)).assertEqual(true);
- expect(info.length).assertLarger(0);
- for (var i = 0; i < info.length; i++) {
- console.info('Acts_Ams_test_0200 getProcessRunningInfo[' + i + "]: " + JSON.stringify(info[i]));
- expect(typeof (info[i].pid)).assertEqual("number");
- expect(info[i].pid).assertLarger(0);
-
- expect(typeof (info[i].processName)).assertEqual("string");
- expect(info[i].processName.length).assertLarger(0);
- expect(Array.isArray(info[i].bundleNames)).assertEqual(true);
- expect(info[i].bundleNames.length).assertEqual(0);
-
- expect(typeof (info[i].uid)).assertEqual("number");
- expect(info[i].uid).assertLarger(0);
- }
- done();
- });
- })
-})
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/abilitymanager/actsamscallbackfourthscene/entry/src/main/config.json b/aafwk/aafwk_standard/abilitymanager/actsamscallbackfourthscene/entry/src/main/config.json
deleted file mode 100644
index 91ea088ceeba5e02ebd26beb56f0892a0b2172a7..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/actsamscallbackfourthscene/entry/src/main/config.json
+++ /dev/null
@@ -1,87 +0,0 @@
-{
- "app": {
- "bundleName": "com.example.actsamscallbackfourthscene",
- "vendor": "example",
- "version": {
- "code": 1,
- "name": "1.0"
- },
- "apiVersion": {
- "compatible": 4,
- "target": 5,
- "releaseType": "Beta1"
- }
- },
- "deviceConfig": {},
- "module": {
- "package": "com.example.actsamscallbackfourthscene",
- "name": ".MyApplication",
- "deviceType": [
- "phone"
- ],
- "distro": {
- "deliveryWithInstall": true,
- "moduleName": "entry",
- "moduleType": "entry",
- "installationFree": true
- },
- "abilities": [
- {
- "visible": true,
- "name": "com.example.actsamscallbackfourthscene.MainAbility",
- "icon": "$media:icon",
- "description": "$string:mainability_description",
- "label": "$string:app_name",
- "type": "page",
- "isVisible": "true",
- "launchType": "singleton"
- }
- ],
- "reqPermissions": [
- {
- "name": "ohos.permission.INSTALL_BUNDLE",
- "reason": "need use ohos.permission.INSTALL_BUNDLE"
- },
- {
- "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.CLEAN_BACKGROUND_PROCESSES",
- "reason":"need use ohos.permission.CLEAN_BACKGROUND_PROCESSES"
- },
- {
- "name":"ohos.permission.MANAGE_MISSIONS",
- "reason":"need use ohos.permission.MANAGE_MISSIONS"
- },
- {
- "name":"ohos.permission.GET_RUNNING_INFO",
- "reason":"need use ohos.permission.GET_RUNNING_INFO"
- }
- ],
- "js": [
- {
- "pages": [
- "pages/index/index"
- ],
- "name": "default",
- "window": {
- "designWidth": 720,
- "autoDesignWidth": false
- }
- }
- ]
- }
-}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/abilitymanager/actsamscallbackfourthscene/entry/src/main/js/default/app.js b/aafwk/aafwk_standard/abilitymanager/actsamscallbackfourthscene/entry/src/main/js/default/app.js
deleted file mode 100644
index 2a68c1992145a976957d7dcdd69a7e9c2e8e9877..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/actsamscallbackfourthscene/entry/src/main/js/default/app.js
+++ /dev/null
@@ -1,22 +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.
- */
-export default {
- onCreate() {
- console.info('AceApplication onCreate');
- },
- onDestroy() {
- console.info('AceApplication onDestroy');
- }
-};
diff --git a/aafwk/aafwk_standard/abilitymanager/actsamscallbackfourthscene/entry/src/main/js/default/pages/index/index.css b/aafwk/aafwk_standard/abilitymanager/actsamscallbackfourthscene/entry/src/main/js/default/pages/index/index.css
deleted file mode 100755
index caf729946975b79e55ab9e56e55bf860337b3f50..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/actsamscallbackfourthscene/entry/src/main/js/default/pages/index/index.css
+++ /dev/null
@@ -1,38 +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.
- */
-
-.container {
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- left: 0px;
- top: 0px;
- width: 100%;
- height: 100%;
-}
-
-.title {
- font-size: 60px;
- text-align: center;
- width: 100%;
- height: 40%;
- margin: 10px;
-}
-.btn {
- width: 50%;
- height: 100px;
- font-size: 40px;
-}
diff --git a/aafwk/aafwk_standard/abilitymanager/actsamscallbackfourthscene/entry/src/main/js/default/pages/index/index.hml b/aafwk/aafwk_standard/abilitymanager/actsamscallbackfourthscene/entry/src/main/js/default/pages/index/index.hml
deleted file mode 100755
index 61ea59d936e5a2971f1ea3d179c44a7f3f596c54..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/actsamscallbackfourthscene/entry/src/main/js/default/pages/index/index.hml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- {{ $t('strings.hello') }} {{title}}
-
-
-
diff --git a/aafwk/aafwk_standard/abilitymanager/actsamscallbackfourthscene/entry/src/main/js/resources/base/element/string.json b/aafwk/aafwk_standard/abilitymanager/actsamscallbackfourthscene/entry/src/main/js/resources/base/element/string.json
deleted file mode 100755
index f94ce7e64e455e1ebf22a4b2792c5b52c791d037..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/actsamscallbackfourthscene/entry/src/main/js/resources/base/element/string.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "string": [
- {
- "name": "app_name",
- "value": "JsHelloWorld"
- },
- {
- "name": "mainability_description",
- "value": "hap sample empty page"
- }
- ]
-}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/abilitymanager/actsamscallbackfourthscene/entry/src/main/js/test/MangerAbilityJsunit.test.js b/aafwk/aafwk_standard/abilitymanager/actsamscallbackfourthscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
deleted file mode 100644
index 8cecdd34071364c51e1a1a52523ba0d76838243c..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/actsamscallbackfourthscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
+++ /dev/null
@@ -1,138 +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 featureAbility from '@ohos.ability.featureability'
-import appManager from "@ohos.application.appManager"
-import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index'
-
-describe('ActsAmsCallBackFourthScene', function () {
- console.info('----ActsAmsCallBackFourthScene----');
- beforeAll(async function (done) {
- await featureAbility.startAbility(
- {
- want:
- {
- deviceId: "",
- bundleName: "com.ix.verify.io",
- abilityName: "com.example.VerifyIoThirdAbility",
- action: "action1",
- parameters:
- {},
- },
- }, (error, data) => {
- console.info('ActsAmsCallBackFourthScene VerifyIoThirdAbility start, error.code \
- ' + error.code + ', data length [' + data.length + ']');
- }
- );
-
- await featureAbility.startAbility(
- {
- want:
- {
- deviceId: "",
- bundleName: "com.ix.simulate.feature",
- abilityName: "com.example.SimulateFeatureAbilityFir",
- action: "action1",
- parameters:
- {},
- },
- }, (error, data) => {
- console.info('ActsAmsCallBackFourthScene SimulateFeatureAbilityFir start, error.code \
- ' + error.code + ', data length [' + data.length + ']');
- }
- );
-
- await featureAbility.startAbility(
- {
- want:
- {
- deviceId: "",
- bundleName: "com.ix.verify.act",
- abilityName: "com.example.VerifyActThirdAbility",
- action: "action1",
- parameters:
- {},
- },
- }, (error, data) => {
- console.info('ActsAmsCallBackFourthScene VerifyActThirdAbility start, error.code \
- ' + error.code + ', data length [' + data.length + ']');
- }
- );
-
- await featureAbility.startAbility(
- {
- want:
- {
- deviceId: "",
- bundleName: "com.ix.simulate.entry",
- abilityName: "com.example.SimulateEntryAbilityFir",
- action: "action1",
- parameters:
- {},
- },
- }, (error, data) => {
- console.info('ActsAmsCallBackFourthScene SimulateEntryAbilityFir start, error.code \
- ' + error.code + ', data length [' + data.length + ']');
- }
- );
- done();
- });
-
- function timeout(done) {
- expect().assertFail();
- console.debug('Acts_Ams_test=========timeout========');
- done();
- }
-
- function sleep(delay) {
- let start = new Date().getTime();
- while (true) {
- if (new Date().getTime() - start > delay) {
- break;
- }
- }
- }
-
- /*
- * @tc.number : Acts_Ams_test_5000
- * @tc.name : getProcessRunningInfos : Get All Running Processes Info
- * @tc.desc : Get All Running Processes Info(by CallBack)
- */
- it('Acts_Ams_test_5000', 0, async function (done) {
- console.info("sleep begin");
- sleep(5000);
- console.info("sleep end");
- appManager.getProcessRunningInfos(
- (error, info) => {
- console.info('Acts_Ams_test_5000 getProcessRunningInfos error.code \
- ' + error.code + ', data length [' + info.length + ']');
- expect(Array.isArray(info)).assertEqual(true);
- expect(info.length).assertLarger(0);
- for (let i = 0; i < info.length; i++) {
- console.info('Acts_Ams_test_5000 getProcessRunningInfo[' + i + "]: " + JSON.stringify(info[i]));
- expect(typeof (info[i].pid)).assertEqual("number");
- expect(info[i].pid).assertLarger(0);
-
- expect(typeof (info[i].processName)).assertEqual("string");
- expect(info[i].processName.length).assertLarger(0);
- expect(Array.isArray(info[i].bundleNames)).assertEqual(true);
- expect(info[i].bundleNames.length).assertEqual(0);
-
- expect(typeof (info[i].uid)).assertEqual("number");
- expect(info[i].uid).assertLarger(0);
- }
- done();
- });
- })
-})
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/abilitymanager/actsamscallbacksecondscene/entry/src/main/js/default/app.js b/aafwk/aafwk_standard/abilitymanager/actsamscallbacksecondscene/entry/src/main/js/default/app.js
deleted file mode 100644
index 2a68c1992145a976957d7dcdd69a7e9c2e8e9877..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/actsamscallbacksecondscene/entry/src/main/js/default/app.js
+++ /dev/null
@@ -1,22 +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.
- */
-export default {
- onCreate() {
- console.info('AceApplication onCreate');
- },
- onDestroy() {
- console.info('AceApplication onDestroy');
- }
-};
diff --git a/aafwk/aafwk_standard/abilitymanager/actsamscallbacksecondscene/entry/src/main/js/default/pages/index/index.css b/aafwk/aafwk_standard/abilitymanager/actsamscallbacksecondscene/entry/src/main/js/default/pages/index/index.css
deleted file mode 100755
index caf729946975b79e55ab9e56e55bf860337b3f50..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/actsamscallbacksecondscene/entry/src/main/js/default/pages/index/index.css
+++ /dev/null
@@ -1,38 +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.
- */
-
-.container {
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- left: 0px;
- top: 0px;
- width: 100%;
- height: 100%;
-}
-
-.title {
- font-size: 60px;
- text-align: center;
- width: 100%;
- height: 40%;
- margin: 10px;
-}
-.btn {
- width: 50%;
- height: 100px;
- font-size: 40px;
-}
diff --git a/aafwk/aafwk_standard/abilitymanager/actsamscallbacksecondscene/entry/src/main/js/default/pages/index/index.hml b/aafwk/aafwk_standard/abilitymanager/actsamscallbacksecondscene/entry/src/main/js/default/pages/index/index.hml
deleted file mode 100755
index 61ea59d936e5a2971f1ea3d179c44a7f3f596c54..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/actsamscallbacksecondscene/entry/src/main/js/default/pages/index/index.hml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- {{ $t('strings.hello') }} {{title}}
-
-
-
diff --git a/aafwk/aafwk_standard/abilitymanager/actsamscallbacksecondscene/entry/src/main/js/resources/base/element/string.json b/aafwk/aafwk_standard/abilitymanager/actsamscallbacksecondscene/entry/src/main/js/resources/base/element/string.json
deleted file mode 100755
index f94ce7e64e455e1ebf22a4b2792c5b52c791d037..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/actsamscallbacksecondscene/entry/src/main/js/resources/base/element/string.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "string": [
- {
- "name": "app_name",
- "value": "JsHelloWorld"
- },
- {
- "name": "mainability_description",
- "value": "hap sample empty page"
- }
- ]
-}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/abilitymanager/actsamscallbacksecondscene/entry/src/main/js/test/MangerAbilityJsunit.test.js b/aafwk/aafwk_standard/abilitymanager/actsamscallbacksecondscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
deleted file mode 100644
index d6dd1794b13ff616b84e0421e8db0759c680c4cf..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/actsamscallbacksecondscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
+++ /dev/null
@@ -1,104 +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 featureAbility from '@ohos.ability.featureability'
-import appManager from "@ohos.application.appManager"
-import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit'
-
-describe('ActsAmsCallBackSecondScene', function () {
- console.info('----ActsAmsCallBackSecondScene----');
- beforeAll(async function (done) {
- await featureAbility.startAbility(
- {
- want:
- {
- deviceId: "",
- bundleName: "com.ix.verify.io",
- abilityName: "com.example.VerifyIoThirdAbility",
- action: "action1",
- parameters:
- {},
- },
- }, (error, data) => {
- console.info('ActsAmsCallBackSecondScene VerifyIoThirdAbility start, error.code \
- ' + error.code + ', data length [' + data.length + ']');
- }
- );
-
- await featureAbility.startAbility(
- {
- want:
- {
- deviceId: "",
- bundleName: "com.ix.simulate.feature",
- abilityName: "com.example.SimulateFeatureAbilityFir",
- action: "action1",
- parameters:
- {},
- },
- }, (error, data) => {
- console.info('ActsAmsCallBackSecondScene SimulateFeatureAbilityFir start, error.code \
- ' + error.code + ', data length [' + data.length + ']');
- }
- );
- done();
- });
-
- function timeout(done) {
- expect().assertFail();
- console.debug('Acts_Ams_test=========timeout========');
- done();
- }
-
- function sleep(delay) {
- let start = new Date().getTime();
- while (true) {
- if (new Date().getTime() - start > delay) {
- break;
- }
- }
- }
-
- /*
- * @tc.number : Acts_Ams_test_1800
- * @tc.name : getProcessRunningInfos : Get All Running Processes Info
- * @tc.desc : Get All Running Processes Info(by CallBack)
- */
- it('Acts_Ams_test_1800', 0, async function (done) {
- console.info("sleep begin");
- sleep(5000);
- console.info("sleep end");
- appManager.getProcessRunningInfos(
- (error, info) => {
- console.info('Acts_Ams_test_1800 getProcessRunningInfos error.code \
- ' + error.code + ', data length [' + info.length + ']');
- expect(Array.isArray(info)).assertEqual(true);
- expect(info.length).assertLarger(0);
- for (let i = 0; i < info.length; i++) {
- console.info('Acts_Ams_test_1800 getProcessRunningInfo[' + i + "]: " + JSON.stringify(info[i]));
- expect(typeof (info[i].pid)).assertEqual("number");
- expect(info[i].pid).assertLarger(0);
-
- expect(typeof (info[i].processName)).assertEqual("string");
- expect(info[i].processName.length).assertLarger(0);
- expect(Array.isArray(info[i].bundleNames)).assertEqual(true);
- expect(info[i].bundleNames.length).assertEqual(0);
-
- expect(typeof (info[i].uid)).assertEqual("number");
- expect(info[i].uid).assertLarger(0);
- }
- done();
- });
- })
-})
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/abilitymanager/actsamscallbackthirdscene/entry/src/main/config.json b/aafwk/aafwk_standard/abilitymanager/actsamscallbackthirdscene/entry/src/main/config.json
deleted file mode 100644
index 5d5e565d90ff227c8c75f0fc81b05eff0002673f..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/actsamscallbackthirdscene/entry/src/main/config.json
+++ /dev/null
@@ -1,87 +0,0 @@
-{
- "app": {
- "bundleName": "com.example.actsamscallbackthirdscene",
- "vendor": "example",
- "version": {
- "code": 1,
- "name": "1.0"
- },
- "apiVersion": {
- "compatible": 4,
- "target": 5,
- "releaseType": "Beta1"
- }
- },
- "deviceConfig": {},
- "module": {
- "package": "com.example.actsamscallbackthirdscene",
- "name": ".MyApplication",
- "deviceType": [
- "phone"
- ],
- "distro": {
- "deliveryWithInstall": true,
- "moduleName": "entry",
- "moduleType": "entry",
- "installationFree": true
- },
- "abilities": [
- {
- "visible": true,
- "name": "com.example.actsamscallbackthirdscene.MainAbility",
- "icon": "$media:icon",
- "description": "$string:mainability_description",
- "label": "$string:app_name",
- "type": "page",
- "isVisible": "true",
- "launchType": "singleton"
- }
- ],
- "reqPermissions": [
- {
- "name": "ohos.permission.INSTALL_BUNDLE",
- "reason": "need use ohos.permission.INSTALL_BUNDLE"
- },
- {
- "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.CLEAN_BACKGROUND_PROCESSES",
- "reason":"need use ohos.permission.CLEAN_BACKGROUND_PROCESSES"
- },
- {
- "name":"ohos.permission.MANAGE_MISSIONS",
- "reason":"need use ohos.permission.MANAGE_MISSIONS"
- },
- {
- "name":"ohos.permission.GET_RUNNING_INFO",
- "reason":"need use ohos.permission.GET_RUNNING_INFO"
- }
- ],
- "js": [
- {
- "pages": [
- "pages/index/index"
- ],
- "name": "default",
- "window": {
- "designWidth": 720,
- "autoDesignWidth": false
- }
- }
- ]
- }
-}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/abilitymanager/actsamscallbackthirdscene/entry/src/main/js/default/app.js b/aafwk/aafwk_standard/abilitymanager/actsamscallbackthirdscene/entry/src/main/js/default/app.js
deleted file mode 100644
index 2a68c1992145a976957d7dcdd69a7e9c2e8e9877..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/actsamscallbackthirdscene/entry/src/main/js/default/app.js
+++ /dev/null
@@ -1,22 +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.
- */
-export default {
- onCreate() {
- console.info('AceApplication onCreate');
- },
- onDestroy() {
- console.info('AceApplication onDestroy');
- }
-};
diff --git a/aafwk/aafwk_standard/abilitymanager/actsamscallbackthirdscene/entry/src/main/js/default/pages/index/index.css b/aafwk/aafwk_standard/abilitymanager/actsamscallbackthirdscene/entry/src/main/js/default/pages/index/index.css
deleted file mode 100755
index caf729946975b79e55ab9e56e55bf860337b3f50..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/actsamscallbackthirdscene/entry/src/main/js/default/pages/index/index.css
+++ /dev/null
@@ -1,38 +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.
- */
-
-.container {
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- left: 0px;
- top: 0px;
- width: 100%;
- height: 100%;
-}
-
-.title {
- font-size: 60px;
- text-align: center;
- width: 100%;
- height: 40%;
- margin: 10px;
-}
-.btn {
- width: 50%;
- height: 100px;
- font-size: 40px;
-}
diff --git a/aafwk/aafwk_standard/abilitymanager/actsamscallbackthirdscene/entry/src/main/js/default/pages/index/index.hml b/aafwk/aafwk_standard/abilitymanager/actsamscallbackthirdscene/entry/src/main/js/default/pages/index/index.hml
deleted file mode 100755
index 61ea59d936e5a2971f1ea3d179c44a7f3f596c54..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/actsamscallbackthirdscene/entry/src/main/js/default/pages/index/index.hml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- {{ $t('strings.hello') }} {{title}}
-
-
-
diff --git a/aafwk/aafwk_standard/abilitymanager/actsamscallbackthirdscene/entry/src/main/js/resources/base/element/string.json b/aafwk/aafwk_standard/abilitymanager/actsamscallbackthirdscene/entry/src/main/js/resources/base/element/string.json
deleted file mode 100755
index f94ce7e64e455e1ebf22a4b2792c5b52c791d037..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/actsamscallbackthirdscene/entry/src/main/js/resources/base/element/string.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "string": [
- {
- "name": "app_name",
- "value": "JsHelloWorld"
- },
- {
- "name": "mainability_description",
- "value": "hap sample empty page"
- }
- ]
-}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/abilitymanager/actsamscallbackthirdscene/entry/src/main/js/test/MangerAbilityJsunit.test.js b/aafwk/aafwk_standard/abilitymanager/actsamscallbackthirdscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
deleted file mode 100644
index fa89922d593b8736cbd0ca3b57851247122d8f6a..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/actsamscallbackthirdscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
+++ /dev/null
@@ -1,98 +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 featureAbility from '@ohos.ability.featureability'
-import appManager from "@ohos.application.appManager"
-import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index'
-
-describe('ActsAmsCallBackThirdScene', function () {
- console.info('----ActsAmsCallBackThirdScene----');
- beforeAll(async function (done) {
- await featureAbility.startAbility(
- {
- want:
- {
- deviceId: "",
- bundleName: "com.ix.simulate.feature",
- abilityName: "com.example.SimulateFeatureAbilityFir",
- action: "action1",
- parameters:
- {},
- },
- }, (error, data) => {
- console.info('ActsAmsCallBackThirdScene SimulateFeatureAbilityFir start, error.code \
- ' + error.code + ', data length [' + data.length + ']');
- }
- );
-
- await featureAbility.startAbility(
- {
- want:
- {
- deviceId: "",
- bundleName: "com.ix.verify.io",
- abilityName: "com.example.VerifyIoThirdAbility",
- action: "action1",
- parameters:
- {},
- },
- }, (error, data) => {
- console.info('ActsAmsCallBackThirdScene VerifyIoThirdAbility start, error.code \
- ' + error.code + ', data length [' + data.length + ']');
- }
- );
- done();
- });
-
- function sleep(delay) {
- let start = new Date().getTime();
- while (true) {
- if (new Date().getTime() - start > delay) {
- break;
- }
- }
- }
-
- /*
- * @tc.number : Acts_Ams_test_3400
- * @tc.name : getProcessRunningInfos : Get All Running Processes Info
- * @tc.desc : Get All Running Processes Info(by CallBack)
- */
- it('Acts_Ams_test_3400', 0, async function (done) {
- console.info("sleep begin");
- sleep(5000);
- console.info("sleep end");
- appManager.getProcessRunningInfos(
- (error, info) => {
- console.info('Acts_Ams_test_3400 getProcessRunningInfos error.code \
- ' + error.code + ', data length [' + info.length + ']');
- expect(Array.isArray(info)).assertEqual(true);
- expect(info.length).assertLarger(0);
- for (let i = 0; i < info.length; i++) {
- console.info('Acts_Ams_test_3400 getProcessRunningInfo[' + i + "]: " + JSON.stringify(info[i]));
- expect(typeof (info[i].pid)).assertEqual("number");
- expect(info[i].pid).assertLarger(0);
-
- expect(typeof (info[i].processName)).assertEqual("string");
- expect(info[i].processName.length).assertLarger(0);
- expect(Array.isArray(info[i].bundleNames)).assertEqual(true);
- expect(info[i].bundleNames.length).assertEqual(0);
-
- expect(typeof (info[i].uid)).assertEqual("number");
- expect(info[i].uid).assertLarger(0);
- }
- done();
- });
- })
-})
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/abilitymanager/actsamstestfifthscene/entry/src/main/config.json b/aafwk/aafwk_standard/abilitymanager/actsamstestfifthscene/entry/src/main/config.json
deleted file mode 100644
index 93a4f79a2b8f817e1fdaef40e060f3b43eefd6e0..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/actsamstestfifthscene/entry/src/main/config.json
+++ /dev/null
@@ -1,87 +0,0 @@
-{
- "app": {
- "bundleName": "com.example.actsamstestfifthscene",
- "vendor": "example",
- "version": {
- "code": 1,
- "name": "1.0"
- },
- "apiVersion": {
- "compatible": 4,
- "target": 5,
- "releaseType": "Beta1"
- }
- },
- "deviceConfig": {},
- "module": {
- "package": "com.example.actsamstestfifthscene",
- "name": ".MyApplication",
- "deviceType": [
- "phone"
- ],
- "distro": {
- "deliveryWithInstall": true,
- "moduleName": "entry",
- "moduleType": "entry",
- "installationFree": true
- },
- "abilities": [
- {
- "visible": true,
- "name": "com.example.actsamstestfifthscene.MainAbility",
- "icon": "$media:icon",
- "description": "$string:mainability_description",
- "label": "$string:app_name",
- "type": "page",
- "isVisible": "true",
- "launchType": "singleton"
- }
- ],
- "reqPermissions": [
- {
- "name": "ohos.permission.INSTALL_BUNDLE",
- "reason": "need use ohos.permission.INSTALL_BUNDLE"
- },
- {
- "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.CLEAN_BACKGROUND_PROCESSES",
- "reason":"need use ohos.permission.CLEAN_BACKGROUND_PROCESSES"
- },
- {
- "name":"ohos.permission.MANAGE_MISSIONS",
- "reason":"need use ohos.permission.MANAGE_MISSIONS"
- },
- {
- "name":"ohos.permission.GET_RUNNING_INFO",
- "reason":"need use ohos.permission.GET_RUNNING_INFO"
- }
- ],
- "js": [
- {
- "pages": [
- "pages/index/index"
- ],
- "name": "default",
- "window": {
- "designWidth": 720,
- "autoDesignWidth": false
- }
- }
- ]
- }
-}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/abilitymanager/actsamstestfifthscene/entry/src/main/js/default/app.js b/aafwk/aafwk_standard/abilitymanager/actsamstestfifthscene/entry/src/main/js/default/app.js
deleted file mode 100644
index 2a68c1992145a976957d7dcdd69a7e9c2e8e9877..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/actsamstestfifthscene/entry/src/main/js/default/app.js
+++ /dev/null
@@ -1,22 +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.
- */
-export default {
- onCreate() {
- console.info('AceApplication onCreate');
- },
- onDestroy() {
- console.info('AceApplication onDestroy');
- }
-};
diff --git a/aafwk/aafwk_standard/abilitymanager/actsamstestfifthscene/entry/src/main/js/default/pages/index/index.css b/aafwk/aafwk_standard/abilitymanager/actsamstestfifthscene/entry/src/main/js/default/pages/index/index.css
deleted file mode 100755
index caf729946975b79e55ab9e56e55bf860337b3f50..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/actsamstestfifthscene/entry/src/main/js/default/pages/index/index.css
+++ /dev/null
@@ -1,38 +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.
- */
-
-.container {
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- left: 0px;
- top: 0px;
- width: 100%;
- height: 100%;
-}
-
-.title {
- font-size: 60px;
- text-align: center;
- width: 100%;
- height: 40%;
- margin: 10px;
-}
-.btn {
- width: 50%;
- height: 100px;
- font-size: 40px;
-}
diff --git a/aafwk/aafwk_standard/abilitymanager/actsamstestfifthscene/entry/src/main/js/default/pages/index/index.hml b/aafwk/aafwk_standard/abilitymanager/actsamstestfifthscene/entry/src/main/js/default/pages/index/index.hml
deleted file mode 100755
index 61ea59d936e5a2971f1ea3d179c44a7f3f596c54..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/actsamstestfifthscene/entry/src/main/js/default/pages/index/index.hml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- {{ $t('strings.hello') }} {{title}}
-
-
-
diff --git a/aafwk/aafwk_standard/abilitymanager/actsamstestfifthscene/entry/src/main/js/resources/base/element/string.json b/aafwk/aafwk_standard/abilitymanager/actsamstestfifthscene/entry/src/main/js/resources/base/element/string.json
deleted file mode 100755
index f94ce7e64e455e1ebf22a4b2792c5b52c791d037..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/actsamstestfifthscene/entry/src/main/js/resources/base/element/string.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "string": [
- {
- "name": "app_name",
- "value": "JsHelloWorld"
- },
- {
- "name": "mainability_description",
- "value": "hap sample empty page"
- }
- ]
-}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/abilitymanager/actsamstestfifthscene/entry/src/main/js/test/MangerAbilityJsunit.test.js b/aafwk/aafwk_standard/abilitymanager/actsamstestfifthscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
deleted file mode 100644
index c6abb03cf8f11545609396232d362a25cbdd4313..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/actsamstestfifthscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
+++ /dev/null
@@ -1,154 +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 featureAbility from '@ohos.ability.featureability'
-import appManager from "@ohos.application.appManager"
-import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index'
-
-let abilityNameList = [
- "com.ohos.launcher.MainAbility",
- "com.ohos.callui.ServiceAbility",
- "com.example.SimulateFeatureAbilityFir",
- "com.example.SimulateFeatureAbilitySed",
- "com.example.VerifyIoThirdAbility",
- "com.example.actsamstestfifthscene.MainAbility"
-]
-
-let bundleNameList = [
- "com.ohos.launcher",
- "com.ohos.systemui",
- "com.ohos.callui",
- "com.ohos.contacts",
- "com.ohos.mms",
- "com.ohos.telephonydataability",
- "com.ohos.contactsdataability",
- "com.ix.simulate.feature",
- "com.ix.verify.io",
- "com.example.actsamstestfifthscene"
-]
-
-describe('ActsAmsTestFifthScene', function () {
- console.info('----ActsAmsTestFifthScene----');
- beforeAll(async function (done) {
- await featureAbility.startAbility(
- {
- want:
- {
- deviceId: "",
- bundleName: "com.ix.simulate.feature",
- abilityName: "com.example.SimulateFeatureAbilityFir",
- action: "action1",
- entities: ["entity1"],
- type: "MIMETYPE",
- uri: "key={true,true,false}",
- options:
- {},
- parameters:
- {},
- },
- }, (error, data) => {
- console.info('ActsAmsTestFifthScene SimulateFeatureAbilityFir start, error.code \
- ' + error.code + ', data length [' + data.length + ']');
- }
- );
-
- await featureAbility.startAbility(
- {
- want:
- {
- deviceId: "",
- bundleName: "com.ix.verify.io",
- abilityName: "com.example.VerifyIoThirdAbility",
- action: "action1",
- entities: ["entity1"],
- type: "MIMETYPE",
- uri: "key={true,true,false}",
- options:
- {},
- parameters:
- {},
- },
- }, (error, data) => {
- console.info('ActsAmsTestFifthScene VerifyIoThirdAbility start, error.code \
- ' + error.code + ', data length [' + data.length + ']');
- }
- );
-
- await featureAbility.startAbility(
- {
- want:
- {
- deviceId: "",
- bundleName: "com.ix.simulate.feature",
- abilityName: "com.example.SimulateFeatureAbilitySed",
- action: "action1",
- entities: ["entity1"],
- type: "MIMETYPE",
- uri: "key={true,true,false}",
- options:
- {},
- parameters:
- {},
- },
- }, (error, data) => {
- console.info('ActsAmsTestFifthScene SimulateFeatureAbilitySed start, error.code \
- ' + error.code + ', data length [' + data.length + ']');
- }
- );
- done();
- });
-
- function timeout(done) {
- expect().assertFail();
- console.debug('Acts_Ams_test=========timeout========');
- done();
- }
-
- function sleep(delay) {
- let start = new Date().getTime();
- while (true) {
- if (new Date().getTime() - start > delay) {
- break;
- }
- }
- }
-
- /*
- * @tc.number : Acts_Ams_test_0100
- * @tc.name : getProcessRunningInfos : Get All Running Processes Info
- * @tc.desc : Get All Running Processes Info(by Promise)
- */
- it('Acts_Ams_test_0100', 0, async function (done) {
- console.info("sleep begin");
- sleep(5000);
- console.info("sleep end");
- let info = await appManager.getProcessRunningInfos();
- expect(Array.isArray(info)).assertEqual(true);
- expect(info.length).assertLarger(0);
- for (let i = 0; i < info.length; i++) {
- console.info('Acts_Ams_test_0100 getProcessRunningInfo[' + i + "]: " + JSON.stringify(info[i]));
- expect(typeof (info[i].pid)).assertEqual("number");
- expect(info[i].pid).assertLarger(0);
-
- expect(typeof (info[i].processName)).assertEqual("string");
- expect(info[i].processName.length).assertLarger(0);
- expect(Array.isArray(info[i].bundleNames)).assertEqual(true);
- expect(info[i].bundleNames.length).assertEqual(0);
-
- expect(typeof (info[i].uid)).assertEqual("number");
- expect(info[i].uid).assertLarger(0);
- }
- done();
- })
-})
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/abilitymanager/actsamstestfirstscene/entry/src/main/config.json b/aafwk/aafwk_standard/abilitymanager/actsamstestfirstscene/entry/src/main/config.json
deleted file mode 100644
index 2a7d876233c49b6df5c9f5bc3a50797c7b49bde1..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/actsamstestfirstscene/entry/src/main/config.json
+++ /dev/null
@@ -1,96 +0,0 @@
-{
- "app": {
- "bundleName": "com.example.actsamstestfirstscene",
- "vendor": "example",
- "version": {
- "code": 1,
- "name": "1.0"
- },
- "apiVersion": {
- "compatible": 4,
- "target": 5,
- "releaseType": "Beta1"
- }
- },
- "deviceConfig": {},
- "module": {
- "package": "com.example.actsamstestfirstscene",
- "name": ".MyApplication",
- "deviceType": [
- "phone"
- ],
- "distro": {
- "deliveryWithInstall": true,
- "moduleName": "entry",
- "moduleType": "entry"
- },
- "abilities": [
- {
- "skills": [
- {
- "entities": [
- "entity.system.home"
- ],
- "actions": [
- "action.system.home"
- ]
- }
- ],
- "visible": true,
- "name": "com.example.actsamstestfirstscene.MainAbility",
- "icon": "$media:icon",
- "description": "$string:mainability_description",
- "label": "$string:app_name",
- "type": "page",
- "isVisible": "true",
- "launchType": "singleton"
- }
- ],
- "reqPermissions": [
- {
- "name": "ohos.permission.INSTALL_BUNDLE",
- "reason": "need use ohos.permission.INSTALL_BUNDLE"
- },
- {
- "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.CLEAN_BACKGROUND_PROCESSES",
- "reason":"need use ohos.permission.CLEAN_BACKGROUND_PROCESSES"
- },
- {
- "name":"ohos.permission.MANAGE_MISSIONS",
- "reason":"need use ohos.permission.MANAGE_MISSIONS"
- },
- {
- "name":"ohos.permission.GET_RUNNING_INFO",
- "reason":"need use ohos.permission.GET_RUNNING_INFO"
- }
- ],
- "js": [
- {
- "pages": [
- "pages/index/index"
- ],
- "name": "default",
- "window": {
- "designWidth": 720,
- "autoDesignWidth": false
- }
- }
- ]
- }
-}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/abilitymanager/actsamstestfirstscene/entry/src/main/js/default/app.js b/aafwk/aafwk_standard/abilitymanager/actsamstestfirstscene/entry/src/main/js/default/app.js
deleted file mode 100644
index 2a68c1992145a976957d7dcdd69a7e9c2e8e9877..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/actsamstestfirstscene/entry/src/main/js/default/app.js
+++ /dev/null
@@ -1,22 +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.
- */
-export default {
- onCreate() {
- console.info('AceApplication onCreate');
- },
- onDestroy() {
- console.info('AceApplication onDestroy');
- }
-};
diff --git a/aafwk/aafwk_standard/abilitymanager/actsamstestfirstscene/entry/src/main/js/default/pages/index/index.css b/aafwk/aafwk_standard/abilitymanager/actsamstestfirstscene/entry/src/main/js/default/pages/index/index.css
deleted file mode 100755
index caf729946975b79e55ab9e56e55bf860337b3f50..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/actsamstestfirstscene/entry/src/main/js/default/pages/index/index.css
+++ /dev/null
@@ -1,38 +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.
- */
-
-.container {
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- left: 0px;
- top: 0px;
- width: 100%;
- height: 100%;
-}
-
-.title {
- font-size: 60px;
- text-align: center;
- width: 100%;
- height: 40%;
- margin: 10px;
-}
-.btn {
- width: 50%;
- height: 100px;
- font-size: 40px;
-}
diff --git a/aafwk/aafwk_standard/abilitymanager/actsamstestfirstscene/entry/src/main/js/default/pages/index/index.hml b/aafwk/aafwk_standard/abilitymanager/actsamstestfirstscene/entry/src/main/js/default/pages/index/index.hml
deleted file mode 100755
index 61ea59d936e5a2971f1ea3d179c44a7f3f596c54..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/actsamstestfirstscene/entry/src/main/js/default/pages/index/index.hml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- {{ $t('strings.hello') }} {{title}}
-
-
-
diff --git a/aafwk/aafwk_standard/abilitymanager/actsamstestfirstscene/entry/src/main/js/resources/base/element/string.json b/aafwk/aafwk_standard/abilitymanager/actsamstestfirstscene/entry/src/main/js/resources/base/element/string.json
deleted file mode 100755
index f94ce7e64e455e1ebf22a4b2792c5b52c791d037..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/actsamstestfirstscene/entry/src/main/js/resources/base/element/string.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "string": [
- {
- "name": "app_name",
- "value": "JsHelloWorld"
- },
- {
- "name": "mainability_description",
- "value": "hap sample empty page"
- }
- ]
-}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/abilitymanager/actsamstestfirstscene/entry/src/main/js/test/MangerAbilityJsunit.test.js b/aafwk/aafwk_standard/abilitymanager/actsamstestfirstscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
deleted file mode 100644
index 89ea4840831e61ba3c917d483bb0918a1caba6dd..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/actsamstestfirstscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
+++ /dev/null
@@ -1,88 +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 featureAbility from '@ohos.ability.featureability'
-import appManager from "@ohos.application.appManager"
-import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index'
-
-describe('ActsAmsTestFirstScene', function () {
- console.info('----ActsAmsTestFirstScene----');
- beforeAll(async function (done) {
- await featureAbility.startAbility(
- {
- want:
- {
- deviceId: "",
- bundleName: "com.ix.simulate.feature",
- abilityName: "com.example.SimulateFeatureAbilityFir",
- action: "action1",
- entities: ["entity1"],
- type: "MIMETYPE",
- uri: "key={true,true,false}",
- options:
- {},
- parameters:
- {},
- },
- }, (error, data) => {
- console.info('ActsAmsTestFirstScene SimulateFeatureAbilityFir start, error.code \
- ' + error.code + ', data length [' + data.length + ']');
- }
- );
- done();
- });
-
- function timeout(done) {
- expect().assertFail();
- console.debug('Acts_Ams_test=========timeout========');
- done();
- }
-
- function sleep(delay) {
- var start = new Date().getTime();
- while (true) {
- if (new Date().getTime() - start > delay) {
- break;
- }
- }
- }
-
- /*
- * @tc.number : Acts_Ams_test_0100
- * @tc.name : getProcessRunningInfos : Get All Running Processes Info
- * @tc.desc : Get All Running Processes Info(by Promise)
- */
- it('Acts_Ams_test_0100', 0, async function (done) {
- console.info("sleep begin");
- sleep(5000);
- console.info("sleep end");
- var info = await appManager.getProcessRunningInfos();
- expect(Array.isArray(info)).assertEqual(true);
- expect(info.length).assertLarger(0);
- for (var i = 0; i < info.length; i++) {
- console.info('Acts_Ams_test_0100 getProcessRunningInfo[' + i + "]: " + JSON.stringify(info[i]));
- expect(typeof (info[i].pid)).assertEqual("number");
- expect(info[i].pid).assertLarger(0);
-
- expect(typeof (info[i].processName)).assertEqual("string");
- expect(info[i].processName.length).assertLarger(0);
- expect(Array.isArray(info[i].bundleNames)).assertEqual(true);
- expect(info[i].bundleNames.length).assertEqual(0);
-
- expect(typeof (info[i].uid)).assertEqual("number");
- expect(info[i].uid).assertLarger(0);
- }
- done();
- })
-})
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/abilitymanager/actsamstestfourthscene/entry/src/main/config.json b/aafwk/aafwk_standard/abilitymanager/actsamstestfourthscene/entry/src/main/config.json
deleted file mode 100644
index bd83460fe18ea646108c470c27d5a89cac905339..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/actsamstestfourthscene/entry/src/main/config.json
+++ /dev/null
@@ -1,87 +0,0 @@
-{
- "app": {
- "bundleName": "com.example.actsamstestfourthscene",
- "vendor": "example",
- "version": {
- "code": 1,
- "name": "1.0"
- },
- "apiVersion": {
- "compatible": 4,
- "target": 5,
- "releaseType": "Beta1"
- }
- },
- "deviceConfig": {},
- "module": {
- "package": "com.example.actsamstestfourthscene",
- "name": ".MyApplication",
- "deviceType": [
- "phone"
- ],
- "distro": {
- "deliveryWithInstall": true,
- "moduleName": "entry",
- "moduleType": "entry",
- "installationFree": true
- },
- "abilities": [
- {
- "visible": true,
- "name": "com.example.actsamstestfourthscene.MainAbility",
- "icon": "$media:icon",
- "description": "$string:mainability_description",
- "label": "$string:app_name",
- "type": "page",
- "isVisible": "true",
- "launchType": "singleton"
- }
- ],
- "reqPermissions": [
- {
- "name": "ohos.permission.INSTALL_BUNDLE",
- "reason": "need use ohos.permission.INSTALL_BUNDLE"
- },
- {
- "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.CLEAN_BACKGROUND_PROCESSES",
- "reason":"need use ohos.permission.CLEAN_BACKGROUND_PROCESSES"
- },
- {
- "name":"ohos.permission.MANAGE_MISSIONS",
- "reason":"need use ohos.permission.MANAGE_MISSIONS"
- },
- {
- "name":"ohos.permission.GET_RUNNING_INFO",
- "reason":"need use ohos.permission.GET_RUNNING_INFO"
- }
- ],
- "js": [
- {
- "pages": [
- "pages/index/index"
- ],
- "name": "default",
- "window": {
- "designWidth": 720,
- "autoDesignWidth": false
- }
- }
- ]
- }
-}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/abilitymanager/actsamstestfourthscene/entry/src/main/js/default/app.js b/aafwk/aafwk_standard/abilitymanager/actsamstestfourthscene/entry/src/main/js/default/app.js
deleted file mode 100644
index 2a68c1992145a976957d7dcdd69a7e9c2e8e9877..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/actsamstestfourthscene/entry/src/main/js/default/app.js
+++ /dev/null
@@ -1,22 +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.
- */
-export default {
- onCreate() {
- console.info('AceApplication onCreate');
- },
- onDestroy() {
- console.info('AceApplication onDestroy');
- }
-};
diff --git a/aafwk/aafwk_standard/abilitymanager/actsamstestfourthscene/entry/src/main/js/default/pages/index/index.css b/aafwk/aafwk_standard/abilitymanager/actsamstestfourthscene/entry/src/main/js/default/pages/index/index.css
deleted file mode 100755
index caf729946975b79e55ab9e56e55bf860337b3f50..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/actsamstestfourthscene/entry/src/main/js/default/pages/index/index.css
+++ /dev/null
@@ -1,38 +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.
- */
-
-.container {
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- left: 0px;
- top: 0px;
- width: 100%;
- height: 100%;
-}
-
-.title {
- font-size: 60px;
- text-align: center;
- width: 100%;
- height: 40%;
- margin: 10px;
-}
-.btn {
- width: 50%;
- height: 100px;
- font-size: 40px;
-}
diff --git a/aafwk/aafwk_standard/abilitymanager/actsamstestfourthscene/entry/src/main/js/default/pages/index/index.hml b/aafwk/aafwk_standard/abilitymanager/actsamstestfourthscene/entry/src/main/js/default/pages/index/index.hml
deleted file mode 100755
index 61ea59d936e5a2971f1ea3d179c44a7f3f596c54..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/actsamstestfourthscene/entry/src/main/js/default/pages/index/index.hml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- {{ $t('strings.hello') }} {{title}}
-
-
-
diff --git a/aafwk/aafwk_standard/abilitymanager/actsamstestfourthscene/entry/src/main/js/resources/base/element/string.json b/aafwk/aafwk_standard/abilitymanager/actsamstestfourthscene/entry/src/main/js/resources/base/element/string.json
deleted file mode 100755
index f94ce7e64e455e1ebf22a4b2792c5b52c791d037..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/actsamstestfourthscene/entry/src/main/js/resources/base/element/string.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "string": [
- {
- "name": "app_name",
- "value": "JsHelloWorld"
- },
- {
- "name": "mainability_description",
- "value": "hap sample empty page"
- }
- ]
-}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/abilitymanager/actsamstestfourthscene/entry/src/main/js/test/MangerAbilityJsunit.test.js b/aafwk/aafwk_standard/abilitymanager/actsamstestfourthscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
deleted file mode 100644
index 5db5938070dd61cbeef312ded4487cfc9faa4530..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/actsamstestfourthscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
+++ /dev/null
@@ -1,154 +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 featureAbility from '@ohos.ability.featureability'
-import appManager from "@ohos.application.appManager"
-import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index'
-
-describe('ActsAmsTestFourthScene', function () {
- console.info('----ActsAmsTestFourthScene----');
- beforeAll(async function (done) {
- await featureAbility.startAbility(
- {
- want:
- {
- deviceId: "",
- bundleName: "com.ix.verify.io",
- abilityName: "com.example.VerifyIoThirdAbility",
- action: "action1",
- entities: ["entity1"],
- type: "MIMETYPE",
- uri: "key={true,true,false}",
- options:
- {},
- parameters:
- {},
- },
- }, (error, data) => {
- console.info('ActsAmsTestFourthScene VerifyIoThirdAbility start, error.code \
- ' + error.code + ', data length [' + data.length + ']');
- }
- );
-
- await featureAbility.startAbility(
- {
- want:
- {
- deviceId: "",
- bundleName: "com.ix.simulate.feature",
- abilityName: "com.example.SimulateFeatureAbilityFir",
- action: "action1",
- entities: ["entity1"],
- type: "MIMETYPE",
- uri: "key={true,true,false}",
- options:
- {},
- parameters:
- {},
- },
- }, (error, data) => {
- console.info('ActsAmsTestFourthScene SimulateFeatureAbilityFir start, error.code \
- ' + error.code + ', data length [' + data.length + ']');
- }
- );
-
- await featureAbility.startAbility(
- {
- want:
- {
- deviceId: "",
- bundleName: "com.ix.verify.act",
- abilityName: "com.example.VerifyActThirdAbility",
- action: "action1",
- entities: ["entity1"],
- type: "MIMETYPE",
- uri: "key={true,true,false}",
- options:
- {},
- parameters:
- {},
- },
- }, (error, data) => {
- console.info('ActsAmsTestFourthScene VerifyActThirdAbility start, error.code \
- ' + error.code + ', data length [' + data.length + ']');
- }
- );
-
- await featureAbility.startAbility(
- {
- want:
- {
- deviceId: "",
- bundleName: "com.ix.simulate.entry",
- abilityName: "com.example.SimulateEntryAbility",
- action: "action1",
- entities: ["entity1"],
- type: "MIMETYPE",
- uri: "key={true,true,false}",
- options:
- {},
- parameters:
- {},
- },
- }, (error, data) => {
- console.info('ActsAmsTestFourthScene SimulateEntryAbility start, error.code \
- ' + error.code + ', data length [' + data.length + ']');
- }
- );
- done();
- });
-
- function timeout(done) {
- expect().assertFail();
- console.debug('Acts_Ams_test=========timeout========');
- done();
- }
-
- function sleep(delay) {
- var start = new Date().getTime();
- while (true) {
- if (new Date().getTime() - start > delay) {
- break;
- }
- }
- }
-
- /*
- * @tc.number : Acts_Ams_test_1700
- * @tc.name : getProcessRunningInfos : Get All Running Processes Info
- * @tc.desc : Get All Running Processes Info(by Promise)
- */
- it('Acts_Ams_test_1700', 0, async function (done) {
- console.info("sleep begin");
- sleep(5000);
- console.info("sleep end");
- var info = await appManager.getProcessRunningInfos();
- expect(Array.isArray(info)).assertEqual(true);
- expect(info.length).assertLarger(0);
- for (var i = 0; i < info.length; i++) {
- console.info('Acts_Ams_test_1700 getProcessRunningInfo[' + i + "]: " + JSON.stringify(info[i]));
- expect(typeof (info[i].pid)).assertEqual("number");
- expect(info[i].pid).assertLarger(0);
-
- expect(typeof (info[i].processName)).assertEqual("string");
- expect(info[i].processName.length).assertLarger(0);
- expect(Array.isArray(info[i].bundleNames)).assertEqual(true);
- expect(info[i].bundleNames.length).assertEqual(0);
-
- expect(typeof (info[i].uid)).assertEqual("number");
- expect(info[i].uid).assertLarger(0);
- }
- done();
- })
-})
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/abilitymanager/actsamstestsecondscene/entry/src/main/config.json b/aafwk/aafwk_standard/abilitymanager/actsamstestsecondscene/entry/src/main/config.json
deleted file mode 100644
index b877c7d21a4e6ce8240807de6033f6d911ea8afc..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/actsamstestsecondscene/entry/src/main/config.json
+++ /dev/null
@@ -1,87 +0,0 @@
-{
- "app": {
- "bundleName": "com.example.actsamstestsecondscene",
- "vendor": "example",
- "version": {
- "code": 1,
- "name": "1.0"
- },
- "apiVersion": {
- "compatible": 4,
- "target": 5,
- "releaseType": "Beta1"
- }
- },
- "deviceConfig": {},
- "module": {
- "package": "com.example.actsamstestsecondscene",
- "name": ".MyApplication",
- "deviceType": [
- "phone"
- ],
- "distro": {
- "deliveryWithInstall": true,
- "moduleName": "entry",
- "moduleType": "entry",
- "installationFree": true
- },
- "abilities": [
- {
- "visible": true,
- "name": "com.example.actsamstestsecondscene.MainAbility",
- "icon": "$media:icon",
- "description": "$string:mainability_description",
- "label": "$string:app_name",
- "type": "page",
- "isVisible": "true",
- "launchType": "singleton"
- }
- ],
- "reqPermissions": [
- {
- "name": "ohos.permission.INSTALL_BUNDLE",
- "reason": "need use ohos.permission.INSTALL_BUNDLE"
- },
- {
- "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.CLEAN_BACKGROUND_PROCESSES",
- "reason":"need use ohos.permission.CLEAN_BACKGROUND_PROCESSES"
- },
- {
- "name":"ohos.permission.MANAGE_MISSIONS",
- "reason":"need use ohos.permission.MANAGE_MISSIONS"
- },
- {
- "name":"ohos.permission.GET_RUNNING_INFO",
- "reason":"need use ohos.permission.GET_RUNNING_INFO"
- }
- ],
- "js": [
- {
- "pages": [
- "pages/index/index"
- ],
- "name": "default",
- "window": {
- "designWidth": 720,
- "autoDesignWidth": false
- }
- }
- ]
- }
-}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/abilitymanager/actsamstestsecondscene/entry/src/main/js/default/app.js b/aafwk/aafwk_standard/abilitymanager/actsamstestsecondscene/entry/src/main/js/default/app.js
deleted file mode 100644
index 2a68c1992145a976957d7dcdd69a7e9c2e8e9877..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/actsamstestsecondscene/entry/src/main/js/default/app.js
+++ /dev/null
@@ -1,22 +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.
- */
-export default {
- onCreate() {
- console.info('AceApplication onCreate');
- },
- onDestroy() {
- console.info('AceApplication onDestroy');
- }
-};
diff --git a/aafwk/aafwk_standard/abilitymanager/actsamstestsecondscene/entry/src/main/js/default/pages/index/index.css b/aafwk/aafwk_standard/abilitymanager/actsamstestsecondscene/entry/src/main/js/default/pages/index/index.css
deleted file mode 100755
index caf729946975b79e55ab9e56e55bf860337b3f50..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/actsamstestsecondscene/entry/src/main/js/default/pages/index/index.css
+++ /dev/null
@@ -1,38 +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.
- */
-
-.container {
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- left: 0px;
- top: 0px;
- width: 100%;
- height: 100%;
-}
-
-.title {
- font-size: 60px;
- text-align: center;
- width: 100%;
- height: 40%;
- margin: 10px;
-}
-.btn {
- width: 50%;
- height: 100px;
- font-size: 40px;
-}
diff --git a/aafwk/aafwk_standard/abilitymanager/actsamstestsecondscene/entry/src/main/js/default/pages/index/index.hml b/aafwk/aafwk_standard/abilitymanager/actsamstestsecondscene/entry/src/main/js/default/pages/index/index.hml
deleted file mode 100755
index 61ea59d936e5a2971f1ea3d179c44a7f3f596c54..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/actsamstestsecondscene/entry/src/main/js/default/pages/index/index.hml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- {{ $t('strings.hello') }} {{title}}
-
-
-
diff --git a/aafwk/aafwk_standard/abilitymanager/actsamstestsecondscene/entry/src/main/js/resources/base/element/string.json b/aafwk/aafwk_standard/abilitymanager/actsamstestsecondscene/entry/src/main/js/resources/base/element/string.json
deleted file mode 100755
index f94ce7e64e455e1ebf22a4b2792c5b52c791d037..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/actsamstestsecondscene/entry/src/main/js/resources/base/element/string.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "string": [
- {
- "name": "app_name",
- "value": "JsHelloWorld"
- },
- {
- "name": "mainability_description",
- "value": "hap sample empty page"
- }
- ]
-}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/abilitymanager/actsamstestsecondscene/entry/src/main/js/test/MangerAbilityJsunit.test.js b/aafwk/aafwk_standard/abilitymanager/actsamstestsecondscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
deleted file mode 100644
index 30148309fb0f10aaca15a5528f2788788dc5a3ae..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/actsamstestsecondscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
+++ /dev/null
@@ -1,110 +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 featureAbility from '@ohos.ability.featureability'
-import appManager from "@ohos.application.appManager"
-import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index'
-
-describe('ActsAmsTestSecondScene', function () {
- console.info('----ActsAmsTestSecondScene----');
- beforeAll(async function (done) {
- await featureAbility.startAbility(
- {
- want:
- {
- deviceId: "",
- bundleName: "com.ix.verify.io",
- abilityName: "com.example.VerifyIoThirdAbility",
- action: "action1",
- entities: ["entity1"],
- type: "MIMETYPE",
- uri: "key={true,true,false}",
- options:
- {},
- parameters:
- {},
- },
- }, (error, data) => {
- console.info('ActsAmsTestSecondScene VerifyIoThirdAbility start, error.code \
- ' + error.code + ', data length [' + data.length + ']');
- }
- );
-
- await featureAbility.startAbility(
- {
- want:
- {
- deviceId: "",
- bundleName: "com.ix.simulate.feature",
- abilityName: "com.example.SimulateFeatureAbilityFir",
- action: "action1",
- entities: ["entity1"],
- type: "MIMETYPE",
- uri: "key={true,true,false}",
- options:
- {},
- parameters:
- {},
- },
- }, (error, data) => {
- console.info('ActsAmsTestSecondScene SimulateFeatureAbilityFir start, error.code \
- ' + error.code + ', data length [' + data.length + ']');
- }
- );
- done();
- });
-
- function timeout(done) {
- expect().assertFail();
- console.debug('Acts_Ams_test=========timeout========');
- done();
- }
-
- function sleep(delay) {
- var start = new Date().getTime();
- while (true) {
- if (new Date().getTime() - start > delay) {
- break;
- }
- }
- }
-
- /*
- * @tc.number : Acts_Ams_test_1700
- * @tc.name : getProcessRunningInfos : Get All Running Processes Info
- * @tc.desc : Get All Running Processes Info(by Promise)
- */
- it('Acts_Ams_test_1700', 0, async function (done) {
- console.info("sleep begin");
- sleep(5000);
- console.info("sleep end");
- var info = await appManager.getProcessRunningInfos();
- expect(Array.isArray(info)).assertEqual(true);
- expect(info.length).assertLarger(0);
- for (var i = 0; i < info.length; i++) {
- console.info('Acts_Ams_test_1700 getProcessRunningInfo[' + i + "]: " + JSON.stringify(info[i]));
- expect(typeof (info[i].pid)).assertEqual("number");
- expect(info[i].pid).assertLarger(0);
-
- expect(typeof (info[i].processName)).assertEqual("string");
- expect(info[i].processName.length).assertLarger(0);
- expect(Array.isArray(info[i].bundleNames)).assertEqual(true);
- expect(info[i].bundleNames.length).assertEqual(0);
-
- expect(typeof (info[i].uid)).assertEqual("number");
- expect(info[i].uid).assertLarger(0);
- }
- done();
- })
-})
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/abilitymanager/actsamstestthirdscene/entry/src/main/config.json b/aafwk/aafwk_standard/abilitymanager/actsamstestthirdscene/entry/src/main/config.json
deleted file mode 100644
index bfa361843e1c5e59f83ed22dd68ced2b9db5a2b7..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/actsamstestthirdscene/entry/src/main/config.json
+++ /dev/null
@@ -1,87 +0,0 @@
-{
- "app": {
- "bundleName": "com.example.actsamstestthirdscene",
- "vendor": "example",
- "version": {
- "code": 1,
- "name": "1.0"
- },
- "apiVersion": {
- "compatible": 4,
- "target": 5,
- "releaseType": "Beta1"
- }
- },
- "deviceConfig": {},
- "module": {
- "package": "com.example.actsamstestthirdscene",
- "name": ".MyApplication",
- "deviceType": [
- "phone"
- ],
- "distro": {
- "deliveryWithInstall": true,
- "moduleName": "entry",
- "moduleType": "entry",
- "installationFree": true
- },
- "abilities": [
- {
- "visible": true,
- "name": "com.example.actsamstestthirdscene.MainAbility",
- "icon": "$media:icon",
- "description": "$string:mainability_description",
- "label": "$string:app_name",
- "type": "page",
- "isVisible": "true",
- "launchType": "singleton"
- }
- ],
- "reqPermissions": [
- {
- "name": "ohos.permission.INSTALL_BUNDLE",
- "reason": "need use ohos.permission.INSTALL_BUNDLE"
- },
- {
- "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.CLEAN_BACKGROUND_PROCESSES",
- "reason":"need use ohos.permission.CLEAN_BACKGROUND_PROCESSES"
- },
- {
- "name":"ohos.permission.MANAGE_MISSIONS",
- "reason":"need use ohos.permission.MANAGE_MISSIONS"
- },
- {
- "name":"ohos.permission.GET_RUNNING_INFO",
- "reason":"need use ohos.permission.GET_RUNNING_INFO"
- }
- ],
- "js": [
- {
- "pages": [
- "pages/index/index"
- ],
- "name": "default",
- "window": {
- "designWidth": 720,
- "autoDesignWidth": false
- }
- }
- ]
- }
-}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/abilitymanager/actsamstestthirdscene/entry/src/main/js/default/app.js b/aafwk/aafwk_standard/abilitymanager/actsamstestthirdscene/entry/src/main/js/default/app.js
deleted file mode 100644
index 2a68c1992145a976957d7dcdd69a7e9c2e8e9877..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/actsamstestthirdscene/entry/src/main/js/default/app.js
+++ /dev/null
@@ -1,22 +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.
- */
-export default {
- onCreate() {
- console.info('AceApplication onCreate');
- },
- onDestroy() {
- console.info('AceApplication onDestroy');
- }
-};
diff --git a/aafwk/aafwk_standard/abilitymanager/actsamstestthirdscene/entry/src/main/js/default/pages/index/index.css b/aafwk/aafwk_standard/abilitymanager/actsamstestthirdscene/entry/src/main/js/default/pages/index/index.css
deleted file mode 100755
index caf729946975b79e55ab9e56e55bf860337b3f50..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/actsamstestthirdscene/entry/src/main/js/default/pages/index/index.css
+++ /dev/null
@@ -1,38 +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.
- */
-
-.container {
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- left: 0px;
- top: 0px;
- width: 100%;
- height: 100%;
-}
-
-.title {
- font-size: 60px;
- text-align: center;
- width: 100%;
- height: 40%;
- margin: 10px;
-}
-.btn {
- width: 50%;
- height: 100px;
- font-size: 40px;
-}
diff --git a/aafwk/aafwk_standard/abilitymanager/actsamstestthirdscene/entry/src/main/js/default/pages/index/index.hml b/aafwk/aafwk_standard/abilitymanager/actsamstestthirdscene/entry/src/main/js/default/pages/index/index.hml
deleted file mode 100755
index 61ea59d936e5a2971f1ea3d179c44a7f3f596c54..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/actsamstestthirdscene/entry/src/main/js/default/pages/index/index.hml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- {{ $t('strings.hello') }} {{title}}
-
-
-
diff --git a/aafwk/aafwk_standard/abilitymanager/actsamstestthirdscene/entry/src/main/js/resources/base/element/string.json b/aafwk/aafwk_standard/abilitymanager/actsamstestthirdscene/entry/src/main/js/resources/base/element/string.json
deleted file mode 100755
index f94ce7e64e455e1ebf22a4b2792c5b52c791d037..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/actsamstestthirdscene/entry/src/main/js/resources/base/element/string.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "string": [
- {
- "name": "app_name",
- "value": "JsHelloWorld"
- },
- {
- "name": "mainability_description",
- "value": "hap sample empty page"
- }
- ]
-}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/abilitymanager/actsamstestthirdscene/entry/src/main/js/test/MangerAbilityJsunit.test.js b/aafwk/aafwk_standard/abilitymanager/actsamstestthirdscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
deleted file mode 100644
index a3775ae39d5a13062873e441d7152b906e20b602..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/actsamstestthirdscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
+++ /dev/null
@@ -1,112 +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 featureAbility from '@ohos.ability.featureability'
-import appManager from "@ohos.application.appManager"
-import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index'
-
-describe('ActsAmsTestThirdScene', function () {
- console.info('----ActsAmsTestThirdScene----');
-
- beforeAll(async function (done) {
- await featureAbility.startAbility(
- {
- want:
- {
- deviceId: "",
- bundleName: "com.ix.simulate.feature",
- abilityName: "com.example.SimulateFeatureAbilityFir",
- action: "action1",
- entities: ["entity1"],
- type: "MIMETYPE",
- uri: "key={true,true,false}",
- options:
- {},
- parameters:
- {},
- },
- }, (error, data) => {
- console.info('ActsAmsTestThirdScene SimulateFeatureAbilityFir start, error.code \
- ' + error.code + ', data length [' + data.length + ']');
- }
- );
-
- await featureAbility.startAbility(
- {
- want:
- {
- deviceId: "",
- bundleName: "com.ix.verify.io",
- abilityName: "com.example.VerifyIoThirdAbility",
- action: "action1",
- entities: ["entity1"],
- type: "MIMETYPE",
- uri: "key={true,true,false}",
- options:
- {},
- parameters:
- {},
- },
- }, (error, data) => {
- console.info('ActsAmsTestThirdScene VerifyIoThirdAbility start, error.code \
- ' + error.code + ', data length [' + data.length + ']');
- }
- );
- done();
- });
-
- function timeout(done) {
- expect().assertFail();
- console.debug('Acts_Ams_test=========timeout========');
- done();
- }
-
- function sleep(delay) {
- var start = new Date().getTime();
- while (true) {
- if (new Date().getTime() - start > delay) {
- break;
- }
- }
- }
-
- /*
- * @tc.number : Acts_Ams_test_3300
- * @tc.name : getProcessRunningInfos : Get All Running Processes Info
- * @tc.desc : Get All Running Processes Info(by Promise)
- */
- it('Acts_Ams_test_3300', 0, async function (done) {
- console.info("sleep begin");
- sleep(5000);
- console.info("sleep end");
- var info = await appManager.getProcessRunningInfos();
- console.info('Acts_Ams_test_3300 getProcessRunningInfos JSON String: ' + JSON.stringify(info));
- expect(Array.isArray(info)).assertEqual(true);
- expect(info.length).assertLarger(0);
- for (var i = 0; i < info.length; i++) {
- console.info('Acts_Ams_test_3300 getProcessRunningInfo[' + i + "]: " + JSON.stringify(info[i]));
- expect(typeof (info[i].pid)).assertEqual("number");
- expect(info[i].pid).assertLarger(0);
-
- expect(typeof (info[i].processName)).assertEqual("string");
- expect(info[i].processName.length).assertLarger(0);
- expect(Array.isArray(info[i].bundleNames)).assertEqual(true);
- expect(info[i].bundleNames.length).assertEqual(0);
-
- expect(typeof (info[i].uid)).assertEqual("number");
- expect(info[i].uid).assertLarger(0);
- }
- done();
- })
-})
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/abilitymanager/sceneProject/simulateEAbility/src/main/config.json b/aafwk/aafwk_standard/abilitymanager/sceneProject/simulateEAbility/src/main/config.json
deleted file mode 100644
index 863cea8c0d2beb9916eacc1e9bf602f5a4c2ce9b..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/sceneProject/simulateEAbility/src/main/config.json
+++ /dev/null
@@ -1,74 +0,0 @@
-{
- "app": {
- "bundleName": "com.ix.simulate.entry",
- "vendor": "example",
- "version": {
- "code": 1,
- "name": "1.0"
- },
- "apiVersion": {
- "compatible": 4,
- "target": 5,
- "releaseType": "Beta1"
- }
- },
- "deviceConfig": {},
- "module": {
- "package": "com.example.simulateeability",
- "name": ".MyApplication",
- "deviceType": [
- "phone"
- ],
- "distro": {
- "deliveryWithInstall": true,
- "moduleName": "simulateEAbility",
- "moduleType": "feature",
- "installationFree": true
- },
- "abilities": [
- {
- "visible": true,
- "name": "com.example.SimulateEntryAbility",
- "icon": "$media:icon",
- "description": "$string:mainability_description",
- "label": "$string:app_name",
- "type": "page",
- "launchType": "standard"
- }
- ],
- "reqPermissions": [
- {
- "name": "ohos.permission.INSTALL_BUNDLE",
- "reason": "need use ohos.permission.INSTALL_BUNDLE"
- },
- {
- "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"
- }
- ],
- "js": [
- {
- "pages": [
- "pages/index/index"
- ],
- "name": "default",
- "window": {
- "designWidth": 720,
- "autoDesignWidth": false
- }
- }
- ]
- }
-}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/abilitymanager/sceneProject/simulateEAbility/src/main/js/default/app.js b/aafwk/aafwk_standard/abilitymanager/sceneProject/simulateEAbility/src/main/js/default/app.js
deleted file mode 100644
index 2a68c1992145a976957d7dcdd69a7e9c2e8e9877..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/sceneProject/simulateEAbility/src/main/js/default/app.js
+++ /dev/null
@@ -1,22 +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.
- */
-export default {
- onCreate() {
- console.info('AceApplication onCreate');
- },
- onDestroy() {
- console.info('AceApplication onDestroy');
- }
-};
diff --git a/aafwk/aafwk_standard/abilitymanager/sceneProject/simulateEAbility/src/main/js/default/pages/index/index.css b/aafwk/aafwk_standard/abilitymanager/sceneProject/simulateEAbility/src/main/js/default/pages/index/index.css
deleted file mode 100755
index caf729946975b79e55ab9e56e55bf860337b3f50..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/sceneProject/simulateEAbility/src/main/js/default/pages/index/index.css
+++ /dev/null
@@ -1,38 +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.
- */
-
-.container {
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- left: 0px;
- top: 0px;
- width: 100%;
- height: 100%;
-}
-
-.title {
- font-size: 60px;
- text-align: center;
- width: 100%;
- height: 40%;
- margin: 10px;
-}
-.btn {
- width: 50%;
- height: 100px;
- font-size: 40px;
-}
diff --git a/aafwk/aafwk_standard/abilitymanager/sceneProject/simulateEAbility/src/main/js/default/pages/index/index.hml b/aafwk/aafwk_standard/abilitymanager/sceneProject/simulateEAbility/src/main/js/default/pages/index/index.hml
deleted file mode 100755
index 61ea59d936e5a2971f1ea3d179c44a7f3f596c54..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/sceneProject/simulateEAbility/src/main/js/default/pages/index/index.hml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- {{ $t('strings.hello') }} {{title}}
-
-
-
diff --git a/aafwk/aafwk_standard/abilitymanager/sceneProject/simulateEAbility/src/main/js/resources/base/element/string.json b/aafwk/aafwk_standard/abilitymanager/sceneProject/simulateEAbility/src/main/js/resources/base/element/string.json
deleted file mode 100755
index f94ce7e64e455e1ebf22a4b2792c5b52c791d037..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/sceneProject/simulateEAbility/src/main/js/resources/base/element/string.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "string": [
- {
- "name": "app_name",
- "value": "JsHelloWorld"
- },
- {
- "name": "mainability_description",
- "value": "hap sample empty page"
- }
- ]
-}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/abilitymanager/sceneProject/simulateFAbilityFir/src/main/config.json b/aafwk/aafwk_standard/abilitymanager/sceneProject/simulateFAbilityFir/src/main/config.json
deleted file mode 100644
index ba0166b87a7e0e550e0c56d4d117e37ce147537a..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/sceneProject/simulateFAbilityFir/src/main/config.json
+++ /dev/null
@@ -1,74 +0,0 @@
-{
- "app": {
- "bundleName": "com.ix.simulate.feature",
- "vendor": "example",
- "version": {
- "code": 1,
- "name": "1.0"
- },
- "apiVersion": {
- "compatible": 4,
- "target": 5,
- "releaseType": "Beta1"
- }
- },
- "deviceConfig": {},
- "module": {
- "package": "com.example.simulatefabilityfir",
- "name": ".MyApplication",
- "deviceType": [
- "phone"
- ],
- "distro": {
- "deliveryWithInstall": true,
- "moduleName": "simulateFAbilityFir",
- "moduleType": "feature",
- "installationFree": true
- },
- "abilities": [
- {
- "visible": true,
- "name": "com.example.SimulateFeatureAbilityFir",
- "icon": "$media:icon",
- "description": "$string:mainability_description",
- "label": "$string:app_name",
- "type": "page",
- "launchType": "standard"
- }
- ],
- "reqPermissions": [
- {
- "name": "ohos.permission.INSTALL_BUNDLE",
- "reason": "need use ohos.permission.INSTALL_BUNDLE"
- },
- {
- "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"
- }
- ],
- "js": [
- {
- "pages": [
- "pages/index/index"
- ],
- "name": "default",
- "window": {
- "designWidth": 720,
- "autoDesignWidth": false
- }
- }
- ]
- }
-}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/abilitymanager/sceneProject/simulateFAbilityFir/src/main/js/default/app.js b/aafwk/aafwk_standard/abilitymanager/sceneProject/simulateFAbilityFir/src/main/js/default/app.js
deleted file mode 100644
index 2a68c1992145a976957d7dcdd69a7e9c2e8e9877..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/sceneProject/simulateFAbilityFir/src/main/js/default/app.js
+++ /dev/null
@@ -1,22 +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.
- */
-export default {
- onCreate() {
- console.info('AceApplication onCreate');
- },
- onDestroy() {
- console.info('AceApplication onDestroy');
- }
-};
diff --git a/aafwk/aafwk_standard/abilitymanager/sceneProject/simulateFAbilityFir/src/main/js/default/pages/index/index.css b/aafwk/aafwk_standard/abilitymanager/sceneProject/simulateFAbilityFir/src/main/js/default/pages/index/index.css
deleted file mode 100755
index caf729946975b79e55ab9e56e55bf860337b3f50..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/sceneProject/simulateFAbilityFir/src/main/js/default/pages/index/index.css
+++ /dev/null
@@ -1,38 +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.
- */
-
-.container {
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- left: 0px;
- top: 0px;
- width: 100%;
- height: 100%;
-}
-
-.title {
- font-size: 60px;
- text-align: center;
- width: 100%;
- height: 40%;
- margin: 10px;
-}
-.btn {
- width: 50%;
- height: 100px;
- font-size: 40px;
-}
diff --git a/aafwk/aafwk_standard/abilitymanager/sceneProject/simulateFAbilityFir/src/main/js/default/pages/index/index.hml b/aafwk/aafwk_standard/abilitymanager/sceneProject/simulateFAbilityFir/src/main/js/default/pages/index/index.hml
deleted file mode 100755
index 61ea59d936e5a2971f1ea3d179c44a7f3f596c54..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/sceneProject/simulateFAbilityFir/src/main/js/default/pages/index/index.hml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- {{ $t('strings.hello') }} {{title}}
-
-
-
diff --git a/aafwk/aafwk_standard/abilitymanager/sceneProject/simulateFAbilityFir/src/main/js/resources/base/element/string.json b/aafwk/aafwk_standard/abilitymanager/sceneProject/simulateFAbilityFir/src/main/js/resources/base/element/string.json
deleted file mode 100755
index f94ce7e64e455e1ebf22a4b2792c5b52c791d037..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/sceneProject/simulateFAbilityFir/src/main/js/resources/base/element/string.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "string": [
- {
- "name": "app_name",
- "value": "JsHelloWorld"
- },
- {
- "name": "mainability_description",
- "value": "hap sample empty page"
- }
- ]
-}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/abilitymanager/sceneProject/simulateFAbilitySed/src/main/config.json b/aafwk/aafwk_standard/abilitymanager/sceneProject/simulateFAbilitySed/src/main/config.json
deleted file mode 100644
index 19d4fdde572a057d21418b89b5f705260141557d..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/sceneProject/simulateFAbilitySed/src/main/config.json
+++ /dev/null
@@ -1,74 +0,0 @@
-{
- "app": {
- "bundleName": "com.ix.simulate.feature",
- "vendor": "example",
- "version": {
- "code": 1,
- "name": "1.0"
- },
- "apiVersion": {
- "compatible": 4,
- "target": 5,
- "releaseType": "Beta1"
- }
- },
- "deviceConfig": {},
- "module": {
- "package": "com.example.simulatefabilitysed",
- "name": ".MyApplication",
- "deviceType": [
- "phone"
- ],
- "distro": {
- "deliveryWithInstall": true,
- "moduleName": "simulateFAbilitySed",
- "moduleType": "feature",
- "installationFree": true
- },
- "abilities": [
- {
- "visible": true,
- "name": "com.example.SimulateFeatureAbilitySed",
- "icon": "$media:icon",
- "description": "$string:mainability_description",
- "label": "$string:app_name",
- "type": "page",
- "launchType": "standard"
- }
- ],
- "reqPermissions": [
- {
- "name": "ohos.permission.INSTALL_BUNDLE",
- "reason": "need use ohos.permission.INSTALL_BUNDLE"
- },
- {
- "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"
- }
- ],
- "js": [
- {
- "pages": [
- "pages/index/index"
- ],
- "name": "default",
- "window": {
- "designWidth": 720,
- "autoDesignWidth": false
- }
- }
- ]
- }
-}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/abilitymanager/sceneProject/simulateFAbilitySed/src/main/js/default/app.js b/aafwk/aafwk_standard/abilitymanager/sceneProject/simulateFAbilitySed/src/main/js/default/app.js
deleted file mode 100644
index 2a68c1992145a976957d7dcdd69a7e9c2e8e9877..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/sceneProject/simulateFAbilitySed/src/main/js/default/app.js
+++ /dev/null
@@ -1,22 +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.
- */
-export default {
- onCreate() {
- console.info('AceApplication onCreate');
- },
- onDestroy() {
- console.info('AceApplication onDestroy');
- }
-};
diff --git a/aafwk/aafwk_standard/abilitymanager/sceneProject/simulateFAbilitySed/src/main/js/default/pages/index/index.css b/aafwk/aafwk_standard/abilitymanager/sceneProject/simulateFAbilitySed/src/main/js/default/pages/index/index.css
deleted file mode 100755
index caf729946975b79e55ab9e56e55bf860337b3f50..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/sceneProject/simulateFAbilitySed/src/main/js/default/pages/index/index.css
+++ /dev/null
@@ -1,38 +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.
- */
-
-.container {
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- left: 0px;
- top: 0px;
- width: 100%;
- height: 100%;
-}
-
-.title {
- font-size: 60px;
- text-align: center;
- width: 100%;
- height: 40%;
- margin: 10px;
-}
-.btn {
- width: 50%;
- height: 100px;
- font-size: 40px;
-}
diff --git a/aafwk/aafwk_standard/abilitymanager/sceneProject/simulateFAbilitySed/src/main/js/default/pages/index/index.hml b/aafwk/aafwk_standard/abilitymanager/sceneProject/simulateFAbilitySed/src/main/js/default/pages/index/index.hml
deleted file mode 100755
index 61ea59d936e5a2971f1ea3d179c44a7f3f596c54..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/sceneProject/simulateFAbilitySed/src/main/js/default/pages/index/index.hml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- {{ $t('strings.hello') }} {{title}}
-
-
-
diff --git a/aafwk/aafwk_standard/abilitymanager/sceneProject/simulateFAbilitySed/src/main/js/resources/base/element/string.json b/aafwk/aafwk_standard/abilitymanager/sceneProject/simulateFAbilitySed/src/main/js/resources/base/element/string.json
deleted file mode 100755
index f94ce7e64e455e1ebf22a4b2792c5b52c791d037..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/sceneProject/simulateFAbilitySed/src/main/js/resources/base/element/string.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "string": [
- {
- "name": "app_name",
- "value": "JsHelloWorld"
- },
- {
- "name": "mainability_description",
- "value": "hap sample empty page"
- }
- ]
-}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/abilitymanager/sceneProject/verifyAAbility/src/main/config.json b/aafwk/aafwk_standard/abilitymanager/sceneProject/verifyAAbility/src/main/config.json
deleted file mode 100644
index 101baeb978f8f09baf374e7397cb886f7d49c857..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/sceneProject/verifyAAbility/src/main/config.json
+++ /dev/null
@@ -1,74 +0,0 @@
-{
- "app": {
- "bundleName": "com.ix.verify.act",
- "vendor": "example",
- "version": {
- "code": 1,
- "name": "1.0"
- },
- "apiVersion": {
- "compatible": 4,
- "target": 5,
- "releaseType": "Beta1"
- }
- },
- "deviceConfig": {},
- "module": {
- "package": "com.example.verifyaability",
- "name": ".MyApplication",
- "deviceType": [
- "phone"
- ],
- "distro": {
- "deliveryWithInstall": true,
- "moduleName": "verifyAAbility",
- "moduleType": "feature",
- "installationFree": true
- },
- "abilities": [
- {
- "visible": true,
- "name": "com.example.VerifyActThirdAbility",
- "icon": "$media:icon",
- "description": "$string:mainability_description",
- "label": "$string:app_name",
- "type": "page",
- "launchType": "singleton"
- }
- ],
- "reqPermissions": [
- {
- "name": "ohos.permission.INSTALL_BUNDLE",
- "reason": "need use ohos.permission.INSTALL_BUNDLE"
- },
- {
- "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"
- }
- ],
- "js": [
- {
- "pages": [
- "pages/index/index"
- ],
- "name": "default",
- "window": {
- "designWidth": 720,
- "autoDesignWidth": false
- }
- }
- ]
- }
-}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/abilitymanager/sceneProject/verifyAAbility/src/main/js/default/app.js b/aafwk/aafwk_standard/abilitymanager/sceneProject/verifyAAbility/src/main/js/default/app.js
deleted file mode 100644
index 2a68c1992145a976957d7dcdd69a7e9c2e8e9877..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/sceneProject/verifyAAbility/src/main/js/default/app.js
+++ /dev/null
@@ -1,22 +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.
- */
-export default {
- onCreate() {
- console.info('AceApplication onCreate');
- },
- onDestroy() {
- console.info('AceApplication onDestroy');
- }
-};
diff --git a/aafwk/aafwk_standard/abilitymanager/sceneProject/verifyAAbility/src/main/js/default/pages/index/index.css b/aafwk/aafwk_standard/abilitymanager/sceneProject/verifyAAbility/src/main/js/default/pages/index/index.css
deleted file mode 100755
index caf729946975b79e55ab9e56e55bf860337b3f50..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/sceneProject/verifyAAbility/src/main/js/default/pages/index/index.css
+++ /dev/null
@@ -1,38 +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.
- */
-
-.container {
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- left: 0px;
- top: 0px;
- width: 100%;
- height: 100%;
-}
-
-.title {
- font-size: 60px;
- text-align: center;
- width: 100%;
- height: 40%;
- margin: 10px;
-}
-.btn {
- width: 50%;
- height: 100px;
- font-size: 40px;
-}
diff --git a/aafwk/aafwk_standard/abilitymanager/sceneProject/verifyAAbility/src/main/js/default/pages/index/index.hml b/aafwk/aafwk_standard/abilitymanager/sceneProject/verifyAAbility/src/main/js/default/pages/index/index.hml
deleted file mode 100755
index 61ea59d936e5a2971f1ea3d179c44a7f3f596c54..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/sceneProject/verifyAAbility/src/main/js/default/pages/index/index.hml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- {{ $t('strings.hello') }} {{title}}
-
-
-
diff --git a/aafwk/aafwk_standard/abilitymanager/sceneProject/verifyAAbility/src/main/js/resources/base/element/string.json b/aafwk/aafwk_standard/abilitymanager/sceneProject/verifyAAbility/src/main/js/resources/base/element/string.json
deleted file mode 100755
index f94ce7e64e455e1ebf22a4b2792c5b52c791d037..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/sceneProject/verifyAAbility/src/main/js/resources/base/element/string.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "string": [
- {
- "name": "app_name",
- "value": "JsHelloWorld"
- },
- {
- "name": "mainability_description",
- "value": "hap sample empty page"
- }
- ]
-}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/abilitymanager/sceneProject/verifyIAbility/src/main/config.json b/aafwk/aafwk_standard/abilitymanager/sceneProject/verifyIAbility/src/main/config.json
deleted file mode 100644
index 657b60b37733030913c3bdaf3df3eeb946919ebf..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/sceneProject/verifyIAbility/src/main/config.json
+++ /dev/null
@@ -1,74 +0,0 @@
-{
- "app": {
- "bundleName": "com.ix.verify.io",
- "vendor": "example",
- "version": {
- "code": 1,
- "name": "1.0"
- },
- "apiVersion": {
- "compatible": 4,
- "target": 5,
- "releaseType": "Beta1"
- }
- },
- "deviceConfig": {},
- "module": {
- "package": "com.example.verifyiability",
- "name": ".MyApplication",
- "deviceType": [
- "phone"
- ],
- "distro": {
- "deliveryWithInstall": true,
- "moduleName": "verifyIAbility",
- "moduleType": "feature",
- "installationFree": true
- },
- "abilities": [
- {
- "visible": true,
- "name": "com.example.VerifyIoThirdAbility",
- "icon": "$media:icon",
- "description": "$string:mainability_description",
- "label": "$string:app_name",
- "type": "page",
- "launchType": "singleton"
- }
- ],
- "reqPermissions": [
- {
- "name": "ohos.permission.INSTALL_BUNDLE",
- "reason": "need use ohos.permission.INSTALL_BUNDLE"
- },
- {
- "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"
- }
- ],
- "js": [
- {
- "pages": [
- "pages/index/index"
- ],
- "name": "default",
- "window": {
- "designWidth": 720,
- "autoDesignWidth": false
- }
- }
- ]
- }
-}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/abilitymanager/sceneProject/verifyIAbility/src/main/js/default/app.js b/aafwk/aafwk_standard/abilitymanager/sceneProject/verifyIAbility/src/main/js/default/app.js
deleted file mode 100644
index 2a68c1992145a976957d7dcdd69a7e9c2e8e9877..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/sceneProject/verifyIAbility/src/main/js/default/app.js
+++ /dev/null
@@ -1,22 +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.
- */
-export default {
- onCreate() {
- console.info('AceApplication onCreate');
- },
- onDestroy() {
- console.info('AceApplication onDestroy');
- }
-};
diff --git a/aafwk/aafwk_standard/abilitymanager/sceneProject/verifyIAbility/src/main/js/default/pages/index/index.css b/aafwk/aafwk_standard/abilitymanager/sceneProject/verifyIAbility/src/main/js/default/pages/index/index.css
deleted file mode 100755
index caf729946975b79e55ab9e56e55bf860337b3f50..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/sceneProject/verifyIAbility/src/main/js/default/pages/index/index.css
+++ /dev/null
@@ -1,38 +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.
- */
-
-.container {
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- left: 0px;
- top: 0px;
- width: 100%;
- height: 100%;
-}
-
-.title {
- font-size: 60px;
- text-align: center;
- width: 100%;
- height: 40%;
- margin: 10px;
-}
-.btn {
- width: 50%;
- height: 100px;
- font-size: 40px;
-}
diff --git a/aafwk/aafwk_standard/abilitymanager/sceneProject/verifyIAbility/src/main/js/default/pages/index/index.hml b/aafwk/aafwk_standard/abilitymanager/sceneProject/verifyIAbility/src/main/js/default/pages/index/index.hml
deleted file mode 100755
index 61ea59d936e5a2971f1ea3d179c44a7f3f596c54..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/sceneProject/verifyIAbility/src/main/js/default/pages/index/index.hml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- {{ $t('strings.hello') }} {{title}}
-
-
-
diff --git a/aafwk/aafwk_standard/abilitymanager/sceneProject/verifyIAbility/src/main/js/resources/base/element/string.json b/aafwk/aafwk_standard/abilitymanager/sceneProject/verifyIAbility/src/main/js/resources/base/element/string.json
deleted file mode 100755
index f94ce7e64e455e1ebf22a4b2792c5b52c791d037..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymanager/sceneProject/verifyIAbility/src/main/js/resources/base/element/string.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "string": [
- {
- "name": "app_name",
- "value": "JsHelloWorld"
- },
- {
- "name": "mainability_description",
- "value": "hap sample empty page"
- }
- ]
-}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappa/AppScope/app.json b/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappa/AppScope/app.json
deleted file mode 100755
index d67e483bd8ea4508e24f2157b4ee6d92f6f44f9e..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappa/AppScope/app.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
- "app": {
- "bundleName": "com.example.amsabilitymultiinstanceappa",
- "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/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappa/AppScope/resources/base/element/string.json b/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappa/AppScope/resources/base/element/string.json
deleted file mode 100755
index 0d3507c0d180557b94bc5f0071ba146b4909fe51..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappa/AppScope/resources/base/element/string.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "string": [
- {
- "name": "app_name",
- "value": "ohosProject"
- }
- ]
-}
diff --git a/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappa/Test.json b/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappa/Test.json
deleted file mode 100755
index 3ec911dfc7b3a17504cd4577be5bbabaf7f97e63..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappa/Test.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "description": "Configuration for hjunit demo Tests"
-}
diff --git a/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappa/entry/src/main/ets/Application/AbilityStage.ts b/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappa/entry/src/main/ets/Application/AbilityStage.ts
deleted file mode 100755
index 3e374f11969c3fdeeddb1b3ab50e70f68cae2ab2..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappa/entry/src/main/ets/Application/AbilityStage.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 AbilityStage from "@ohos.application.AbilityStage"
-
-const ONACCEPTWANT_KEY_NOTSET_ID = -1;
-const ONACCEPTWANT_KEY_UNDEFINED_ID = -2;
-var onAcceptWantCalledSeq;
-
-export default class MyAbilityStage extends AbilityStage {
- onCreate() {
- console.log("AbilityMultiInstanceAppA MyAbilityStage onCreate")
- globalThis.stageOnCreateRun = 1;
- globalThis.stageContext = this.context;
- }
-
- onAcceptWant(want) {
- console.log("AbilityMultiInstanceAppA onAcceptWant called want:" + JSON.stringify(want));
- if ((want.parameters == undefined) || (want.parameters.startId == undefined)) {
- console.log("AbilityMultiInstanceAppA specified param err");
- return;
- }
-
- var abilityId = want.parameters.startId.toString();
- onAcceptWantCalledSeq = "onAcceptWantCalled";
- onAcceptWantCalledSeq += "Id";
- onAcceptWantCalledSeq += abilityId;
- globalThis.onAcceptWantCalledSeq = onAcceptWantCalledSeq;
-
- if (want.parameters.startId == ONACCEPTWANT_KEY_NOTSET_ID) {
- return;
- } else if (want.parameters.startId == ONACCEPTWANT_KEY_UNDEFINED_ID) {
- return undefined;
- }
-
- globalThis.abilityWant = want;
- console.log("AbilityMultiInstanceAppA set globalThis result :" + globalThis.onAcceptWantCalledSeq);
- return abilityId;
- }
-}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappa/entry/src/main/ets/MainAbility/MainAbility.ts b/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappa/entry/src/main/ets/MainAbility/MainAbility.ts
deleted file mode 100755
index 43ebe70e0abfcc5d265325b52b996c58833a27f8..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappa/entry/src/main/ets/MainAbility/MainAbility.ts
+++ /dev/null
@@ -1,141 +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.application.Ability'
-import commonEvent from '@ohos.commonEvent'
-
-var callBackSeq = "";
-
-function publishCallBack() {
- console.debug("====>Publish CallBack ====>");
-}
-
-async function startAbilityProcess(abilityContext, parameters) {
- let bundleName = "com.example.amsabilitymultiinstanceappa";
- let abilityName = "com.example.amsabilitymultiinstanceappa.MainAbility";
-
- let idx = parameters.nextStep;
- switch (parameters.step[idx]) {
- case "StartA1":
- parameters.startId = 1;
- break;
- case "StartA2":
- parameters.startId = 2;
- break;
- case "StartB":
- bundleName = "com.example.amsabilitymultiinstanceappb";
- abilityName = "com.example.amsabilitymultiinstanceappb.MainAbility";
- break;
- case "StartC":
- bundleName = "com.example.amsabilitymultiinstanceappc";
- abilityName = "com.example.amsabilitymultiinstanceappc.MainAbility";
- break;
- case "StartDMain1":
- bundleName = "com.example.amsabilitymultiinstanceappd";
- abilityName = "com.example.amsabilitymultiinstanceappd.MainAbility";
- parameters.startId = 1;
- break;
- case "StartDMain2":
- bundleName = "com.example.amsabilitymultiinstanceappd";
- abilityName = "com.example.amsabilitymultiinstanceappd.MainAbility";
- parameters.startId = 2;
- break;
- case "StartDSec":
- bundleName = "com.example.amsabilitymultiinstanceappd";
- abilityName = "com.example.amsabilitymultiinstanceappd.SecondAbility";
- break;
- case "StartDThd":
- bundleName = "com.example.amsabilitymultiinstanceappd";
- abilityName = "com.example.amsabilitymultiinstanceappd.ThirdAbility";
- break;
- case "StartE":
- bundleName = "com.example.amsabilitymultiinstanceappe";
- abilityName = "com.example.amsabilitymultiinstanceappe.MainAbility";
- break;
-
- default:
- break;
- }
- parameters.nextStep = ++idx;
- abilityContext.startAbility({
- bundleName: bundleName,
- abilityName: abilityName,
- parameters: parameters
- }, (error, data) => {
- console.log('AppA startAbilityProcess result: ' + JSON.stringify(error) + ", " + JSON.stringify(data))
- })
-}
-
-async function onShowProcess() {
- var abilityWant = globalThis.abilityWant;
- var callBackData = "AppA:"
- callBackSeq += globalThis.onAcceptWantCalledSeq;
- callBackData += callBackSeq;
-
- var commonEventPublishData = {
- data: callBackData,
- parameters: abilityWant.parameters
- };
-
- console.log("AbilityMultiInstanceAppA abilityWant = " + JSON.stringify(abilityWant));
- if (abilityWant.parameters.nextStep >= abilityWant.parameters.stepNum) {
- commonEvent.publish("MultiInstanceStartFinish", commonEventPublishData, publishCallBack);
- callBackSeq = "";
- globalThis.onAcceptWantCalledSeq = "";
- } else {
- commonEvent.publish("MultiInstanceStartNext", commonEventPublishData, () => {
- callBackSeq = "";
- globalThis.onAcceptWantCalledSeq = "";
- startAbilityProcess(globalThis.abilityContext, abilityWant.parameters);
- });
- }
-}
-
-export default class MainAbility extends Ability {
- onCreate(want, launchParam) {
- // Ability is creating, initialize resources for this ability
- console.log("AbilityMultiInstanceAppA onCreate")
- callBackSeq += "onCreate";
- globalThis.abilityWant = want;
- }
-
- onDestroy() {
- // Ability is destroying, release resources for this ability
- console.log("AbilityMultiInstanceAppA onDestroy")
- }
-
- onWindowStageCreate(windowStage) {
- // Main window is created, set main page for this ability
- console.log("AbilityMultiInstanceAppA onWindowStageCreate")
- globalThis.abilityContext = this.context
- windowStage.setUIContent(this.context, "pages/index/index", null)
- }
-
- onWindowStageDestroy() {
- // Main window is destroyed, release UI related resources
- console.log("AbilityMultiInstanceAppA onWindowStageDestroy")
- }
-
- onForeground() {
- // Ability has brought to foreground
- console.log("AbilityMultiInstanceAppA onForeground")
- callBackSeq += "onForeground";
- onShowProcess();
- }
-
- onBackground() {
- // Ability has back to background
- console.log("AbilityMultiInstanceAppA onBackground")
- }
-};
diff --git a/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappa/entry/src/main/module.json b/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappa/entry/src/main/module.json
deleted file mode 100755
index 1295ce09e65bf8a693bbf550e26b6410572c0c0e..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappa/entry/src/main/module.json
+++ /dev/null
@@ -1,80 +0,0 @@
-{
- "module": {
- "name": "com.example.amsabilitymultiinstanceappa",
- "type": "entry",
- "srcEntrance": "./ets/Application/AbilityStage.ts",
- "description": "$string:phone_entry_dsc",
- "mainElement": "MainAbility",
- "deviceTypes": [
- "phone"
- ],
- "deliveryWithInstall": true,
- "installationFree": false,
- "uiSyntax": "ets",
- "pages": "$profile:main_pages",
- "abilities": [
- {
- "name": "com.example.amsabilitymultiinstanceappa.MainAbility",
- "srcEntrance": "./ets/MainAbility/MainAbility.ts",
- "description": "$string:phone_entry_main",
- "icon": "$media:icon",
- "label": "$string:entry_label",
- "visible": true,
- "orientation": "portrait",
- "launchType": "specified",
- "skills": [
- {
- "actions": [
- "action.system.home"
- ],
- "entities": [
- "entity.system.home"
- ]
- }
- ]
- }
- ],
- "requestPermissions": [
- {
- "name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED",
- "reason":"need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"
- },
- {
- "name":"ohos.permission.GET_BUNDLE_INFO",
- "reason":"need use ohos.permission.GET_BUNDLE_INFO"
- },
- {
- "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.INSTALL_BUNDLE",
- "reason":"need use ohos.permission.INSTALL_BUNDLE"
- },
- {
- "name":"ohos.permission.MANAGE_MISSIONS",
- "reason":"need use ohos.permission.MANAGE_MISSIONS"
- },
- {
- "name":"ohos.permission.GET_RUNNING_INFO",
- "reason":"need use ohos.permission.GET_RUNNING_INFO"
- },
- {
- "name":"ohos.permission.CLEAN_BACKGROUND_PROCESSES",
- "reason":"need use ohos.permission.CLEAN_BACKGROUND_PROCESSES"
- },
- {
- "name":"ohos.permission.CLEAN_APPLICATION_DATA",
- "reason":"need use ohos.permission.CLEAN_APPLICATION_DATA"
- }
- ]
- }
-}
diff --git a/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappa/entry/src/main/resources/base/element/string.json b/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappa/entry/src/main/resources/base/element/string.json
deleted file mode 100755
index 376647878b379044fa3300dfa4662c98a4c3efbc..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappa/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/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappa/entry/src/main/resources/base/profile/main_pages.json b/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappa/entry/src/main/resources/base/profile/main_pages.json
deleted file mode 100755
index 96b478210df9884592229ae2db6f6bb7f86c14f4..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappa/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/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappb/AppScope/app.json b/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappb/AppScope/app.json
deleted file mode 100755
index 3a8cafbace72ac1e99151ff1e395f5c6aac4c39e..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappb/AppScope/app.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
- "app": {
- "bundleName": "com.example.amsabilitymultiinstanceappb",
- "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/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappb/AppScope/resources/base/element/string.json b/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappb/AppScope/resources/base/element/string.json
deleted file mode 100755
index 0d3507c0d180557b94bc5f0071ba146b4909fe51..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappb/AppScope/resources/base/element/string.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "string": [
- {
- "name": "app_name",
- "value": "ohosProject"
- }
- ]
-}
diff --git a/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappb/Test.json b/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappb/Test.json
deleted file mode 100755
index 3ec911dfc7b3a17504cd4577be5bbabaf7f97e63..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappb/Test.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "description": "Configuration for hjunit demo Tests"
-}
diff --git a/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappb/entry/src/main/ets/Application/AbilityStage.ts b/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappb/entry/src/main/ets/Application/AbilityStage.ts
deleted file mode 100755
index f85fcf92b35787bd01eb2edb753cdd6b49f1dfdd..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappb/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.application.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/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappb/entry/src/main/ets/MainAbility/MainAbility.ts b/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappb/entry/src/main/ets/MainAbility/MainAbility.ts
deleted file mode 100755
index 6079a2ac35659177d9c87a847b92bdd1527ddbd5..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappb/entry/src/main/ets/MainAbility/MainAbility.ts
+++ /dev/null
@@ -1,137 +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.application.Ability'
-import commonEvent from '@ohos.commonEvent'
-
-var callBackSeq = "";
-
-function publishCallBack() {
- console.debug("====>AbilityMultiInstanceAppB Publish CallBack ====>");
-}
-
-async function startAbilityProcess(abilityContext, parameters) {
- let bundleName = "com.example.amsabilitymultiinstanceappa";
- let abilityName = "com.example.amsabilitymultiinstanceappa.MainAbility";
-
- let idx = parameters.nextStep;
- switch (parameters.step[idx]) {
- case "StartA1":
- parameters.startId = 1;
- break;
- case "StartA2":
- parameters.startId = 2;
- break;
- case "StartB":
- bundleName = "com.example.amsabilitymultiinstanceappb";
- abilityName = "com.example.amsabilitymultiinstanceappb.MainAbility";
- break;
- case "StartC":
- bundleName = "com.example.amsabilitymultiinstanceappc";
- abilityName = "com.example.amsabilitymultiinstanceappc.MainAbility";
- break;
- case "StartDMain1":
- bundleName = "com.example.amsabilitymultiinstanceappd";
- abilityName = "com.example.amsabilitymultiinstanceappd.MainAbility";
- parameters.startId = 1;
- break;
- case "StartDMain2":
- bundleName = "com.example.amsabilitymultiinstanceappd";
- abilityName = "com.example.amsabilitymultiinstanceappd.MainAbility";
- parameters.startId = 2;
- break;
- case "StartDSec":
- bundleName = "com.example.amsabilitymultiinstanceappd";
- abilityName = "com.example.amsabilitymultiinstanceappd.SecondAbility";
- break;
- case "StartDThd":
- bundleName = "com.example.amsabilitymultiinstanceappd";
- abilityName = "com.example.amsabilitymultiinstanceappd.ThirdAbility";
- break;
- case "StartE":
- bundleName = "com.example.amsabilitymultiinstanceappe";
- abilityName = "com.example.amsabilitymultiinstanceappe.MainAbility";
- break;
-
- default:
- break;
- }
- parameters.nextStep = ++idx;
- abilityContext.startAbility({
- bundleName: bundleName,
- abilityName: abilityName,
- parameters: parameters
- }, (error, data) => {
- console.log('AppB startAbilityProcess result: ' + JSON.stringify(error) + ", " + JSON.stringify(data))
- })
-}
-
-async function onShowProcess() {
- var abilityWant = globalThis.abilityWant;
- var callBackData = "AppB:"
- callBackData += callBackSeq;
-
- var commonEventPublishData = {
- data: callBackData,
- parameters: abilityWant.parameters
- };
- console.log("AbilityMultiInstanceAppB onShowProcess")
- if (abilityWant.parameters.nextStep >= abilityWant.parameters.stepNum) {
- commonEvent.publish("MultiInstanceStartFinish", commonEventPublishData, publishCallBack);
- callBackSeq = "";
- } else {
- commonEvent.publish("MultiInstanceStartNext", commonEventPublishData, () => {
- callBackSeq = "";
- startAbilityProcess(globalThis.abilityContext, abilityWant.parameters);
- });
- }
-}
-
-export default class MainAbility extends Ability {
- onCreate(want, launchParam) {
- // Ability is creating, initialize resources for this ability
- console.log("AbilityMultiInstanceAppB MainAbility onCreate")
- callBackSeq += "onCreate";
- globalThis.abilityWant = want;
- }
-
- onDestroy() {
- // Ability is destroying, release resources for this ability
- console.log("AbilityMultiInstanceAppB MainAbility onDestroy")
- }
-
- onWindowStageCreate(windowStage) {
- // Main window is created, set main page for this ability
- console.log("AbilityMultiInstanceAppB MainAbility onWindowStageCreate")
- globalThis.abilityContext = this.context
- windowStage.setUIContent(this.context, "pages/index/index", null)
- }
-
- onWindowStageDestroy() {
- // Main window is destroyed, release UI related resources
- console.log("AbilityMultiInstanceAppB MainAbility onWindowStageDestroy")
- }
-
- onForeground() {
- // Ability has brought to foreground
- console.log("AbilityMultiInstanceAppB MainAbility onForeground")
- callBackSeq += "onForeground";
- onShowProcess();
- }
-
- onBackground() {
- // Ability has back to background
- console.log("AbilityMultiInstanceAppB MainAbility onBackground")
- }
-};
diff --git a/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappb/entry/src/main/module.json b/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappb/entry/src/main/module.json
deleted file mode 100755
index 75e3babd5c72d3676c2316809129459391ab8ad5..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappb/entry/src/main/module.json
+++ /dev/null
@@ -1,80 +0,0 @@
-{
- "module": {
- "name": "com.example.amsabilitymultiinstanceappb",
- "type": "entry",
- "srcEntrance": "./ets/Application/AbilityStage.ts",
- "description": "$string:phone_entry_dsc",
- "mainElement": "MainAbility",
- "deviceTypes": [
- "phone"
- ],
- "deliveryWithInstall": true,
- "installationFree": false,
- "uiSyntax": "ets",
- "pages": "$profile:main_pages",
- "abilities": [
- {
- "name": "com.example.amsabilitymultiinstanceappb.MainAbility",
- "srcEntrance": "./ets/MainAbility/MainAbility.ts",
- "description": "$string:phone_entry_main",
- "icon": "$media:icon",
- "label": "$string:entry_label",
- "visible": true,
- "orientation": "portrait",
- "launchType": "standard",
- "skills": [
- {
- "actions": [
- "action.system.home"
- ],
- "entities": [
- "entity.system.home"
- ]
- }
- ]
- }
- ],
- "requestPermissions": [
- {
- "name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED",
- "reason":"need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"
- },
- {
- "name":"ohos.permission.GET_BUNDLE_INFO",
- "reason":"need use ohos.permission.GET_BUNDLE_INFO"
- },
- {
- "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.INSTALL_BUNDLE",
- "reason":"need use ohos.permission.INSTALL_BUNDLE"
- },
- {
- "name":"ohos.permission.MANAGE_MISSIONS",
- "reason":"need use ohos.permission.MANAGE_MISSIONS"
- },
- {
- "name":"ohos.permission.GET_RUNNING_INFO",
- "reason":"need use ohos.permission.GET_RUNNING_INFO"
- },
- {
- "name":"ohos.permission.CLEAN_BACKGROUND_PROCESSES",
- "reason":"need use ohos.permission.CLEAN_BACKGROUND_PROCESSES"
- },
- {
- "name":"ohos.permission.CLEAN_APPLICATION_DATA",
- "reason":"need use ohos.permission.CLEAN_APPLICATION_DATA"
- }
- ]
- }
-}
diff --git a/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappb/entry/src/main/resources/base/element/string.json b/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappb/entry/src/main/resources/base/element/string.json
deleted file mode 100755
index 376647878b379044fa3300dfa4662c98a4c3efbc..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappb/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/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappb/entry/src/main/resources/base/profile/main_pages.json b/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappb/entry/src/main/resources/base/profile/main_pages.json
deleted file mode 100755
index 96b478210df9884592229ae2db6f6bb7f86c14f4..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappb/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/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappc/AppScope/app.json b/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappc/AppScope/app.json
deleted file mode 100755
index 9aba063149e11de782e342d6dfbee9c7e76bc7f8..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappc/AppScope/app.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
- "app": {
- "bundleName": "com.example.amsabilitymultiinstanceappc",
- "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/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappc/AppScope/resources/base/element/string.json b/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappc/AppScope/resources/base/element/string.json
deleted file mode 100755
index 0d3507c0d180557b94bc5f0071ba146b4909fe51..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappc/AppScope/resources/base/element/string.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "string": [
- {
- "name": "app_name",
- "value": "ohosProject"
- }
- ]
-}
diff --git a/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappc/Test.json b/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappc/Test.json
deleted file mode 100755
index 3ec911dfc7b3a17504cd4577be5bbabaf7f97e63..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappc/Test.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "description": "Configuration for hjunit demo Tests"
-}
diff --git a/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappc/entry/src/main/ets/Application/AbilityStage.ts b/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappc/entry/src/main/ets/Application/AbilityStage.ts
deleted file mode 100755
index f85fcf92b35787bd01eb2edb753cdd6b49f1dfdd..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappc/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.application.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/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappc/entry/src/main/ets/MainAbility/MainAbility.ts b/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappc/entry/src/main/ets/MainAbility/MainAbility.ts
deleted file mode 100755
index 51045c97e81fb6c20dcb2cd996045caf767ad1ba..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappc/entry/src/main/ets/MainAbility/MainAbility.ts
+++ /dev/null
@@ -1,135 +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.application.Ability'
-import commonEvent from '@ohos.commonEvent'
-
-var callBackSeq = "";
-
-function publishCallBack() {
- console.debug("====>AbilityMultiInstanceAppC Publish CallBack ====>");
-}
-
-async function onShowProcess() {
- var abilityWant = globalThis.abilityWant;
- var callBackData = "AppC:";
- callBackData += callBackSeq;
- var commonEventPublishData = {
- data: callBackData,
- parameters: abilityWant.parameters
- };
- console.log("AbilityMultiInstanceAppC onShowProcess")
- if (abilityWant.parameters.nextStep >= abilityWant.parameters.stepNum) {
- commonEvent.publish("MultiInstanceStartFinish", commonEventPublishData, publishCallBack);
- } else {
- commonEvent.publish("MultiInstanceStartNext", commonEventPublishData, () => {
- startAbilityProcess(globalThis.abilityContext, abilityWant.parameters);
- });
- }
- callBackSeq = "";
-}
-
-async function startAbilityProcess(abilityContext, parameters) {
- let bundleName = "com.example.amsabilitymultiinstanceappa";
- let abilityName = "com.example.amsabilitymultiinstanceappa.MainAbility";
-
- let idx = parameters.nextStep;
- switch (parameters.step[idx]) {
- case "StartA1":
- parameters.startId = 1;
- break;
- case "StartA2":
- parameters.startId = 2;
- break;
- case "StartB":
- bundleName = "com.example.amsabilitymultiinstanceappb";
- abilityName = "com.example.amsabilitymultiinstanceappb.MainAbility";
- break;
- case "StartC":
- bundleName = "com.example.amsabilitymultiinstanceappc";
- abilityName = "com.example.amsabilitymultiinstanceappc.MainAbility";
- break;
- case "StartDMain1":
- bundleName = "com.example.amsabilitymultiinstanceappd";
- abilityName = "com.example.amsabilitymultiinstanceappd.MainAbility";
- parameters.startId = 1;
- break;
- case "StartDMain2":
- bundleName = "com.example.amsabilitymultiinstanceappd";
- abilityName = "com.example.amsabilitymultiinstanceappd.MainAbility";
- parameters.startId = 2;
- break;
- case "StartDSec":
- bundleName = "com.example.amsabilitymultiinstanceappd";
- abilityName = "com.example.amsabilitymultiinstanceappd.SecondAbility";
- break;
- case "StartDThd":
- bundleName = "com.example.amsabilitymultiinstanceappd";
- abilityName = "com.example.amsabilitymultiinstanceappd.ThirdAbility";
- break;
- case "StartE":
- bundleName = "com.example.amsabilitymultiinstanceappe";
- abilityName = "com.example.amsabilitymultiinstanceappe.MainAbility";
- break;
-
- default:
- break;
- }
- parameters.nextStep = ++idx;
- abilityContext.startAbility({
- bundleName: bundleName,
- abilityName: abilityName,
- parameters: parameters
- }, (error, data) => {
- console.log('AppC startAbilityProcess result: ' + JSON.stringify(error) + ", " + JSON.stringify(data))
- })
-}
-
-export default class MainAbility extends Ability {
- onCreate(want, launchParam) {
- // Ability is creating, initialize resources for this ability
- console.log("MainAbility onCreate")
- callBackSeq += "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, "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")
- callBackSeq += "onForeground";
- onShowProcess();
- }
-
- onBackground() {
- // Ability has back to background
- console.log("MainAbility onBackground")
- }
-};
diff --git a/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappc/entry/src/main/module.json b/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappc/entry/src/main/module.json
deleted file mode 100755
index e057d556016f87d67feeb1d75387d9e662e7cfae..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappc/entry/src/main/module.json
+++ /dev/null
@@ -1,80 +0,0 @@
-{
- "module": {
- "name": "com.example.amsabilitymultiinstanceappc",
- "type": "entry",
- "srcEntrance": "./ets/Application/AbilityStage.ts",
- "description": "$string:phone_entry_dsc",
- "mainElement": "MainAbility",
- "deviceTypes": [
- "phone"
- ],
- "deliveryWithInstall": true,
- "installationFree": false,
- "uiSyntax": "ets",
- "pages": "$profile:main_pages",
- "abilities": [
- {
- "name": "com.example.amsabilitymultiinstanceappc.MainAbility",
- "srcEntrance": "./ets/MainAbility/MainAbility.ts",
- "description": "$string:phone_entry_main",
- "icon": "$media:icon",
- "label": "$string:entry_label",
- "visible": true,
- "orientation": "portrait",
- "launchType": "singleton",
- "skills": [
- {
- "actions": [
- "action.system.home"
- ],
- "entities": [
- "entity.system.home"
- ]
- }
- ]
- }
- ],
- "requestPermissions": [
- {
- "name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED",
- "reason":"need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"
- },
- {
- "name":"ohos.permission.GET_BUNDLE_INFO",
- "reason":"need use ohos.permission.GET_BUNDLE_INFO"
- },
- {
- "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.INSTALL_BUNDLE",
- "reason":"need use ohos.permission.INSTALL_BUNDLE"
- },
- {
- "name":"ohos.permission.MANAGE_MISSIONS",
- "reason":"need use ohos.permission.MANAGE_MISSIONS"
- },
- {
- "name":"ohos.permission.GET_RUNNING_INFO",
- "reason":"need use ohos.permission.GET_RUNNING_INFO"
- },
- {
- "name":"ohos.permission.CLEAN_BACKGROUND_PROCESSES",
- "reason":"need use ohos.permission.CLEAN_BACKGROUND_PROCESSES"
- },
- {
- "name":"ohos.permission.CLEAN_APPLICATION_DATA",
- "reason":"need use ohos.permission.CLEAN_APPLICATION_DATA"
- }
- ]
- }
-}
diff --git a/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappc/entry/src/main/resources/base/element/string.json b/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappc/entry/src/main/resources/base/element/string.json
deleted file mode 100755
index 376647878b379044fa3300dfa4662c98a4c3efbc..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappc/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/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappc/entry/src/main/resources/base/profile/main_pages.json b/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappc/entry/src/main/resources/base/profile/main_pages.json
deleted file mode 100755
index 96b478210df9884592229ae2db6f6bb7f86c14f4..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappc/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/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappd/AppScope/app.json b/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappd/AppScope/app.json
deleted file mode 100755
index 8392e22811fde0f13b8db0baa00eabbb9a86b371..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappd/AppScope/app.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
- "app": {
- "bundleName": "com.example.amsabilitymultiinstanceappd",
- "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/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappd/AppScope/resources/base/element/string.json b/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappd/AppScope/resources/base/element/string.json
deleted file mode 100755
index 0d3507c0d180557b94bc5f0071ba146b4909fe51..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappd/AppScope/resources/base/element/string.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "string": [
- {
- "name": "app_name",
- "value": "ohosProject"
- }
- ]
-}
diff --git a/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappd/Test.json b/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappd/Test.json
deleted file mode 100755
index 3ec911dfc7b3a17504cd4577be5bbabaf7f97e63..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappd/Test.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "description": "Configuration for hjunit demo Tests"
-}
diff --git a/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappd/entry/src/main/ets/Application/AbilityStage.ts b/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappd/entry/src/main/ets/Application/AbilityStage.ts
deleted file mode 100755
index 89ebbd7d62a810f034fc4bea4517987e8af21e7e..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappd/entry/src/main/ets/Application/AbilityStage.ts
+++ /dev/null
@@ -1,37 +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.application.AbilityStage"
-
-var onAcceptWantCalledSeq;
-
-export default class MyAbilityStage extends AbilityStage {
- onCreate() {
- console.log("AbilityMultiInstanceAppD MyAbilityStage onCreate")
- globalThis.stageOnCreateRun = 1;
- globalThis.stageContext = this.context;
- }
-
- onAcceptWant(want) {
- console.log("AbilityMultiInstanceAppD onAcceptWant called want:" + JSON.stringify(want));
- var abilityId = want.parameters.startId.toString();
- onAcceptWantCalledSeq = "onAcceptWantCalled";
- onAcceptWantCalledSeq += "Id";
- onAcceptWantCalledSeq += abilityId;
- globalThis.onAcceptWantCalledSeq = onAcceptWantCalledSeq;
- globalThis.abilityWant = want;
- console.log("AbilityMultiInstanceAppD set globalThis result :" + globalThis.onAcceptWantCalledSeq);
- return abilityId;
- }
-}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappd/entry/src/main/ets/MainAbility/MainAbility.ts b/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappd/entry/src/main/ets/MainAbility/MainAbility.ts
deleted file mode 100755
index 8576046e9fd231d301d8fd0d5fedf701c1517161..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappd/entry/src/main/ets/MainAbility/MainAbility.ts
+++ /dev/null
@@ -1,137 +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.application.Ability'
-import commonEvent from '@ohos.commonEvent'
-
-var callBackSeq = "";
-function publishCallBack() {
- console.debug("====>AbilityMultiInstanceAppD Publish CallBack ====>");
-}
-async function onShowProcess() {
- var abilityWant = globalThis.abilityWant;
- var callBackData = "AppD:";
- callBackSeq += globalThis.onAcceptWantCalledSeq;
- callBackData += callBackSeq;
- var commonEventPublishData = {
- data: callBackData,
- parameters: abilityWant.parameters
- };
-
- console.log("AbilityMultiInstanceAppD abilityWant = " + JSON.stringify(abilityWant));
- if (abilityWant.parameters.nextStep >= abilityWant.parameters.stepNum) {
- commonEvent.publish("MultiInstanceStartFinish", commonEventPublishData, publishCallBack);
- } else {
- commonEvent.publish("MultiInstanceStartNext", commonEventPublishData, () => {
- startAbilityProcess(globalThis.abilityContext, abilityWant.parameters);
- });
- }
- globalThis.onAcceptWantCalledSeq = "";
- callBackSeq = "";
-}
-
-async function startAbilityProcess(abilityContext, parameters) {
- let bundleName = "com.example.amsabilitymultiinstanceappa";
- let abilityName = "com.example.amsabilitymultiinstanceappa.MainAbility";
-
- let idx = parameters.nextStep;
- switch (parameters.step[idx]) {
- case "StartA1":
- parameters.startId = 1;
- break;
- case "StartA2":
- parameters.startId = 2;
- break;
- case "StartB":
- bundleName = "com.example.amsabilitymultiinstanceappb";
- abilityName = "com.example.amsabilitymultiinstanceappb.MainAbility";
- break;
- case "StartC":
- bundleName = "com.example.amsabilitymultiinstanceappc";
- abilityName = "com.example.amsabilitymultiinstanceappc.MainAbility";
- break;
- case "StartDMain1":
- bundleName = "com.example.amsabilitymultiinstanceappd";
- abilityName = "com.example.amsabilitymultiinstanceappd.MainAbility";
- parameters.startId = 1;
- break;
- case "StartDMain2":
- bundleName = "com.example.amsabilitymultiinstanceappd";
- abilityName = "com.example.amsabilitymultiinstanceappd.MainAbility";
- parameters.startId = 2;
- break;
- case "StartDSec":
- bundleName = "com.example.amsabilitymultiinstanceappd";
- abilityName = "com.example.amsabilitymultiinstanceappd.SecondAbility";
- break;
- case "StartDThd":
- bundleName = "com.example.amsabilitymultiinstanceappd";
- abilityName = "com.example.amsabilitymultiinstanceappd.ThirdAbility";
- break;
- case "StartE":
- bundleName = "com.example.amsabilitymultiinstanceappe";
- abilityName = "com.example.amsabilitymultiinstanceappe.MainAbility";
- break;
-
- default:
- break;
- }
- parameters.nextStep = ++idx;
- abilityContext.startAbility({
- bundleName: bundleName,
- abilityName: abilityName,
- parameters: parameters
- }, (error, data) => {
- console.log('AppD startAbilityProcess result: ' + JSON.stringify(error) + ", " + JSON.stringify(data))
- })
-}
-
-export default class MainAbility extends Ability {
-
- onCreate(want, launchParam) {
- // Ability is creating, initialize resources for this ability
- console.log("AbilityMultiInstanceAppD onCreate")
- callBackSeq += "onCreate";
- globalThis.abilityWant = want;
- }
-
- onDestroy() {
- // Ability is destroying, release resources for this ability
- console.log("AbilityMultiInstanceAppD onDestroy")
- }
-
- onWindowStageCreate(windowStage) {
- // Main window is created, set main page for this ability
- console.log("AbilityMultiInstanceAppD onWindowStageCreate")
- globalThis.abilityContext = this.context
- windowStage.setUIContent(this.context, "pages/index/index", null)
- }
-
- onWindowStageDestroy() {
- // Main window is destroyed, release UI related resources
- console.log("AbilityMultiInstanceAppD onWindowStageDestroy")
- }
-
- onForeground() {
- // Ability has brought to foreground
- console.log("AbilityMultiInstanceAppD onForeground")
- callBackSeq += "onForeground";
- onShowProcess();
- }
-
- onBackground() {
- // Ability has back to background
- console.log("AbilityMultiInstanceAppD onBackground")
- }
-};
diff --git a/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappd/entry/src/main/ets/SecondAbility/SecondAbility.ts b/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappd/entry/src/main/ets/SecondAbility/SecondAbility.ts
deleted file mode 100755
index 1542e0cadfc1a69dbcd3d33facbd7719fe0f8b01..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappd/entry/src/main/ets/SecondAbility/SecondAbility.ts
+++ /dev/null
@@ -1,137 +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.application.Ability'
-import commonEvent from '@ohos.commonEvent'
-
-var callBackSeq = "";
-function publishCallBack() {
- console.debug("====>AbilityMultiInstanceAppD Sec Publish CallBack ====>");
-}
-async function onShowProcess() {
- var abilityWant = globalThis.abilityWant;
- var callBackData = "AppD:";
- callBackSeq += globalThis.onAcceptWantCalledSeq;
- callBackData += callBackSeq;
- var commonEventPublishData = {
- data: callBackData,
- parameters: abilityWant.parameters
- };
-
- console.log("AbilityMultiInstanceAppD Sec abilityWant = " + JSON.stringify(abilityWant));
- if (abilityWant.parameters.nextStep >= abilityWant.parameters.stepNum) {
- commonEvent.publish("MultiInstanceStartFinish", commonEventPublishData, publishCallBack);
- } else {
- commonEvent.publish("MultiInstanceStartNext", commonEventPublishData, () => {
- startAbilityProcess(globalThis.abilityContext, abilityWant.parameters);
- });
- }
- globalThis.onAcceptWantCalledSeq = "";
- callBackSeq = "";
-}
-
-async function startAbilityProcess(abilityContext, parameters) {
- let bundleName = "com.example.amsabilitymultiinstanceappa";
- let abilityName = "com.example.amsabilitymultiinstanceappa.MainAbility";
-
- let idx = parameters.nextStep;
- switch (parameters.step[idx]) {
- case "StartA1":
- parameters.startId = 1;
- break;
- case "StartA2":
- parameters.startId = 2;
- break;
- case "StartB":
- bundleName = "com.example.amsabilitymultiinstanceappb";
- abilityName = "com.example.amsabilitymultiinstanceappb.MainAbility";
- break;
- case "StartC":
- bundleName = "com.example.amsabilitymultiinstanceappc";
- abilityName = "com.example.amsabilitymultiinstanceappc.MainAbility";
- break;
- case "StartDMain1":
- bundleName = "com.example.amsabilitymultiinstanceappd";
- abilityName = "com.example.amsabilitymultiinstanceappd.MainAbility";
- parameters.startId = 1;
- break;
- case "StartDMain2":
- bundleName = "com.example.amsabilitymultiinstanceappd";
- abilityName = "com.example.amsabilitymultiinstanceappd.MainAbility";
- parameters.startId = 2;
- break;
- case "StartDSec":
- bundleName = "com.example.amsabilitymultiinstanceappd";
- abilityName = "com.example.amsabilitymultiinstanceappd.SecondAbility";
- break;
- case "StartDThd":
- bundleName = "com.example.amsabilitymultiinstanceappd";
- abilityName = "com.example.amsabilitymultiinstanceappd.ThirdAbility";
- break;
- case "StartE":
- bundleName = "com.example.amsabilitymultiinstanceappe";
- abilityName = "com.example.amsabilitymultiinstanceappe.MainAbility";
- break;
-
- default:
- break;
- }
- parameters.nextStep = ++idx;
- abilityContext.startAbility({
- bundleName: bundleName,
- abilityName: abilityName,
- parameters: parameters
- }, (error, data) => {
- console.log('AppD startAbilityProcess result: ' + JSON.stringify(error) + ", " + JSON.stringify(data))
- })
-}
-
-export default class SecondAbility extends Ability {
-
- onCreate(want, launchParam) {
- // Ability is creating, initialize resources for this ability
- console.log("AbilityMultiInstanceAppD Sec onCreate")
- callBackSeq += "onCreate";
- globalThis.abilityWant = want;
- }
-
- onDestroy() {
- // Ability is destroying, release resources for this ability
- console.log("AbilityMultiInstanceAppD Sec onDestroy")
- }
-
- onWindowStageCreate(windowStage) {
- // Main window is created, set main page for this ability
- console.log("AbilityMultiInstanceAppD Sec onWindowStageCreate")
- globalThis.abilityContext = this.context
- windowStage.setUIContent(this.context, "pages/index/index", null)
- }
-
- onWindowStageDestroy() {
- // Main window is destroyed, release UI related resources
- console.log("AbilityMultiInstanceAppD Sec onWindowStageDestroy")
- }
-
- onForeground() {
- // Ability has brought to foreground
- console.log("AbilityMultiInstanceAppD Sec onForeground")
- callBackSeq += "onForeground";
- onShowProcess();
- }
-
- onBackground() {
- // Ability has back to background
- console.log("AbilityMultiInstanceAppD Sec onBackground")
- }
-};
diff --git a/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappd/entry/src/main/ets/ThirdAbility/ThirdAbility.ts b/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappd/entry/src/main/ets/ThirdAbility/ThirdAbility.ts
deleted file mode 100755
index 1e9537a68caab6f135948932743a082f1a4185f4..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappd/entry/src/main/ets/ThirdAbility/ThirdAbility.ts
+++ /dev/null
@@ -1,133 +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.application.Ability'
-import commonEvent from '@ohos.commonEvent'
-
-var callBackSeq = "";
-function publishCallBack() {
- console.debug("====>AbilityMultiInstanceAppD Third Publish CallBack ====>");
-}
-async function onShowProcess() {
- var abilityWant = globalThis.abilityWant;
- var callBackData = "AppD:";
- callBackSeq += globalThis.onAcceptWantCalledSeq;
- callBackData += callBackSeq;
- var commonEventPublishData = {
- data: callBackData,
- parameters: abilityWant.parameters
- };
-
- console.log("AbilityMultiInstanceAppD Third abilityWant = " + JSON.stringify(abilityWant));
- if (abilityWant.parameters.nextStep >= abilityWant.parameters.stepNum) {
- commonEvent.publish("MultiInstanceStartFinish", commonEventPublishData, publishCallBack);
- } else {
- commonEvent.publish("MultiInstanceStartNext", commonEventPublishData, () => {
- startAbilityProcess(globalThis.abilityContext, abilityWant.parameters);
- });
- }
- globalThis.onAcceptWantCalledSeq = "";
- callBackSeq = "";
-}
-
-async function startAbilityProcess(abilityContext, parameters) {
- let bundleName = "com.example.amsabilitymultiinstanceappa";
- let abilityName = "com.example.amsabilitymultiinstanceappa.MainAbility";
-
- let idx = parameters.nextStep;
- switch (parameters.step[idx]) {
- case "StartA1":
- parameters.startId = 1;
- break;
- case "StartA2":
- parameters.startId = 2;
- break;
- case "StartB":
- bundleName = "com.example.amsabilitymultiinstanceappb";
- abilityName = "com.example.amsabilitymultiinstanceappb.MainAbility";
- break;
- case "StartC":
- bundleName = "com.example.amsabilitymultiinstanceappc";
- abilityName = "com.example.amsabilitymultiinstanceappc.MainAbility";
- break;
- case "StartDMain1":
- bundleName = "com.example.amsabilitymultiinstanceappd";
- abilityName = "com.example.amsabilitymultiinstanceappd.MainAbility";
- parameters.startId = 1;
- break;
- case "StartDMain2":
- bundleName = "com.example.amsabilitymultiinstanceappd";
- abilityName = "com.example.amsabilitymultiinstanceappd.MainAbility";
- parameters.startId = 2;
- break;
- case "StartDSec":
- bundleName = "com.example.amsabilitymultiinstanceappd";
- abilityName = "com.example.amsabilitymultiinstanceappd.SecondAbility";
- break;
- case "StartDThd":
- bundleName = "com.example.amsabilitymultiinstanceappd";
- abilityName = "com.example.amsabilitymultiinstanceappd.ThirdAbility";
- break;
-
- default:
- break;
- }
- parameters.nextStep = ++idx;
- abilityContext.startAbility({
- bundleName: bundleName,
- abilityName: abilityName,
- parameters: parameters
- }, (error, data) => {
- console.log('AppD startAbilityProcess result: ' + JSON.stringify(error) + ", " + JSON.stringify(data))
- })
-}
-
-export default class ThirdAbility extends Ability {
-
- onCreate(want, launchParam) {
- // Ability is creating, initialize resources for this ability
- console.log("AbilityMultiInstanceAppD Third onCreate")
- callBackSeq += "onCreate";
- globalThis.abilityWant = want;
- }
-
- onDestroy() {
- // Ability is destroying, release resources for this ability
- console.log("AbilityMultiInstanceAppD Third onDestroy")
- }
-
- onWindowStageCreate(windowStage) {
- // Main window is created, set main page for this ability
- console.log("AbilityMultiInstanceAppD Third onWindowStageCreate")
- globalThis.abilityContext = this.context
- windowStage.setUIContent(this.context, "pages/index/index", null)
- }
-
- onWindowStageDestroy() {
- // Main window is destroyed, release UI related resources
- console.log("AbilityMultiInstanceAppD Third onWindowStageDestroy")
- }
-
- onForeground() {
- // Ability has brought to foreground
- console.log("AbilityMultiInstanceAppD Third onForeground")
- callBackSeq += "onForeground";
- onShowProcess();
- }
-
- onBackground() {
- // Ability has back to background
- console.log("AbilityMultiInstanceAppD Third onBackground")
- }
-};
diff --git a/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappd/entry/src/main/module.json b/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappd/entry/src/main/module.json
deleted file mode 100755
index 87d984d906258e6f231e0818890387a07bd840a3..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappd/entry/src/main/module.json
+++ /dev/null
@@ -1,120 +0,0 @@
-{
- "module": {
- "name": "com.example.amsabilitymultiinstanceappd",
- "type": "entry",
- "srcEntrance": "./ets/Application/AbilityStage.ts",
- "description": "$string:phone_entry_dsc",
- "mainElement": "MainAbility",
- "deviceTypes": [
- "phone"
- ],
- "deliveryWithInstall": true,
- "installationFree": false,
- "uiSyntax": "ets",
- "pages": "$profile:main_pages",
- "abilities": [
- {
- "name": "com.example.amsabilitymultiinstanceappd.MainAbility",
- "srcEntrance": "./ets/MainAbility/MainAbility.ts",
- "description": "$string:phone_entry_main",
- "icon": "$media:icon",
- "label": "$string:entry_label",
- "visible": true,
- "orientation": "portrait",
- "launchType": "specified",
- "skills": [
- {
- "actions": [
- "action.system.home"
- ],
- "entities": [
- "entity.system.home"
- ]
- }
- ]
- },
- {
- "name": "com.example.amsabilitymultiinstanceappd.SecondAbility",
- "srcEntrance": "./ets/SecondAbility/SecondAbility.ts",
- "description": "$string:phone_entry_main",
- "icon": "$media:icon",
- "label": "$string:entry_label",
- "visible": true,
- "orientation": "portrait",
- "launchType": "standard",
- "skills": [
- {
- "actions": [
- "action.system.home"
- ],
- "entities": [
- "entity.system.home"
- ]
- }
- ]
- },
- {
- "name": "com.example.amsabilitymultiinstanceappd.ThirdAbility",
- "srcEntrance": "./ets/ThirdAbility/ThirdAbility.ts",
- "description": "$string:phone_entry_main",
- "icon": "$media:icon",
- "label": "$string:entry_label",
- "visible": true,
- "orientation": "portrait",
- "launchType": "singleton",
- "skills": [
- {
- "actions": [
- "action.system.home"
- ],
- "entities": [
- "entity.system.home"
- ]
- }
- ]
- }
- ],
- "requestPermissions": [
- {
- "name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED",
- "reason":"need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"
- },
- {
- "name":"ohos.permission.GET_BUNDLE_INFO",
- "reason":"need use ohos.permission.GET_BUNDLE_INFO"
- },
- {
- "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.INSTALL_BUNDLE",
- "reason":"need use ohos.permission.INSTALL_BUNDLE"
- },
- {
- "name":"ohos.permission.MANAGE_MISSIONS",
- "reason":"need use ohos.permission.MANAGE_MISSIONS"
- },
- {
- "name":"ohos.permission.GET_RUNNING_INFO",
- "reason":"need use ohos.permission.GET_RUNNING_INFO"
- },
- {
- "name":"ohos.permission.CLEAN_BACKGROUND_PROCESSES",
- "reason":"need use ohos.permission.CLEAN_BACKGROUND_PROCESSES"
- },
- {
- "name":"ohos.permission.CLEAN_APPLICATION_DATA",
- "reason":"need use ohos.permission.CLEAN_APPLICATION_DATA"
- }
- ]
- }
-}
diff --git a/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappd/entry/src/main/resources/base/element/string.json b/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappd/entry/src/main/resources/base/element/string.json
deleted file mode 100755
index 376647878b379044fa3300dfa4662c98a4c3efbc..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappd/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/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappd/entry/src/main/resources/base/profile/main_pages.json b/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappd/entry/src/main/resources/base/profile/main_pages.json
deleted file mode 100755
index 96b478210df9884592229ae2db6f6bb7f86c14f4..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappd/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/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappe/src/main/js/default/pages/index/index.js b/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappe/src/main/js/default/pages/index/index.js
deleted file mode 100755
index 3bd0d8acc929c7f56fb5b681260878986342a90e..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstanceappe/src/main/js/default/pages/index/index.js
+++ /dev/null
@@ -1,120 +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 featureAbility from '@ohos.ability.featureability'
-import commonEvent from '@ohos.commonEvent'
-
-const injectRef = Object.getPrototypeOf(global) || global
-injectRef.regeneratorRuntime = require('@babel/runtime/regenerator')
-var callBackSeq = "";
-
-function publishCallBack() {
- console.debug("====>AbilityMultiInstanceAppB Publish CallBack ====>");
-}
-
-async function startAbilityProcess(parameters) {
- let bundleName = "com.example.amsabilitymultiinstanceappa";
- let abilityName = "com.example.amsabilitymultiinstanceappa.MainAbility";
-
- let idx = parameters.nextStep;
- switch (parameters.step[idx]) {
- case "StartA1":
- parameters.startId = 1;
- break;
- case "StartA2":
- parameters.startId = 2;
- break;
- case "StartB":
- bundleName = "com.example.amsabilitymultiinstanceappb";
- abilityName = "com.example.amsabilitymultiinstanceappb.MainAbility";
- break;
- case "StartC":
- bundleName = "com.example.amsabilitymultiinstanceappc";
- abilityName = "com.example.amsabilitymultiinstanceappc.MainAbility";
- break;
- case "StartDMain1":
- bundleName = "com.example.amsabilitymultiinstanceappd";
- abilityName = "com.example.amsabilitymultiinstanceappd.MainAbility";
- parameters.startId = 1;
- break;
- case "StartDMain2":
- bundleName = "com.example.amsabilitymultiinstanceappd";
- abilityName = "com.example.amsabilitymultiinstanceappd.MainAbility";
- parameters.startId = 2;
- break;
- case "StartDSec":
- bundleName = "com.example.amsabilitymultiinstanceappd";
- abilityName = "com.example.amsabilitymultiinstanceappd.SecondAbility";
- break;
- case "StartDThd":
- bundleName = "com.example.amsabilitymultiinstanceappd";
- abilityName = "com.example.amsabilitymultiinstanceappd.ThirdAbility";
- break;
- case "StartE":
- bundleName = "com.example.amsabilitymultiinstanceappe";
- abilityName = "com.example.amsabilitymultiinstanceappe.MainAbility";
- break;
-
- default:
- break;
- }
- parameters.nextStep = ++idx;
- await featureAbility.startAbility({
- want:
- {
- bundleName: bundleName,
- abilityName: abilityName,
- parameters: parameters
- }
- });
-}
-
-async function onShowProcess() {
- var abilityWant = await featureAbility.getWant();
- var callBackData = "AppE:";
- callBackData += callBackSeq;
- var commonEventPublishData = {
- data: callBackData,
- parameters: abilityWant.parameters
- };
- if (abilityWant.parameters.nextStep >= abilityWant.parameters.stepNum) {
- commonEvent.publish("MultiInstanceStartFinish", commonEventPublishData, publishCallBack);
- } else {
- commonEvent.publish("MultiInstanceStartNext", commonEventPublishData, () => {
- startAbilityProcess(abilityWant.parameters);
- });
- }
- callBackSeq = "";
-}
-
-export default {
- data: {
- title: "AbilityMultiInstanceAppE"
- },
- onInit() {
- this.title = "AbilityMultiInstanceAppE";
- callBackSeq += "onInit";
- },
- onShow() {
- console.log('AbilityMultiInstanceAppE onShow start');
- callBackSeq += "onShow";
- onShowProcess();
- },
- onStart() {
- console.log('AbilityMultiInstanceAppE onStart');
- },
- onStop() {
- console.log('AbilityMultiInstanceAppE onStop');
- },
-}
diff --git a/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstancetest/Test.json b/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstancetest/Test.json
deleted file mode 100755
index f3c05f6cac44b4e1392bd7de9359f572e107fef2..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstancetest/Test.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- "description": "Configuration for hjunit demo Tests",
- "driver": {
- "type": "JSUnitTest",
- "test-timeout": "1000000",
- "package": "com.example.abilitymultiinstance",
- "shell-timeout": "300000"
- },
- "kits": [
- {
- "test-file-name": [
- "ActsAmsAbilityMultiinstanceTest.hap",
- "ActsAmsAbilityMultiinstanceHapARelyHap.hap",
- "ActsAmsAbilityMultiinstanceHapBRelyHap.hap",
- "ActsAmsAbilityMultiinstanceHapCRelyHap.hap",
- "ActsAmsAbilityMultiinstanceHapDRelyHap.hap",
- "ActsAmsAbilityMultiinstanceHapERelyHap.hap"
- ],
- "type": "AppInstallKit",
- "cleanup-apps": true
- },
- {
- "type": "ShellKit",
- "run-command": [
- "remount"
- ]
- },
- {
- "type": "ShellKit",
- "run-command": [
- "chmod 644 /data/*.hap"
- ]
- }
- ]
-}
diff --git a/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstancetest/entry/src/main/ets/pages/index.ets b/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstancetest/entry/src/main/ets/pages/index.ets
deleted file mode 100755
index e5ef3e3680a267a6aa28a510c77f04cc5cd3c0cb..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstancetest/entry/src/main/ets/pages/index.ets
+++ /dev/null
@@ -1,64 +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 {Core, ExpectExtend, InstrumentLog, ReportExtend} from "deccjsunit/index.ets"
-import testsuite from "../../test/List.test.ets"
-
-@Entry
-@Component
-struct Index {
-
- aboutToAppear() {
- console.info("start run testcase!!!!")
- const core = Core.getInstance()
- const expectExtend = new ExpectExtend({
- 'id': 'extend'
- })
- core.addService('expect', expectExtend)
- const reportExtend = new ReportExtend(file)
-
- core.addService('report', reportExtend)
- core.init()
- core.subscribeEvent('task', reportExtend)
- const configService = core.getDefaultService('config')
- console.info('parameters---->' + JSON.stringify(globalThis.abilityWant.parameters))
- globalThis.abilityWant.parameters['timeout'] = 10000;
- configService.setConfig(globalThis.abilityWant.parameters)
- testsuite(globalThis.abilityContext)
- core.execute()
- }
-
- build() {
- Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) {
- Text('Test App')
- .fontSize(50)
- .fontWeight(FontWeight.Bold)
- Button() {
- Text('next page')
- .fontSize(25)
- .fontWeight(FontWeight.Bold)
- }.type(ButtonType.Capsule)
- .margin({
- top: 20
- })
- .backgroundColor('#0D9FFB')
- .onClick(() => {
- })
- }
- .width('100%')
- .height('100%')
- }
-}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstancetest/entry/src/main/ets/pages/index/index.ets b/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstancetest/entry/src/main/ets/pages/index/index.ets
deleted file mode 100755
index 577f53879917d26276c6ef294f65d9d044533161..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/abilitymultiinstance/amsabilitymultiinstancetest/entry/src/main/ets/pages/index/index.ets
+++ /dev/null
@@ -1,66 +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 {Core, ExpectExtend, InstrumentLog, ReportExtend} from "deccjsunit/index.ets"
-import testsuite from "../../test/List.test.ets"
-
-
-@Entry
-@Component
-struct Index {
-
- aboutToAppear(){
- console.info("start run testcase!!!!")
- const core = Core.getInstance()
- const expectExtend = new ExpectExtend({
- 'id': 'extend'
- })
- core.addService('expect', expectExtend)
- const reportExtend = new ReportExtend(file)
-
- core.addService('report', reportExtend)
- core.init()
- core.subscribeEvent('task', reportExtend)
- const configService = core.getDefaultService('config')
- console.info('parameters---->' + JSON.stringify(globalThis.abilityWant.parameters))
- globalThis.abilityWant.parameters.timeout = 70000;
- configService.setConfig(globalThis.abilityWant.parameters)
- testsuite(globalThis.abilityContext)
- core.execute()
- }
-
- build() {
- Flex({ direction:FlexDirection.Column, alignItems:ItemAlign.Center, justifyContent: FlexAlign.Center }) {
- Text('Hello World')
- .fontSize(50)
- .fontWeight(FontWeight.Bold)
- Button() {
- Text('next page')
- .fontSize(25)
- .fontWeight(FontWeight.Bold)
- }.type(ButtonType.Capsule)
- .margin({
- top: 20
- })
- .backgroundColor('#0D9FFB')
- .onClick(() => {
-
- })
- }
- .width('100%')
- .height('100%')
- }
-}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/actsabilitymanageretstest/BUILD.gn b/aafwk/aafwk_standard/actsabilitymanageretstest/BUILD.gn
deleted file mode 100644
index 082b2b6c6fe264af9abe979ca351d85405c63ac5..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/actsabilitymanageretstest/BUILD.gn
+++ /dev/null
@@ -1,36 +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("ActsAbilityManagerEtsTest") {
- hap_profile = "./entry/src/main/config.json"
- deps = [
- ":hjs_demo_ets_assets",
- ":hjs_demo_ets_resources",
- ":hjs_demo_ets_test_assets",
- ]
- ets2abc = true
- certificate_profile = "./signature/openharmony_sx.p7b"
- hap_name = "ActsAbilityManagerEtsTest"
-}
-ohos_js_assets("hjs_demo_ets_assets") {
- source_dir = "./entry/src/main/ets/MainAbility"
-}
-ohos_js_assets("hjs_demo_ets_test_assets") {
- source_dir = "./entry/src/main/ets/TestAbility"
-}
-ohos_resources("hjs_demo_ets_resources") {
- sources = [ "./entry/src/main/resources" ]
- hap_profile = "./entry/src/main/config.json"
-}
diff --git a/aafwk/aafwk_standard/actsabilitymanageretstest/Test.json b/aafwk/aafwk_standard/actsabilitymanageretstest/Test.json
deleted file mode 100644
index 612f4ad6cde7edc8136b76da944ac6447854c819..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/actsabilitymanageretstest/Test.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- "description": "Configuration for aceceshi Tests",
- "driver": {
- "type": "OHJSUnitTest",
- "test-timeout": "600000",
- "bundle-name": "com.ohos.acecollaboration",
- "package-name": "com.ohos.acecollaboration",
- "shell-timeout": "600000"
- },
- "kits": [
- {
- "test-file-name": [
- "ActsAbilityManagerEtsTest.hap"
- ],
- "type": "AppInstallKit",
- "cleanup-apps": true
- }
- ]
-}
diff --git a/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/config.json b/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/config.json
deleted file mode 100644
index 9ce6b05e5656e00bc860a908d1972996c074a95f..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/config.json
+++ /dev/null
@@ -1,192 +0,0 @@
-{
- "app": {
- "bundleName": "com.ohos.acecollaboration",
- "vendor": "ohos",
- "version": {
- "code": 1000000,
- "name": "1.0.0"
- },
- "apiVersion": {
- "compatible": 7,
- "releaseType": "Release",
- "target": 7
- }
- },
- "deviceConfig": {},
- "module": {
- "package": "com.ohos.acecollaboration",
- "name": ".MyApplication",
- "srcPath": "",
- "mainAbility": "com.ohos.acecollaboration.MainAbility",
- "deviceType": [
- "phone"
- ],
- "reqPermissions": [
- {
- "name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"
- },
- {
- "name": "ohos.permission.GET_BUNDLE_INFO"
- }
- ],
- "distro": {
- "deliveryWithInstall": true,
- "moduleName": "entry",
- "moduleType": "entry",
- "installationFree": false
- },
- "abilities": [
- {
- "skills": [
- {
- "entities": [
- "entity.system.home"
- ],
- "actions": [
- "action.system.home"
- ]
- }
- ],
- "visible": true,
- "srcPath": "MainAbility",
- "srcLanguage": "ets",
- "name": "com.ohos.acecollaboration.MainAbility",
- "icon": "$media:icon",
- "description": "$string:mainability_description",
- "label": "$string:entry_MainAbility",
- "type": "page",
- "launchType": "standard"
- },
- {
- "orientation": "unspecified",
- "visible": true,
- "srcPath": "TestAbility",
- "name": ".TestAbility",
- "srcLanguage": "ets",
- "icon": "$media:icon",
- "description": "$string:TestAbility_desc",
- "formsEnabled": false,
- "label": "$string:TestAbility_label",
- "type": "page",
- "launchType": "standard"
- },
- {
- "orientation": "unspecified",
- "srcPath": "MainAbility2",
- "name": ".MainAbility2",
- "srcLanguage": "ets",
- "icon": "$media:icon",
- "description": "$string:description_mainability2",
- "formsEnabled": false,
- "label": "$string:entry_MainAbility2",
- "type": "page",
- "launchType": "standard"
- },
- {
- "srcPath": "ServiceAbility",
- "name": ".ServiceAbility",
- "icon": "$media:icon",
- "srcLanguage": "ets",
- "description": "$string:description_serviceability",
- "type": "service"
- },
- {
- "srcPath": "ServiceAbility2",
- "name": ".ServiceAbility2",
- "icon": "$media:icon",
- "srcLanguage": "ets",
- "description": "$string:description_serviceability2",
- "type": "service"
- },
- {
- "srcPath": "ServiceAbility3",
- "name": ".ServiceAbility3",
- "icon": "$media:icon",
- "srcLanguage": "ets",
- "description": "$string:description_serviceability3",
- "type": "service"
- },
- {
- "srcPath": "ServiceAbility4",
- "name": ".ServiceAbility4",
- "icon": "$media:icon",
- "srcLanguage": "ets",
- "description": "$string:description_serviceability4",
- "type": "service"
- },
- {
- "srcPath": "ServiceAbility5",
- "name": ".ServiceAbility5",
- "icon": "$media:icon",
- "srcLanguage": "ets",
- "description": "$string:description_serviceability5",
- "type": "service"
- },
- {
- "srcPath": "ServiceAbility6",
- "name": ".ServiceAbility6",
- "icon": "$media:icon",
- "srcLanguage": "ets",
- "description": "$string:description_serviceability6",
- "type": "service"
- },
- {
- "srcPath": "ServiceAbility7",
- "name": ".ServiceAbility7",
- "icon": "$media:icon",
- "srcLanguage": "ets",
- "description": "$string:description_serviceability7",
- "type": "service"
- }
- ],
- "js": [
- {
- "mode": {
- "syntax": "ets",
- "type": "pageAbility"
- },
- "pages": [
- "pages/index"
- ],
- "name": "MainAbility",
- "window": {
- "designWidth": 720,
- "autoDesignWidth": false
- }
- },
- {
- "mode": {
- "syntax": "ets",
- "type": "pageAbility"
- },
- "pages": [
- "pages/index"
- ],
- "name": ".MainAbility2",
- "window": {
- "designWidth": 720,
- "autoDesignWidth": false
- }
- },
- {
- "mode": {
- "syntax": "ets",
- "type": "pageAbility"
- },
- "pages": [
- "pages/index"
- ],
- "name": ".TestAbility",
- "window": {
- "designWidth": 720,
- "autoDesignWidth": false
- }
- }
- ],
- "defPermissions": [
- {
- "name": "com.ohos.acecollaboration.DataAbilityShellProvider.PROVIDER"
- }
- ]
- }
-}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/MainAbility/app.ets b/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/MainAbility/app.ets
deleted file mode 100644
index 5d603333c7bf5167e7d1d3ead6c9daa9c4b2862d..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/MainAbility/app.ets
+++ /dev/null
@@ -1,22 +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.
- */
-export default {
- onCreate() {
- console.info('Application onCreate')
- },
- onDestroy() {
- console.info('Application onDestroy')
- },
-}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/MainAbility/pages/index.ets b/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/MainAbility/pages/index.ets
deleted file mode 100644
index 5b8a8cc1e2e6b3499fd9192331356dbb7300b9f8..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/MainAbility/pages/index.ets
+++ /dev/null
@@ -1,40 +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.
- */
-
-@Entry
-@Component
-struct MyComponent {
- aboutToAppear() {
- }
-
- build() {
- Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) {
- Text('Hello World')
- .fontSize(50)
- .fontWeight(FontWeight.Bold)
- Button() {
- Text('next page')
- .fontSize(25)
- .fontWeight(FontWeight.Bold)
- }.type(ButtonType.Capsule)
- .margin({
- top: 20
- })
- .backgroundColor('#0D9FFB')
- }
- .width('100%')
- .height('100%')
- }
-}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/ServiceAbility/service.ts b/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/ServiceAbility/service.ts
deleted file mode 100644
index bc342fe3466309a38caac4ed30aff68f3d01738b..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/ServiceAbility/service.ts
+++ /dev/null
@@ -1,52 +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 rpc from '@ohos.rpc';
-
-class StubTest extends rpc.RemoteObject {
- constructor(des) {
- super(des)
- }
-
- onRemoteRequest(code, data, reply, option) {
- console.info('ServiceAbility onRemoteRequest');
- if (code === 1) {
- let op1 = data.readInt();
- let op2 = data.readInt();
- reply.writeInt(op1 + op2);
- console.info('ServiceAbility op1:' + op1 + ' op2:' + op2);
- }
- return true;
- }
-}
-
-export default {
- onStart() {
- console.info('ServiceAbility onStart');
- },
- onStop() {
- console.info('ServiceAbility onStop');
- },
- onCommand(want, startId) {
- console.info('ServiceAbility onCommand');
- },
- onConnect(want) {
- console.info('ServiceAbility onConnect');
- return new StubTest("test");
- },
- onDisConnect(want) {
- console.info('ServiceAbility onDisConnect');
- },
-};
diff --git a/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/ServiceAbility2/service.ts b/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/ServiceAbility2/service.ts
deleted file mode 100644
index fb96c3af10db275c6eb3707f198e1fa30e014e3d..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/ServiceAbility2/service.ts
+++ /dev/null
@@ -1,132 +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 particleAbility from '@ohos.ability.particleAbility';
-import rpc from '@ohos.rpc'
-
-class StubTest2 extends rpc.RemoteObject {
- constructor(des) {
- super(des)
- }
-
- onRemoteRequest(code, data, reply, option) {
- console.info('ServiceAbility2 onRemoteRequest');
- if (code === 1) {
- let op1 = data.readInt();
- let op2 = data.readInt();
- reply.writeInt(op1 + op2);
- console.info('ServiceAbility2 op1:' + op1 + ' op2:' + op2);
- }
- return true;
- }
-}
-
-function getNowTime() {
- return new Date().getTime();
-}
-
-function getDurationTime(msg, startTime, endTime) {
- console.info(msg + 'Get Interface startTime: ' + startTime);
- console.info(msg + 'Get Interface endTime: ' + endTime);
- var duration = (endTime - startTime)
- console.info(msg + 'Get Interface Duration: ' + duration);
- return duration;
-}
-
-async function sleep(time: any) {
- var now = new Date();
- var exitTime = now.getTime() + time;
- while (true) {
- now = new Date();
- if (now.getTime() > exitTime)
- break;
- }
- console.info(`sleep ${time} over...`);
-}
-
-export default {
- onStart() {
- console.info('ServiceAbility2 onStart');
- },
- onStop() {
- console.info('ServiceAbility2 onStop');
- },
- onCommand(want, startId) {
- console.info('ServiceAbility2 onCommand');
- let request = {
- "bundleName": "com.ohos.acecollaboration",
- "abilityName": "com.ohos.acecollaboration.ServiceAbility",
- }
- let options = {
- onConnect: async function (element: any, proxy: any) {
- console.log('particleAbility_connectAbility_test_0100 ConnectAbility onConnect element.deviceId : '
- + JSON.stringify(element.deviceId));
- console.log('particleAbility_connectAbility_test_0100 ConnectAbility onConnect element.bundleName : '
- + JSON.stringify(element.bundleName));
- console.log('particleAbility_connectAbility_test_0100 ConnectAbility onConnect element.abilityName : '
- + JSON.stringify(element.abilityName));
- console.log('particleAbility_connectAbility_test_0100 ConnectAbility onConnect element.uri : '
- + JSON.stringify(element.uri));
- console.log('particleAbility_connectAbility_test_0100 ConnectAbility onConnect element.shortName : '
- + JSON.stringify(element.shortName));
- console.log('particleAbility_connectAbility_test_0100 ConnectAbility onConnect proxy : '
- + JSON.stringify(proxy));
- },
- onDisconnect: async function (element1: any) {
- console.log('particleAbility_connectAbility_test_0100 ConnectAbility onDisconnect element.deviceId : '
- + JSON.stringify(element1.deviceId));
- console.log('particleAbility_connectAbility_test_0100 ConnectAbility onDisconnect element.bundleName : '
- + JSON.stringify(element1.bundleName));
- console.log('particleAbility_connectAbility_test_0100 ConnectAbility onDisconnect element.abilityName: '
- + JSON.stringify(element1.abilityName));
- console.log('particleAbility_connectAbility_test_0100 ConnectAbility onDisconnect element.uri : '
- + JSON.stringify(element1.uri));
- console.log('particleAbility_connectAbility_test_0100 ConnectAbility onDisconnect element.shortName : '
- + JSON.stringify(element1.shortName));
- },
- onFailed: async function (code: any) {
- console.log('particleAbility_connectAbility_test_0100 ConnectAbility onFailed errCode : ' + code);
- },
- }
-
- let connection_succeeded: any;
- console.info('particleAbility_connectAbility_test_0100 start ');
- var timeOldStamp = getNowTime();
- var connection = particleAbility.connectAbility(request, options);
- var timeNewStamp = getNowTime();
- getDurationTime('particleAbility_connectAbility_test_0100 connectability', timeOldStamp, timeNewStamp);
- connection_succeeded = connection;
- console.info('particleAbility_connectAbility_test_0100 service request is:' + JSON.stringify(request));
- console.info('particleAbility_connectAbility_test_0100 options is:' + JSON.stringify(options));
- console.info('particleAbility_connectAbility_test_0100 data is: ' + JSON.stringify(connection));
- console.info('particleAbility_connectAbility_test_0100 connection=: ' + connection);
- sleep(5000);
- console.info('particleAbility_connectAbility_test_0100 disconnectability start ');
- var timeOldStamp = getNowTime();
- particleAbility.disconnectAbility(connection_succeeded).then((data: any) => {
- var timeNewStamp = getNowTime();
- getDurationTime('particleAbility_connectAbility_test_0100 disconnectability', timeOldStamp, timeNewStamp);
- console.info('particleAbility_connectAbility_test_0100 disconnectability succeeded: ' +
- JSON.stringify(data));
- }).catch((error: any) => {
- console.error('particleAbility_connectAbility_test_0100 disconnectability failed. Cause: ' +
- JSON.stringify(error));
- })
- },
- onConnect(want) {
- console.info('ServiceAbility2 onConnect');
- return new StubTest2("test");
- },
-};
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/ServiceAbility3/service.ts b/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/ServiceAbility3/service.ts
deleted file mode 100644
index 4c669dfbde479acb547c1480690f4a21f5cbb10d..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/ServiceAbility3/service.ts
+++ /dev/null
@@ -1,133 +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 particleAbility from '@ohos.ability.particleAbility';
-import rpc from '@ohos.rpc';
-
-class StubTest3 extends rpc.RemoteObject {
- constructor(des) {
- super(des)
- }
-
- onRemoteRequest(code, data, reply, option) {
- console.info('ServiceAbility3 onRemoteRequest');
- if (code === 1) {
- let op1 = data.readInt();
- let op2 = data.readInt();
- reply.writeInt(op1 + op2);
- console.info('ServiceAbility3 op1:' + op1 + ' op2:' + op2);
- }
- return true;
- }
-}
-
-function getNowTime() {
- return new Date().getTime();
-}
-
-function getDurationTime(msg, startTime, endTime) {
- console.info(msg + 'Get Interface startTime: ' + startTime);
- console.info(msg + 'Get Interface endTime: ' + endTime);
- var duration = (endTime - startTime)
- console.info(msg + 'Get Interface Duration: ' + duration);
- return duration;
-}
-
-async function sleep(time: any) {
- var now = new Date();
- var exitTime = now.getTime() + time;
- while (true) {
- now = new Date();
- if (now.getTime() > exitTime)
- break;
- }
- console.info(`sleep ${time} over...`);
-}
-
-export default {
- onStart() {
- console.info('ServiceAbility3 onStart');
- },
- onStop() {
- console.info('ServiceAbility3 onStop');
- },
- onCommand(want, startId) {
- console.info('ServiceAbility3 onCommand');
- let request = {
- "bundleName": "com.ohos.acecollaboration",
- "abilityName": "com.ohos.acecollaboration.ServiceAbility",
- }
- let options = {
- onConnect: async function (element: any, proxy: any) {
- console.log('particleAbility_connectAbility_test_0200 ConnectAbility onConnect element.deviceId : '
- + JSON.stringify(element.deviceId))
- console.log('particleAbility_connectAbility_test_0200 ConnectAbility onConnect element.bundleName : '
- + JSON.stringify(element.bundleName))
- console.log('particleAbility_connectAbility_test_0200 ConnectAbility onConnect element.abilityName : '
- + JSON.stringify(element.abilityName))
- console.log('particleAbility_connectAbility_test_0200 ConnectAbility onConnect element.uri : '
- + JSON.stringify(element.uri))
- console.log('particleAbility_connectAbility_test_0200 ConnectAbility onConnect element.shortName : '
- + JSON.stringify(element.shortName))
- console.log('particleAbility_connectAbility_test_0200 ConnectAbility onConnect proxy : '
- + JSON.stringify(proxy));
- },
- onDisconnect: async function (element1: any) {
- console.log('particleAbility_connectAbility_test_0200 ConnectAbility onDisconnect element.deviceId :'
- + JSON.stringify(element1.deviceId));
- console.log('particleAbility_connectAbility_test_0200 ConnectAbility onDisconnect element.bundleName :'
- + JSON.stringify(element1.bundleName));
- console.log('particleAbility_connectAbility_test_0200 ConnectAbility onDisconnect element.abilityName :'
- + JSON.stringify(element1.abilityName));
- console.log('particleAbility_connectAbility_test_0200 ConnectAbility onDisconnect element.uri : '
- + JSON.stringify(element1.uri));
- console.log('particleAbility_connectAbility_test_0200 ConnectAbility onDisconnect element.shortName : '
- + JSON.stringify(element1.shortName));
- },
- onFailed: function (code: any) {
- console.log('particleAbility_connectAbility_test_0200 ConnectAbility onFailed errCode: ' + code)
- },
- }
-
- let connection_succeeded: any;
- console.info('particleAbility_connectAbility_test_0200 start ');
- var timeOldStamp = getNowTime();
- var connection = particleAbility.connectAbility(request, options);
- var timeNewStamp = getNowTime();
- getDurationTime('particleAbility_connectAbility_test_0200 connectability', timeOldStamp, timeNewStamp);
- connection_succeeded = connection;
- console.info('particleAbility_connectAbility_test_0200 service request is:' + JSON.stringify(request));
- console.info('particleAbility_connectAbility_test_0200 options is:' + JSON.stringify(options));
- console.info('particleAbility_connectAbility_test_0200 connection=: ' + connection);
- sleep(5000);
- console.info('particleAbility_connectAbility_test_0200 disconnectability start ');
- try {
- var timeOldStamp = getNowTime();
- particleAbility.disconnectAbility(connection_succeeded, (error, data) => {
- var timeNewStamp = getNowTime();
- getDurationTime('particleAbility_connectAbility_test_0200 disconnectability', timeOldStamp, timeNewStamp);
- console.info('particleAbility_connectAbility_test_0200 disconnectability succeeded: ' + JSON.stringify(data));
- })
- }
- catch(error: any){
- console.error('particleAbility_connectAbility_test_0200 disconnectability failed. Cause: ' +
- JSON.stringify(error));
- }
- },
- onConnect(want) {
- console.info('ServiceAbility3 onConnect');
- return new StubTest3("test");
- },
-};
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/ServiceAbility4/service.ts b/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/ServiceAbility4/service.ts
deleted file mode 100644
index 8b768feb66951e0b3be14938b1f24f3bc08d3fef..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/ServiceAbility4/service.ts
+++ /dev/null
@@ -1,132 +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 particleAbility from '@ohos.ability.particleAbility';
-import rpc from '@ohos.rpc'
-
-class StubTest4 extends rpc.RemoteObject {
- constructor(des) {
- super(des)
- }
-
- onRemoteRequest(code, data, reply, option) {
- console.info('ServiceAbility4 onRemoteRequest');
- if (code === 1) {
- let op1 = data.readInt();
- let op2 = data.readInt();
- reply.writeInt(op1 + op2);
- console.info('ServiceAbility4 op1:' + op1 + ' op2:' + op2);
- }
- return true;
- }
-}
-
-function getNowTime() {
- return new Date().getTime();
-}
-
-function getDurationTime(msg, startTime, endTime) {
- console.info(msg + 'Get Interface startTime: ' + startTime);
- console.info(msg + 'Get Interface endTime: ' + endTime);
- var duration = (endTime - startTime)
- console.info(msg + 'Get Interface Duration: ' + duration);
- return duration;
-}
-
-async function sleep(time: any) {
- var now = new Date();
- var exitTime = now.getTime() + time;
- while (true) {
- now = new Date();
- if (now.getTime() > exitTime)
- break;
- }
- console.info(`sleep ${time} over...`);
-}
-
-export default {
- onStart() {
- console.info('ServiceAbility4 onStart');
- },
- onStop() {
- console.info('ServiceAbility4 onStop');
- },
- onCommand(want, startId) {
- console.info('ServiceAbility4 onCommand');
- let request = {
- "bundleName": "com.open.harmony.packagemag",
- "abilityName": "com.open.harmony.packagemag.packServiceAbility",
- }
- let options = {
- onConnect: async function (element: any, proxy: any) {
- console.log('particleAbility_connectAbility_test_0300 ConnectAbility onConnect element.deviceId : '
- + JSON.stringify(element.deviceId))
- console.log('particleAbility_connectAbility_test_0300 ConnectAbility onConnect element.bundleName : '
- + JSON.stringify(element.bundleName))
- console.log('particleAbility_connectAbility_test_0300 ConnectAbility onConnect element.abilityName : '
- + JSON.stringify(element.abilityName))
- console.log('particleAbility_connectAbility_test_0300 ConnectAbility onConnect element.uri : '
- + JSON.stringify(element.uri))
- console.log('particleAbility_connectAbility_test_0300 ConnectAbility onConnect element.shortName : '
- + JSON.stringify(element.shortName))
- console.log('particleAbility_connectAbility_test_0300 ConnectAbility onConnect proxy : '
- + JSON.stringify(proxy));
- },
- onDisconnect: async function (element1: any) {
- console.log('particleAbility_connectAbility_test_0300 ConnectAbility onDisconnect element.deviceId : '
- + JSON.stringify(element1.deviceId));
- console.log('particleAbility_connectAbility_test_0300 ConnectAbility onDisconnect element.bundleName: '
- + JSON.stringify(element1.bundleName));
- console.log('particleAbility_connectAbility_test_0300 ConnectAbility onDisconnect element.abilityName:'
- + JSON.stringify(element1.abilityName));
- console.log('particleAbility_connectAbility_test_0300 ConnectAbility onDisconnect element.uri: '
- + JSON.stringify(element1.uri));
- console.log('particleAbility_connectAbility_test_0300 ConnectAbility onDisconnect element.shortName :'
- + JSON.stringify(element1.shortName));
- },
- onFailed: function (code: any) {
- console.log('particleAbility_connectAbility_test_0300 ConnectAbility onFailed errCode : '+ code);
- },
- }
-
- let connection_succeeded: any;
- console.info('particleAbility_connectAbility_test_0300 start ');
- var timeOldStamp = getNowTime();
- var connection = particleAbility.connectAbility(request, options);
- var timeNewStamp = getNowTime();
- getDurationTime('particleAbility_connectAbility_test_0300 connectability', timeOldStamp, timeNewStamp);
- connection_succeeded = connection;
- console.info('particleAbility_connectAbility_test_0300 service request is:' + JSON.stringify(request));
- console.info('particleAbility_connectAbility_test_0300 options is:' + JSON.stringify(options));
- console.info('particleAbility_connectAbility_test_0300 data is: ' + JSON.stringify(connection));
- console.info('particleAbility_connectAbility_test_0300 connection=: ' + connection);
- sleep(5000);
- console.info('particleAbility_connectAbility_test_0300 disconnectability start ');
- var timeOldStamp = getNowTime();
- particleAbility.disconnectAbility(connection_succeeded).then((data: any) => {
- var timeNewStamp = getNowTime();
- getDurationTime('particleAbility_connectAbility_test_0300 disconnectability', timeOldStamp, timeNewStamp);
- console.info('particleAbility_connectAbility_test_0300 disconnectability succeeded:'
- + JSON.stringify(data));
- }).catch ((error: any) =>{
- console.error('particleAbility_connectAbility_test_0300 disconnectability failed. Cause: ' +
- JSON.stringify(error));
- })
- },
- onConnect(want) {
- console.info('ServiceAbility4 onConnect');
- return new StubTest4("test");
- },
-};
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/ServiceAbility5/service.ts b/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/ServiceAbility5/service.ts
deleted file mode 100644
index 646eb606b02d7cee6f934271853de8f8449f44fb..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/ServiceAbility5/service.ts
+++ /dev/null
@@ -1,147 +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 particleAbility from '@ohos.ability.particleAbility';
-import rpc from '@ohos.rpc'
-
-class StubTest5 extends rpc.RemoteObject {
- constructor(des) {
- super(des)
- }
-
- onRemoteRequest(code, data, reply, option) {
- console.info('ServiceAbility5 onRemoteRequest');
- if (code === 1) {
- let op1 = data.readInt();
- let op2 = data.readInt();
- reply.writeInt(op1 + op2);
- console.info('ServiceAbility5 op1:' + op1 + ' op2:' + op2);
- }
- return true;
- }
-}
-
-function getNowTime() {
- return new Date().getTime();
-}
-
-function getDurationTime(msg, startTime, endTime) {
- console.info(msg + 'Get Interface startTime: ' + startTime);
- console.info(msg + 'Get Interface endTime: ' + endTime);
- var duration = (endTime - startTime)
- console.info(msg + 'Get Interface Duration: ' + duration);
- return duration;
-}
-
-async function sleep(time: any) {
- var now = new Date();
- var exitTime = now.getTime() + time;
- while (true) {
- now = new Date();
- if (now.getTime() > exitTime)
- break;
- }
- console.info(`sleep ${time} over...`);
-}
-
-export default {
- onStart() {
- console.info('ServiceAbility5 onStart');
- },
- onStop() {
- console.info('ServiceAbility5 onStop');
- },
- onCommand(want, startId) {
- console.info('ServiceAbility5 onCommand');
- let request = {
- "bundleName": "",
- "abilityName": "",
- }
- let options = {
- onConnect: async function (element: any, proxy: any) {
- console.log('particleAbility_connectAbility_test_0400 ConnectAbility onConnect element.deviceId : '
- + JSON.stringify(element.deviceId))
- console.log('particleAbility_connectAbility_test_0400 ConnectAbility onConnect element.bundleName : '
- + JSON.stringify(element.bundleName))
- console.log('particleAbility_connectAbility_test_0400 ConnectAbility onConnect element.abilityName : '
- + JSON.stringify(element.abilityName))
- console.log('particleAbility_connectAbility_test_0400 ConnectAbility onConnect element.uri : '
- + JSON.stringify(element.uri))
- console.log('particleAbility_connectAbility_test_0400 ConnectAbility onConnect element.shortName : '
- + JSON.stringify(element.shortName))
- console.log('particleAbility_connectAbility_test_0400 ConnectAbility onConnect proxy : '
- + JSON.stringify(proxy));
- },
- onDisconnect: function (element1: any) {
- console.log('particleAbility_connectAbility_test_0400 ConnectAbility onDisconnect element.deviceId : '
- + JSON.stringify(element1.deviceId));
- console.log('particleAbility_connectAbility_test_0400 ConnectAbility onDisconnect element.bundleName: '
- + JSON.stringify(element1.bundleName));
- console.log('particleAbility_connectAbility_test_0400 ConnectAbility onDisconnect element.abilityName:'
- + JSON.stringify(element1.abilityName));
- console.log('particleAbility_connectAbility_test_0400 ConnectAbility onDisconnect element.uri : '
- + JSON.stringify(element1.uri));
- console.log('particleAbility_connectAbility_test_0400 ConnectAbility onDisconnect element.shortName : '
- + JSON.stringify(element1.shortName));
- },
- onFailed: function (code: any) {
- console.log('particleAbility_connectAbility_test_0400 ConnectAbility onFailed errCode:' + code);
- },
- }
-
- let connection_succeeded: any;
- console.info('particleAbility_connectAbility_test_0400 start ');
- var timeOldStamp = getNowTime();
- var connection = particleAbility.connectAbility(request, options);
- var timeNewStamp = getNowTime();
- getDurationTime('particleAbility_connectAbility_test_0400 connectability', timeOldStamp, timeNewStamp);
- connection_succeeded = connection;
- console.info('particleAbility_connectAbility_test_0400 service request is:' + JSON.stringify(request));
- console.info('particleAbility_connectAbility_test_0400 options is:' + JSON.stringify(options));
- console.info('particleAbility_connectAbility_test_0400 connection=: ' + connection);
- sleep(5000);
- console.info('particleAbility_connectAbility_test_0400 disconnectability start ');
- var timeOldStamp = getNowTime();
- particleAbility.disconnectAbility(connection_succeeded).then((data: any) => {
- var timeNewStamp = getNowTime();
- getDurationTime('particleAbility_connectAbility_test_0400 disconnectability', timeOldStamp, timeNewStamp);
- console.info('particleAbility_connectAbility_test_0400 disconnectability succeeded: ' +
- JSON.stringify(data));
- }).catch((error: any) => {
- console.error('particleAbility_connectAbility_test_0400 disconnectability failed. Cause: ' +
- JSON.stringify(error));
- });
- sleep(5000);
- console.info('particleAbility_connectAbility_test_0400 disconnectability_fail start ');
- try {
- var timeOldStamp = getNowTime();
- particleAbility.disconnectAbility(-1).then((data: any) => {
- var timeNewStamp = getNowTime();
- getDurationTime('particleAbility_connectAbility_test_0400 disconnectability_fail',
- timeOldStamp, timeNewStamp);
- console.info('particleAbility_connectAbility_test_0400 disconnectability_fail succeeded: ' +
- JSON.stringify(data));
- })
- }
- catch (error: any) {
- console.error('particleAbility_connectAbility_test_0400 disconnectability_fail failed. Cause: ' +
- JSON.stringify(error));
- }
- },
- onConnect(want) {
- console.info('ServiceAbility5 onConnect');
- return new StubTest5("test");
- },
-};
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/ServiceAbility6/service.ts b/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/ServiceAbility6/service.ts
deleted file mode 100644
index 5e5f15eb7146d35bd26b6c5512a94991b08f5b68..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/ServiceAbility6/service.ts
+++ /dev/null
@@ -1,108 +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 particleAbility from '@ohos.ability.particleAbility';
-import rpc from '@ohos.rpc'
-
-class StubTest6 extends rpc.RemoteObject {
- constructor(des) {
- super(des)
- }
-
- onRemoteRequest(code, data, reply, option) {
- console.info('ServiceAbility6 onRemoteRequest');
- if (code === 1) {
- let op1 = data.readInt();
- let op2 = data.readInt();
- reply.writeInt(op1 + op2);
- console.info('ServiceAbility6 op1:' + op1 + ' op2:' + op2);
- }
- return true;
- }
-}
-function getNowTime() {
- return new Date().getTime();
-}
-
-function getDurationTime(msg, startTime, endTime) {
- console.info(msg + 'Get Interface startTime: ' + startTime);
- console.info(msg + 'Get Interface endTime: ' + endTime);
- var duration = (endTime - startTime)
- console.info(msg + 'Get Interface Duration: ' + duration);
- return duration;
-}
-
-export default {
- onStart() {
- console.info('ServiceAbility onStart');
- },
- onStop() {
- console.info('ServiceAbility onStop');
- },
- onCommand(want, startId) {
- console.info('ServiceAbility onCommand');
-
- let request = {
- "bundleName":"com.ohos.acecollaboration",
- "abilityName":"com.ohos.acecollaboration.xxx",
- }
- let options = {
- onConnect:async function (element:any, proxy:any) {
- console.log('particleAbility_connectAbility_test_0500 ConnectAbility onConnect element.deviceId : '
- + JSON.stringify(element.deviceId))
- console.log('particleAbility_connectAbility_test_0500 ConnectAbility onConnect element.bundleName : '
- + JSON.stringify(element.bundleName))
- console.log('particleAbility_connectAbility_test_0500 ConnectAbility onConnect element.abilityName : '
- + JSON.stringify(element.abilityName))
- console.log('particleAbility_connectAbility_test_0500 ConnectAbility onConnect element.uri : '
- + JSON.stringify(element.uri))
- console.log('particleAbility_connectAbility_test_0500 ConnectAbility onConnect element.shortName : '
- + JSON.stringify(element.shortName))
- console.log('particleAbility_connectAbility_test_0500 ConnectAbility onConnect proxy : '
- + JSON.stringify(proxy));
- },
- onDisconnect:function (element1:any) {
- console.log('particleAbility_connectAbility_test_0500 ConnectAbility onDisconnect element.deviceId : '
- + JSON.stringify(element1.deviceId));
- console.log('particleAbility_connectAbility_test_0500 ConnectAbility onDisconnect element.bundleName: '
- + JSON.stringify(element1.bundleName));
- console.log('particleAbility_connectAbility_test_0500 ConnectAbility onDisconnect element.abilityName:'
- + JSON.stringify(element1.abilityName));
- console.log('particleAbility_connectAbility_test_0500 ConnectAbility onDisconnect element.uri : '
- + JSON.stringify(element1.uri));
- console.log('particleAbility_connectAbility_test_0500 ConnectAbility onDisconnect element.shortName : '
- + JSON.stringify(element1.shortName));
- },
- onFailed:function (code:any) {
- console.log('particleAbility_connectAbility_test_0500 ConnectAbility service onFailed errCode:' + code)
- },
- }
-
- console.info('particleAbility_connectAbility_test_0500 errorabilityName start');
- var timeOldStamp = getNowTime();
- var connection = particleAbility.connectAbility(request, options);
- var timeNewStamp = getNowTime();
- getDurationTime('particleAbility_connectAbility_test_0500 connectability', timeOldStamp, timeNewStamp);
- console.info('particleAbility_connectAbility_test_0500 errorabilityName request is:'
- + JSON.stringify(request));
- console.info('particleAbility_connectAbility_test_0500 errorabilityName options is:'
- + JSON.stringify(options));
- console.info('particleAbility_connectAbility_test_0500 errorabilityName connection=: ' + connection);
- },
- onConnect(want) {
- console.info('ServiceAbility6 onConnect');
- return new StubTest6("test");
- },
-};
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/ServiceAbility7/service.ts b/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/ServiceAbility7/service.ts
deleted file mode 100644
index a1efccb5cf6eeab2eb90e6b589958c139599e0ae..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/ServiceAbility7/service.ts
+++ /dev/null
@@ -1,135 +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 particleAbility from '@ohos.ability.particleAbility';
-import rpc from '@ohos.rpc'
-
-class StubTest7 extends rpc.RemoteObject {
- constructor(des) {
- super(des)
- }
-
- onRemoteRequest(code, data, reply, option) {
- console.info('ServiceAbility7 onRemoteRequest');
- if (code === 1) {
- let op1 = data.readInt();
- let op2 = data.readInt();
- reply.writeInt(op1 + op2);
- console.info('ServiceAbility7 op1:' + op1 + ' op2:' + op2);
- }
- return true;
- }
-}
-
-function getNowTime() {
- return new Date().getTime();
-}
-
-function getDurationTime(msg, startTime, endTime) {
- console.info(msg + 'Get Interface startTime: ' + startTime);
- console.info(msg + 'Get Interface endTime: ' + endTime);
- var duration = (endTime - startTime)
- console.info(msg + 'Get Interface Duration: ' + duration);
- return duration;
-}
-
-async function sleep(time: any) {
- var now = new Date();
- var exitTime = now.getTime() + time;
- while (true) {
- now = new Date();
- if (now.getTime() > exitTime)
- break;
- }
- console.info(`sleep ${time} over...`);
-}
-export default {
- onStart() {
- console.info('ServiceAbility7 onStart');
- },
- onStop() {
- console.info('ServiceAbility7 onStop');
- },
- onCommand(want, startId) {
- console.info('ServiceAbility7 onCommand');
-
- let request = {
- "bundleName":"com.example.myapplication",
- "abilityName":"com.example.myapplication.ServiceAbility_API8",
- }
- let options = {
- onConnect:async function (element:any, proxy:any) {
- console.log('particleAbility_connectAbility_test_0600 ConnectAbility onConnect element.deviceId : '
- + JSON.stringify(element.deviceId))
- console.log('particleAbility_connectAbility_test_0600 ConnectAbility onConnect element.bundleName : '
- + JSON.stringify(element.bundleName))
- console.log('particleAbility_connectAbility_test_0600 ConnectAbility onConnect element.abilityName : '
- + JSON.stringify(element.abilityName))
- console.log('particleAbility_connectAbility_test_0600 ConnectAbility onConnect element.uri : '
- + JSON.stringify(element.uri))
- console.log('particleAbility_connectAbility_test_0600 ConnectAbility onConnect element.shortName : '
- + JSON.stringify(element.shortName))
- console.log('particleAbility_connectAbility_test_0600 ConnectAbility onConnect proxy : '
- + JSON.stringify(proxy));
- },
- onDisconnect:async function (element1:any) {
- console.log('particleAbility_connectAbility_test_0600 ConnectAbility onDisconnect element.deviceId : '
- + JSON.stringify(element1.deviceId));
- console.log('particleAbility_connectAbility_test_0600 ConnectAbility onDisconnect element.bundleName: '
- + JSON.stringify(element1.bundleName));
- console.log('particleAbility_connectAbility_test_0600 ConnectAbility onDisconnect element.abilityName:'
- + JSON.stringify(element1.abilityName));
- console.log('particleAbility_connectAbility_test_0600 ConnectAbility onDisconnect element.uri : '
- + JSON.stringify(element1.uri));
- console.log('particleAbility_connectAbility_test_0600 ConnectAbility onDisconnect element.shortName : '
- + JSON.stringify(element1.shortName));
- },
- onFailed:function (code:any) {
- console.log('particleAbility_connectAbility_test_0600 ConnectAbility onFailed errCode:' + code);
- },
- }
-
- let connection_succeeded:any;
- console.info('particleAbility_connectAbility_test_0600 start ');
- var timeOldStamp = getNowTime();
- var connection = particleAbility.connectAbility(request, options);
- var timeNewStamp = getNowTime();
- getDurationTime('particleAbility_connectAbility_test_0600 connectability', timeOldStamp, timeNewStamp);
- connection_succeeded = connection;
- console.info('particleAbility_connectAbility_test_0600 service request is:' + JSON.stringify(request));
- console.info('particleAbility_connectAbility_test_0600 options is:' + JSON.stringify(options));
- console.info('particleAbility_connectAbility_test_0600 data is: ' + JSON.stringify(connection));
- console.info('particleAbility_connectAbility_test_0600 connection=: ' + connection);
- sleep(5000);
- console.info('particleAbility_connectAbility_test_0600 disconnectability start ');
- var timeOldStamp = getNowTime();
- particleAbility.disconnectAbility(connection_succeeded).then((data: any) => {
- var timeNewStamp = getNowTime();
- getDurationTime('particleAbility_connectAbility_test_0600 disconnectability', timeOldStamp, timeNewStamp);
- console.info('particleAbility_connectAbility_test_0600 disconnectability succeeded: ' +
- JSON.stringify(data));
- }).catch((error: any) =>{
- console.error('particleAbility_connectAbility_test_0600 disconnectability failed. Cause: ' +
- JSON.stringify(error));
- });
- },
- onConnect(want) {
- console.info('ServiceAbility7 onConnect');
- return new StubTest7("test");
- },
- onDisConnect(want) {
- console.info('ServiceAbility7 onDisConnect');
- },
-};
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/TestAbility/app.ets b/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/TestAbility/app.ets
deleted file mode 100644
index 9511bef9a9463a9b72db92a826b1d58313ddfe78..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/TestAbility/app.ets
+++ /dev/null
@@ -1,32 +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 { Hypium } from 'hypium/index'
-import testsuite from '../test/List.test'
-
-export default {
- onCreate() {
- console.info('Application onCreate')
- var abilityDelegator: any
- abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator()
- var abilityDelegatorArguments: any
- abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments()
- console.info('start run testcase!!!')
- Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite)
- },
- onDestroy() {
- console.info('Application onDestroy')
- },
-}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/TestAbility/pages/index.ets b/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/TestAbility/pages/index.ets
deleted file mode 100644
index 011878f2b989ed0798baafed2b6c14e241fad57e..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/TestAbility/pages/index.ets
+++ /dev/null
@@ -1,49 +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 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/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts b/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts
deleted file mode 100644
index 143e3ae5ce3c4181c0034fa6aa3c75191a6c49e6..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts
+++ /dev/null
@@ -1,77 +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 itName',
- '-s level', '-s testType', '-s size', '-s timeout',
- '-s package'
- ])
- let targetParams = '';
- for (const key in parameters) {
- if (keySet.has(key)) {
- 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')
- }
-
- onRun() {
- console.log('OpenHarmonyTestRunner onRun run')
- abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments()
- abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator()
-
- let lMonitor = {
- abilityName: testAbilityName,
- onAbilityCreate: onAbilityCreateCallback,
- };
- var testAbilityName = abilityDelegatorArguments.parameters['-p'] + '.TestAbility'
- abilityDelegator.addAbilityMonitor(lMonitor, addAbilityMonitorCallback)
- var cmd = 'aa start -d 0 -a ' + testAbilityName + ' -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 call abilityDelegator.getAppContext')
- var context = abilityDelegator.getAppContext()
- console.info('getAppContext : ' + JSON.stringify(context))
- console.info('OpenHarmonyTestRunner onRun end')
- }
-};
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/test/ContextJsunit.test.ets b/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/test/ContextJsunit.test.ets
deleted file mode 100644
index 94cef5f883debf66714233de4ece8c44cb78eb92..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/test/ContextJsunit.test.ets
+++ /dev/null
@@ -1,249 +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 featureAbility from '@ohos.ability.featureAbility'
-import {describe, beforeEach, afterEach, it, expect} from 'hypium/index';
-import Utils from './Utils';
-
-export default function ContextJsunit() {
- describe('appInfoTest', function () {
- beforeEach(async function (done) {
- console.info("context before each called");
- done()
- });
-
- afterEach(async function () {
- await Utils.sleep(2000);
- console.info("context after each called");
- });
-
- /*
- * @tc.number: context_getCacheDir_test_0100
- * @tc.name: getCacheDir : Obtains the Cache directory on internal storage.
- * @tc.desc: Check the return value of the interface (by promise)
- * @tc.level 0
- */
- it("context_getCacheDir_test_0100", 0, async function (done) {
- console.log("------------------start context_getCacheDir_test_0100-------------------");
- try {
- var timeOldStamp = await Utils.getNowTime();
- var context = await featureAbility.getContext();
- context.getCacheDir().then((data) => {
- var timeNewStamp = Utils.getNowTime();
- Utils.getDurationTime('context_getCacheDir_test_0100', timeOldStamp, timeNewStamp)
- console.log("context_getCacheDir_test_0100: CacheDir is " + data);
- })
- } catch (error) {
- console.log("logMessage context_getCacheDir_test_0100: error = " + error);
- expect(error).assertEqual("/data/storage/el2/base/haps/entry/cache");
- }
- var data1 = await context.getCacheDir();
- expect(typeof (data1)).assertEqual("string");
- expect(data1).assertEqual("/data/storage/el2/base/haps/entry/cache");
- done();
- console.log("------------------end context_getCacheDir_test_0100-------------------");
- });
-
- /*
- * @tc.number: context_getCacheDir_test_0200
- * @tc.name: getCacheDir : Obtains the Cache directory on internal storage.
- * @tc.desc: Check the return value of the interface (by AsyncCallback)
- * @tc.level 0
- */
- it("context_getCacheDir_test_0200", 0, async function (done) {
- console.log("------------------start context_getCacheDir_test_0200-------------------");
- try {
- var timeOldStamp = await Utils.getNowTime();
- var context = await featureAbility.getContext();
- context.getCacheDir((err, data) => {
- var timeNewStamp = Utils.getNowTime();
- Utils.getDurationTime('context_getCacheDir_test_0200', timeOldStamp, timeNewStamp)
- console.log("context_getCacheDir_test_0200: getCacheDir successful, result = " + data);
- });
- } catch (error) {
- console.log("logMessage context_getCacheDir_test_0200: error = " + error);
- expect(error).assertEqual("/data/storage/el2/base/haps/entry/cache");
- }
- var data1 = await context.getCacheDir();
- expect(typeof (data1)).assertEqual("string");
- expect(data1).assertEqual("/data/storage/el2/base/haps/entry/cache");
- done();
- console.log("------------------end context_getCacheDir_test_0200-------------------");
- });
-
- /*
- * @tc.number: context_getFilesDir_test_0100
- * @tc.name: getFilesDir : Obtains the files directory on internal storage.
- * @tc.desc: Check the return value of the interface (by promise)
- * @tc.level 0
- */
- it("context_getFilesDir_test_0100", 0, async function (done) {
- console.log("------------------start context_getFilesDir_test_0100-------------------");
- try {
- var timeOldStamp = await Utils.getNowTime();
- var context = await featureAbility.getContext();
- context.getFilesDir().then((data) => {
- var timeNewStamp = Utils.getNowTime();
- Utils.getDurationTime('context_getFilesDir_test_0100', timeOldStamp, timeNewStamp)
- console.log("context_getFilesDir_test_0100:FilesDir is " + data);
- })
- } catch (error) {
- console.log("logMessage context_getFilesDir_test_0100: error = " + error);
- expect(error).assertEqual("/data/storage/el2/base/haps/entry/files");
- }
- var data1 = await context.getFilesDir();
- expect(typeof (data1)).assertEqual("string");
- expect(data1).assertEqual("/data/storage/el2/base/haps/entry/files");
- done();
- console.log("------------------end context_getFilesDir_test_0100-------------------");
- });
-
- /*
- * @tc.number: context_getFilesDir_test_0200
- * @tc.name: getFilesDir : Obtains the files directory on internal storage.
- * @tc.desc: Check the return value of the interface (by AsyncCallback)
- * @tc.level 0
- */
- it("context_getFilesDir_test_0200", 0, async function (done) {
- console.log("------------------start context_getFilesDir_test_0200-------------------");
- try {
- var timeOldStamp = await Utils.getNowTime();
- var context = await featureAbility.getContext();
- context.getFilesDir((err, data) => {
- var timeNewStamp = Utils.getNowTime();
- Utils.getDurationTime('context_getFilesDir_test_0200', timeOldStamp, timeNewStamp)
- console.log("context_getFilesDir_test_0200: getFilesDir successful, result = " + data);
- });
- } catch (error) {
- console.log("logMessage context_getFilesDir_test_0200: error = " + error);
- expect(error).assertEqual("/data/storage/el2/base/haps/entry/files");
- }
- var data1 = await context.getFilesDir();
- expect(typeof (data1)).assertEqual("string");
- expect(data1).assertEqual("/data/storage/el2/base/haps/entry/files");
- done();
- console.log("------------------end context_getFilesDir_test_0200-------------------");
- });
-
-
- /*
- * @tc.number: context_getOrCreateDistributedDir_test_0100
- * @tc.name: getOrCreateDistributedDir : Obtains the directory of Distributed files.
- * @tc.desc: Check the return value of the interface (by promise)
- * @tc.level 0
- */
- it("context_getOrCreateDistributedDir_0100", 0, async function (done) {
- console.log("------------------start context_getOrCreateDistributedDir_0100-------------------");
- try {
- var timeOldStamp = await Utils.getNowTime();
- var context = await featureAbility.getContext();
- context.getOrCreateDistributedDir().then((data) => {
- var timeNewStamp = Utils.getNowTime();
- Utils.getDurationTime('context_getOrCreateDistributedDir_0100', timeOldStamp, timeNewStamp);
- console.log("context_getOrCreateDistributedDir_0100: DistributedDir is " + data);
- })
- } catch (error) {
- console.log("logMessage context_getOrCreateDistributedDir_0100: error = " + error);
- expect(error).assertEqual("/data/storage/el2/distributedfiles/entry");
- }
- var data1 = await context.getOrCreateDistributedDir();
- expect(typeof (data1)).assertEqual("string");
- expect(data1).assertEqual("/data/storage/el2/distributedfiles");
- done();
- console.log("------------------end context_getOrCreateDistributedDir_0100-------------------");
- });
-
- /*
- * @tc.number: context_getOrCreateDistributedDir_0200
- * @tc.name: getOrCreateDistributedDir : Obtains the directory of Distributed files.
- * @tc.desc: Check the return value of the interface (by AsyncCallback)
- * @tc.level 0
- */
- it("context_getOrCreateDistributedDir_0200", 0, async function (done) {
- console.log("------------------start context_getOrCreateDistributedDir_0200-------------------");
- try {
- var timeOldStamp = await Utils.getNowTime();
- var context = await featureAbility.getContext();
- context.getOrCreateDistributedDir((err, data) => {
- var timeNewStamp = Utils.getNowTime();
- Utils.getDurationTime('context_getOrCreateDistributedDir_0200', timeOldStamp, timeNewStamp);
- console.log("context_getOrCreateDistributedDir_0200: getOrCreateDistributedDir successful, result = " + data);
- });
- } catch (error) {
- console.log("logMessage context_getOrCreateDistributedDir_0200: error = " + error);
- expect(error).assertEqual("/data/storage/el2/distributedfiles/entry");
- }
- var data1 = await context.getOrCreateDistributedDir();
- expect(typeof (data1)).assertEqual("string");
- expect(data1).assertEqual("/data/storage/el2/distributedfiles");
- done();
- console.log("------------------end context_getOrCreateDistributedDir_0200-------------------");
- });
-
- /*
- * @tc.number: context_getAppType_0100
- * @tc.name: getAppType : Obtains the type of current application.
- * @tc.desc: Check the return value of the interface (by promise)
- * @tc.level 0
- */
- it("context_getAppType_0100", 0, async function (done) {
- console.log("------------------start context_getAppType_0100-------------------");
- try {
- var timeOldStamp = await Utils.getNowTime();
- var context = await featureAbility.getContext();
- context.getAppType().then((data) => {
- var timeNewStamp = Utils.getNowTime();
- Utils.getDurationTime('context_getAppType_0100_0100', timeOldStamp, timeNewStamp);
- console.log("context_getAppType_0100: AppType is " + data);
- })
- } catch (error) {
- console.log("logMessage context_getAppType_0100: error = " + error);
- expect(error).assertEqual("system");
- }
- var data1 = await context.getAppType();
- expect(typeof (data1)).assertEqual("string");
- expect(data1).assertEqual("system");
- done();
- console.log("------------------end context_getAppType_0100-------------------");
- });
-
- /*
- * @tc.number: context_getAppType_0200
- * @tc.name: getAppType : Obtains the type of current application.
- * @tc.desc: Check the return value of the interface (by AsyncCallback)
- * @tc.level 0
- */
- it("context_getAppType_0200", 0, async function (done) {
- console.log("------------------start context_getAppType_0200-------------------");
- try {
- var timeOldStamp = await Utils.getNowTime();
- var context = await featureAbility.getContext();
- context.getAppType((err, data) => {
- var timeNewStamp = Utils.getNowTime();
- Utils.getDurationTime('context_getAppType_0200_0100', timeOldStamp, timeNewStamp);
- console.log("context_getAppType_0200: getAppType successful, result = " + data);
- });
- } catch (error) {
- console.log("logMessage context_getAppType_0200: error = " + error);
- expect(error).assertEqual("system");
- }
- var data1 = await context.getAppType();
- expect(typeof (data1)).assertEqual("string");
- expect(data1).assertEqual("system");
- done();
- console.log("------------------end context_getAppType_0200-------------------");
- });
- })
-}
diff --git a/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/test/List.test.ets b/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/test/List.test.ets
deleted file mode 100644
index fea9b55619a3c88c223e58ba0c03d203ad1be8ca..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/test/List.test.ets
+++ /dev/null
@@ -1,30 +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 addContextAndAbilityJsunit from './addContextAndAbilityJsunit.test.ets';
-import getHapModuleInfoJsunit from './getHapModuleInfoJsunit.test.ets';
-import getAbilityInfoJsunit from './getAbilityInfoJsunit.test.ets';
-import getApplicationContext from './getApplicationContextJsunit.test.ets';
-import getAppVersionInfoJsunit from './getAppVersionInfoJsunit.test.ets';
-import ContextJsunit from './ContextJsunit.test.ets';
-
-export default function testsuite() {
- ContextJsunit();
- addContextAndAbilityJsunit();
- getHapModuleInfoJsunit();
- getAbilityInfoJsunit();
- getApplicationContext();
- getAppVersionInfoJsunit();
-}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/test/Utils.ets b/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/test/Utils.ets
deleted file mode 100644
index d347b04062965c665153e7ac358028d6ae274d53..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/test/Utils.ets
+++ /dev/null
@@ -1,47 +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.
- */
-
-export default class Utils {
- static sleep(time) {
- return new Promise((resolve, reject) => {
- setTimeout(() => {
- resolve(reject)
- }, time)
- }).then(() => {
- console.info(`sleep ${time} over...`)
- })
- }
-
- static getNowTime() {
- return new Date().getTime();
- }
-
- /**
- * 接口调用时间
- * @param startTime 接口调用开始时间
- * @param endTime 接口调用结束时间
- */
- static getDurationTime(msg, startTime, endTime) {
- console.info(msg + 'Get Interface startTime: ' + startTime);
- console.info(msg + 'Get Interface endTime: ' + endTime);
- var duration = (endTime - startTime)
- console.info(msg + 'Get Interface Duration: ' + duration);
- return duration;
- }
-}
-
-
-
-
diff --git a/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/test/addContextAndAbilityJsunit.test.ets b/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/test/addContextAndAbilityJsunit.test.ets
deleted file mode 100644
index 15644bc9e87d7e145387a823c114538db125390c..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/test/addContextAndAbilityJsunit.test.ets
+++ /dev/null
@@ -1,301 +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 {describe, it, expect} from 'hypium/index';
-import Utils from './Utils';
-import ability_featureAbility from '@ohos.ability.featureAbility';
-import ability_particleAbility from '@ohos.ability.particleAbility';
-import abilityManager from "@ohos.application.appManager"
-
-const TAG_TEST_0100 = ' context_isUpdatingConfigurations_test_0100 ';
-const TAG_TEST_0200 = ' context_isUpdatingConfigurations_test_0200 ';
-const TAG_TEST_0300 = ' context_printDrawnCompleted_test_0100 ';
-const TAG_TEST_0400 = ' context_printDrawnCompleted_test_0200 ';
-const TAG_TEST_0500 = ' context_getAppMemorySize_test_0100 ';
-const TAG_TEST_0600 = ' context_getAppMemorySize_test_0200 ';
-const TAG_TEST_0700 = ' context_isRamConstrainedDevice_test_0100 ';
-const TAG_TEST_0800 = ' context_isRamConstrainedDevice_test_0200 ';
-const TAG_TEST_0900 = ' context_featureAbility_test_0100 ';
-const TAG_TEST_0010 = ' context_featureAbility_test_0200 ';
-const TAG_TEST_0011 = ' context_featureAbility_test_0300 ';
-const TAG_TEST_0012 = ' context_featureAbility_test_0400 ';
-
-export default function addContextAndAbilityJsunit() {
- describe('appInfoTest', function () {
- /*
- * @tc.number: context_isUpdatingConfigurations_test_0100
- * @tc.name: isUpdatingConfigurations : Obtains whether the configuration of the current ability is changing.
- * @tc.desc: Check the return value of the interface (by promise)
- * @tc.level 0
- */
- it(TAG_TEST_0100, 0, async function (done) {
- console.info(TAG_TEST_0100 + 'promise START');
- let detailed;
- var startTime = await Utils.getNowTime();
- var context = ability_featureAbility.getContext();
- await context.isUpdatingConfigurations().then((data) => {
- var endTime = Utils.getNowTime();
- Utils.getDurationTime(TAG_TEST_0100, startTime, endTime)
- console.info(TAG_TEST_0100 + ' promise data is:' + JSON.stringify(data));
- detailed = data;
- }).catch((error) => {
- console.error(TAG_TEST_0100 + 'promise errors is: ' + JSON.stringify(error));
- })
- expect(typeof (detailed)).assertEqual("boolean");
- expect(detailed).assertEqual(false);
- done();
- console.log('------------------ ' + TAG_TEST_0100 + ' end -------------------');
- });
-
- /*
- * @tc.number: context_isUpdatingConfigurations_test_0200
- * @tc.name: isUpdatingConfigurations : Obtains whether the configuration of the current ability is changing.
- * @tc.desc: Check the return value of the interface (by AsyncCallback)
- * @tc.level 0
- */
- it(TAG_TEST_0200, 0, async function (done) {
- let detailed;
- console.info(TAG_TEST_0200 + 'callBack START');
- try {
- var startTime = await Utils.getNowTime();
- var context = ability_featureAbility.getContext();
- context.isUpdatingConfigurations((error, data) => {
- var endTime = Utils.getNowTime();
- Utils.getDurationTime(TAG_TEST_0200, startTime, endTime)
- detailed = data;
- console.info(TAG_TEST_0200 + ' callBack succeeded. data is:' + JSON.stringify(data));
- });
- } catch (error) {
- console.error(TAG_TEST_0200 + 'Operation failed. Cause: ' + JSON.stringify(error));
- }
- await Utils.sleep(2000)
- expect(typeof (detailed)).assertEqual("boolean");
- expect(detailed).assertEqual(false);
- done();
- console.log('------------------ ' + TAG_TEST_0200 + ' end -------------------');
- });
-
- /*
- * @tc.number: context_printDrawnCompleted_test_0100
- * @tc.name: printDrawnCompleted : Inform the system of the time required to complete the drawing of the page
- capability.
- * @tc.desc: Check the return value of the interface (by promise)
- * @tc.level 0
- */
- it(TAG_TEST_0300, 0, async function (done) {
- let detailed;
- console.info(TAG_TEST_0300 + 'callBack START');
- var startTime = await Utils.getNowTime();
- var context = ability_featureAbility.getContext();
- await context.printDrawnCompleted().then((data) => {
- var endTime = Utils.getNowTime();
- Utils.getDurationTime(TAG_TEST_0300, startTime, endTime)
- console.info(TAG_TEST_0300 + ' promise data is:' + JSON.stringify(data));
- detailed = data;
- }).catch((error) => {
- console.error(TAG_TEST_0300 + 'promise error is: ' + JSON.stringify(error));
- });
- await Utils.sleep(2000)
- expect(detailed).assertEqual(null);
- done();
- console.log('------------------ ' + TAG_TEST_0300 + ' end -------------------');
- })
-
-
- /*
- * @tc.number: context_printDrawnCompleted_test_0200
- * @tc.name: printDrawnCompleted : Inform the system of the time required to complete the drawing of the page
- capability.
- * @tc.desc: Check the return value of the interface (by AsyncCallback)
- * @tc.level 0
- */
- it(TAG_TEST_0400, 0, async function (done) {
- let detailed;
- console.info(TAG_TEST_0400 + 'callBack START');
- try {
- var startTime = await Utils.getNowTime();
- var context = ability_featureAbility.getContext();
- context.printDrawnCompleted((error, data) => {
- var endTime = Utils.getNowTime();
- Utils.getDurationTime(TAG_TEST_0300, startTime, endTime)
- detailed = data;
- console.info(TAG_TEST_0400 + ' callBack succeeded. data is:' + JSON.stringify(data));
- });
- } catch (error) {
- console.error(TAG_TEST_0400 + 'Operation failed. Cause: ' + JSON.stringify(error));
- }
- await Utils.sleep(2000)
- expect(detailed).assertEqual(null);
- done();
- console.log('------------------ ' + TAG_TEST_0400 + ' end -------------------');
- })
-
-
- /*
- * @tc.number: context_getAppMemorySize_test_0100
- * @tc.name: getAppMemorySize : Obtains the memory size of the application.
- * @tc.desc: Check the return value of the interface (by promise)
- * @tc.level 0
- */
- it(TAG_TEST_0500, 0, async function (done) {
- console.info(TAG_TEST_0500 + 'promise START');
- let detailed;
- var startTime = await Utils.getNowTime();
- await abilityManager.getAppMemorySize()
- .then((data) => {
- var endTime = Utils.getNowTime();
- Utils.getDurationTime(TAG_TEST_0500, startTime, endTime)
- console.info(TAG_TEST_0500 + ' promise data is:' + JSON.stringify(data));
- detailed = data;
- }).catch((error) => {
- console.error(TAG_TEST_0500 + 'promise errors is: ' + JSON.stringify(error));
- })
- await Utils.sleep(2000)
- expect(typeof (detailed)).assertEqual("number");
- expect(detailed).assertEqual(512);
- done();
- console.log('------------------ ' + TAG_TEST_0500 + ' end -------------------');
- });
-
- /*
- * @tc.number: context_getAppMemorySize_test_0200
- * @tc.name: getAppMemorySize : Obtains the memory size of the application.
- * @tc.desc: Check the return value of the interface (by AsyncCallback)
- * @tc.level 0
- */
- it(TAG_TEST_0600, 0, async function (done) {
- console.info(TAG_TEST_0600 + 'callBack START');
- var startTime = await Utils.getNowTime();
- abilityManager.getAppMemorySize((error, data) => {
- var endTime = Utils.getNowTime();
- Utils.getDurationTime(TAG_TEST_0500, startTime, endTime)
- console.info(TAG_TEST_0600 + ' callBack error is: ' + JSON.stringify(error));
- console.info(TAG_TEST_0600 + ' callBack data is:' + JSON.stringify(data));
- expect(typeof (data)).assertEqual("number");
- expect(data).assertEqual(512);
- console.log('------------------ ' + TAG_TEST_0600 + ' end -------------------');
- done();
- })
- });
-
- /*
- * @tc.number: context_isRamConstrainedDevice_test_0100
- * @tc.name: isRamConstrainedDevice : Obtains whether the current device has low ram.
- * @tc.desc: Check the return value of the interface (by promise)
- * @tc.level 0
- */
- it(TAG_TEST_0700, 0, async function (done) {
- let detailed;
- console.info(TAG_TEST_0700 + 'promise START');
- var startTime = await Utils.getNowTime();
- await abilityManager.isRamConstrainedDevice().then((data) => {
- var endTime = Utils.getNowTime();
- Utils.getDurationTime(TAG_TEST_0500, startTime, endTime)
- console.info(TAG_TEST_0700 + ' promise data is:' + JSON.stringify(data));
- detailed = data;
- }).catch((error) => {
- console.error(TAG_TEST_0700 + 'promise errors is: ' + JSON.stringify(error));
- })
- await Utils.sleep(1000)
- expect(typeof (detailed)).assertEqual("boolean");
- expect(detailed).assertEqual(false)
- done();
- console.log('------------------ ' + TAG_TEST_0700 + ' end -------------------');
- });
-
- /*
- * @tc.number: context_isRamConstrainedDevice_test_0200
- * @tc.name: isRamConstrainedDevice : Obtains whether the current device has low ram.
- * @tc.desc: Check the return value of the interface (by AsyncCallback)
- * @tc.level 0
- */
- it(TAG_TEST_0800, 0, async function (done) {
- console.info(TAG_TEST_0800 + 'callBack START');
- var startTime = await Utils.getNowTime();
- abilityManager.isRamConstrainedDevice((error, data) => {
- var endTime = Utils.getNowTime();
- Utils.getDurationTime(TAG_TEST_0500, startTime, endTime)
- console.info(TAG_TEST_0800 + ' callBack error is:' + error);
- console.info(TAG_TEST_0800 + ' callBack data is:' + JSON.stringify(data));
- expect(typeof (data)).assertEqual("boolean");
- expect(data).assertEqual(false);
- done();
- })
- console.log('------------------ ' + TAG_TEST_0800 + ' end -------------------');
- });
- /*
- * @tc.number: context_featureAbility_test_0100
- * @tc.name: featureAbility.ErrorCode : featureAbility.ErrorCode
- * @tc.desc: Check the featureAbility.ErrorCode.NO_ERROR
- * @tc.level 0
- */
- it(TAG_TEST_0900, 0, async function (done) {
- console.info(TAG_TEST_0900 + ' NO_ERROR START');
- var no_error = ability_featureAbility.ErrorCode.NO_ERROR
- console.info(TAG_TEST_0900 + ' featureAbility no_error is: ' + no_error);
- expect(typeof (no_error)).assertEqual("number");
- expect(no_error).assertEqual(0);
- done();
- console.log('------------------ ' + TAG_TEST_0900 + ' end -------------------');
- });
-
- /*
- * @tc.number: context_featureAbility_test_0200
- * @tc.name: featureAbility.ErrorCode : featureAbility.ErrorCode
- * @tc.desc: Check the featureAbility.ErrorCode.INVALID_PARAMETER
- * @tc.level 0
- */
- it(TAG_TEST_0010, 0, async function (done) {
- console.info(TAG_TEST_0010 + ' INVALID_PARAMETER START');
- var invalid_parameter = ability_featureAbility.ErrorCode.INVALID_PARAMETER
- console.info(TAG_TEST_0010 + ' featureAbility invalid_parameter is: ' + invalid_parameter);
- expect(typeof (invalid_parameter)).assertEqual("number");
- expect(invalid_parameter).assertEqual(-1);
- done();
- console.log('------------------ ' + TAG_TEST_0010 + ' end -------------------');
- });
-
- /*
- * @tc.number: context_featureAbility_test_0300
- * @tc.name: featureAbility.ErrorCode : featureAbility.ErrorCode
- * @tc.desc: Check the featureAbility.ErrorCode.ABILITY_NOT_FOUND
- * @tc.level 0
- */
- it(TAG_TEST_0011, 0, async function (done) {
- console.info(TAG_TEST_0011 + ' ABILITY_NOT_FOUND START');
- var ability_not_found = ability_featureAbility.ErrorCode.ABILITY_NOT_FOUND
- console.info(TAG_TEST_0011 + ' featureAbility ability_not_found is: ' + ability_not_found);
- expect(typeof (ability_not_found)).assertEqual("number");
- expect(ability_not_found).assertEqual(-2);
- done();
- console.log('------------------ ' + TAG_TEST_0011 + ' end -------------------');
- });
-
- /*
- * @tc.number: context_featureAbility_test_0400
- * @tc.name: featureAbility.ErrorCode : featureAbility.ErrorCode
- * @tc.desc: Check the featureAbility.ErrorCode.PERMISSION_DENY
- * @tc.level 0
- */
- it(TAG_TEST_0012, 0, async function (done) {
- console.info(TAG_TEST_0012 + ' PERMISSION_DENY START');
- var permission_deny = ability_featureAbility.ErrorCode.PERMISSION_DENY
- console.info(TAG_TEST_0012 + ' featureAbility permission_deny is: ' + permission_deny);
- expect(typeof (permission_deny)).assertEqual("number");
- expect(permission_deny).assertEqual(-3);
- done();
- console.log('------------------ ' + TAG_TEST_0012 + ' end -------------------');
- });
- })
-}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/test/getAbilityInfoJsunit.test.ets b/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/test/getAbilityInfoJsunit.test.ets
deleted file mode 100644
index 93c8b130ea2fb2fda1d162b0ceb7a981f9366d7b..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/test/getAbilityInfoJsunit.test.ets
+++ /dev/null
@@ -1,333 +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 {describe, it, expect} from 'hypium/index';
-import Utils from './Utils';
-import ability_featureAbility from '@ohos.ability.featureAbility';
-
-export default function getHapModuleInfoJsunit() {
- describe('appInfoTest', function () {
-
- /**
- * @tc.number: context_getAbilityInfo_test_0100
- * @tc.name: getAbilityInfo:Query the current attributionability details.
- * @tc.desc: Check the return value of the interface (by promise)
- * @tc.level 0
- */
- it('context_getAbilityInfo_test_0100', 0, async function (done) {
- console.info('[context_getAbilityInfo_test_0100] START');
- await Utils.sleep(1000);
- var timeOldStamp = await Utils.getNowTime();
- var context = ability_featureAbility.getContext();
- await context.getAbilityInfo()
- .then((data) => {
- var timeNewStamp = Utils.getNowTime();
- Utils.getDurationTime('context_getAbilityInfo_test_0100', timeOldStamp, timeNewStamp);
- console.info('[context_getAbilityInfo_test_0100] data is:' + JSON.stringify(data));
- expect(typeof (data)).assertEqual("object");
- }).catch((error) => {
- console.error('[context_getAbilityInfo_test_0100] failed:' + JSON.stringify(error));
- })
- var promise = await context.getAbilityInfo();
- console.info('--[context_getAbilityInfo_test_0100] check---');
- checkAbilityInfo('context_getAbilityInfo_test_0100', promise);
- console.info('[context_getAbilityInfo_test_0100] FINISH');
- done();
- });
-
- async function startAbility2() {
- var str = {
- "want": {
- "bundleName": "com.ohos.acecollaboration",
- "abilityName": "com.ohos.acecollaboration.MainAbility2",
- },
- };
- ability_featureAbility.startAbility(str).then((data) => {
- console.info('context_getAbilityInfo_test_0300 startMainAbility2 succeeded: ' + JSON.stringify(data));
- }).catch((error) => {
- console.error('context_getAbilityInfo_test_0300 startMainAbility2 failed. Cause: ' + JSON.stringify(error));
- });
- }
-
- /**
- * @tc.number: context_getAbilityInfo_test_0200
- * @tc.name: getAbilityInfo:Query the current attributionability details.
- * @tc.desc: Check the return value of the interface (by AsyncCallback)
- * @tc.level 0
- */
- it('context_getAbilityInfo_test_0200', 0, async function (done) {
- try {
- console.info('[context_getAbilityInfo_test_0200] START');
- await Utils.sleep(1000);
- var timeOldStamp = await Utils.getNowTime();
- var context = ability_featureAbility.getContext();
- context.getAbilityInfo((error, data) => {
- var timeNewStamp = Utils.getNowTime();
- Utils.getDurationTime('context_getAbilityInfo_test_0200', timeOldStamp, timeNewStamp);
- console.info('[context_getAbilityInfo_test_0200] data is:' + JSON.stringify(data));
- expect(typeof (data)).assertEqual("object");
- });
- } catch (error) {
- console.error('[context_getAbilityInfo_test_0200] failed: ' + JSON.stringify(error));
- }
- var callback = await context.getAbilityInfo();
- console.info('---[context_getAbilityInfo_test_0200] check---');
- checkAbilityInfo('context_getAbilityInfo_test_0200', callback);
- console.info('[context_getAbilityInfo_test_0200] FINISH');
- done();
- })
-
-
- /**
- * @tc.number: context_getAbilityInfo_test_0300_1
- * @tc.name: getAbilityInfo:Query the current attributionability details.
- * @tc.desc: Check the return value of the interface
- * @tc.level 0
- */
- it('context_getAbilityInfo_test_0300_1', 0, async function (done) {
- console.info('[context_getAbilityInfo_test_0300] STARTability');
- startAbility2();
- done();
- });
-
- /**
- * @tc.number: context_getAbilityInfo_test_0400
- * @tc.name: getAbilityInfo:Query the current attributionability details.
- * @tc.desc: Check the return value of the interface (by promise)
- * @tc.level 0
- */
- it('context_getAbilityInfo_test_0400', 0, async function (done) {
- console.info('[context_getAbilityInfo_test_0400] START');
- await Utils.sleep(1000);
- var timeOldStamp = await Utils.getNowTime();
- var context = ability_featureAbility.getContext();
- await context.getAbilityInfo()
- .then((data) => {
- var timeNewStamp = Utils.getNowTime();
- Utils.getDurationTime('context_getAbilityInfo_test_0400', timeOldStamp, timeNewStamp);
- console.info('[context_getAbilityInfo_test_0400] data is:' + JSON.stringify(data));
- expect(typeof (data)).assertEqual("object");
- }).catch((error) => {
- console.error('[context_getAbilityInfo_test_0400] failed:' + JSON.stringify(error));
- })
- var promise = await context.getAbilityInfo();
- console.info('--[context_getAbilityInfo_test_0400] check---');
- checkAbilityInfo('context_getAbilityInfo_test_0400', promise);
- console.info('[context_getAbilityInfo_test_0400] FINISH');
- done();
- });
-
- function checkAbilityInfo(msg, data) {
- console.log(msg + "checkAbilityInfo start " + JSON.stringify(data));
- console.log(msg + "checkAbilityInfo bundleName : " + data.bundleName);
- console.log(msg + "checkAbilityInfo name : " + data.name);
- console.log(msg + "checkAbilityInfo label : " + data.label);
- console.log(msg + "checkAbilityInfo description : " + data.description);
- console.log(msg + "checkAbilityInfo icon : " + data.icon);
- console.log(msg + "checkAbilityInfo descriptionId : " + data.descriptionId);
- console.log(msg + "checkAbilityInfo iconId : " + data.iconId);
- console.log(msg + "checkAbilityInfo moduleName : " + data.moduleName);
- console.log(msg + "checkAbilityInfo process : " + data.process);
- console.log(msg + "checkAbilityInfo targetAbility : " + data.targetAbility);
- console.log(msg + "checkAbilityInfo backgroundModes : " + data.backgroundModes);
- console.log(msg + "checkAbilityInfo isVisible : " + data.isVisible);
- console.log(msg + "checkAbilityInfo formEnabled : " + data.formEnabled);
- console.log(msg + "checkAbilityInfo type : " + data.type)
- console.log(msg + "checkAbilityInfo orientation : " + data.orientation);
- console.log(msg + "checkAbilityInfo launchMode : " + data.launchMode);
- console.log(msg + "checkAbilityInfo permissions length : " + data.permissions.length);
- for (var j = 0; j < data.permissions.length; j++) {
- console.log(msg + "getAbilityInfo data.permissions[" + j + "] : " + data.permissions[j]);
- }
- console.log(msg + "checkAbilityInfo deviceTypes length : " + data.deviceTypes.length);
- for (var k = 0; k < data.deviceTypes.length; k++) {
- console.log(msg + "getAbilityInfo data.deviceTypes[" + k + "] : " + data.deviceTypes[k]);
- }
- console.log(msg + "checkAbilityInfo deviceCapabilities length : " + data.deviceCapabilities.length);
- for (var i = 0; i < data.deviceCapabilities.length; i++) {
- console.log(msg + "getAbilityInfo data.deviceCapabilities[" + i + "] : " + data.deviceCapabilities[i]);
- }
- console.log(msg + "checkAbilityInfo readPermission : " + data.readPermission);
- console.log(msg + "checkAbilityInfo writePermission : " + data.writePermission);
- console.log(msg + "checkAbilityInfo formEntity : " + data.formEntity);
- console.log(msg + "checkAbilityInfo minFormHeight : " + data.minFormHeight);
- console.log(msg + "checkAbilityInfo defaultFormHeight : " + data.defaultFormHeight);
- console.log(msg + "checkAbilityInfo minFormWidth : " + data.minFormWidth);
- console.log(msg + "checkAbilityInfo defaultFormWidth : " + data.defaultFormWidth);
- console.log(msg + "checkAbilityInfo uri : " + data.uri);
- console.log(msg + "checkAbilityInfo customizeData : " + data.customizeData);
- console.log(msg + "checkAbilityInfo labelId : " + data.labelId);
- console.log(msg + "checkAbilityInfo subType : " + data.subType);
-
- expect(typeof (data)).assertEqual("object");
- expect(typeof (data.bundleName)).assertEqual("string");
- expect(typeof (data.name)).assertEqual("string");
- expect(typeof (data.label)).assertEqual("string");
- expect(typeof (data.description)).assertEqual("string");
- expect(typeof (data.icon)).assertEqual("string");
- expect(typeof (data.labelId)).assertEqual("number");
- expect(typeof (data.descriptionId)).assertEqual("number");
- expect(typeof (data.iconId)).assertEqual("number");
- expect(typeof (data.moduleName)).assertEqual("string");
- expect(typeof (data.process)).assertEqual("string");
- expect(typeof (data.targetAbility)).assertEqual("string");
- expect(typeof (data.backgroundModes)).assertEqual("number");
- expect(typeof (data.isVisible)).assertEqual("boolean");
- expect(typeof (data.formEnabled)).assertEqual("boolean");
- expect(typeof (data.type)).assertEqual("number");
- expect(typeof (data.subType)).assertEqual("number");
- expect(typeof (data.orientation)).assertEqual("number");
- expect(typeof (data.launchMode)).assertEqual("number");
- expect(Array.isArray(data.permissions)).assertEqual(true);
- expect(Array.isArray(data.deviceTypes)).assertEqual(true);
- expect(Array.isArray(data.deviceCapabilities)).assertEqual(true);
- expect(typeof (data.readPermission)).assertEqual("string");
- expect(typeof (data.writePermission)).assertEqual("string");
- expect(typeof (data.applicationInfo)).assertEqual("object");
- expect(typeof (data.formEntity)).assertEqual("number");
- expect(typeof (data.minFormHeight)).assertEqual("number");
- expect(typeof (data.defaultFormHeight)).assertEqual("number");
- expect(typeof (data.minFormWidth)).assertEqual("number");
- expect(typeof (data.defaultFormWidth)).assertEqual("number");
- expect(typeof (data.uri)).assertEqual("string");
-
- expect(data.bundleName).assertEqual("com.ohos.acecollaboration");
- expect(data.name).assertEqual("com.ohos.acecollaboration.MainAbility");
- expect(data.label).assertEqual("$string:entry_MainAbility");
- expect(data.description).assertEqual("$string:mainability_description");
- expect(data.icon).assertEqual("$media:icon");
- expect(data.descriptionId > 0).assertTrue();
- expect(data.iconId > 0).assertTrue();
- expect(data.moduleName).assertEqual("entry");
- expect(data.process).assertEqual("");
- expect(data.targetAbility).assertEqual("");
- expect(data.backgroundModes).assertEqual(0);
- expect(data.isVisible).assertEqual(true);
- expect(data.formEnabled).assertEqual(false);
- expect(data.type).assertEqual(1);
- expect(data.orientation).assertEqual(0);
- expect(data.launchMode).assertEqual(1);
- expect(data.deviceTypes[0]).assertEqual("phone");
- expect(data.readPermission).assertEqual("");
- expect(data.writePermission).assertEqual("");
- checkApplicationInfo(msg, data.applicationInfo);
- expect(data.formEntity).assertEqual(0);
- expect(data.minFormHeight).assertEqual(0);
- expect(data.defaultFormHeight).assertEqual(0);
- expect(data.minFormWidth).assertEqual(0);
- expect(data.defaultFormWidth).assertEqual(0);
- expect(data.uri).assertEqual("");
- expect(data.labelId > 0).assertTrue();
- expect(data.subType).assertEqual(0);
-
- console.log(msg + "---checkAbilityInfo End--- ");
- }
-
- function checkApplicationInfo(msg, info) {
- console.log(msg + "checkApplicationInfo start : " + JSON.stringify(info));
- console.log(msg + "checkApplicationInfo name : " + info.name);
- console.log(msg + "checkApplicationInfo description : " + info.description);
- console.log(msg + "checkApplicationInfo descriptionId : " + info.descriptionId);
- console.log(msg + "checkApplicationInfo systemApp : " + info.systemApp);
- console.log(msg + "checkApplicationInfo enabled : " + info.enabled);
- console.log(msg + "checkApplicationInfo label : " + info.label);
- console.log(msg + "checkApplicationInfo labelId : " + info.labelId);
- console.log(msg + "checkApplicationInfo icon : " + info.icon);
- console.log(msg + "checkApplicationInfo iconId : " + info.iconId);
- console.log(msg + "checkApplicationInfo process : " + info.process);
- console.log(msg + "checkApplicationInfo supportedModes : " + info.supportedModes);
-
- console.log(msg + "checkApplicationInfo moduleSourceDirs length : " + info.moduleSourceDirs.length);
- for (var j = 0; j < info.moduleSourceDirs.length; j++) {
- console.log(msg + "checkApplicationInfo info.moduleSourceDirs[" + j + "] : " + info.moduleSourceDirs[j]);
- }
- console.log(msg + "checkApplicationInfo permissions length : " + info.permissions.length);
- for (var k = 0; k < info.permissions.length; k++) {
- console.log(msg + "checkApplicationInfo info.permissions[" + k + "] : " + info.permissions[k]);
- }
- console.log(msg + "checkApplicationInfo moduleInfos length : " + info.moduleInfos.length);
- for (var i = 0; i < info.moduleInfos.length; i++) {
- console.log(msg + "checkApplicationInfo info.moduleInfos[" + i + "].moduleName : "
- + info.moduleInfos[i].moduleName);
- console.log(msg + "checkApplicationInfo info.moduleInfos[" + i + "].moduleSourceDir : "
- + info.moduleInfos[i].moduleSourceDir);
- }
- console.log(msg + "checkApplicationInfo entryDir : " + info.entryDir);
-
- expect(typeof (info)).assertEqual("object");
- expect(typeof (info.name)).assertEqual("string");
- expect(typeof (info.description)).assertEqual("string");
- expect(typeof (info.descriptionId)).assertEqual("number");
- expect(typeof (info.systemApp)).assertEqual("boolean");
- expect(typeof (info.enabled)).assertEqual("boolean");
- expect(typeof (info.label)).assertEqual("string");
- expect(typeof (info.labelId)).assertEqual("string");
- expect(typeof (info.icon)).assertEqual("string");
- expect(typeof (info.iconId)).assertEqual("string");
- expect(typeof (info.process)).assertEqual("string");
- expect(typeof (info.supportedModes)).assertEqual("number");
- expect(Array.isArray(info.moduleSourceDirs)).assertEqual(true);
- expect(Array.isArray(info.permissions)).assertEqual(true);
- expect(Array.isArray(info.moduleInfos)).assertEqual(true);
- expect(typeof (info.entryDir)).assertEqual("string");
-
- expect(info.name).assertEqual("com.ohos.acecollaboration");
- expect(info.description).assertEqual("$string:mainability_description");
- expect(info.descriptionId > 0).assertTrue();
- expect(info.systemApp).assertEqual(true);
- expect(info.enabled).assertEqual(true);
- expect(info.label).assertEqual("$string:entry_MainAbility");
- expect(info.icon).assertEqual("$media:icon");
- expect(info.process).assertEqual("");
- expect(info.supportedModes).assertEqual(0);
- expect(info.entryDir).assertEqual("/data/app/el1/bundle/public/" +
- "com.ohos.acecollaboration/com.ohos.acecollaboration");
- if (info.moduleSourceDirs.length == 1){
- expect(info.moduleInfos[0].moduleName).assertEqual("entry");
- expect(info.moduleInfos[0].moduleSourceDir).assertEqual("/data/app/el1/bundle/public/" +
- "com.ohos.acecollaboration/com.ohos.acecollaboration");
- }else if(info.moduleSourceDirs.length == 2) {
- if (info.moduleInfos[0].moduleName == "myapplication1") {
- expect(info.moduleInfos[0].moduleName).assertEqual("myapplication1");
- expect(info.moduleInfos[0].moduleSourceDir).assertEqual("/data/app/el1/bundle/public/" +
- "com.ohos.acecollaboration/com.example.myapplication1");
- expect(info.moduleInfos[1].moduleName).assertEqual("entry");
- expect(info.moduleInfos[1].moduleSourceDir).assertEqual("/data/app/el1/bundle/public/" +
- "com.ohos.acecollaboration/com.ohos.acecollaboration");
- }else{
- expect(info.moduleInfos[0].moduleName).assertEqual("myapplication2");
- expect(info.moduleInfos[0].moduleSourceDir).assertEqual("/data/app/el1/bundle/public/" +
- "com.ohos.acecollaboration/com.example.myapplication2");
- expect(info.moduleInfos[1].moduleName).assertEqual("entry");
- expect(info.moduleInfos[1].moduleSourceDir).assertEqual("/data/app/el1/bundle/public/" +
- "com.ohos.acecollaboration/com.ohos.acecollaboration");
- }
- }else {
- expect(info.moduleInfos[0].moduleName).assertEqual("myapplication1");
- expect(info.moduleInfos[0].moduleSourceDir).assertEqual("/data/app/el1/bundle/public/" +
- "com.ohos.acecollaboration/com.example.myapplication1");
- expect(info.moduleInfos[1].moduleName).assertEqual("myapplication2");
- expect(info.moduleInfos[1].moduleSourceDir).assertEqual("/data/app/el1/bundle/public/" +
- "com.ohos.acecollaboration/com.example.myapplication2");
- expect(info.moduleInfos[2].moduleName).assertEqual("entry");
- expect(info.moduleInfos[2].moduleSourceDir).assertEqual("/data/app/el1/bundle/public/" +
- "com.ohos.acecollaboration/com.ohos.acecollaboration");
- }
-
- console.log(msg + "---checkApplicationInfo End--- ");
-
- }
-
- })
-}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/test/getAppVersionInfoJsunit.test.ets b/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/test/getAppVersionInfoJsunit.test.ets
deleted file mode 100644
index bcc246bc465015fde802853923899e4a5475b6a1..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/test/getAppVersionInfoJsunit.test.ets
+++ /dev/null
@@ -1,92 +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 {describe, it, expect} from 'hypium/index';
-import Utils from './Utils';
-import ability_featureAbility from '@ohos.ability.featureAbility';
-
-export default function getHapModuleInfoJsunit() {
- describe('appInfoTest', function () {
- /**
- * @tc.number: context_getAppVersionInfo_test_0100
- * @tc.name: getAppVersionInfo:Gets the version information for the application.
- * @tc.desc: Check the return type of the interface (by Promise)
- * @tc.level 0
- */
- it('context_getAppVersionInfo_test_0100', 0, async function (done) {
- console.info('[context_getAppVersionInfo_test_0100] START');
- await Utils.sleep(1000);
- var timeOldStamp = await Utils.getNowTime();
- var context = ability_featureAbility.getContext();
- context.getAppVersionInfo()
- .then((data) => {
- var timeNewStamp = Utils.getNowTime();
- Utils.getDurationTime('context_getAppVersionInfo_test_0100', timeOldStamp, timeNewStamp);
- console.info('[context_getAppVersionInfo_test_0100] data is:' + JSON.stringify(data));
- expect(typeof (data)).assertEqual("object");
- }).catch((error) => {
- console.error('[context_getAppVersionInfo_test_0100] failed:' + JSON.stringify(error));
- })
- var promise = await context.getAppVersionInfo();
- console.info('---[context_getAppVersionInfo_test_0100] check---');
- checkAppVersionInfo('context_getAppVersionInfo_test_0100', promise);
- console.info('[context_getAppVersionInfo_test_0100] FINISH');
- done();
- });
-
- /**
- * @tc.number: context_getAppVersionInfo_test_0200
- * @tc.name: getAppVersionInfo:Gets the version information for the application.
- * @tc.desc: Check the return type of the interface (by Callback)
- * @tc.level 0
- */
- it('context_getAppVersionInfo_test_0200', 0, async function (done) {
- try {
- console.info('[context_getAppVersionInfo_test_0200] START');
- await Utils.sleep(1000);
- var timeOldStamp = await Utils.getNowTime();
- var context = ability_featureAbility.getContext();
- context.getAppVersionInfo((error, data) => {
- var timeNewStamp = Utils.getNowTime();
- Utils.getDurationTime('context_getAppVersionInfo_test_0200', timeOldStamp, timeNewStamp);
- console.info('[context_getAppVersionInfo_test_0200] data is:' + JSON.stringify(data));
- expect(typeof (data)).assertEqual("object");
- });
- }
- catch (error) {
- console.error('[context_getAppVersionInfo_test_0200] failed: ' + JSON.stringify(error));
- }
- var callback = await context.getAppVersionInfo();
- console.info('---[context_getAppVersionInfo_test_0200] check---');
- checkAppVersionInfo('context_getAppVersionInfo_test_0200', callback);
- console.info('[context_getAppVersionInfo_test_0200] FINISH');
- done();
- });
-
- function checkAppVersionInfo(msg, data) {
- console.log(msg + "checkAppVersionInfo start : " + JSON.stringify(data));
- console.log(msg + "checkAppVersionInfo appName : " + data.appName);
- console.log(msg + "checkAppVersionInfo versionCode : " + data.versionCode);
- console.log(msg + "checkAppVersionInfo versionName : " + data.versionName);
- expect(typeof (data)).assertEqual("object");
- expect(typeof (data.appName)).assertEqual("string");
- expect(typeof (data.versionCode)).assertEqual("number");
- expect(typeof (data.versionName)).assertEqual("string");
- expect(data.appName).assertEqual("");
- expect(data.versionCode).assertEqual(1000000);
- expect(data.versionName).assertEqual("1.0.0");
- console.log(msg + "---checkAppVersionInfo End--- ");
- }
- })
-}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/test/getApplicationContextJsunit.test.ets b/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/test/getApplicationContextJsunit.test.ets
deleted file mode 100644
index 25b351b61a82031d2d9ad400ed8be9ce9ab0e6ba..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/test/getApplicationContextJsunit.test.ets
+++ /dev/null
@@ -1,46 +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 {describe, it, expect} from 'hypium/index';
-import Utils from './Utils';
-import ability_featureAbility from '@ohos.ability.featureAbility';
-
-export default function getHapModuleInfoJsunit() {
- describe('appInfoTest', function () {
- /**
- * @tc.number: context_getApplicationContext_test_0100
- * @tc.name: getApplicationContext:Gets the application context information.
- * @tc.desc: Check the return value of the interface
- * @tc.level 0
- */
- it('context_getApplicationContext_test_0100', 0, async function (done) {
- try {
- console.info('[context_getApplicationContext_test_0100] START');
- await Utils.sleep(1000);
- var timeOldStamp = await Utils.getNowTime();
- var context = ability_featureAbility.getContext().getApplicationContext();
- var timeNewStamp = Utils.getNowTime();
- Utils.getDurationTime('context_getApplicationContext_test_0100', timeOldStamp, timeNewStamp);
- console.info('[context_getApplicationContext_test_0100] data is:' + JSON.stringify(context));
- }
- catch (error) {
- console.error('[context_getApplicationContext_test_0100] failed:' + JSON.stringify(error));
- }
- expect(typeof (context)).assertEqual("object");
- console.info('[context_getApplicationContext_test_0100] FINISH');
- done();
- });
-
- })
-}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/test/getHapModuleInfoJsunit.test.ets b/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/test/getHapModuleInfoJsunit.test.ets
deleted file mode 100644
index b012afe8b3ebf0abd0f039bdd4f9e747905987a6..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/test/getHapModuleInfoJsunit.test.ets
+++ /dev/null
@@ -1,233 +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 {describe, it, expect} from 'hypium/index';
-import Utils from './Utils';
-import ability_featureAbility from '@ohos.ability.featureAbility';
-
-export default function getHapModuleInfoJsunit() {
- describe('appInfoTest', function () {
- /**
- * @tc.number: context_getHapModuleInfo_test_0100
- * @tc.name: getHapModuleInfo:Obtains the HapModuleInfo object of the application.
- * @tc.desc: Check the return type of the interface (by Promise)
- * @tc.level 0
- */
- it('context_getHapModuleInfo_test_0100', 0, async function (done) {
- console.info('[context_getHapModuleInfo_test_0100] START');
- await Utils.sleep(1000);
- var timeOldStamp = await Utils.getNowTime();
- var context = ability_featureAbility.getContext();
- context.getHapModuleInfo()
- .then((data) => {
- var timeNewStamp = Utils.getNowTime();
- Utils.getDurationTime('context_getHapModuleInfo_test_0100', timeOldStamp, timeNewStamp);
- console.info('[context_getHapModuleInfo_test_0100] data is:' + JSON.stringify(data));
- expect(typeof (data)).assertEqual("object");
- })
- .catch((error) => {
- console.error('[context_getHapModuleInfo_test_0100] failed:' + JSON.stringify(error));
- })
- var promise = await context.getHapModuleInfo();
- console.info('---[context_getHapModuleInfo_test_0100] check---');
- checkHapModuleInfo('context_getHapModuleInfo_test_0100', promise);
- console.info('[context_getHapModuleInfo_test_0100] FINISH');
- done();
- });
-
- /**
- * @tc.number: context_getHapModuleInfo_test_0200
- * @tc.name: getHapModuleInfo:Obtains the HapModuleInfo object of the application.
- * @tc.desc: Check the return type of the interface (by Callback)
- * @tc.level 0
- */
- it('context_getHapModuleInfo_test_0200', 0, async function (done) {
- let callback;
- try {
- console.info('[context_getHapModuleInfo_test_0200] START');
- var timeOldStamp = await Utils.getNowTime();
- var context = ability_featureAbility.getContext();
- context.getHapModuleInfo((error, data) => {
- var timeNewStamp = Utils.getNowTime();
- Utils.getDurationTime('context_getHapModuleInfo_test_0200', timeOldStamp, timeNewStamp);
- console.info('[context_getHapModuleInfo_test_0200] data is:' + JSON.stringify(data));
- callback = data;
- expect(typeof (data)).assertEqual("object");
- });
- } catch (error) {
- console.error('[context_getHapModuleInfo_test_0200] failed: ' + JSON.stringify(error));
- }
- await Utils.sleep(1000);
- console.info('---[context_getHapModuleInfo_test_0200] check---');
- checkHapModuleInfo('context_getHapModuleInfo_test_0200', callback);
- console.info('[context_getHapModuleInfo_test_0200] FINISH');
- done();
- });
-
- function checkHapModuleInfo(msg, data) {
- console.log(msg + "checkHapModuleInfo start " + JSON.stringify(data));
- console.log(msg + "checkHapModuleInfo name : " + data.name);
- console.log(msg + "checkHapModuleInfo description : " + data.description);
- console.log(msg + "checkHapModuleInfo descriptionId : " + data.descriptionId);
- console.log(msg + "checkHapModuleInfo icon : " + data.icon);
- console.log(msg + "checkHapModuleInfo label : " + data.label);
- console.log(msg + "checkHapModuleInfo labelId : " + data.labelId);
- console.log(msg + "checkHapModuleInfo iconId : " + data.iconId);
- console.log(msg + "checkHapModuleInfo backgroundImg : " + data.backgroundImg);
- console.log(msg + "checkHapModuleInfo supportedModes : " + data.supportedModes);
- console.log(msg + "checkHapModuleInfo reqCapabilities length : " + data.reqCapabilities.length);
- for (var j = 0; j < data.reqCapabilities.length; j++) {
- console.log(msg + "getHapModuleInfo data.reqCapabilities[" + j + "] : " + data.reqCapabilities[j]);
- }
- console.log(msg + "checkHapModuleInfo deviceTypes length : " + data.deviceTypes.length);
- for (var k = 0; k < data.deviceTypes.length; k++) {
- console.log(msg + "getHapModuleInfo data.deviceTypes[" + k + "] : " + data.deviceTypes[k]);
- }
- console.log(msg + "checkHapModuleInfo abilityInfos length : " + data.abilityInfos.length);
- console.log(msg + "checkHapModuleInfo moduleName : " + data.moduleName);
- console.log(msg + "checkHapModuleInfo mainAbilityName : " + data.mainAbilityName);
- console.log(msg + "checkHapModuleInfo installationFree : " + data.installationFree);
- expect(typeof (data)).assertEqual("object");
- expect(typeof (data.name)).assertEqual("string");
- expect(typeof (data.description)).assertEqual("string");
- expect(typeof (data.descriptionId)).assertEqual("number");
- expect(typeof (data.icon)).assertEqual("string");
- expect(typeof (data.label)).assertEqual("string");
- expect(typeof (data.labelId)).assertEqual("number");
- expect(typeof (data.iconId)).assertEqual("number");
- expect(typeof (data.backgroundImg)).assertEqual("string");
- expect(typeof (data.supportedModes)).assertEqual("number");
- expect(Array.isArray(data.reqCapabilities)).assertEqual(true);
- expect(Array.isArray(data.deviceTypes)).assertEqual(true);
- expect(Array.isArray(data.abilityInfos)).assertEqual(true);
- expect(typeof (data.moduleName)).assertEqual("string");
- expect(typeof (data.mainAbilityName)).assertEqual("string");
- expect(typeof (data.installationFree)).assertEqual("boolean");
- expect(data.name).assertEqual("com.ohos.acecollaboration");
- expect(data.description).assertEqual("");
- expect(data.descriptionId).assertEqual(0);
- expect(data.icon).assertEqual("$media:icon");
- expect(data.label).assertEqual("$string:entry_MainAbility");
- expect(data.labelId).assertEqual(0);
- expect(data.iconId).assertEqual(0);
- expect(data.backgroundImg).assertEqual("");
- expect(data.supportedModes).assertEqual(0);
- expect(data.deviceTypes[0]).assertEqual("phone");
- checkAbilityInfo(msg,data.abilityInfos[0]);
- expect(data.moduleName).assertEqual("entry")
- expect(data.mainAbilityName).assertEqual("");
- expect(data.installationFree).assertEqual(false);
- console.log(msg + "---checkHapModuleInfo End---");
- }
-
- function checkAbilityInfo(msg,data) {
- console.log(msg+ "checkAbilityInfo start " + JSON.stringify(data));
- console.log(msg+ "checkAbilityInfo bundleName : " + data.bundleName);
- console.log(msg+ "checkAbilityInfo name : " + data.name);
- console.log(msg+ "checkAbilityInfo label : " + data.label);
- console.log(msg+ "checkAbilityInfo description : " + data.description);
- console.log(msg+ "checkAbilityInfo icon : " + data.icon);
- console.log(msg+ "checkAbilityInfo descriptionId : " + data.descriptionId);
- console.log(msg+ "checkAbilityInfo iconId : " + data.iconId);
- console.log(msg+ "checkAbilityInfo moduleName : " + data.moduleName);
- console.log(msg+ "checkAbilityInfo process : " + data.process);
- console.log(msg+ "checkAbilityInfo targetAbility : " + data.targetAbility);
- console.log(msg+ "checkAbilityInfo backgroundModes : " + data.backgroundModes);
- console.log(msg+ "checkAbilityInfo isVisible : " + data.isVisible);
- console.log(msg+ "checkAbilityInfo formEnabled : " + data.formEnabled);
- console.log(msg+ "checkAbilityInfo type : " + data.type)
- console.log(msg+ "checkAbilityInfo orientation : " + data.orientation);
- console.log(msg+ "checkAbilityInfo launchMode : " + data.launchMode);
- console.log(msg+ "checkAbilityInfo permissions length : " + data.permissions.length);
- for (var j = 0; j < data.permissions.length; j++) {
- console.log(msg+ "getAbilityInfo data.permissions[" + j + "] : " + data.permissions[j]);
- }
- console.log(msg+ "checkAbilityInfo deviceTypes length : " + data.deviceTypes.length);
- for (var k = 0; k < data.deviceTypes.length; k++) {
- console.log(msg+ "getAbilityInfo data.deviceTypes[" + k + "] : " + data.deviceTypes[k]);
- }
- console.log(msg+ "checkAbilityInfo deviceCapabilities length : " + data.deviceCapabilities.length);
- for (var i = 0; i < data.deviceCapabilities.length; i++) {
- console.log(msg+ "getAbilityInfo data.deviceCapabilities[" + i + "] : " + data.deviceCapabilities[i]);
- }
- console.log(msg+ "checkAbilityInfo readPermission : " + data.readPermission);
- console.log(msg+ "checkAbilityInfo writePermission : " + data.writePermission);
- console.log(msg+ "checkAbilityInfo formEntity : " + data.formEntity);
- console.log(msg+ "checkAbilityInfo minFormHeight : " + data.minFormHeight);
- console.log(msg+ "checkAbilityInfo defaultFormHeight : " + data.defaultFormHeight);
- console.log(msg+ "checkAbilityInfo minFormWidth : " + data.minFormWidth);
- console.log(msg+ "checkAbilityInfo defaultFormWidth : " + data.defaultFormWidth);
- console.log(msg+ "checkAbilityInfo uri : " + data.uri);
- console.log(msg+ "checkAbilityInfo labelId : " + data.labelId);
- console.log(msg+ "checkAbilityInfo subType : " + data.subType);
- expect(typeof (data)).assertEqual("object");
- expect(typeof (data.bundleName)).assertEqual("string");
- expect(typeof (data.name)).assertEqual("string");
- expect(typeof (data.label)).assertEqual("string");
- expect(typeof (data.description)).assertEqual("string");
- expect(typeof (data.icon)).assertEqual("string");
- expect(typeof (data.labelId)).assertEqual("number");
- expect(typeof (data.descriptionId)).assertEqual("number");
- expect(typeof (data.iconId)).assertEqual("number");
- expect(typeof (data.moduleName)).assertEqual("string");
- expect(typeof (data.process)).assertEqual("string");
- expect(typeof (data.targetAbility)).assertEqual("string");
- expect(typeof (data.backgroundModes)).assertEqual("number");
- expect(typeof (data.isVisible)).assertEqual("boolean");
- expect(typeof (data.formEnabled)).assertEqual("boolean");
- expect(typeof (data.type)).assertEqual("number");
- expect(typeof (data.subType)).assertEqual("number");
- expect(typeof (data.orientation)).assertEqual("number");
- expect(typeof (data.launchMode)).assertEqual("number");
- expect(Array.isArray(data.permissions)).assertEqual(true);
- expect(Array.isArray(data.deviceTypes)).assertEqual(true);
- expect(Array.isArray(data.deviceCapabilities)).assertEqual(true);
- expect(typeof (data.readPermission)).assertEqual("string");
- expect(typeof (data.writePermission)).assertEqual("string");
- expect(typeof (data.applicationInfo)).assertEqual("object");
- expect(typeof (data.formEntity)).assertEqual("number");
- expect(typeof (data.minFormHeight)).assertEqual("number");
- expect(typeof (data.defaultFormHeight)).assertEqual("number");
- expect(typeof (data.minFormWidth)).assertEqual("number");
- expect(typeof (data.defaultFormWidth)).assertEqual("number");
- expect(typeof (data.uri)).assertEqual("string");
- expect(data.bundleName).assertEqual("com.ohos.acecollaboration");
- expect(data.name).assertEqual("com.ohos.acecollaboration.MainAbility");
- expect(data.label).assertEqual("$string:entry_MainAbility");
- expect(data.description).assertEqual("$string:mainability_description");
- expect(data.icon).assertEqual("$media:icon");
- expect(data.moduleName).assertEqual("entry");
- expect(data.process).assertEqual("");
- expect(data.targetAbility).assertEqual("");
- expect(data.backgroundModes).assertEqual(0);
- expect(data.isVisible).assertEqual(true);
- expect(data.formEnabled).assertEqual(false);
- expect(data.type).assertEqual(1);
- expect(data.orientation).assertEqual(0);
- expect(data.launchMode).assertEqual(1);
- expect(data.deviceTypes[0]).assertEqual("phone");
- expect(data.readPermission).assertEqual("");
- expect(data.writePermission).assertEqual("");
- expect(data.formEntity).assertEqual(0);
- expect(data.minFormHeight).assertEqual(0);
- expect(data.defaultFormHeight).assertEqual(0);
- expect(data.minFormWidth).assertEqual(0);
- expect(data.defaultFormWidth).assertEqual(0);
- expect(data.uri).assertEqual("");
- expect(data.subType).assertEqual(0);
- console.log(msg+ "---checkAbilityInfo End--- ");
- }
-
- })
-}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/resources/base/element/string.json b/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/resources/base/element/string.json
deleted file mode 100644
index febe5eef2727a008fe870ae874cc219ef5653f20..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/resources/base/element/string.json
+++ /dev/null
@@ -1,56 +0,0 @@
-{
- "string": [
- {
- "name": "entry_MainAbility",
- "value": "entry_MainAbility"
- },
- {
- "name": "mainability_description",
- "value": "eTS_Empty Ability"
- },
- {
- "name": "description_serviceability",
- "value": "hap sample empty service"
- },
- {
- "name": "description_serviceability2",
- "value": "hap sample empty service"
- },
- {
- "name": "description_serviceability3",
- "value": "hap sample empty service"
- },
- {
- "name": "description_serviceability4",
- "value": "hap sample empty service"
- },
- {
- "name": "description_serviceability5",
- "value": "hap sample empty service"
- },
- {
- "name": "description_mainability2",
- "value": "eTS_Empty Ability2"
- },
- {
- "name": "entry_MainAbility2",
- "value": "MainAbility2"
- },
- {
- "name": "description_serviceability6",
- "value": "hap sample empty service"
- },
- {
- "name": "description_serviceability7",
- "value": "hap sample empty service"
- },
- {
- "name": "TestAbility_desc",
- "value": "description"
- },
- {
- "name": "TestAbility_label",
- "value": "label"
- }
- ]
-}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/actsabilitymanageretstest/myapplication1/src/main/config.json b/aafwk/aafwk_standard/actsabilitymanageretstest/myapplication1/src/main/config.json
deleted file mode 100644
index c7a8264f21f89dbeada57ecb990c257dbb0d7bf2..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/actsabilitymanageretstest/myapplication1/src/main/config.json
+++ /dev/null
@@ -1,62 +0,0 @@
-{
- "app": {
- "bundleName": "com.ohos.acecollaboration",
- "vendor": "example",
- "version": {
- "code": 1000000,
- "name": "1.0.0"
- },
- "apiVersion": {
- "compatible": 7,
- "releaseType": "Release",
- "target": 7
- }
- },
- "deviceConfig": {},
- "module": {
- "package": "com.example.myapplication1",
- "name": ".MyApplication",
- "mainAbility": ".MainAbility",
- "srcPath": "",
- "deviceType": [
- "phone"
- ],
- "distro": {
- "deliveryWithInstall": true,
- "moduleName": "myapplication1",
- "moduleType": "feature",
- "installationFree": false
- },
- "abilities": [
- {
- "orientation": "unspecified",
- "visible": true,
- "srcPath": "MainAbility",
- "name": ".MainAbility",
- "srcLanguage": "ets",
- "icon": "$media:icon",
- "description": "$string:description_mainability",
- "formsEnabled": false,
- "label": "$string:myapplication1_MainAbility",
- "type": "page",
- "launchType": "standard"
- }
- ],
- "js": [
- {
- "mode": {
- "syntax": "ets",
- "type": "pageAbility"
- },
- "pages": [
- "pages/index"
- ],
- "name": ".MainAbility",
- "window": {
- "designWidth": 720,
- "autoDesignWidth": false
- }
- }
- ]
- }
-}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/actsabilitymanageretstest/myapplication1/src/main/ets/MainAbility/app.ets b/aafwk/aafwk_standard/actsabilitymanageretstest/myapplication1/src/main/ets/MainAbility/app.ets
deleted file mode 100644
index 6a47e22427b28a7af740c97ab4467f0872c41496..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/actsabilitymanageretstest/myapplication1/src/main/ets/MainAbility/app.ets
+++ /dev/null
@@ -1,23 +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.
- */
-
-export default {
- onCreate() {
- console.info('Application onCreate')
- },
- onDestroy() {
- console.info('Application onDestroy')
- },
-}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/actsabilitymanageretstest/myapplication1/src/main/ets/MainAbility/pages/index.ets b/aafwk/aafwk_standard/actsabilitymanageretstest/myapplication1/src/main/ets/MainAbility/pages/index.ets
deleted file mode 100644
index f624baca1eef7433bd450a120f3b0dbb29053a76..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/actsabilitymanageretstest/myapplication1/src/main/ets/MainAbility/pages/index.ets
+++ /dev/null
@@ -1,49 +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 file from '@system.file';
-import {Core, ExpectExtend, InstrumentLog, ReportExtend} from "deccjsunit/index.ets";
-import testsuite_app1 from "../test/List.test.ets";
-import featureAbility from "@ohos.ability.featureAbility";
-
-@Entry
-@Component
-struct Index {
- aboutToAppear() {
- console.info("start run testcase!!!!")
- const core = Core.getInstance();
- const expectExtend = new ExpectExtend({
- 'id': 'extend'
- });
- core.addService('expect', expectExtend);
- const reportExtend = new ReportExtend(file);
- core.addService('report', reportExtend);
- core.init();
- core.subscribeEvent('task', reportExtend);
- const configService = core.getDefaultService('config');
- configService.setConfig(this)
- testsuite_app1();
- core.execute();
- }
- build() {
- Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) {
- Text('myapplication1 page')
- .fontSize(50)
- .fontWeight(FontWeight.Bold)
- }
- .width('100%')
- .height('100%')
- }
-}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/actsabilitymanageretstest/myapplication1/src/main/ets/MainAbility/test/List.test.ets b/aafwk/aafwk_standard/actsabilitymanageretstest/myapplication1/src/main/ets/MainAbility/test/List.test.ets
deleted file mode 100644
index d154c999065b0b646e3913a1bd62d30fbf33e491..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/actsabilitymanageretstest/myapplication1/src/main/ets/MainAbility/test/List.test.ets
+++ /dev/null
@@ -1,21 +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 getHapModuleInfoJsunit_app1 from './getHapModuleInfoJsunit_app1.test.ets';
-
-export default function testsuite_app1() {
- getHapModuleInfoJsunit_app1();
-
-}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/actsabilitymanageretstest/myapplication1/src/main/ets/MainAbility/test/Utils.ets b/aafwk/aafwk_standard/actsabilitymanageretstest/myapplication1/src/main/ets/MainAbility/test/Utils.ets
deleted file mode 100644
index 6ebf5db93fff3b99d15eb14c76e11d4f8f32c827..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/actsabilitymanageretstest/myapplication1/src/main/ets/MainAbility/test/Utils.ets
+++ /dev/null
@@ -1,42 +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.
- */
-
-export default class Utils {
- static sleep(time) {
- return new Promise((resolve, reject) => {
- setTimeout(() => {
- resolve(reject)
- }, time)
- }).then(() => {
- console.info(`sleep ${time} over...`)
- })
- }
-
- static getNowTime() {
- return new Date().getTime();
- }
-
- static getDurationTime(msg,startTime, endTime) {
- console.info(msg+'Get Interface startTime: ' + startTime);
- console.info(msg+'Get Interface endTime: ' + endTime);
- var duration = (endTime - startTime)
- console.info(msg+'Get Interface Duration: ' + duration);
- return duration;
- }
-}
-
-
-
-
diff --git a/aafwk/aafwk_standard/actsabilitymanageretstest/myapplication1/src/main/ets/MainAbility/test/getHapModuleInfoJsunit_app1.test.ets b/aafwk/aafwk_standard/actsabilitymanageretstest/myapplication1/src/main/ets/MainAbility/test/getHapModuleInfoJsunit_app1.test.ets
deleted file mode 100644
index 741a34c2859e17a2f78c50d1725c6800942a6e5a..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/actsabilitymanageretstest/myapplication1/src/main/ets/MainAbility/test/getHapModuleInfoJsunit_app1.test.ets
+++ /dev/null
@@ -1,301 +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 {describe, it, expect} from "deccjsunit/index.ets";
-import Utils from './Utils';
-import ability_featureAbility from '@ohos.ability.featureAbility';
-
-export default function getHapModuleInfoJsunit() {
- describe('appInfoTest', function () {
-
- /**
- * @tc.number: context_getHapModuleInfo_test_0300
- * @tc.name: getHapModuleInfo:Obtains the HapModuleInfo object of the application.
- * @tc.desc: Check the return type of the interface (by Promise)
- * @tc.level 0
- */
- it('context_getHapModuleInfo_test_0300', 0, async function (done) {
- console.info('[context_getHapModuleInfo_test_0300] START');
- await Utils.sleep(1000);
- var timeOldStamp = await Utils.getNowTime();
- var context = ability_featureAbility.getContext();
- context.getHapModuleInfo()
- .then((data) => {
- var timeNewStamp = Utils.getNowTime();
- Utils.getDurationTime('context_getHapModuleInfo_test_0300', timeOldStamp, timeNewStamp);
- console.info('[context_getHapModuleInfo_test_0300] data is:' + JSON.stringify(data));
- expect(typeof (data)).assertEqual("object");
- })
- .catch((error) => {
- console.error('[context_getHapModuleInfo_test_0300] failed:' + JSON.stringify(error));
- })
- var promise = await context.getHapModuleInfo();
- console.info('---[context_getHapModuleInfo_test_0300] check---');
- checkHapModuleInfo_app('context_getHapModuleInfo_test_0300', promise);
- console.info('[context_getHapModuleInfo_test_0300] FINISH');
- done();
- });
-
- function checkHapModuleInfo_app(msg, data) {
- console.log(msg + "checkHapModuleInfo start " + JSON.stringify(data));
- console.log(msg + "checkHapModuleInfo name : " + data.name);
- console.log(msg + "checkHapModuleInfo description : " + data.description);
- console.log(msg + "checkHapModuleInfo descriptionId : " + data.descriptionId);
- console.log(msg + "checkHapModuleInfo icon : " + data.icon);
- console.log(msg + "checkHapModuleInfo label : " + data.label);
- console.log(msg + "checkHapModuleInfo labelId : " + data.labelId);
- console.log(msg + "checkHapModuleInfo iconId : " + data.iconId);
- console.log(msg + "checkHapModuleInfo backgroundImg : " + data.backgroundImg);
- console.log(msg + "checkHapModuleInfo supportedModes : " + data.supportedModes);
- console.log(msg + "checkHapModuleInfo reqCapabilities length : " + data.reqCapabilities.length);
- for (var j = 0; j < data.reqCapabilities.length; j++) {
- console.log(msg + "getHapModuleInfo data.reqCapabilities[" + j + "] : " + data.reqCapabilities[j]);
- }
- console.log(msg + "checkHapModuleInfo deviceTypes length : " + data.deviceTypes.length);
- for (var k = 0; k < data.deviceTypes.length; k++) {
- console.log(msg + "getHapModuleInfo data.deviceTypes[" + k + "] : " + data.deviceTypes[k]);
- }
- console.log(msg + "checkHapModuleInfo abilityInfos length : " + data.abilityInfos.length);
- console.log(msg + "checkHapModuleInfo moduleName : " + data.moduleName);
- console.log(msg + "checkHapModuleInfo mainAbilityName : " + data.mainAbilityName);
- console.log(msg + "checkHapModuleInfo installationFree : " + data.installationFree);
-
- expect(typeof (data)).assertEqual("object");
- expect(typeof (data.name)).assertEqual("string");
- expect(typeof (data.description)).assertEqual("string");
- expect(typeof (data.descriptionId)).assertEqual("number");
- expect(typeof (data.icon)).assertEqual("string");
- expect(typeof (data.label)).assertEqual("string");
- expect(typeof (data.labelId)).assertEqual("number");
- expect(typeof (data.iconId)).assertEqual("number");
- expect(typeof (data.backgroundImg)).assertEqual("string");
- expect(typeof (data.supportedModes)).assertEqual("number");
- expect(Array.isArray(data.reqCapabilities)).assertEqual(true);
- expect(Array.isArray(data.deviceTypes)).assertEqual(true);
- expect(Array.isArray(data.abilityInfos)).assertEqual(true);
- expect(typeof (data.moduleName)).assertEqual("string");
- expect(typeof (data.mainAbilityName)).assertEqual("string");
- expect(typeof (data.installationFree)).assertEqual("boolean");
- expect(data.name).assertEqual("com.example.myapplication1");
- expect(data.description).assertEqual("");
- expect(data.descriptionId).assertEqual(0);
- expect(data.icon).assertEqual("$media:icon");
- expect(data.label).assertEqual("$string:myapplication1_MainAbility");
- expect(data.labelId).assertEqual(0);
- expect(data.iconId).assertEqual(0);
- expect(data.backgroundImg).assertEqual("");
- expect(data.supportedModes).assertEqual(0);
-
- expect(data.deviceTypes[0]).assertEqual("phone");
- checkAbilityInfo(msg,data.abilityInfos[0]);
-
- expect(data.moduleName).assertEqual("myapplication1")
- expect(data.mainAbilityName).assertEqual("");
- expect(data.installationFree).assertEqual(false);
-
- console.log(msg + "---checkHapModuleInfo End---");
- }
-
- function checkAbilityInfo(msg,data) {
- console.log(msg+ "checkAbilityInfo start " + JSON.stringify(data));
- console.log(msg+ "checkAbilityInfo bundleName : " + data.bundleName);
- console.log(msg+ "checkAbilityInfo name : " + data.name);
- console.log(msg+ "checkAbilityInfo label : " + data.label);
- console.log(msg+ "checkAbilityInfo description : " + data.description);
- console.log(msg+ "checkAbilityInfo icon : " + data.icon);
- console.log(msg+ "checkAbilityInfo descriptionId : " + data.descriptionId);
- console.log(msg+ "checkAbilityInfo iconId : " + data.iconId);
- console.log(msg+ "checkAbilityInfo moduleName : " + data.moduleName);
- console.log(msg+ "checkAbilityInfo process : " + data.process);
- console.log(msg+ "checkAbilityInfo targetAbility : " + data.targetAbility);
- console.log(msg+ "checkAbilityInfo backgroundModes : " + data.backgroundModes);
- console.log(msg+ "checkAbilityInfo isVisible : " + data.isVisible);
- console.log(msg+ "checkAbilityInfo formEnabled : " + data.formEnabled);
- console.log(msg+ "checkAbilityInfo type : " + data.type)
- console.log(msg+ "checkAbilityInfo orientation : " + data.orientation);
- console.log(msg+ "checkAbilityInfo launchMode : " + data.launchMode);
- console.log(msg+ "checkAbilityInfo permissions length : " + data.permissions.length);
- for (var j = 0; j < data.permissions.length; j++) {
- console.log(msg+ "getAbilityInfo data.permissions[" + j + "] : " + data.permissions[j]);
- }
- console.log(msg+ "checkAbilityInfo deviceTypes length : " + data.deviceTypes.length);
- for (var k = 0; k < data.deviceTypes.length; k++) {
- console.log(msg+ "getAbilityInfo data.deviceTypes[" + k + "] : " + data.deviceTypes[k]);
- }
- console.log(msg+ "checkAbilityInfo deviceCapabilities length : " + data.deviceCapabilities.length);
- for (var i = 0; i < data.deviceCapabilities.length; i++) {
- console.log(msg+ "getAbilityInfo data.deviceCapabilities[" + i + "] : " + data.deviceCapabilities[i]);
- }
- console.log(msg+ "checkAbilityInfo readPermission : " + data.readPermission);
- console.log(msg+ "checkAbilityInfo writePermission : " + data.writePermission);
- console.log(msg+ "checkAbilityInfo formEntity : " + data.formEntity);
- console.log(msg+ "checkAbilityInfo minFormHeight : " + data.minFormHeight);
- console.log(msg+ "checkAbilityInfo defaultFormHeight : " + data.defaultFormHeight);
- console.log(msg+ "checkAbilityInfo minFormWidth : " + data.minFormWidth);
- console.log(msg+ "checkAbilityInfo defaultFormWidth : " + data.defaultFormWidth);
- console.log(msg+ "checkAbilityInfo uri : " + data.uri);
- console.log(msg+ "checkAbilityInfo labelId : " + data.labelId);
- console.log(msg+ "checkAbilityInfo subType : " + data.subType);
- expect(typeof (data)).assertEqual("object");
- expect(typeof (data.bundleName)).assertEqual("string");
- expect(typeof (data.name)).assertEqual("string");
- expect(typeof (data.label)).assertEqual("string");
- expect(typeof (data.description)).assertEqual("string");
- expect(typeof (data.icon)).assertEqual("string");
- expect(typeof (data.labelId)).assertEqual("number");
- expect(typeof (data.descriptionId)).assertEqual("number");
- expect(typeof (data.iconId)).assertEqual("number");
- expect(typeof (data.moduleName)).assertEqual("string");
- expect(typeof (data.process)).assertEqual("string");
- expect(typeof (data.targetAbility)).assertEqual("string");
- expect(typeof (data.backgroundModes)).assertEqual("number");
- expect(typeof (data.isVisible)).assertEqual("boolean");
- expect(typeof (data.formEnabled)).assertEqual("boolean");
- expect(typeof (data.type)).assertEqual("number");
- expect(typeof (data.subType)).assertEqual("number");
- expect(typeof (data.orientation)).assertEqual("number");
- expect(typeof (data.launchMode)).assertEqual("number");
- expect(Array.isArray(data.permissions)).assertEqual(true);
- expect(Array.isArray(data.deviceTypes)).assertEqual(true);
- expect(Array.isArray(data.deviceCapabilities)).assertEqual(true);
- expect(typeof (data.readPermission)).assertEqual("string");
- expect(typeof (data.writePermission)).assertEqual("string");
- expect(typeof (data.applicationInfo)).assertEqual("object");
- expect(typeof (data.formEntity)).assertEqual("number");
- expect(typeof (data.minFormHeight)).assertEqual("number");
- expect(typeof (data.defaultFormHeight)).assertEqual("number");
- expect(typeof (data.minFormWidth)).assertEqual("number");
- expect(typeof (data.defaultFormWidth)).assertEqual("number");
- expect(typeof (data.uri)).assertEqual("string");
- expect(data.bundleName).assertEqual("com.ohos.acecollaboration");
- expect(data.name).assertEqual("com.example.myapplication1.MainAbility");
- expect(data.label).assertEqual("$string:myapplication1_MainAbility");
- expect(data.description).assertEqual("$string:description_mainability");
- expect(data.icon).assertEqual("$media:icon");
- expect(data.descriptionId > 0).assertTrue();
- expect(data.iconId > 0).assertTrue();
- expect(data.moduleName).assertEqual("myapplication1");
- expect(data.process).assertEqual("");
- expect(data.targetAbility).assertEqual("");
- expect(data.backgroundModes).assertEqual(0);
- expect(data.isVisible).assertEqual(true);
- expect(data.formEnabled).assertEqual(false);
- expect(data.type).assertEqual(1);
- expect(data.orientation).assertEqual(0);
- expect(data.launchMode).assertEqual(1);
- expect(data.deviceTypes[0]).assertEqual("phone");
- expect(data.readPermission).assertEqual("");
- expect(data.writePermission).assertEqual("");
- checkApplicationInfo(msg,data.applicationInfo);
- expect(data.formEntity).assertEqual(0);
- expect(data.minFormHeight).assertEqual(0);
- expect(data.defaultFormHeight).assertEqual(0);
- expect(data.minFormWidth).assertEqual(0);
- expect(data.defaultFormWidth).assertEqual(0);
- expect(data.uri).assertEqual("");
- expect(data.labelId > 0).assertTrue();
- expect(data.subType).assertEqual(0);
- console.log(msg+ "---checkAbilityInfo End--- ");
- }
-
- function checkApplicationInfo(msg,info) {
- console.log(msg+ "checkApplicationInfo start : " + JSON.stringify(info));
- console.log(msg+ "checkApplicationInfo name : " + info.name);
- console.log(msg+ "checkApplicationInfo description : " + info.description);
- console.log(msg+ "checkApplicationInfo descriptionId : " + info.descriptionId);
- console.log(msg+ "checkApplicationInfo systemApp : " + info.systemApp);
- console.log(msg+ "checkApplicationInfo enabled : " + info.enabled);
- console.log(msg+ "checkApplicationInfo label : " + info.label);
- console.log(msg+ "checkApplicationInfo labelId : " + info.labelId);
- console.log(msg+ "checkApplicationInfo icon : " + info.icon);
- console.log(msg+ "checkApplicationInfo iconId : " + info.iconId);
- console.log(msg+ "checkApplicationInfo process : " + info.process);
- console.log(msg+ "checkApplicationInfo supportedModes : " + info.supportedModes);
- console.log(msg+ "checkApplicationInfo moduleSourceDirs length : " + info.moduleSourceDirs.length);
- for (var j = 0; j < info.moduleSourceDirs.length; j++) {
- console.log(msg+ "checkApplicationInfo info.moduleSourceDirs[" + j + "] : " + info.moduleSourceDirs[j]);
- }
- console.log(msg+ "checkApplicationInfo permissions length : " + info.permissions.length);
- for (var k = 0; k < info.permissions.length; k++) {
- console.log(msg+ "checkApplicationInfo info.permissions[" + k + "] : " + info.permissions[k]);
- }
- console.log(msg+ "checkApplicationInfo moduleInfos length : " + info.moduleInfos.length);
- for (var i = 0; i < info.moduleInfos.length; i++) {
- console.log(msg+ "checkApplicationInfo info.moduleInfos[" + i + "].moduleName : " + info.moduleInfos[i].moduleName);
- console.log(msg+ "checkApplicationInfo info.moduleInfos[" + i + "].moduleSourceDir : " + info.moduleInfos[i].moduleSourceDir);
- }
- console.log(msg+ "checkApplicationInfo entryDir : " + info.entryDir);
- expect(typeof (info)).assertEqual("object");
- expect(typeof (info.name)).assertEqual("string");
- expect(typeof (info.description)).assertEqual("string");
- expect(typeof (info.descriptionId)).assertEqual("number");
- expect(typeof (info.systemApp)).assertEqual("boolean");
- expect(typeof (info.enabled)).assertEqual("boolean");
- expect(typeof (info.label)).assertEqual("string");
- expect(typeof (info.labelId)).assertEqual("string");
- expect(typeof (info.icon)).assertEqual("string");
- expect(typeof (info.iconId)).assertEqual("string");
- expect(typeof (info.process)).assertEqual("string");
- expect(typeof (info.supportedModes)).assertEqual("number");
- expect(Array.isArray(info.moduleSourceDirs)).assertEqual(true);
- expect(Array.isArray(info.permissions)).assertEqual(true);
- expect(Array.isArray(info.moduleInfos)).assertEqual(true);
- expect(typeof (info.entryDir)).assertEqual("string");
- expect(info.name).assertEqual("com.ohos.acecollaboration");
- expect(info.description).assertEqual("$string:mainability_description");
- expect(info.descriptionId > 0).assertTrue();
- expect(info.systemApp).assertEqual(true);
- expect(info.enabled).assertEqual(true);
- expect(info.label).assertEqual("$string:entry_MainAbility");
- expect(info.icon).assertEqual("$media:icon");
- expect(info.process).assertEqual("");
- expect(info.supportedModes).assertEqual(0);
- if (info.moduleSourceDirs.length == 1){
- expect(info.moduleInfos[0].moduleName).assertEqual("entry");
- expect(info.moduleInfos[0].moduleSourceDir).assertEqual("/data/app/el1/bundle/public/" +
- "com.ohos.acecollaboration/com.ohos.acecollaboration");
- }else if(info.moduleSourceDirs.length == 2) {
- if (info.moduleInfos[0].moduleName == "myapplication1") {
- expect(info.moduleInfos[0].moduleName).assertEqual("myapplication1");
- expect(info.moduleInfos[0].moduleSourceDir).assertEqual("/data/app/el1/bundle/public/" +
- "com.ohos.acecollaboration/com.example.myapplication1");
- expect(info.moduleInfos[1].moduleName).assertEqual("entry");
- expect(info.moduleInfos[1].moduleSourceDir).assertEqual("/data/app/el1/bundle/public/" +
- "com.ohos.acecollaboration/com.ohos.acecollaboration");
- }else{
- expect(info.moduleInfos[0].moduleName).assertEqual("myapplication2");
- expect(info.moduleInfos[0].moduleSourceDir).assertEqual("/data/app/el1/bundle/public/" +
- "com.ohos.acecollaboration/com.example.myapplication2");
- expect(info.moduleInfos[1].moduleName).assertEqual("entry");
- expect(info.moduleInfos[1].moduleSourceDir).assertEqual("/data/app/el1/bundle/public/" +
- "com.ohos.acecollaboration/com.ohos.acecollaboration");
- }
- }else {
- expect(info.moduleInfos[0].moduleName).assertEqual("myapplication1");
- expect(info.moduleInfos[0].moduleSourceDir).assertEqual("/data/app/el1/bundle/public/" +
- "com.ohos.acecollaboration/com.example.myapplication1");
- expect(info.moduleInfos[1].moduleName).assertEqual("myapplication2");
- expect(info.moduleInfos[1].moduleSourceDir).assertEqual("/data/app/el1/bundle/public/" +
- "com.ohos.acecollaboration/com.example.myapplication2");
- expect(info.moduleInfos[2].moduleName).assertEqual("entry");
- expect(info.moduleInfos[2].moduleSourceDir).assertEqual("/data/app/el1/bundle/public/" +
- "com.ohos.acecollaboration/com.ohos.acecollaboration");
- }
- expect(info.entryDir).assertEqual("/data/app/el1/bundle/public/" +
- "com.ohos.acecollaboration/com.ohos.acecollaboration");
- console.log(msg+ "---checkApplicationInfo End--- ");
- }
-
- })
-}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/actsabilitymanageretstest/myapplication1/src/main/resources/base/element/string.json b/aafwk/aafwk_standard/actsabilitymanageretstest/myapplication1/src/main/resources/base/element/string.json
deleted file mode 100644
index 48c85e3618d9895d149e9f2a8674d03f02038d90..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/actsabilitymanageretstest/myapplication1/src/main/resources/base/element/string.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "string": [
- {
- "name": "myapplication1_MainAbility",
- "value": "myapplication1_MainAbility"
- },
- {
- "name": "description_mainability",
- "value": "eTS_Empty Ability"
- }
- ]
-}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/actscalltest/systemappcalleea/entry/src/main/ets/SecondAbility/SecondAbility.ts b/aafwk/aafwk_standard/actscalltest/systemappcalleea/entry/src/main/ets/SecondAbility/SecondAbility.ts
deleted file mode 100755
index d3d4c1daaee21209450190036ee55c176a68ee00..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/actscalltest/systemappcalleea/entry/src/main/ets/SecondAbility/SecondAbility.ts
+++ /dev/null
@@ -1,125 +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.application.Ability'
-import commonEvent from '@ohos.commonEvent'
-
-class MySequenceable {
- num: number = 0;
- str: String = "";
- result: String = "";
-
- constructor(num, string, result) {
- this.num = num;
- this.str = string;
- this.result = result;
- }
-
- setMySequence(num, string, result) {
- this.num = num;
- this.str = string;
- this.result = result;
- }
-
- marshalling(messageParcel) {
- messageParcel.writeInt(this.num);
- messageParcel.writeString(this.str);
- messageParcel.writeString(this.result);
- return true;
- }
-
- unmarshalling(messageParcel) {
- this.num = messageParcel.readInt();
- this.str = messageParcel.readString();
- this.result = messageParcel.readString();
- return true;
- }
-}
-
-function testCall(data) {
- let recvSequence = new MySequenceable(0, '', '');
- console.log('======>SystemAppCalleeA MainAbility on testCall <======')
- data.readSequenceable(recvSequence);
- var result = recvSequence.str + 'processed';
- var commonEventData = {
- code: 0,
- data: 'calleeCheckCallParam',
- parameters: {
- num: recvSequence.num,
- str: recvSequence.str,
- result: result
- }
- }
- commonEvent.publish('CallTest', commonEventData, (err) => {
- console.log('======>CallTestSysA SecondAbility Call_Finish<======')
- })
-
- return recvSequence;
-}
-
-function testCallWithResult(data) {
- let recvSequence = new MySequenceable(0, '', '');
- console.log('======>SystemAppCalleeA MainAbility on testCall <======')
- data.readSequenceable(recvSequence);
- let result = recvSequence.str + 'processed';
- recvSequence.setMySequence(recvSequence.num, recvSequence.str, result);
-
- return recvSequence;
-}
-
-export default class SecondAbility extends Ability {
- test2200(data) {
- console.log("SystemAppCalleeA SecondAbility test2200");
- let recvData = new MySequenceable(0, '', '');
- data.readSequenceable(recvData);
- let result = new MySequenceable(recvData.num + 1, recvData.str + "SystemAppCalleeA", '');
- return result;
- }
-
- onCreate(want, launchParam) {
- // Ability is creating, initialize resources for this ability
- console.log("SystemAppCalleeA SecondAbility onCreate")
- globalThis.abilityWant = want;
- globalThis.abilityContext2 = this.context;
- this.callee.on('test2200', this.test2200);
- this.callee.on('testCall', testCall);
- this.callee.on('testCallWithResult', testCallWithResult);
- }
-
- onDestroy() {
- // Ability is destroying, release resources for this ability
- console.log("SystemAppCalleeA SecondAbility onDestroy")
- }
-
- onWindowStageCreate(windowStage) {
- // Main window is created, set main page for this ability
- console.log("SystemAppCalleeA SecondAbility onWindowStageCreate")
- windowStage.setUIContent(this.context, "pages/index/index", null)
- }
-
- onWindowStageDestroy() {
- // Main window is destroyed, release UI related resources
- console.log("SystemAppCalleeA SecondAbility onWindowStageDestroy")
- }
-
- onForeground() {
- // Ability has brought to foreground
- console.log("SystemAppCalleeA SecondAbility onForeground");
- }
-
- onBackground() {
- // Ability has back to background
- console.log("SystemAppCalleeA SecondAbility onBackground")
- }
-};
diff --git a/aafwk/aafwk_standard/actscalltest/systemappcalleea/entry/src/main/ets/ThirdAbility/ThirdAbility.ts b/aafwk/aafwk_standard/actscalltest/systemappcalleea/entry/src/main/ets/ThirdAbility/ThirdAbility.ts
deleted file mode 100755
index 3352e2a3af8ce3d323225bbe2db4ec0e943eaa17..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/actscalltest/systemappcalleea/entry/src/main/ets/ThirdAbility/ThirdAbility.ts
+++ /dev/null
@@ -1,116 +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.application.Ability'
-import commonEvent from '@ohos.commonEvent'
-
-class MySequenceable {
- num: number = 0;
- str: String = "";
- result: String = "";
-
- constructor(num, string, result) {
- this.num = num;
- this.str = string;
- this.result = result;
- }
-
- setMySequence(num, string, result) {
- this.num = num;
- this.str = string;
- this.result = result;
- }
-
- marshalling(messageParcel) {
- messageParcel.writeInt(this.num);
- messageParcel.writeString(this.str);
- messageParcel.writeString(this.result);
- return true;
- }
-
- unmarshalling(messageParcel) {
- this.num = messageParcel.readInt();
- this.str = messageParcel.readString();
- this.result = messageParcel.readString();
- return true;
- }
-}
-
-function testCall(data) {
- let recvSequence = new MySequenceable(0, '', '');
- console.log('======>SystemAppCallerA MainAbility on testCall <======')
- data.readSequenceable(recvSequence);
- var result = recvSequence.str + 'processed';
- var commonEventData = {
- code: 0,
- data: 'calleeCheckCallParam',
- parameters: {
- num: recvSequence.num,
- str: recvSequence.str,
- result: result
- }
- }
- commonEvent.publish('CallTest', commonEventData, (err) => {
- console.log('======>CallTestSysA SecondAbility Call_Finish<======')
- })
-
- return recvSequence;
-}
-
-function testCallWithResult(data) {
- let recvSequence = new MySequenceable(0, '', '');
- console.log('======>SystemAppCallerA MainAbility on testCall <======')
- data.readSequenceable(recvSequence);
- let result = recvSequence.str + 'processed';
- recvSequence.setMySequence(recvSequence.num, recvSequence.str, result);
-
- return recvSequence;
-}
-
-export default class ThirdAbility extends Ability {
- onCreate(want, launchParam) {
- // Ability is creating, initialize resources for this ability
- console.log("SystemAppCalleeA ThirdAbility onCreate")
- this.callee.on('testCall', testCall);
- this.callee.on('testCallWithResult', testCallWithResult);
- globalThis.abilityWant = want;
- globalThis.abilityContext3 = this.context;
- }
-
- onDestroy() {
- // Ability is destroying, release resources for this ability
- console.log("SystemAppCalleeA ThirdAbility onDestroy")
- }
-
- onWindowStageCreate(windowStage) {
- // Main window is created, set main page for this ability
- console.log("SystemAppCalleeA ThirdAbility onWindowStageCreate")
- windowStage.setUIContent(this.context, "pages/index/index", null)
- }
-
- onWindowStageDestroy() {
- // Main window is destroyed, release UI related resources
- console.log("SystemAppCalleeA ThirdAbility onWindowStageDestroy")
- }
-
- onForeground() {
- // Ability has brought to foreground
- console.log("SystemAppCalleeA ThirdAbility onForeground");
- }
-
- onBackground() {
- // Ability has back to background
- console.log("SystemAppCalleeA ThirdAbility onBackground")
- }
-};
diff --git a/aafwk/aafwk_standard/actscalltest/systemappcallera/entry/src/main/ets/SecondAbility/SecondAbility.ts b/aafwk/aafwk_standard/actscalltest/systemappcallera/entry/src/main/ets/SecondAbility/SecondAbility.ts
deleted file mode 100755
index b01244eb104bb7cb91bfd56336fa0c39f0d1a986..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/actscalltest/systemappcallera/entry/src/main/ets/SecondAbility/SecondAbility.ts
+++ /dev/null
@@ -1,126 +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.application.Ability'
-import commonEvent from '@ohos.commonEvent'
-
-class MySequenceable {
- num: number = 0;
- str: String = "";
- result: String = "";
-
- constructor(num, string, result) {
- this.num = num;
- this.str = string;
- this.result = result;
- }
-
- setMySequence(num, string, result) {
- this.num = num;
- this.str = string;
- this.result = result;
- }
-
- marshalling(messageParcel) {
- messageParcel.writeInt(this.num);
- messageParcel.writeString(this.str);
- messageParcel.writeString(this.result);
- return true;
- }
-
- unmarshalling(messageParcel) {
- this.num = messageParcel.readInt();
- this.str = messageParcel.readString();
- this.result = messageParcel.readString();
- return true;
- }
-}
-
-function testCall(data) {
- let recvSequence = new MySequenceable(0, '', '');
- console.log('======>SystemAppCallerA SecondAbility on testCall <======')
- data.readSequenceable(recvSequence);
- var result = recvSequence.str + 'processed';
- var commonEventData = {
- code: 0,
- data: 'calleeCheckCallParam',
- parameters: {
- num: recvSequence.num,
- str: recvSequence.str,
- result: result
- }
- }
- commonEvent.publish('CallTest', commonEventData, (err) => {
- console.log('======>CallTestSysA SecondAbility Call_Finish<======')
- })
- return recvSequence;
-}
-
-function testCallWithResult(data) {
- let recvSequence = new MySequenceable(0, '', '');
- console.log('======>SystemAppCallerA SecondAbility on testCall <======')
- data.readSequenceable(recvSequence);
- let result = recvSequence.str + 'processed';
- recvSequence.setMySequence(recvSequence.num, recvSequence.str, result);
-
- return recvSequence;
-}
-
-export default class SecondAbility extends Ability {
- onCreate(want, launchParam) {
- // Ability is creating, initialize resources for this ability
- console.log("SystemAppCallerA SecondAbility onCreate")
- globalThis.abilityWant = want;
- globalThis.abilityContext = this.context;
- this.callee.on('testCall', testCall);
- this.callee.on('testCallWithResult', testCallWithResult);
- }
-
- onDestroy() {
- // Ability is destroying, release resources for this ability
- console.log("SystemAppCallerA SecondAbility onDestroy")
- }
-
- onWindowStageCreate(windowStage) {
- // Main window is created, set main page for this ability
- console.log("SystemAppCallerA SecondAbility onWindowStageCreate")
- windowStage.setUIContent(this.context, "pages/index/index", null)
- }
-
- onWindowStageDestroy() {
- // Main window is destroyed, release UI related resources
- console.log("SystemAppCallerA SecondAbility onWindowStageDestroy")
- }
-
- onForeground() {
- // Ability has brought to foreground
- console.log("SystemAppCallerA SecondAbility onForeground");
- if ((globalThis.abilityWant.parameters.case_num == "case0700") ||
- (globalThis.abilityWant.parameters.case_num == "case0800")) {
- console.log("SystemAppCallerA SecondAbility special process in");
- var publishData = globalThis.abilityWant.parameters.case_num + "targetForeground";
- var commonEventData = {
- data: publishData,
- }
- commonEvent.publish('CallTest', commonEventData, (err) => {
- console.log('======>SystemAppCallerA SecondAbility Call_Finish<======')
- })
- }
- }
-
- onBackground() {
- // Ability has back to background
- console.log("SystemAppCallerA SecondAbility onBackground")
- }
-};
diff --git a/aafwk/aafwk_standard/actscalltest/systemappcallera/entry/src/main/ets/ThirdAbility/ThirdAbility.ts b/aafwk/aafwk_standard/actscalltest/systemappcallera/entry/src/main/ets/ThirdAbility/ThirdAbility.ts
deleted file mode 100755
index fcdb359fcf08694e32bcc3789fc252ad046e05ed..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/actscalltest/systemappcallera/entry/src/main/ets/ThirdAbility/ThirdAbility.ts
+++ /dev/null
@@ -1,125 +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.application.Ability'
-import commonEvent from '@ohos.commonEvent'
-
-class MySequenceable {
- num: number = 0;
- str: String = "";
- result: String = "";
-
- constructor(num, string, result) {
- this.num = num;
- this.str = string;
- this.result = result;
- }
-
- setMySequence(num, string, result) {
- this.num = num;
- this.str = string;
- this.result = result;
- }
-
- marshalling(messageParcel) {
- messageParcel.writeInt(this.num);
- messageParcel.writeString(this.str);
- messageParcel.writeString(this.result);
- return true;
- }
-
- unmarshalling(messageParcel) {
- this.num = messageParcel.readInt();
- this.str = messageParcel.readString();
- this.result = messageParcel.readString();
- return true;
- }
-}
-
-function testCall(data) {
- let recvSequence = new MySequenceable(0, '', '');
- console.log('======>SystemAppCallerA ThirdAbility on testCall <======')
- data.readSequenceable(recvSequence);
- var result = recvSequence.str + 'processed';
- var commonEventData = {
- code: 0,
- data: 'calleeCheckCallParam',
- parameters: {
- num: recvSequence.num,
- str: recvSequence.str,
- result: result
- }
- }
- commonEvent.publish('CallTest', commonEventData, (err) => {
- console.log('======>CallTestSysA ThirdAbility Call_Finish<======')
- })
- return recvSequence;
-}
-
-function testCallWithResult(data) {
- let recvSequence = new MySequenceable(0, '', '');
- console.log('======>SystemAppCallerA ThirdAbility on testCall <======')
- data.readSequenceable(recvSequence);
- let result = recvSequence.str + 'processed';
- recvSequence.setMySequence(recvSequence.num, recvSequence.str, result);
-
- return recvSequence;
-}
-
-export default class ThirdAbility extends Ability {
- onCreate(want, launchParam) {
- // Ability is creating, initialize resources for this ability
- console.log("SystemAppCallerA ThirdAbility onCreate")
- globalThis.abilityWant = want;
- globalThis.abilityContext = this.context;
- this.callee.on('testCall', testCall);
- this.callee.on('testCallWithResult', testCallWithResult);
- }
-
- onDestroy() {
- // Ability is destroying, release resources for this ability
- console.log("SystemAppCallerA ThirdAbility onDestroy")
- }
-
- onWindowStageCreate(windowStage) {
- // Main window is created, set main page for this ability
- console.log("SystemAppCallerA ThirdAbility onWindowStageCreate")
- windowStage.setUIContent(this.context, "pages/index/index", null)
- }
-
- onWindowStageDestroy() {
- // Main window is destroyed, release UI related resources
- console.log("SystemAppCallerA ThirdAbility onWindowStageDestroy")
- }
-
- onForeground() {
- // Ability has brought to foreground
- console.log("SystemAppCallerA ThirdAbility onForeground");
- if ((globalThis.abilityWant.parameters.case_num == "case0700") ||
- (globalThis.abilityWant.parameters.case_num == "case0800")) {
- var publishData = globalThis.abilityWant.parameters.case_num + "targetForeground";
- var commonEventData = {
- data: publishData,
- }
- commonEvent.publish('CallTest', commonEventData, (err) => {
- console.log('======>SystemAppCallerA ThirdAbility Call_Finish<======')
- })
- }
- }
-
- onBackground() {
- // Ability has back to background
- console.log("SystemAppCallerA ThirdAbility onBackground")
- }
-};
diff --git a/aafwk/aafwk_standard/actscalltest/systemcallentrytest/Test.json b/aafwk/aafwk_standard/actscalltest/systemcallentrytest/Test.json
deleted file mode 100755
index 9e244efab107c2acc4f7a1dd68f19e6a3ce92f3a..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/actscalltest/systemcallentrytest/Test.json
+++ /dev/null
@@ -1,30 +0,0 @@
-{
- "description": "Configuration for hjunit demo Tests",
- "driver": {
- "type": "JSUnitTest",
- "test-timeout": "1000000",
- "package": "com.example.systemcalltest",
- "shell-timeout": "60000"
- },
- "kits": [
- {
- "test-file-name": [
- "ActsCallTestEntryTest.hap",
- "ActsCallTestFeatureRelyHap.hap",
- "ActsSystemAppCallerARelyHap.hap",
- "ActsSystemAppCallerBRelyHap.hap",
- "ActsSystemAppCallerCRelyHap.hap",
- "ActsSystemAppCalleeARelyHap.hap",
- "ActsThirdAppARelyHap.hap"
- ],
- "type": "AppInstallKit",
- "cleanup-apps": true
- },
- {
- "type": "ShellKit",
- "run-command": [
- "remount"
- ]
- }
- ]
-}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/actscalltest/systemcallentrytest/entry/src/main/ets/SecondAbility/SecondAbility.ts b/aafwk/aafwk_standard/actscalltest/systemcallentrytest/entry/src/main/ets/SecondAbility/SecondAbility.ts
deleted file mode 100755
index cb568532dbb17c17aafa51c222f08b68dfb5c2a6..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/actscalltest/systemcallentrytest/entry/src/main/ets/SecondAbility/SecondAbility.ts
+++ /dev/null
@@ -1,253 +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.application.Ability'
-import commonEvent from '@ohos.commonEvent'
-
-var callerA = "SystemAppCallerA"
-var callSeqA= new Array();
-var callerB = "SystemAppCallerB"
-var callSeqB= new Array();
-var callerC = "SystemAppCallerC"
-var callSeqC= new Array();
-var seq = 0;
-
-function isArrayEqual(a1, a2) {
- return a1.length==a2.length && a1.every(function(value,index) { return value === a2[index]});
-}
-function isArrayEqualWithoutOrder(a1, a2) {
- if (a1.length != a2.length) {
- return false;
- }
- for (let ind in a1) {
- if (a2.indexOf(a1[ind]) == -1) {
- return false;
- };
- }
- return true;
-}
-var expectStressResult=[0,1,2,3,4,5,6,7,8,9];
-
-class MySequenceable {
- num: number = 0;
- str: String = "";
- result: String = "";
-
- constructor(num, string, result) {
- this.num = num;
- this.str = string;
- this.result = result;
- }
-
- setMySequence(num, string, result) {
- this.num = num;
- this.str = string;
- this.result = result;
- }
-
- marshalling(messageParcel) {
- messageParcel.writeInt(this.num);
- messageParcel.writeString(this.str);
- messageParcel.writeString(this.result);
- return true;
- }
-
- unmarshalling(messageParcel) {
- this.num = messageParcel.readInt();
- this.str = messageParcel.readString();
- this.result = messageParcel.readString();
- return true;
- }
-}
-
-function testCall(data) {
- let recvSequence = new MySequenceable(0, '', '');
- console.log('======>SystemCallTest SecondAbility on testCall <======')
- data.readSequenceable(recvSequence);
- var result = recvSequence.str + 'processed';
- var commonEventData = {
- code: 0,
- data: 'calleeCheckCallParam',
- parameters: {
- num: recvSequence.num,
- str: recvSequence.str,
- result: result
- }
- }
- commonEvent.publish('CallTest', commonEventData, (err) => {
- console.log('======>CallTestSysA SecondAbility Call_Finish<======')
- })
- return recvSequence;
-}
-
-function testCall2(data) {
- let recvSequence = new MySequenceable(0, '', '');
- console.log('======>SystemCallTest SecondAbility on testCall <======')
- data.readSequenceable(recvSequence);
- var result = recvSequence.str + 'processed2';
- var commonEventData = {
- code: 0,
- data: 'calleeCheckCall2Param',
- parameters: {
- num: recvSequence.num,
- str: recvSequence.str,
- result: result
- }
- }
- commonEvent.publish('CallTest', commonEventData, (err) => {
- console.log('======>CallTestSysA SecondAbility Call_Finish<======')
- })
- return recvSequence;
-}
-
-function testCallWithResult(data) {
- let recvSequence = new MySequenceable(0, '', '');
- console.log('======>SystemCallTest SecondAbility on testCall <======')
- data.readSequenceable(recvSequence);
- let result = recvSequence.str + 'processed';
- recvSequence.setMySequence(recvSequence.num, recvSequence.str, result);
-
- return recvSequence;
-}
-
-function test2100ReleaseCallback(data) {
- console.log('SystemCallTest SecondAbility test2100ReleaseCallback:' + data);
- test2100ReleaseFlag = data.toString();
-}
-
-var test2100ReleaseFlag = '';
-
-export default class SecondAbility extends Ability {
-
- test2100(data) {
- let recvData = new MySequenceable(0, '', '');
- data.readSequenceable(recvData);
- let want = {
- bundleName: "com.example.systemcalltest",
- abilityName: "com.example.systemcalltest.MainAbility",
- };
- console.log("SystemCallTest SecondAbility test2100 before startAbilityByCall");
- let resultData = new MySequenceable(0, '', '');
- globalThis.abilityContext2.startAbilityByCall(want).then((caller) => {
- let param = new MySequenceable(recvData.num + 1, recvData.str + "Second", recvData.result);
- caller.onRelease(test2100ReleaseCallback);
- for (let start=Date.now(); Date.now() - start <= 200;);
- caller.callWithResult('test2100', param).then((data2) => {
- data2.readSequenceable(resultData);
- caller.release();
- for (let start=Date.now(); Date.now() - start <= 200;);
- resultData.result = test2100ReleaseFlag;
- let commonEventData = {
- parameters: {
- num: resultData.num,
- str: resultData.str,
- result: resultData.result,
- }
- };
- commonEvent.publish('call_case2100_test_result', commonEventData, (err) => {
- console.log('SystemCallTest SecondAbility publish call_case2200_test_result event');
- })
-
- });
- });
- return resultData;
- }
-
- testOff(data) {
- let recvSequence = new MySequenceable(0, '', '');
- data.readSequenceable(recvSequence);
- return recvSequence;
- }
-
- stressMethod(data) {
- let recvData = new MySequenceable(0, '', '');
- data.readSequenceable(recvData);
- console.log('SystemCallTest SecondAbility stressMethod caller ' + recvData.str);
- if (recvData.str == callerA) {
- callSeqA.push(recvData.num);
- } else if (recvData.str == callerB) {
- callSeqB.push(recvData.num);
- } else if (recvData.str == callerC) {
- callSeqC.push(recvData.num);
- }
- seq++;
- if (seq >= 30) {
- console.log('SystemCallTest SecondAbility stressMethod SystemAppCallerA ' + callSeqA);
- console.log('SystemCallTest SecondAbility stressMethod SystemAppCallerB ' + callSeqB);
- console.log('SystemCallTest SecondAbility stressMethod SystemAppCallerC ' + callSeqC);
- let stressResult=isArrayEqualWithoutOrder(callSeqA, expectStressResult);
- stressResult=stressResult&&isArrayEqualWithoutOrder(callSeqB, expectStressResult);
- stressResult=stressResult&&isArrayEqualWithoutOrder(callSeqC, expectStressResult);
- console.log('SystemCallTest SecondAbility stressMethod stressResult ' + stressResult);
- let commonEventData = {
- data: stressResult.toString(),
- };
- commonEvent.publish('com.example.systemcalltest.Test5600', commonEventData, (err) => {
- console.log('SystemCallTest SecondAbility stress test result event');
- });
- seq=0;
- callSeqA = [];
- callSeqB = [];
- callSeqC = [];
- }
- return recvData;
- }
-
- loopMethod(data) {
- let recvData = new MySequenceable(0, '', '');
- data.readSequenceable(recvData);
- return new MySequenceable(recvData.num + 1, recvData.str, '');
- }
-
- onCreate(want, launchParam) {
- // Ability is creating, initialize resources for this ability
- console.log("SystemCallTest SecondAbility onCreate")
- globalThis.abilityWant = want;
- globalThis.secondCallee = this.callee;
- globalThis.abilityContext2 = this.context;
- this.callee.on('test2100', this.test2100);
- this.callee.on('testOff', this.testOff);
- this.callee.on('stressMethod', this.stressMethod);
- this.callee.on('loopMethod', this.loopMethod);
- this.callee.on('testCall', testCall);
- this.callee.on('testCall2', testCall2);
- this.callee.on('testCallWithResult', testCallWithResult);
- }
-
- onDestroy() {
- // Ability is destroying, release resources for this ability
- console.log("SystemCallTest SecondAbility onDestroy")
- }
-
- onWindowStageCreate(windowStage) {
- // Main window is created, set main page for this ability
- console.log("SystemCallTest SecondAbility onWindowStageCreate")
- windowStage.setUIContent(this.context, "pages/second/second", null)
- }
-
- onWindowStageDestroy() {
- // Main window is destroyed, release UI related resources
- console.log("SystemCallTest SecondAbility onWindowStageDestroy")
- }
-
- onForeground() {
- // Ability has brought to foreground
- console.log("SystemCallTest SecondAbility onForeground")
- }
-
- onBackground() {
- // Ability has back to background
- console.log("SystemCallTest SecondAbility onBackground")
- }
-};
diff --git a/aafwk/aafwk_standard/actscalltest/systemcallentrytest/entry/src/main/ets/pages/index/index.ets b/aafwk/aafwk_standard/actscalltest/systemcallentrytest/entry/src/main/ets/pages/index/index.ets
deleted file mode 100755
index 26746b5a84730dfe5b9220652170de21d515737f..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/actscalltest/systemcallentrytest/entry/src/main/ets/pages/index/index.ets
+++ /dev/null
@@ -1,66 +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 {Core, ExpectExtend, InstrumentLog, ReportExtend} from "deccjsunit/index.ets"
-import testsuite from "../../test/List.test.ets"
-
-
-@Entry
-@Component
-struct Index {
-
- aboutToAppear(){
- console.info("start run testcase!!!!")
- const core = Core.getInstance()
- const expectExtend = new ExpectExtend({
- 'id': 'extend'
- })
- core.addService('expect', expectExtend)
- const reportExtend = new ReportExtend(file)
-
- core.addService('report', reportExtend)
- core.init()
- core.subscribeEvent('task', reportExtend)
- const configService = core.getDefaultService('config')
- console.info('parameters---->' + JSON.stringify(globalThis.abilityWant.parameters))
- globalThis.abilityWant.parameters.timeout = 10000;
- configService.setConfig(globalThis.abilityWant.parameters)
- testsuite(globalThis.abilityContext)
- core.execute()
- }
-
- build() {
- Flex({ direction:FlexDirection.Column, alignItems:ItemAlign.Center, justifyContent: FlexAlign.Center }) {
- Text('Hello World')
- .fontSize(50)
- .fontWeight(FontWeight.Bold)
- Button() {
- Text('next page')
- .fontSize(25)
- .fontWeight(FontWeight.Bold)
- }.type(ButtonType.Capsule)
- .margin({
- top: 20
- })
- .backgroundColor('#0D9FFB')
- .onClick(() => {
-
- })
- }
- .width('100%')
- .height('100%')
- }
-}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/actscalltest/systemcallentrytest/entry/src/main/ets/test/Ability.test.ets b/aafwk/aafwk_standard/actscalltest/systemcallentrytest/entry/src/main/ets/test/Ability.test.ets
deleted file mode 100755
index 26c588b530c28551b7b22228b701df4314253670..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/actscalltest/systemcallentrytest/entry/src/main/ets/test/Ability.test.ets
+++ /dev/null
@@ -1,1790 +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 "deccjsunit/index"
-import commonEvent from '@ohos.commonEvent'
-import missionManager from '@ohos.application.missionManager'
-import appManager from '@ohos.application.appManager'
-
-const MAX_MISSION_NUM = 1024;
-var sysABundleName = "com.example.systemcalltest";
-var sysAMainAbilityName = "com.example.systemcalltest.MainAbility";
-var sysASecondAbilityName = "com.example.systemcalltest.SecondAbility";
-var systemAppCallerABundleName = "com.example.systemappcallera";
-var systemAppCallerAMainAbilityName = "com.example.systemappcallera.MainAbility";
-var systemAppCallerASecondAbilityName = "com.example.systemappcallera.SecondAbility";
-var systemAppCallerAThirdAbilityName = "com.example.systemappcallera.ThirdAbility";
-
-var systemAppCalleeABundleName = "com.example.systemappcalleea";
-var systemAppCalleeAMainAbilityName = "com.example.systemappcalleea.MainAbility";
-var systemAppCalleeASecondAbilityName = "com.example.systemappcalleea.SecondAbility";
-var systemAppCalleeAThirdAbilityName = "com.example.systemappcalleea.ThirdAbility";
-
-var systemAppCalleeBBundleName = "com.example.systemappcalleeb";
-var systemAppCalleeBMainAbilityName = "com.example.systemappcalleeb.MainAbility";
-var systemAppCalleeBSecondAbilityName = "com.example.systemappcalleeb.SecondAbility";
-
-var systemAppCalleeCBundleName = "com.example.systemappcalleec";
-var systemAppCalleeCMainAbilityName = "com.example.systemappcalleec.MainAbility";
-var systemAppCalleeCSecondAbilityName = "com.example.systemappcalleec.SecondAbility";
-
-var thirdAppABundleName = "com.example.thirdappa";
-var thirdAppAMainAbilityName = "com.example.thirdappa.MainAbility";
-var subscriberInfo = {
- events: ["CallTest"],
-};
-var caseDepBundles = [];
-
-class MySequenceable {
- num: number = 0;
- str: String = "default";
- result: String = "default";
-
- constructor(num, string, result) {
- this.num = num;
- this.str = string;
- this.result = result;
- }
-
- setMySequence(num, string, result) {
- this.num = num;
- this.str = string;
- this.result = result;
- }
-
- marshalling(messageParcel) {
- messageParcel.writeInt(this.num);
- messageParcel.writeString(this.str);
- messageParcel.writeString(this.result);
- return true;
- }
-
- unmarshalling(messageParcel) {
- this.num = messageParcel.readInt();
- this.str = messageParcel.readString();
- this.result = messageParcel.readString();
- return true;
- }
-}
-
-function getMissionId(abilityName, state) {
- return new Promise(async (resolve, reject) => {
- let missionId = -1;
- let missionInfos = await missionManager.getMissionInfos('', MAX_MISSION_NUM);
- for (let i = 0; i < missionInfos.length; i++) {
- if ((missionInfos[i].want.abilityName == abilityName)
- && (missionInfos[i].runningState == state)) {
- missionId = missionInfos[i].missionId;
- break;
- }
- }
- console.log('======>getMissionId resolve missionId<=======' + missionId);
- resolve(missionId);
- })
-}
-
-function delay(time) {
- let delta;
- if (typeof time != 'number' || time <= 0) {
- delta = 100;
- } else {
- delta = Math.round(time);
- }
- for (let start = Date.now(); Date.now() - start <= delta; );
-}
-
-function clearDepProcess(bundleNames, callback, undoneCallBack) {
- var result;
- var cnt = 0;
-
- if (bundleNames.length == 0) {
- undoneCallBack();
- }
- for (let i = 0; i < bundleNames.length; i++) {
- result = appManager.killProcessesByBundleName(bundleNames[i], (err, data) => {
- console.log("clearDepProcess killProcessesByBundleName bundleName: " + bundleNames[i]);
- console.log("clearDepProcess killProcessesByBundleName err: " + JSON.stringify(err));
- console.log("clearDepProcess killProcessesByBundleName data: " + JSON.stringify(data));
- cnt++;
- if (cnt == bundleNames.length) {
- callback();
- }
- });
- }
-}
-
-export default function abilityTest(abilityContext) {
- describe('ActsAbilityTest', function () {
-
- beforeEach(async (done) => {
- done();
- })
-
- afterEach(async (done) => {
- var testMissionId;
-
- testMissionId = await getMissionId(sysAMainAbilityName, 0);
- console.log('======>afterEach test missionId<=======' + testMissionId);
- if (testMissionId != -1) {
- await missionManager.moveMissionToFront(testMissionId);
- }
- console.log('======>afterEach test missionId move to front<=======');
-
- clearDepProcess(caseDepBundles, () => {
- caseDepBundles = [];
- setTimeout(() => {
- done();
- }, 500)
- }, () => {
- done();
- });
- })
-
- /**
- * @tc.number: ACTS_CommonComponent_Call_0100
- * @tc.name: The parameter "method" of the Caller.callWithResult function is an empty string.
- * @tc.desc: Verify that the parameter "method" of the Caller.callWithResult function is an empty string.
- */
- it('ACTS_CommonComponent_Call_0100', 0, async function (done) {
- console.log('ACTS_CommonComponent_Call_0100 begin');
- var subscriber;
-
- function unSubscribeCallBack() {
- console.log('ACTS_CommonComponent_Call_0100 unSubscribeCallBack')
- done();
- }
-
- function releaseCallback(data) {
- expect(data).assertEqual('release');
- console.log('ACTS_CommonComponent_Call_0100 releaseCallBack' + data);
- commonEvent.unsubscribe(subscriber, unSubscribeCallBack);
- }
-
- function subscribeCallBack(err, data) {
- console.log('ACTS_CommonComponent_Call_0100 subscribeCallBack data:' + JSON.stringify(data))
- expect(data.data).assertEqual('calleeCheckCallParam');
- expect(data.parameters.num).assertEqual(100);
- expect(data.parameters.str).assertEqual('ACTS_CommonComponent_Call_0100');
- expect(data.parameters.result).assertEqual('ACTS_CommonComponent_Call_0100processed');
- console.log('AMS_CallTest_0100 do release');
- caller.release();
- }
-
- subscriber = await commonEvent.createSubscriber(subscriberInfo);
- commonEvent.subscribe(subscriber, subscribeCallBack);
- let caller = await globalThis.abilityContext.startAbilityByCall({
- bundleName: sysABundleName,
- abilityName: sysASecondAbilityName,
- });
-
- caller.onRelease(releaseCallback);
- let param = new MySequenceable(100, "ACTS_CommonComponent_Call_0100", 'default');
- caller.call('testCall', param).then(() => {
- console.log('ACTS_CommonComponent_Call_0100 call success');
- }).catch(err => {
- console.log('ACTS_CommonComponent_Call_0100 call exception' + err);
- expect().assertFail();
- })
- })
-
- /**
- * @tc.number: ACTS_CommonComponent_Call_0200
- * @tc.name: The parameter "method" of the Caller.callWithResult function is an empty string.
- * @tc.desc: Verify that the parameter "method" of the Caller.callWithResult function is an empty string.
- */
- it('ACTS_CommonComponent_Call_0200', 0, async function (done) {
- console.log('ACTS_CommonComponent_Call_0200 begin');
-
- function releaseCallback(data) {
- expect(data).assertEqual('release');
- console.log('ACTS_CommonComponent_Call_0200 releaseCallBack' + data);
- done();
- }
-
- let caller = await globalThis.abilityContext.startAbilityByCall({
- bundleName: sysABundleName,
- abilityName: sysASecondAbilityName,
- });
-
- caller.onRelease(releaseCallback);
- let param = new MySequenceable(200, "ACTS_CommonComponent_Call_0200", 'default');
- caller.callWithResult('testCallWithResult', param).then((data) => {
- console.log('ACTS_CommonComponent_Call_0200 call success');
- var result = new MySequenceable(0, '', '');
- data.readSequenceable(result);
- expect(result.num).assertEqual(200);
- expect(result.str).assertEqual('ACTS_CommonComponent_Call_0200');
- expect(result.result).assertEqual('ACTS_CommonComponent_Call_0200processed');
- caller.release();
- }).catch(err => {
- console.log('ACTS_CommonComponent_Call_0200 call exception' + err);
- expect().assertFail();
- caller.release();
- })
- })
-
- /**
- * @tc.number: ACTS_CommonComponent_Call_0300
- * @tc.name: The parameter "method" of the Caller.callWithResult function is an empty string.
- * @tc.desc: Verify that the parameter "method" of the Caller.callWithResult function is an empty string.
- */
- it('ACTS_CommonComponent_Call_0300', 0, async function (done) {
- console.log('ACTS_CommonComponent_Call_0300 begin');
- var subscriber;
- caseDepBundles = [systemAppCalleeABundleName];
-
- function unSubscribeCallBack() {
- console.log('ACTS_CommonComponent_Call_0300 unSubscribeCallBack')
- done();
- }
-
- function releaseCallback(data) {
- expect(data).assertEqual('release');
- console.log('ACTS_CommonComponent_Call_0300 releaseCallBack' + data);
- commonEvent.unsubscribe(subscriber, unSubscribeCallBack);
- }
-
- function subscribeCallBack(err, data) {
- console.log('ACTS_CommonComponent_Call_0300 subscribeCallBack data:' + JSON.stringify(data))
- expect(data.data).assertEqual('calleeCheckCallParam');
- expect(data.parameters.num).assertEqual(300);
- expect(data.parameters.str).assertEqual('ACTS_CommonComponent_Call_0300');
- expect(data.parameters.result).assertEqual('ACTS_CommonComponent_Call_0300processed');
- console.log('ACTS_CommonComponent_Call_0300 do release');
- caller.release();
- }
-
- subscriber = await commonEvent.createSubscriber(subscriberInfo);
- commonEvent.subscribe(subscriber, subscribeCallBack);
-
- let caller = await globalThis.abilityContext.startAbilityByCall({
- bundleName: systemAppCalleeABundleName,
- abilityName: systemAppCalleeAMainAbilityName,
- });
-
- caller.onRelease(releaseCallback);
- let param = new MySequenceable(300, "ACTS_CommonComponent_Call_0300", 'default');
- caller.call('testCall', param).then(() => {
- console.log('ACTS_CommonComponent_Call_0300 call success');
- }).catch(err => {
- console.log('ACTS_CommonComponent_Call_0300 call exception' + err);
- expect().assertFail();
- })
- })
-
- /**
- * @tc.number: ACTS_CommonComponent_Call_0400
- * @tc.name: The parameter "method" of the Caller.callWithResult function is an empty string.
- * @tc.desc: Verify that the parameter "method" of the Caller.callWithResult function is an empty string.
- */
- it('ACTS_CommonComponent_Call_0400', 0, async function (done) {
- caseDepBundles = [systemAppCalleeABundleName];
- console.log('ACTS_CommonComponent_Call_0400 begin');
-
- function releaseCallback(data) {
- expect(data).assertEqual('release');
- console.log('ACTS_CommonComponent_Call_0400 releaseCallBack' + data);
- done();
- }
-
- let caller = await globalThis.abilityContext.startAbilityByCall({
- bundleName: systemAppCalleeABundleName,
- abilityName: systemAppCalleeAMainAbilityName,
- });
-
- caller.onRelease(releaseCallback);
- let param = new MySequenceable(400, "ACTS_CommonComponent_Call_0400", 'default');
- caller.callWithResult('testCallWithResult', param).then((data) => {
- console.log('ACTS_CommonComponent_Call_0400 call success');
- var result = new MySequenceable(0, '', '');
- data.readSequenceable(result);
- expect(result.num).assertEqual(400);
- expect(result.str).assertEqual('ACTS_CommonComponent_Call_0400');
- expect(result.result).assertEqual('ACTS_CommonComponent_Call_0400processed');
- caller.release();
- }).catch(err => {
- console.log('ACTS_CommonComponent_Call_0400 call exception' + err);
- expect().assertFail();
- caller.release();
- })
- })
-
- /**
- * @tc.number: ACTS_CommonComponent_Call_0500
- * @tc.name: The parameter "method" of the Caller.callWithResult function is an empty string.
- * @tc.desc: Verify that the parameter "method" of the Caller.callWithResult function is an empty string.
- */
- it('ACTS_CommonComponent_Call_0500', 0, async function (done) {
- console.log('ACTS_CommonComponent_Call_0500 begin');
- var subscriber;
- var caller1;
- var caller2;
- caseDepBundles = [systemAppCalleeABundleName];
-
- function unSubscribeCallBack() {
- console.log('ACTS_CommonComponent_Call_0500 unSubscribeCallBack')
- caller1.release();
- done();
- }
-
- function releaseCallback(data) {
- expect(data).assertEqual('release');
- console.log('ACTS_CommonComponent_Call_0500 releaseCallBack' + data);
- commonEvent.unsubscribe(subscriber, unSubscribeCallBack);
- }
-
- function subscribeCallBack(err, data) {
- console.log('ACTS_CommonComponent_Call_0500 subscribeCallBack data:' + JSON.stringify(data))
- expect(data.data).assertEqual('calleeCheckCallParam');
- expect(data.parameters.num).assertEqual(500);
- expect(data.parameters.str).assertEqual('ACTS_CommonComponent_Call_0500');
- expect(data.parameters.result).assertEqual('ACTS_CommonComponent_Call_0500processed');
- console.log('ACTS_CommonComponent_Call_0500 do release');
- caller2.release();
- }
-
- subscriber = await commonEvent.createSubscriber(subscriberInfo);
- commonEvent.subscribe(subscriber, subscribeCallBack);
-
- caller1 = await globalThis.abilityContext.startAbilityByCall({
- bundleName: systemAppCalleeABundleName,
- abilityName: systemAppCalleeAMainAbilityName,
- });
-
- caller2 = await globalThis.abilityContext.startAbilityByCall({
- bundleName: systemAppCalleeABundleName,
- abilityName: systemAppCalleeASecondAbilityName,
- });
-
- caller2.onRelease(releaseCallback);
- let param = new MySequenceable(500, "ACTS_CommonComponent_Call_0500", 'default');
- caller2.call('testCall', param).then(() => {
- console.log('ACTS_CommonComponent_Call_0500 call success');
- }).catch(err => {
- console.log('ACTS_CommonComponent_Call_0500 call exception' + err);
- expect().assertFail();
- })
- })
-
- /**
- * @tc.number: ACTS_CommonComponent_Call_0600
- * @tc.name: The parameter "method" of the Caller.callWithResult function is an empty string.
- * @tc.desc: Verify that the parameter "method" of the Caller.callWithResult function is an empty string.
- */
- it('ACTS_CommonComponent_Call_0600', 0, async function (done) {
- caseDepBundles = [systemAppCalleeABundleName];
- console.log('ACTS_CommonComponent_Call_0600 begin');
-
- function releaseCallback(data) {
- expect(data).assertEqual('release');
- console.log('ACTS_CommonComponent_Call_0600 releaseCallBack' + data);
- caller1.release();
- done();
- }
-
- let caller1 = await globalThis.abilityContext.startAbilityByCall({
- bundleName: systemAppCalleeABundleName,
- abilityName: systemAppCalleeAMainAbilityName,
- });
- let caller2 = await globalThis.abilityContext.startAbilityByCall({
- bundleName: systemAppCalleeABundleName,
- abilityName: systemAppCalleeASecondAbilityName,
- });
-
- caller2.onRelease(releaseCallback);
- let param = new MySequenceable(600, "ACTS_CommonComponent_Call_0600", 'default');
- caller2.callWithResult('testCallWithResult', param).then((data) => {
- console.log('ACTS_CommonComponent_Call_0600 call success');
- var result = new MySequenceable(0, '', '');
- data.readSequenceable(result);
- expect(result.num).assertEqual(600);
- expect(result.str).assertEqual('ACTS_CommonComponent_Call_0600');
- expect(result.result).assertEqual('ACTS_CommonComponent_Call_0600processed');
- caller2.release();
- }).catch(err => {
- console.log('ACTS_CommonComponent_Call_0600 call exception' + err);
- expect().assertFail();
- caller2.release();
- })
- })
-
- /**
- * @tc.number: ACTS_CommonComponent_Call_0700
- * @tc.name: The parameter "method" of the Caller.callWithResult function is an empty string.
- * @tc.desc: Verify that the parameter "method" of the Caller.callWithResult function is an empty string.
- */
- it('ACTS_CommonComponent_Call_0700', 0, async function (done) {
- console.log('ACTS_CommonComponent_Call_0700 begin');
- var subscriber;
- var caller;
- caseDepBundles = [systemAppCalleeABundleName];
-
- function unSubscribeCallBack() {
- console.log('ACTS_CommonComponent_Call_0700 unSubscribeCallBack')
- done();
- }
-
- function releaseCallback(data) {
- expect(data).assertEqual('release');
- console.log('ACTS_CommonComponent_Call_0700 releaseCallBack' + data);
- commonEvent.unsubscribe(subscriber, unSubscribeCallBack);
- }
-
- function releaseCallback1(data) {
- expect(data).assertEqual('release');
- console.log('ACTS_CommonComponent_Call_0700 releaseCallBack1' + data);
- setTimeout(() => {
- globalThis.abilityContext.startAbilityByCall({
- bundleName: systemAppCalleeABundleName,
- abilityName: systemAppCalleeASecondAbilityName,
- }).then(data => {
- caller = data;
- console.log('ACTS_CommonComponent_Call_0700 caller get')
- caller.onRelease(releaseCallback);
- let param = new MySequenceable(700, "ACTS_CommonComponent_Call_0700", 'default');
- caller.call('testCall', param).then(() => {
- console.log('ACTS_CommonComponent_Call_0700 call success');
- }).catch(err => {
- console.log('ACTS_CommonComponent_Call_0700 call exception' + err);
- expect().assertFail();
- })
- })
- }, 100);
- }
-
- function subscribeCallBack(err, data) {
- console.log('ACTS_CommonComponent_Call_0700 subscribeCallBack data:' + JSON.stringify(data))
- expect(data.data).assertEqual('calleeCheckCallParam');
- expect(data.parameters.num).assertEqual(700);
- expect(data.parameters.str).assertEqual('ACTS_CommonComponent_Call_0700');
- expect(data.parameters.result).assertEqual('ACTS_CommonComponent_Call_0700processed');
- console.log('ACTS_CommonComponent_Call_0700 do release');
- caller.release();
- }
-
- subscriber = await commonEvent.createSubscriber(subscriberInfo);
- commonEvent.subscribe(subscriber, subscribeCallBack);
-
- globalThis.abilityContext.startAbilityByCall({
- bundleName: systemAppCalleeABundleName,
- abilityName: systemAppCalleeASecondAbilityName,
- }).then(data => {
- caller = data;
- console.log('ACTS_CommonComponent_Call_0700 caller get')
- caller.onRelease(releaseCallback1);
- caller.release();
- })
- })
-
- /**
- * @tc.number: ACTS_CommonComponent_Call_0800
- * @tc.name: The parameter "method" of the Caller.callWithResult function is an empty string.
- * @tc.desc: Verify that the parameter "method" of the Caller.callWithResult function is an empty string.
- */
- it('ACTS_CommonComponent_Call_0800', 0, async function (done) {
- console.log('ACTS_CommonComponent_Call_0800 begin');
- var caller;
- caseDepBundles = [systemAppCalleeABundleName];
-
- function releaseCallback(data) {
- expect(data).assertEqual('release');
- console.log('ACTS_CommonComponent_Call_0800 releaseCallBack' + data);
- done();
- }
-
- function releaseCallback1(data) {
- expect(data).assertEqual('release');
- console.log('ACTS_CommonComponent_Call_0800 releaseCallBack' + data);
- setTimeout(() => {
- globalThis.abilityContext.startAbilityByCall({
- bundleName: systemAppCalleeABundleName,
- abilityName: systemAppCalleeASecondAbilityName,
- }).then(data => {
- caller = data;
- caller.onRelease(releaseCallback);
- let param = new MySequenceable(800, "ACTS_CommonComponent_Call_0800", 'default');
- caller.callWithResult('testCallWithResult', param).then((data) => {
- console.log('ACTS_CommonComponent_Call_0800 call success');
- var result = new MySequenceable(0, '', '');
- data.readSequenceable(result);
- expect(result.num).assertEqual(800);
- expect(result.str).assertEqual('ACTS_CommonComponent_Call_0800');
- expect(result.result).assertEqual('ACTS_CommonComponent_Call_0800processed');
- caller.release();
- }).catch(err => {
- console.log('ACTS_CommonComponent_Call_0800 call exception' + err);
- expect().assertFail();
- caller.release();
- })
- });
- }, 100);
- }
-
- globalThis.abilityContext.startAbilityByCall({
- bundleName: systemAppCalleeABundleName,
- abilityName: systemAppCalleeASecondAbilityName,
- }).then(data => {
- caller = data;
- console.log('ACTS_CommonComponent_Call_0800 caller get')
- caller.onRelease(releaseCallback1);
- caller.release();
- })
- })
-
- /**
- * @tc.number: ACTS_CommonComponent_Call_0900
- * @tc.name: The parameter "method" of the Caller.callWithResult function is an empty string.
- * @tc.desc: Verify that the parameter "method" of the Caller.callWithResult function is an empty string.
- */
- it('ACTS_CommonComponent_Call_0900', 0, async function (done) {
- console.log('ACTS_CommonComponent_Call_0900 begin');
- var subscriber;
- caseDepBundles = [thirdAppABundleName];
- var caller;
-
- function unSubscribeCallBack() {
- console.log('ACTS_CommonComponent_Call_0900 unSubscribeCallBack')
- done();
- }
-
- function releaseCallback(data) {
- expect(data).assertEqual('release');
- console.log('ACTS_CommonComponent_Call_0900 releaseCallBack' + data);
- commonEvent.unsubscribe(subscriber, unSubscribeCallBack);
- }
-
- function subscribeCallBack(err, data) {
- console.log('ACTS_CommonComponent_Call_0900 subscribeCallBack data:' + JSON.stringify(data))
- expect(data.data).assertEqual('calleeCheckCallParam');
- expect(data.parameters.num).assertEqual(900);
- expect(data.parameters.str).assertEqual('ACTS_CommonComponent_Call_0900');
- expect(data.parameters.result).assertEqual('ACTS_CommonComponent_Call_0900processed');
- console.log('AMS_CallTest_0100 do release');
- caller.release();
- }
-
- subscriber = await commonEvent.createSubscriber(subscriberInfo);
- commonEvent.subscribe(subscriber, subscribeCallBack);
- caller = await globalThis.abilityContext.startAbilityByCall({
- bundleName: thirdAppABundleName,
- abilityName: thirdAppAMainAbilityName,
- });
-
- caller.onRelease(releaseCallback);
- let param = new MySequenceable(900, "ACTS_CommonComponent_Call_0900", 'default');
- caller.call('testCall', param).then(() => {
- console.log('ACTS_CommonComponent_Call_0900 call success');
- }).catch(err => {
- console.log('ACTS_CommonComponent_Call_0900 call exception' + err);
- expect().assertFail();
- })
- })
-
- /**
- * @tc.number: ACTS_CommonComponent_Call_1000
- * @tc.name: The parameter "method" of the Caller.callWithResult function is an empty string.
- * @tc.desc: Verify that the parameter "method" of the Caller.callWithResult function is an empty string.
- */
- it('ACTS_CommonComponent_Call_1000', 0, async function (done) {
- caseDepBundles = [thirdAppABundleName];
- console.log('ACTS_CommonComponent_Call_1000 begin');
- var caller;
-
- function releaseCallback(data) {
- expect(data).assertEqual('release');
- console.log('ACTS_CommonComponent_Call_1000 releaseCallBack' + data);
- done();
- }
-
- caller = await globalThis.abilityContext.startAbilityByCall({
- bundleName: thirdAppABundleName,
- abilityName: thirdAppAMainAbilityName,
- });
-
- caller.onRelease(releaseCallback);
- let param = new MySequenceable(1000, "ACTS_CommonComponent_Call_1000", 'default');
- caller.callWithResult('testCallWithResult', param).then((data) => {
- console.log('ACTS_CommonComponent_Call_1000 call success');
- var result = new MySequenceable(0, '', '');
- data.readSequenceable(result);
- expect(result.num).assertEqual(1000);
- expect(result.str).assertEqual('ACTS_CommonComponent_Call_1000');
- expect(result.result).assertEqual('ACTS_CommonComponent_Call_1000processed');
- caller.release();
- }).catch(err => {
- console.log('ACTS_CommonComponent_Call_1000 call exception' + err);
- expect().assertFail();
- caller.release();
- })
- })
-
- /**
- * @tc.number: ACTS_CommonComponent_Call_1700
- * @tc.name: The parameter "method" of the Caller.callWithResult function is an empty string.
- * @tc.desc: Verify that the parameter "method" of the Caller.callWithResult function is an empty string.
- */
- it('ACTS_CommonComponent_Call_1700', 0, async function (done) {
- console.log('ACTS_CommonComponent_Call_1700 begin');
- var caller;
- var exceptionFlag = false;
-
- try {
- caller = await globalThis.abilityContext.startAbilityByCall({
- bundleName: systemAppCalleeABundleName,
- abilityName: systemAppCalleeAThirdAbilityName,
- });
- } catch(err) {
- console.log('ACTS_CommonComponent_Call_1700 exception' + err);
- exceptionFlag = true;
- expect(err.message).assertEqual("function request remote error");
- }
- expect(exceptionFlag).assertEqual(true);
- done();
- })
-
- /**
- * @tc.number: ACTS_CommonComponent_Call_1900
- * @tc.name: The parameter "method" of the Caller.callWithResult function is an empty string.
- * @tc.desc: Verify that the parameter "method" of the Caller.callWithResult function is an empty string.
- */
- it('ACTS_CommonComponent_Call_1900', 0, async function (done) {
- console.log('ACTS_CommonComponent_Call_1900 begin');
- var subscriber;
- var callBackCnt = 0;
-
- function checkFinish() {
- if (callBackCnt >= 3) {
- console.log('ACTS_CommonComponent_Call_1900 finish release')
- caller.release();
- }
- }
-
- function unSubscribeCallBack() {
- console.log('ACTS_CommonComponent_Call_1900 unSubscribeCallBack')
- done();
- }
-
- function releaseCallback(data) {
- expect(data).assertEqual('release');
- console.log('ACTS_CommonComponent_Call_1900 releaseCallBack' + data);
- commonEvent.unsubscribe(subscriber, unSubscribeCallBack);
- }
-
- function subscribeCallBack(err, data) {
- console.log('ACTS_CommonComponent_Call_1900 subscribeCallBack data:' + JSON.stringify(data))
- if (data.data == 'calleeCheckCallParam') {
- expect(data.parameters.num).assertEqual(1900);
- expect(data.parameters.str).assertEqual('ACTS_CommonComponent_Call_1900');
- expect(data.parameters.result).assertEqual('ACTS_CommonComponent_Call_1900processed');
- callBackCnt++;
- checkFinish();
- } else if (data.data == 'calleeCheckCall2Param') {
- expect(data.parameters.num).assertEqual(1900);
- expect(data.parameters.str).assertEqual('ACTS_CommonComponent_Call_1900');
- expect(data.parameters.result).assertEqual('ACTS_CommonComponent_Call_1900processed2');
- callBackCnt++;
- checkFinish();
- }
- }
-
- subscriber = await commonEvent.createSubscriber(subscriberInfo);
- commonEvent.subscribe(subscriber, subscribeCallBack);
- let caller = await globalThis.abilityContext.startAbilityByCall({
- bundleName: sysABundleName,
- abilityName: sysASecondAbilityName,
- });
-
- caller.onRelease(releaseCallback);
- let param = new MySequenceable(1900, "ACTS_CommonComponent_Call_1900", 'default');
- caller.call('testCall', param).then(() => {
- console.log('ACTS_CommonComponent_Call_1900 call success');
- }).catch(err => {
- console.log('ACTS_CommonComponent_Call_1900 call exception' + err);
- expect().assertFail();
- })
- caller.call('testCall2', param).then(() => {
- console.log('ACTS_CommonComponent_Call_1900 call2 success');
- }).catch(err => {
- console.log('ACTS_CommonComponent_Call_1900 call2 exception' + err);
- expect().assertFail();
- })
-
- caller.callWithResult('testCallWithResult', param).then((data) => {
- console.log('ACTS_CommonComponent_Call_1900 call success');
- var result = new MySequenceable(0, '', '');
- data.readSequenceable(result);
- expect(result.num).assertEqual(1900);
- expect(result.str).assertEqual('ACTS_CommonComponent_Call_1900');
- expect(result.result).assertEqual('ACTS_CommonComponent_Call_1900processed');
- callBackCnt++;
- checkFinish();
- }).catch(err => {
- console.log('ACTS_CommonComponent_Call_1900 call exception' + err);
- expect().assertFail();
- caller.release();
- })
- })
-
- /**
- * @tc.number: ACTS_CommonComponent_Call_2000
- * @tc.name: The callee exits abnormally after the caller requests the call to be called successfully.
- * @tc.desc: Verify that the caller can register the server's death listener.
- */
- it('ACTS_CommonComponent_Call_2000', 0, async function (done) {
- console.log('ACTS_CommonComponent_Call_2000 begin');
-
- function releaseCallback(data) {
- console.log('ACTS_CommonComponent_Call_2000 releaseCallBack:' + data);
- expect(data).assertEqual("died");
- done();
- }
-
- let bundleNameCallee = "com.example.systemappcalleea";
- let abilityNameCallee = "com.example.systemappcalleea.MainAbility";
- let want = {
- bundleName: bundleNameCallee,
- abilityName: abilityNameCallee,
- }
- let caller = await globalThis.abilityContext.startAbilityByCall(want);
- if (typeof caller !== "object" || caller == null) {
- console.log('ACTS_CommonComponent_Call_2000 startAbilityByCall fail');
- expect().assertFail();
- }
- try {
- caller.onRelease(releaseCallback);
- } catch (e) {
- console.log('ACTS_CommonComponent_Call_2000 Caller onRelease fail ' + e);
- expect().assertFail();
- }
- await appManager.killProcessesByBundleName(bundleNameCallee);
- })
-
- /**
- * @tc.number: ACTS_CommonComponent_Call_2300
- * @tc.name: Callee is in standalone process AbilityStage of the same app.
- * @tc.desc: Verify Callee is in standalone process AbilityStage of the same app.
- */
- it('ACTS_CommonComponent_Call_2300', 0, async function (done) {
- console.log('ACTS_CommonComponent_Call_2300 begin');
-
- let bundleNameCallee = "com.example.systemcalltest";
- let abilityNameCallee = "com.example.second.MainAbility";
-
- function releaseCallback(data) {
- console.log('ACTS_CommonComponent_Call_2300 releaseCallBack:' + data);
- expect(data).assertEqual("release");
- done();
- }
-
- let want = {
- bundleName: bundleNameCallee,
- abilityName: abilityNameCallee,
- }
- let caller = await globalThis.abilityContext.startAbilityByCall(want);
- if (typeof caller !== "object" || caller == null) {
- console.log('ACTS_CommonComponent_Call_2300 startAbilityByCall fail');
- expect().assertFail();
- done();
- }
-
- try {
- caller.onRelease(releaseCallback);
- } catch (e) {
- console.log('ACTS_CommonComponent_Call_2300 Caller onRelease fail ' + e);
- expect().assertFail();
- done();
- }
- let param = new MySequenceable(2300, "case2300", 'default');
- caller.callWithResult('test2300', param).then((data) => {
- console.log('ACTS_CommonComponent_Call_2300 callWithResult ' + JSON.stringify(data));
- let result = new MySequenceable(0, '', '');
- data.readSequenceable(result);
- expect(result.str).assertEqual("onCreateonBackground");
- expect(result.num).assertEqual(0);
- });
-
- try {
- caller.release();
- } catch (e) {
- console.log('ACTS_CommonComponent_Call_2300 Caller Release fail:' + e);
- expect().assertFail();
- done();
- }
- })
-
- /**
- * @tc.number: ACTS_CommonComponent_Call_2400
- * @tc.name: The service party cannot provide the corresponding service after calling Callee.off.
- * @tc.desc: The verification service party cannot provide the corresponding service after calling Callee.off.
- */
- it('ACTS_CommonComponent_Call_2400', 0, async function (done) {
- console.log('ACTS_CommonComponent_Call_2400 begin');
-
- function releaseCallback(data) {
- expect(data).assertEqual('release');
- console.log('ACTS_CommonComponent_Call_2400 releaseCallBack ' + data);
- done();
- }
-
- let caller = await globalThis.abilityContext.startAbilityByCall({
- bundleName: sysABundleName,
- abilityName: sysASecondAbilityName,
- });
-
- caller.onRelease(releaseCallback);
- let param = new MySequenceable(2400, "case2400", 'default');
- let beforeOff = 0;
- let afterOff = 0;
- await caller.call('testOff', param).then(() => {
- console.log('ACTS_CommonComponent_Call_2400 call success');
- beforeOff = 1;
- }).catch(err => {
- beforeOff = 2;
- })
-
- globalThis.secondCallee.off('testOff');
-
- await caller.call('testOff', param).then(() => {
- console.log('ACTS_CommonComponent_Call_2400 call success');
- afterOff = 1;
- }).catch(err => {
- afterOff = 2;
- })
-
- expect(beforeOff).assertEqual(1);
- expect(afterOff).assertEqual(2);
- caller.release();
- })
-
- /**
- * @tc.number: ACTS_CommonComponent_Call_2500
- * @tc.name: The parameter "method" of the Caller.call function is an empty string.
- * @tc.desc: Verify that the parameter "method" of the Caller.call function is an empty string.
- */
- it('ACTS_CommonComponent_Call_2500', 0, async function (done) {
- console.log('ACTS_CommonComponent_Call_2500 begin');
-
- function releaseCallback(data) {
- expect(data).assertEqual('release');
- console.log('ACTS_CommonComponent_Call_2500 releaseCallBack' + data);
- done();
- }
-
- let caller = await globalThis.abilityContext.startAbilityByCall({
- bundleName: sysABundleName,
- abilityName: sysASecondAbilityName,
- });
-
- caller.onRelease(releaseCallback);
- let param = new MySequenceable(2500, "case2500", 'default');
- caller.call('', param).then(() => {
- console.log('ACTS_CommonComponent_Call_2500 call success');
- caller.release();
- }).catch(err => {
- console.log('ACTS_CommonComponent_Call_2500 call exception' + err);
- expect(err.message).assertEqual("function input parameter error");
- caller.release();
- })
- })
-
- /**
- * @tc.number: ACTS_CommonComponent_Call_2600
- * @tc.name: The parameter "method" of the Caller.call function is null.
- * @tc.desc: Verify that the parameter "method" of the Caller.call function is null.
- */
- it('ACTS_CommonComponent_Call_2600', 0, async function (done) {
- console.log('ACTS_CommonComponent_Call_2600 begin');
-
- function releaseCallback(data) {
- expect(data).assertEqual('release');
- console.log('ACTS_CommonComponent_Call_2600 releaseCallBack' + data);
- done();
- }
-
- let caller = await globalThis.abilityContext.startAbilityByCall({
- bundleName: sysABundleName,
- abilityName: sysASecondAbilityName,
- });
-
- caller.onRelease(releaseCallback);
- let param = new MySequenceable(2600, "case2600", 'default');
- caller.call(null, param).then(() => {
- console.log('ACTS_CommonComponent_Call_2600 call success');
- caller.release();
- }).catch(err => {
- console.log('ACTS_CommonComponent_Call_2600 call exception' + err);
- expect(err.message).assertEqual("function input parameter error");
- caller.release();
- })
- })
-
- /**
- * @tc.number: ACTS_CommonComponent_Call_2700
- * @tc.name: The parameter "method" of the Caller.call function is undefined.
- * @tc.desc: Verify that the parameter "method" of the Caller.call function is undefined.
- */
- it('ACTS_CommonComponent_Call_2700', 0, async function (done) {
- console.log('ACTS_CommonComponent_Call_2700 begin');
-
- function releaseCallback(data) {
- expect(data).assertEqual('release');
- console.log('ACTS_CommonComponent_Call_2700 releaseCallBack' + data);
- done();
- }
-
- let caller = await globalThis.abilityContext.startAbilityByCall({
- bundleName: sysABundleName,
- abilityName: sysASecondAbilityName,
- });
-
- caller.onRelease(releaseCallback);
- let param = new MySequenceable(2700, "case2700", 'default');
- caller.call(undefined, param).then(() => {
- console.log('ACTS_CommonComponent_Call_2700 call success');
- caller.release();
- }).catch(err => {
- console.log('ACTS_CommonComponent_Call_2700 call exception' + err);
- expect(err.message).assertEqual("function input parameter error");
- caller.release();
- })
- })
-
- /**
- * @tc.number: ACTS_CommonComponent_Call_2800
- * @tc.name: The parameter "method" of the Caller.callWithResult function is an empty string.
- * @tc.desc: Verify that the parameter "method" of the Caller.callWithResult function is an empty string.
- */
- it('ACTS_CommonComponent_Call_2800', 0, async function (done) {
- console.log('ACTS_CommonComponent_Call_2800 begin');
-
- function releaseCallback(data) {
- expect(data).assertEqual('release');
- console.log('ACTS_CommonComponent_Call_2800 releaseCallBack' + data);
- done();
- }
-
- let caller = await globalThis.abilityContext.startAbilityByCall({
- bundleName: sysABundleName,
- abilityName: sysASecondAbilityName,
- });
-
- caller.onRelease(releaseCallback);
- let param = new MySequenceable(2800, "case2800", 'default');
- caller.callWithResult('', param).then((data) => {
- console.log('ACTS_CommonComponent_Call_2800 callWithResult success');
- caller.release();
- }).catch(err => {
- console.log('ACTS_CommonComponent_Call_2800 callWithResult exception' + err);
- expect(err.message).assertEqual("function input parameter error");
- caller.release();
- })
- })
-
- /**
- * @tc.number: ACTS_CommonComponent_Call_2900
- * @tc.name: The parameter "method" of the Caller.callWithResult function is null.
- * @tc.desc: Verify that the parameter "method" of the Caller.callWithResult function is null.
- */
- it('ACTS_CommonComponent_Call_2900', 0, async function (done) {
- console.log('ACTS_CommonComponent_Call_2900 begin');
-
- function releaseCallback(data) {
- expect(data).assertEqual('release');
- console.log('ACTS_CommonComponent_Call_2900 releaseCallBack' + data);
- done();
- }
-
- let caller = await globalThis.abilityContext.startAbilityByCall({
- bundleName: sysABundleName,
- abilityName: sysASecondAbilityName,
- });
-
- caller.onRelease(releaseCallback);
- let param = new MySequenceable(2900, "case2900", 'default');
- caller.callWithResult(null, param).then((data) => {
- console.log('ACTS_CommonComponent_Call_2900 callWithResult success');
- caller.release();
- }).catch(err => {
- console.log('ACTS_CommonComponent_Call_2900 callWithResult exception' + err);
- expect(err.message).assertEqual("function input parameter error");
- caller.release();
- })
- })
-
- /**
- * @tc.number: ACTS_CommonComponent_Call_3000
- * @tc.name: The parameter "method" of the Caller.callWithResult function is undefined.
- * @tc.desc: Verify that the parameter "method" of the Caller.callWithResult function is undefined.
- */
- it('ACTS_CommonComponent_Call_3000', 0, async function (done) {
- console.log('ACTS_CommonComponent_Call_3000 begin');
-
- function releaseCallback(data) {
- expect(data).assertEqual('release');
- console.log('ACTS_CommonComponent_Call_3000 releaseCallBack' + data);
- done();
- }
-
- let caller = await globalThis.abilityContext.startAbilityByCall({
- bundleName: sysABundleName,
- abilityName: sysASecondAbilityName,
- });
-
- caller.onRelease(releaseCallback);
- let param = new MySequenceable(3000, "case3000", 'default');
- caller.callWithResult(undefined, param).then((data) => {
- console.log('ACTS_CommonComponent_Call_3000 call success');
- caller.release();
- }).catch(err => {
- console.log('ACTS_CommonComponent_Call_3000 catch exception' + err);
- expect(err.message).assertEqual("function input parameter error");
- caller.release();
- })
- })
-
- /**
- * @tc.number: ACTS_CommonComponent_Call_3100
- * @tc.name: The parameter method of the Callee.on function is an empty string.
- * @tc.desc: Verify that the parameter method of the Callee.on function is an empty string.
- */
- it('ACTS_CommonComponent_Call_3100', 0, async function (done) {
- console.log('ACTS_CommonComponent_Call_3100 begin');
-
- function onTest(data) {
- console.log('ACTS_CommonComponent_Call_3100 onTest');
- }
-
- let finishFlag = 0;
- try {
- globalThis.callee.on('', onTest);
- } catch (err) {
- console.log('ACTS_CommonComponent_Call_3100 callee.on err' + err);
- expect(err.message).assertEqual("function input parameter error");
- finishFlag = 1;
- }
-
- expect(finishFlag).assertEqual(1);
- done();
- })
-
- /**
- * @tc.number: ACTS_CommonComponent_Call_3200
- * @tc.name: The parameter method of the Callee.on function is null.
- * @tc.desc: Verify that the parameter method of the Callee.on function is null.
- */
- it('ACTS_CommonComponent_Call_3200', 0, async function (done) {
- console.log('ACTS_CommonComponent_Call_3200 begin');
-
- function onTest(data) {
- console.log('ACTS_CommonComponent_Call_3200 onTest');
- }
-
- let finishFlag = 0;
- try {
- globalThis.callee.on(null, onTest);
- } catch (err) {
- console.log('ACTS_CommonComponent_Call_3200 callee.on err' + err);
- expect(err.message).assertEqual("function input parameter error");
- finishFlag = 1;
- }
-
- expect(finishFlag).assertEqual(1);
- done();
- })
-
- /**
- * @tc.number: ACTS_CommonComponent_Call_3300
- * @tc.name: The parameter method of the Caller.callWithResult function is undefined.
- * @tc.desc: Verify that the parameter method of the Caller.callWithResult function is undefined.
- */
- it('ACTS_CommonComponent_Call_3300', 0, async function (done) {
- console.log('ACTS_CommonComponent_Call_3300 begin');
-
- function onTest(data) {
- console.log('ACTS_CommonComponent_Call_3300 onTest');
- }
-
- let finishFlag = 0;
- try {
- globalThis.callee.on(undefined, onTest);
- } catch (err) {
- console.log('ACTS_CommonComponent_Call_3300 callee.on err' + err);
- expect(err.message).assertEqual("function input parameter error");
- finishFlag = 1;
- }
-
- expect(finishFlag).assertEqual(1);
- done();
- })
-
- /**
- * @tc.number: ACTS_CommonComponent_Call_3400
- * @tc.name: The parameter "method" of the Callee.off function is an empty string.
- * @tc.desc: Verify that the parameter "method" of the Callee.off function is an empty string.
- */
- it('ACTS_CommonComponent_Call_3400', 0, async function (done) {
- console.log('ACTS_CommonComponent_Call_3400 begin');
-
- let finishFlag = 0;
- try {
- globalThis.callee.off('');
- } catch (err) {
- console.log('ACTS_CommonComponent_Call_3400 callee.off err' + err);
- expect(err.message).assertEqual("function input parameter error");
- finishFlag = 1;
- }
-
- expect(finishFlag).assertEqual(1);
- done();
- })
-
- /**
- * @tc.number: ACTS_CommonComponent_Call_3500
- * @tc.name: The parameter "method" of the Callee.off function is null.
- * @tc.desc: Verify that the parameter "method" of the Callee.off function is null.
- */
- it('ACTS_CommonComponent_Call_3500', 0, async function (done) {
- console.log('ACTS_CommonComponent_Call_3500 begin');
-
- let finishFlag = 0;
- try {
- globalThis.callee.off(null);
- } catch (err) {
- console.log('ACTS_CommonComponent_Call_3500 callee.off err' + err);
- expect(err.message).assertEqual("function input parameter error");
- finishFlag = 1;
- }
-
- expect(finishFlag).assertEqual(1);
- done();
- })
-
- /**
- * @tc.number: ACTS_CommonComponent_Call_3600
- * @tc.name: The parameter “method” of the Callee.off function is undefined.
- * @tc.desc: Verify that the parameter “method” of the Callee.off function is undefined.
- */
- it('ACTS_CommonComponent_Call_3600', 0, async function (done) {
- console.log('ACTS_CommonComponent_Call_3600 begin');
-
- let finishFlag = 0;
- try {
- globalThis.callee.off(undefined);
- } catch (err) {
- console.log('ACTS_CommonComponent_Call_3600 callee.off err' + err);
- expect(err.message).assertEqual("function input parameter error");
- finishFlag = 1;
- }
-
- expect(finishFlag).assertEqual(1);
- done();
- })
-
- /*
- * @tc.number: ACTS_CommonComponent_Call_3700
- * @tc.name: Connects a service ability, which is used to start a cloned page ability.
- * @tc.desc: Check the event data of executor page ability publishes
- */
- it('ACTS_CommonComponent_Call_3700', 0, async function (done) {
- console.log('ACTS_CommonComponent_Call_3700 begin');
-
- function releaseCallback(data) {
- expect(data).assertEqual('release');
- console.log('ACTS_CommonComponent_Call_3700 releaseCallBack' + data);
- done();
- }
-
- let caller = await globalThis.abilityContext.startAbilityByCall({
- bundleName: sysABundleName,
- abilityName: sysASecondAbilityName,
- });
-
- console.log('ACTS_CommonComponent_Call_3700 before onRelease')
- caller.onRelease(releaseCallback);
- console.log('ACTS_CommonComponent_Call_3700 before call')
- caller.call('testCall', "").then(() => {
- console.log('ACTS_CommonComponent_Call_3700 call success');
- caller.release();
- }).catch(err => {
- console.log('ACTS_CommonComponent_Call_3700 catch exception' + err);
- expect(err.message).assertEqual("function input parameter error");
- caller.release();
- })
- })
-
- /*
- * @tc.number: ACTS_CommonComponent_Call_3800
- * @tc.name: Connects a service ability, which is used to start a cloned page ability.
- * @tc.desc: Check the event data of executor page ability publishes
- */
- it('ACTS_CommonComponent_Call_3800', 0, async function (done) {
- console.log('ACTS_CommonComponent_Call_3800 begin');
-
- function releaseCallback(data) {
- expect(data).assertEqual('release');
- console.log('ACTS_CommonComponent_Call_3800 releaseCallBack' + data);
- done();
- }
-
- let caller = await globalThis.abilityContext.startAbilityByCall({
- bundleName: sysABundleName,
- abilityName: sysASecondAbilityName,
- });
-
- console.log('ACTS_CommonComponent_Call_3800 before onRelease')
- caller.onRelease(releaseCallback);
- console.log('ACTS_CommonComponent_Call_3800 before call')
- caller.call('testCall', null).then(() => {
- console.log('ACTS_CommonComponent_Call_3800 call success');
- caller.release();
- }).catch(err => {
- console.log('ACTS_CommonComponent_Call_3800 catch exception' + err);
- expect(err.message).assertEqual("function input parameter error");
- caller.release();
- })
- })
-
- /*
- * @tc.number: ACTS_CommonComponent_Call_3900
- * @tc.name: Connects a service ability, which is used to start a cloned page ability.
- * @tc.desc: Check the event data of executor page ability publishes
- */
- it('ACTS_CommonComponent_Call_3900', 0, async function (done) {
- console.log('ACTS_CommonComponent_Call_3900 begin');
-
- function releaseCallback(data) {
- expect(data).assertEqual('release');
- console.log('ACTS_CommonComponent_Call_3900 releaseCallBack' + data);
- done();
- }
-
- let caller = await globalThis.abilityContext.startAbilityByCall({
- bundleName: sysABundleName,
- abilityName: sysASecondAbilityName,
- });
-
- console.log('ACTS_CommonComponent_Call_3900 before onRelease')
- caller.onRelease(releaseCallback);
- console.log('ACTS_CommonComponent_Call_3900 before call')
- caller.call('testCall', undefined).then(() => {
- console.log('ACTS_CommonComponent_Call_3900 call success');
- caller.release();
- }).catch(err => {
- console.log('ACTS_CommonComponent_Call_3900 catch exception' + err);
- expect(err.message).assertEqual("function input parameter error");
- caller.release();
- })
- })
-
- /*
- * @tc.number: ACTS_CommonComponent_Call_4000
- * @tc.name: Connects a service ability, which is used to start a cloned page ability.
- * @tc.desc: Check the event data of executor page ability publishes
- */
- it('ACTS_CommonComponent_Call_4000', 0, async function (done) {
- console.log('ACTS_CommonComponent_Call_4000 begin');
-
- function releaseCallback(data) {
- expect(data).assertEqual('release');
- console.log('ACTS_CommonComponent_Call_4000 release CallBack' + data);
- done();
- }
-
- globalThis.abilityContext.startAbilityByCall({
- bundleName: sysABundleName,
- abilityName: sysASecondAbilityName,
- }).then((data) => {
- let caller = data;
- console.log('ACTS_CommonComponent_Call_4000 before onRelease')
- caller.onRelease(releaseCallback);
- console.log('ACTS_CommonComponent_Call_4000 before call')
- caller.callWithResult('testCallWithResult', "").then((data) => {
- console.log('ACTS_CommonComponent_Call_4000 call success');
- expect(data).assertEqual(undefined);
- caller.release();
- }).catch((e) => {
- console.log('ACTS_CommonComponent_Call_4000 call err' + e);
- caller.release();
- });
- })
- })
-
- /*
- * @tc.number: ACTS_CommonComponent_Call_4100
- * @tc.name: Connects a service ability, which is used to start a cloned page ability.
- * @tc.desc: Check the event data of executor page ability publishes
- */
- it('ACTS_CommonComponent_Call_4100', 0, async function (done) {
- console.log('ACTS_CommonComponent_Call_4100 begin');
-
- function releaseCallback(data) {
- expect(data).assertEqual('release');
- console.log('ACTS_CommonComponent_Call_4100 release CallBack' + data);
- done();
- }
-
- globalThis.abilityContext.startAbilityByCall({
- bundleName: sysABundleName,
- abilityName: sysASecondAbilityName,
- }).then((data) => {
- let caller = data;
- console.log('ACTS_CommonComponent_Call_4100 before onRelease')
- caller.onRelease(releaseCallback);
- console.log('ACTS_CommonComponent_Call_4100 before call')
- caller.callWithResult('testCallWithResult', null).then((data) => {
- console.log('ACTS_CommonComponent_Call_4100 call success');
- expect(data).assertEqual(undefined);
- caller.release();
- }).catch((e) => {
- console.log('ACTS_CommonComponent_Call_4100 call err' + e);
- caller.release();
- });
- })
- })
-
- /*
- * @tc.number: ACTS_CommonComponent_Call_4200
- * @tc.name: Connects a service ability, which is used to start a cloned page ability.
- * @tc.desc: Check the event data of executor page ability publishes
- */
- it('ACTS_CommonComponent_Call_4200', 0, async function (done) {
- console.log('ACTS_CommonComponent_Call_4200 begin');
-
- function releaseCallback(data) {
- expect(data).assertEqual('release');
- console.log('ACTS_CommonComponent_Call_4200 release CallBack' + data);
- done();
- }
-
- globalThis.abilityContext.startAbilityByCall({
- bundleName: sysABundleName,
- abilityName: sysASecondAbilityName,
- }).then((data) => {
- let caller = data;
- console.log('ACTS_CommonComponent_Call_4200 before onRelease')
- caller.onRelease(releaseCallback);
- console.log('ACTS_CommonComponent_Call_4200 before call')
- caller.callWithResult('testCallWithResult', undefined).then((data) => {
- console.log('ACTS_CommonComponent_Call_4200 call success');
- expect(data).assertEqual(undefined);
- caller.release();
- }).catch((e) => {
- console.log('ACTS_CommonComponent_Call_4200 call err' + e);
- caller.release();
- });
- })
- })
-
- /*
- * @tc.number: ACTS_CommonComponent_Call_4300
- * @tc.name: Connects a service ability, which is used to start a cloned page ability.
- * @tc.desc: Check the event data of executor page ability publishes
- */
- it('ACTS_CommonComponent_Call_4300', 0, async function (done) {
- console.log('ACTS_CommonComponent_Call_4300 begin');
- let finishFlag = 0;
- try {
- globalThis.callee.on('testCall', "");
- } catch (err) {
- console.log('ACTS_CommonComponent_Call_4300 call err' + err);
- expect(err.message).assertEqual("function input parameter error");
- finishFlag = 1;
- }
-
- expect(finishFlag).assertEqual(1);
- done();
- })
-
- /*
- * @tc.number: ACTS_CommonComponent_Call_4400
- * @tc.name: Connects a service ability, which is used to start a cloned page ability.
- * @tc.desc: Check the event data of executor page ability publishes
- */
- it('ACTS_CommonComponent_Call_4400', 0, async function (done) {
- console.log('ACTS_CommonComponent_Call_4400 begin');
- let finishFlag = 0;
- try {
- globalThis.callee.on('testCall', null);
- } catch (err) {
- console.log('ACTS_CommonComponent_Call_4400 call err' + err);
- expect(err.message).assertEqual("function input parameter error");
- finishFlag = 1;
- }
-
- expect(finishFlag).assertEqual(1);
- done();
- })
-
- /*
- * @tc.number: ACTS_CommonComponent_Call_4500
- * @tc.name: Connects a service ability, which is used to start a cloned page ability.
- * @tc.desc: Check the event data of executor page ability publishes
- */
- it('ACTS_CommonComponent_Call_4500', 0, async function (done) {
- console.log('ACTS_CommonComponent_Call_4500 begin');
- let finishFlag = 0;
- try {
- globalThis.callee.on('testCall', undefined);
- } catch (err) {
- console.log('ACTS_CommonComponent_Call_4500 call err' + err);
- expect(err.message).assertEqual("function input parameter error");
- finishFlag = 1;
- }
-
- expect(finishFlag).assertEqual(1);
- done();
- })
-
- /**
- * @tc.number: ACTS_CommonComponent_Call_4800
- * @tc.name: Callee is in standalone process AbilityStage of the same app.
- * @tc.desc: Verify Callee is in standalone process AbilityStage of the same app.
- */
- it('ACTS_CommonComponent_Call_4800', 0, async function (done) {
- console.log('ACTS_CommonComponent_Call_4800 begin');
-
- let bundleNameCallee = "com.example.systemcalltest";
- let abilityNameCallee = "com.example.second.MainAbility";
-
- function releaseCallback(data) {
- console.log('ACTS_CommonComponent_Call_4800 releaseCallBack:' + data);
- expect(data).assertEqual("release");
- done();
- }
-
- let want = {
- bundleName: bundleNameCallee,
- abilityName: abilityNameCallee,
- }
- let caller = await globalThis.abilityContext.startAbilityByCall(want);
- if (typeof caller !== "object" || caller == null) {
- console.log('ACTS_CommonComponent_Call_4800 startAbilityByCall fail');
- expect().assertFail();
- done();
- }
-
- try {
- caller.onRelease(releaseCallback);
- } catch (e) {
- console.log('ACTS_CommonComponent_Call_4800 Caller onRelease fail ' + e);
- expect().assertFail();
- done();
- }
- let param = new MySequenceable(4600, "case4600", 'default');
- caller.callWithResult('test4600', param).then((data) => {
- let result = new MySequenceable(0, '', '');
- data.readSequenceable(result);
- expect(result.str).assertEqual("onCreateonBackground");
- expect(result.num).assertEqual(0);
- });
-
- try {
- caller.release();
- } catch (e) {
- console.log('ACTS_CommonComponent_Call_4800 Caller Release fail:' + e);
- expect().assertFail();
- done();
- }
- })
-
- /*
- * @tc.number: ACTS_CommonComponent_Call_4900
- * @tc.name: Connects a service ability, which is used to start a cloned page ability.
- * @tc.desc: Check the event data of executor page ability publishes
- */
- it('ACTS_CommonComponent_Call_4900', 0, async function (done) {
- console.log('ACTS_CommonComponent_Call_4900 begin');
- let caller;
- let sequenceable = new MySequenceable(1, 'ACTS_CommonComponent_Call_4900', 'default');
-
- function releaseCallback(data) {
- expect(data).assertEqual('release');
- console.log('ACTS_CommonComponent_Call_4900 releaseCallBack ' + data);
- caller.call('testCall', sequenceable).then(() => {
- console.log('ACTS_CommonComponent_Call_4900 call2 success');
- expect().assertFail();
- done();
- }).catch(err => {
- console.log('ACTS_CommonComponent_Call_4900 call2 err ' + err);
- expect(err.message).assertEqual("function inner object error");
- done();
- })
- }
-
- globalThis.abilityContext.startAbilityByCall({
- bundleName: sysABundleName,
- abilityName: sysASecondAbilityName,
- }).then((data) => {
- caller = data;
- console.log('ACTS_CommonComponent_Call_4900 before onRelease')
- caller.onRelease(releaseCallback);
- console.log('ACTS_CommonComponent_Call_4900 before call')
- delay(100);
- caller.call('testCall', sequenceable).then(() => {
- console.log('ACTS_CommonComponent_Call_4900 call1 success');
- caller.release();
- }).catch((e) => {
- console.log('ACTS_CommonComponent_Call_4900 call err' + e);
- expect().assertFail();
- done();
- });
- })
- })
-
- /*
- * @tc.number: ACTS_CommonComponent_Call_5000
- * @tc.name: Connects a service ability, which is used to start a cloned page ability.
- * @tc.desc: Check the event data of executor page ability publishes
- */
- it('ACTS_CommonComponent_Call_5000', 0, async function (done) {
- console.log('ACTS_CommonComponent_Call_5000 begin');
- let finishFlag = 0;
-
- function testCallback_5100() {
- console.log('ACTS_CommonComponent_Call_5000 testCallback');
- }
-
- try {
- globalThis.callee.on('ACTS_CommonComponent_Call_5000', testCallback_5100);
- } catch (err) {
- console.log('ACTS_CommonComponent_Call_5000 call err' + err);
- expect().assertFail();
- globalThis.callee.off('ACTS_CommonComponent_Call_5000');
- done();
- }
- try {
- globalThis.callee.on('ACTS_CommonComponent_Call_5000', testCallback_5100);
- } catch (err) {
- console.log('ACTS_CommonComponent_Call_5000 call err' + err);
- expect(err.message).assertEqual("function is registered");
- finishFlag = 1;
- }
-
- expect(finishFlag).assertEqual(1);
- globalThis.callee.off('ACTS_CommonComponent_Call_5000');
- console.log('ACTS_CommonComponent_Call_5000 finished');
- done();
- })
-
- /*
- * @tc.number: ACTS_CommonComponent_Call_5100
- * @tc.name: Connects a service ability, which is used to start a cloned page ability.
- * @tc.desc: Check the event data of executor page ability publishes
- */
- it('ACTS_CommonComponent_Call_5100', 0, async function (done) {
- console.log('ACTS_CommonComponent_Call_5100 begin');
- let finishFlag = 0;
-
- function testCallback_5100() {
- console.log('ACTS_CommonComponent_Call_5100 testCallback');
- }
-
- try {
- globalThis.callee.on('ACTS_CommonComponent_Call_5100', testCallback_5100);
- globalThis.callee.off('ACTS_CommonComponent_Call_5100');
- } catch (err) {
- console.log('ACTS_CommonComponent_Call_5100 first step err' + err);
- expect().assertFail();
- globalThis.callee.off('ACTS_CommonComponent_Call_5100');
- done();
- }
- try {
- globalThis.callee.off('ACTS_CommonComponent_Call_5100');
- } catch (err) {
- console.log('ACTS_CommonComponent_Call_5100 call err' + err);
- expect(err.message).assertEqual("function not registered");
- finishFlag = 1;
- }
-
- expect(finishFlag).assertEqual(1);
- console.log('ACTS_CommonComponent_Call_5100 finished');
- done();
- })
-
- /*
- * @tc.number: ACTS_CommonComponent_Call_5200
- * @tc.name: Connects a service ability, which is used to start a cloned page ability.
- * @tc.desc: Check the event data of executor page ability publishes
- */
- it('ACTS_CommonComponent_Call_5200', 0, async function (done) {
- console.log('ACTS_CommonComponent_Call_5200 begin');
- let caller;
- let exceptionFlag = false;
-
- try {
- caller = await globalThis.abilityContext.startAbilityByCall(null);
- console.log('ACTS_CommonComponent_Call_5200 startAbilityByCall' + JSON.stringify(caller))
- } catch(err) {
- console.log('ACTS_CommonComponent_Call_5200 exception' + err);
- exceptionFlag = true;
- expect(err.message).assertEqual("function input parameter error");
- }
-
- expect(exceptionFlag).assertEqual(true);
- done();
- })
-
- /*
- * @tc.number: ACTS_CommonComponent_Call_5300
- * @tc.name: Connects a service ability, which is used to start a cloned page ability.
- * @tc.desc: Check the event data of executor page ability publishes
- */
- it('ACTS_CommonComponent_Call_5300', 0, async function (done) {
- console.log('ACTS_CommonComponent_Call_5300 begin');
- let caller;
- let exceptionFlag = false;
-
- try {
- caller = await globalThis.abilityContext.startAbilityByCall({
- bundleName: "",
- abilityName: "",
- });
- console.log('ACTS_CommonComponent_Call_5300 startAbilityByCall' + JSON.stringify(caller))
- } catch(err) {
- console.log('ACTS_CommonComponent_Call_5300 exception' + err);
- exceptionFlag = true;
- expect(err.message).assertEqual("function request remote error");
- }
-
- expect(exceptionFlag).assertEqual(true);
- done();
- })
-
- /*
- * @tc.number: ACTS_CommonComponent_Call_5400
- * @tc.name: Connects a service ability, which is used to start a cloned page ability.
- * @tc.desc: Check the event data of executor page ability publishes
- */
- it('ACTS_CommonComponent_Call_5400', 0, async function (done) {
- console.log('ACTS_CommonComponent_Call_5400 begin');
- let caller;
- let exceptionFlag = false;
-
- try {
- caller = await globalThis.abilityContext.startAbilityByCall(undefined);
- console.log('ACTS_CommonComponent_Call_5400 startAbilityByCall' + JSON.stringify(caller))
- } catch(err) {
- console.log('ACTS_CommonComponent_Call_5400 exception' + err);
- exceptionFlag = true;
- expect(err.message).assertEqual("function input parameter error");
- }
-
- expect(exceptionFlag).assertEqual(true);
- done();
- })
-
- /**
- * @tc.number: ACTS_CommonComponent_Call_5700
- * @tc.name: The mission of callee is not in recent list when startAbilityByCall only.
- * @tc.desc: Verify the mission of callee is not in recent list when startAbilityByCall only.
- */
- it('ACTS_CommonComponent_Call_5700', 0, async function (done) {
- console.log('ACTS_CommonComponent_Call_5700 begin');
-
- let bundleNameCallee = "com.example.systemcalltest";
- let abilityNameCallee = "com.example.systemcalltest.SecondAbility";
- let want = {
- bundleName: bundleNameCallee,
- abilityName: abilityNameCallee,
- }
- let caller = await globalThis.abilityContext.startAbilityByCall(want);
- if (typeof caller !== "object" || caller == null) {
- console.log('ACTS_CommonComponent_Call_5700 startAbilityByCall fail');
- expect().assertFail();
- done();
- }
-
- async function releaseCallback(data) {
- console.log('ACTS_CommonComponent_Call_5700 releaseCallBack:' + data);
- expect(data).assertEqual("release");
-
- let missionId = await getMissionId(abilityNameCallee, 0);
- expect(missionId == -1).assertTrue();
- done();
- }
-
- try {
- caller.onRelease(releaseCallback);
- } catch (e) {
- console.log('ACTS_CommonComponent_Call_5700 Caller onRelease fail ' + e);
- expect().assertFail();
- done();
- }
-
- try {
- caller.release();
- } catch (e) {
- console.log('ACTS_CommonComponent_Call_5700 Caller Release fail:' + e);
- expect().assertFail();
- done();
- }
- })
-
- /**
- * @tc.number: ACTS_CommonComponent_Call_5800
- * @tc.name: The mission of callee is in recent list when startAbilityByCall then startAbility.
- * @tc.desc: Verify the mission of callee is in recent list when startAbilityByCall then startAbility.
- */
- it('ACTS_CommonComponent_Call_5800', 0, async function (done) {
- console.log('ACTS_CommonComponent_Call_5800 begin');
-
- let bundleNameCallee = "com.example.systemcalltest";
- let abilityNameCallee = "com.example.systemcalltest.SecondAbility";
- let want = {
- bundleName: bundleNameCallee,
- abilityName: abilityNameCallee,
- }
- let caller = await globalThis.abilityContext.startAbilityByCall(want);
- if (typeof caller !== "object" || caller == null) {
- console.log('ACTS_CommonComponent_Call_5800 startAbilityByCall fail');
- expect().assertFail();
- done();
- }
-
- function startAbilityCallback(err) {
- console.log('ACTS_CommonComponent_Call_5800 startAbilityCallback');
- if (err.code != 0) {
- expect().assertFail();
- done();
- }
- }
-
- await globalThis.abilityContext.startAbility(want, startAbilityCallback);
-
- async function releaseCallback(data) {
- console.log('ACTS_CommonComponent_Call_5800 releaseCallBack:' + data);
- expect(data).assertEqual("release");
-
- let missionId = await getMissionId(abilityNameCallee, 0);
- expect(missionId != -1).assertTrue();
- done();
- }
- try {
- caller.onRelease(releaseCallback);
- } catch (e) {
- console.log('ACTS_CommonComponent_Call_5800 Caller onRelease fail ' + e);
- expect().assertFail();
- done();
- }
-
- try {
- caller.release();
- } catch (e) {
- console.log('ACTS_CommonComponent_Call_5800 Caller Release fail:' + e);
- expect().assertFail();
- done();
- }
- })
- })
-}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/actscalltest/systemcallfeature/entry/src/main/ets/pages/second/second.ets b/aafwk/aafwk_standard/actscalltest/systemcallfeature/entry/src/main/ets/pages/second/second.ets
deleted file mode 100755
index 72e66614c1a8c9068b0b0594d6da4ae52c0912b7..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/actscalltest/systemcallfeature/entry/src/main/ets/pages/second/second.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('SystemCallTest SecondAbility)')
- .fontSize(50)
- .fontWeight(FontWeight.Bold)
- }
- .width('100%')
- .height('100%')
- }
-}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/actscalltest/thirdcalltest/Test.json b/aafwk/aafwk_standard/actscalltest/thirdcalltest/Test.json
deleted file mode 100755
index be829fa64d2f0de17aed753a31a013505eb5a561..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/actscalltest/thirdcalltest/Test.json
+++ /dev/null
@@ -1,26 +0,0 @@
-{
- "description": "Configuration for hjunit demo Tests",
- "driver": {
- "type": "JSUnitTest",
- "test-timeout": "1000000",
- "package": "com.example.thirdcalltest",
- "shell-timeout": "60000"
- },
- "kits": [
- {
- "test-file-name": [
- "ActsThirdCallTest.hap",
- "ActsSystemAppCalleeARelyHap.hap",
- "ActsThirdAppARelyHap.hap"
- ],
- "type": "AppInstallKit",
- "cleanup-apps": true
- },
- {
- "type": "ShellKit",
- "run-command": [
- "remount"
- ]
- }
- ]
-}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/actscalltest/thirdcalltest/entry/src/main/ets/FifthAbility/FifthAbility.ts b/aafwk/aafwk_standard/actscalltest/thirdcalltest/entry/src/main/ets/FifthAbility/FifthAbility.ts
deleted file mode 100755
index 598552ba1ad34790f70d58abcbd0735b7e6fbcc3..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/actscalltest/thirdcalltest/entry/src/main/ets/FifthAbility/FifthAbility.ts
+++ /dev/null
@@ -1,124 +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.application.Ability'
-import commonEvent from '@ohos.commonEvent'
-
-class MySequenceable {
- num: number = 0;
- str: String = "";
- result: String = "";
-
- constructor(num, string, result) {
- this.num = num;
- this.str = string;
- this.result = result;
- }
-
- setMySequence(num, string, result) {
- this.num = num;
- this.str = string;
- this.result = result;
- }
-
- marshalling(messageParcel) {
- messageParcel.writeInt(this.num);
- messageParcel.writeString(this.str);
- messageParcel.writeString(this.result);
- return true;
- }
-
- unmarshalling(messageParcel) {
- this.num = messageParcel.readInt();
- this.str = messageParcel.readString();
- this.result = messageParcel.readString();
- return true;
- }
-}
-
-function testCall(data) {
- let recvSequence = new MySequenceable(0, '', '');
- console.log('======>SystemCallTest FifthAbility on testCall <======')
- data.readSequenceable(recvSequence);
- var result = recvSequence.str + 'processed';
- var commonEventData = {
- code: 0,
- data: 'calleeCheckCallParam',
- parameters: {
- num: recvSequence.num,
- str: recvSequence.str,
- result: result
- }
- }
- commonEvent.publish('CallTest', commonEventData, (err) => {
- console.log('======>CallTestSysA FifthAbility Call_Finish<======')
- })
- return recvSequence;
-}
-
-function testCallWithResult(data) {
- let recvSequence = new MySequenceable(0, '', '');
- console.log('======>SystemCallTest FifthAbility on testCall <======')
- data.readSequenceable(recvSequence);
- let result = recvSequence.str + 'processed';
- recvSequence.setMySequence(recvSequence.num, recvSequence.str, result);
-
- return recvSequence;
-}
-
-export default class FifthAbility extends Ability {
- onCreate(want, launchParam) {
- // Ability is creating, initialize resources for this ability
- console.log("SystemCallTest FifthAbility onCreate")
- globalThis.abilityWant = want;
- this.callee.on('testCall', testCall);
- this.callee.on('testCallWithResult', testCallWithResult);
- }
-
- onDestroy() {
- // Ability is destroying, release resources for this ability
- console.log("SystemCallTest FifthAbility onDestroy")
- }
-
- onWindowStageCreate(windowStage) {
- // Main window is created, set main page for this ability
- console.log("SystemCallTest FifthAbility onWindowStageCreate")
- windowStage.setUIContent(this.context, "pages/second/second", null)
- }
-
- onWindowStageDestroy() {
- // Main window is destroyed, release UI related resources
- console.log("SystemCallTest FifthAbility onWindowStageDestroy")
- }
-
- onForeground() {
- // Ability has brought to foreground
- console.log("SystemCallTest FifthAbility onForeground")
- if ((globalThis.abilityWant.parameters.case_num == "case1300") ||
- (globalThis.abilityWant.parameters.case_num == "case1400")) {
- var publishData = globalThis.abilityWant.parameters.case_num + "targetForeground";
- var commonEventData = {
- data: publishData,
- }
- commonEvent.publish('CallTest', commonEventData, (err) => {
- console.log('======>SystemAppCallerA FifthAbility Call_Finish<======')
- })
- }
- }
-
- onBackground() {
- // Ability has back to background
- console.log("SystemCallTest FifthAbility onBackground")
- }
-};
diff --git a/aafwk/aafwk_standard/actscalltest/thirdcalltest/entry/src/main/ets/ForthAbility/ForthAbility.ts b/aafwk/aafwk_standard/actscalltest/thirdcalltest/entry/src/main/ets/ForthAbility/ForthAbility.ts
deleted file mode 100755
index 325cf4b41c4ba6200d53ece07b0f4105f12d681c..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/actscalltest/thirdcalltest/entry/src/main/ets/ForthAbility/ForthAbility.ts
+++ /dev/null
@@ -1,124 +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.application.Ability'
-import commonEvent from '@ohos.commonEvent'
-
-class MySequenceable {
- num: number = 0;
- str: String = "";
- result: String = "";
-
- constructor(num, string, result) {
- this.num = num;
- this.str = string;
- this.result = result;
- }
-
- setMySequence(num, string, result) {
- this.num = num;
- this.str = string;
- this.result = result;
- }
-
- marshalling(messageParcel) {
- messageParcel.writeInt(this.num);
- messageParcel.writeString(this.str);
- messageParcel.writeString(this.result);
- return true;
- }
-
- unmarshalling(messageParcel) {
- this.num = messageParcel.readInt();
- this.str = messageParcel.readString();
- this.result = messageParcel.readString();
- return true;
- }
-}
-
-function testCall(data) {
- let recvSequence = new MySequenceable(0, '', '');
- console.log('======>SystemCallTest ForthAbility on testCall <======')
- data.readSequenceable(recvSequence);
- var result = recvSequence.str + 'processed';
- var commonEventData = {
- code: 0,
- data: 'calleeCheckCallParam',
- parameters: {
- num: recvSequence.num,
- str: recvSequence.str,
- result: result
- }
- }
- commonEvent.publish('CallTest', commonEventData, (err) => {
- console.log('======>CallTestSysA ForthAbility Call_Finish<======')
- })
- return recvSequence;
-}
-
-function testCallWithResult(data) {
- let recvSequence = new MySequenceable(0, '', '');
- console.log('======>SystemCallTest ForthAbility on testCall <======')
- data.readSequenceable(recvSequence);
- let result = recvSequence.str + 'processed';
- recvSequence.setMySequence(recvSequence.num, recvSequence.str, result);
-
- return recvSequence;
-}
-
-export default class ForthAbility extends Ability {
- onCreate(want, launchParam) {
- // Ability is creating, initialize resources for this ability
- console.log("SystemCallTest ForthAbility onCreate")
- globalThis.abilityWant = want;
- this.callee.on('testCall', testCall);
- this.callee.on('testCallWithResult', testCallWithResult);
- }
-
- onDestroy() {
- // Ability is destroying, release resources for this ability
- console.log("SystemCallTest ForthAbility onDestroy")
- }
-
- onWindowStageCreate(windowStage) {
- // Main window is created, set main page for this ability
- console.log("SystemCallTest ForthAbility onWindowStageCreate")
- windowStage.setUIContent(this.context, "pages/second/second", null)
- }
-
- onWindowStageDestroy() {
- // Main window is destroyed, release UI related resources
- console.log("SystemCallTest ForthAbility onWindowStageDestroy")
- }
-
- onForeground() {
- // Ability has brought to foreground
- console.log("SystemCallTest ForthAbility onForeground")
- if ((globalThis.abilityWant.parameters.case_num == "case1300") ||
- (globalThis.abilityWant.parameters.case_num == "case1400")) {
- var publishData = globalThis.abilityWant.parameters.case_num + "targetForeground";
- var commonEventData = {
- data: publishData,
- }
- commonEvent.publish('CallTest', commonEventData, (err) => {
- console.log('======>SystemAppCallerA ForthAbility Call_Finish<======')
- })
- }
- }
-
- onBackground() {
- // Ability has back to background
- console.log("SystemCallTest ForthAbility onBackground")
- }
-};
diff --git a/aafwk/aafwk_standard/actscalltest/thirdcalltest/entry/src/main/ets/SecondAbility/SecondAbility.ts b/aafwk/aafwk_standard/actscalltest/thirdcalltest/entry/src/main/ets/SecondAbility/SecondAbility.ts
deleted file mode 100755
index 8438a2192682cacd7ba4f2c14ef5a0136517fad2..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/actscalltest/thirdcalltest/entry/src/main/ets/SecondAbility/SecondAbility.ts
+++ /dev/null
@@ -1,124 +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.application.Ability'
-import commonEvent from '@ohos.commonEvent'
-
-class MySequenceable {
- num: number = 0;
- str: String = "";
- result: String = "";
-
- constructor(num, string, result) {
- this.num = num;
- this.str = string;
- this.result = result;
- }
-
- setMySequence(num, string, result) {
- this.num = num;
- this.str = string;
- this.result = result;
- }
-
- marshalling(messageParcel) {
- messageParcel.writeInt(this.num);
- messageParcel.writeString(this.str);
- messageParcel.writeString(this.result);
- return true;
- }
-
- unmarshalling(messageParcel) {
- this.num = messageParcel.readInt();
- this.str = messageParcel.readString();
- this.result = messageParcel.readString();
- return true;
- }
-}
-
-function testCall(data) {
- let recvSequence = new MySequenceable(0, '', '');
- console.log('======>SystemCallTest SecondAbility on testCall <======')
- data.readSequenceable(recvSequence);
- var result = recvSequence.str + 'processed';
- var commonEventData = {
- code: 0,
- data: 'calleeCheckCallParam',
- parameters: {
- num: recvSequence.num,
- str: recvSequence.str,
- result: result
- }
- }
- commonEvent.publish('CallTest', commonEventData, (err) => {
- console.log('======>CallTestSysA SecondAbility Call_Finish<======')
- })
- return recvSequence;
-}
-
-function testCallWithResult(data) {
- let recvSequence = new MySequenceable(0, '', '');
- console.log('======>SystemCallTest SecondAbility on testCall <======')
- data.readSequenceable(recvSequence);
- let result = recvSequence.str + 'processed';
- recvSequence.setMySequence(recvSequence.num, recvSequence.str, result);
-
- return recvSequence;
-}
-
-export default class SecondAbility extends Ability {
- onCreate(want, launchParam) {
- // Ability is creating, initialize resources for this ability
- console.log("SystemCallTest SecondAbility onCreate")
- globalThis.abilityWant = want;
- this.callee.on('testCall', testCall);
- this.callee.on('testCallWithResult', testCallWithResult);
- }
-
- onDestroy() {
- // Ability is destroying, release resources for this ability
- console.log("SystemCallTest SecondAbility onDestroy")
- }
-
- onWindowStageCreate(windowStage) {
- // Main window is created, set main page for this ability
- console.log("SystemCallTest SecondAbility onWindowStageCreate")
- windowStage.setUIContent(this.context, "pages/second/second", null)
- }
-
- onWindowStageDestroy() {
- // Main window is destroyed, release UI related resources
- console.log("SystemCallTest SecondAbility onWindowStageDestroy")
- }
-
- onForeground() {
- // Ability has brought to foreground
- console.log("SystemCallTest SecondAbility onForeground")
- if ((globalThis.abilityWant.parameters.case_num == "case1300") ||
- (globalThis.abilityWant.parameters.case_num == "case1400")) {
- var publishData = globalThis.abilityWant.parameters.case_num + "targetForeground";
- var commonEventData = {
- data: publishData,
- }
- commonEvent.publish('CallTest', commonEventData, (err) => {
- console.log('======>SystemAppCallerA SecondAbility Call_Finish<======')
- })
- }
- }
-
- onBackground() {
- // Ability has back to background
- console.log("SystemCallTest SecondAbility onBackground")
- }
-};
diff --git a/aafwk/aafwk_standard/actscalltest/thirdcalltest/entry/src/main/ets/ThirdAbility/ThirdAbility.ts b/aafwk/aafwk_standard/actscalltest/thirdcalltest/entry/src/main/ets/ThirdAbility/ThirdAbility.ts
deleted file mode 100755
index 4c0685e63f78b14ae70cec2340c95c852f52ba10..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/actscalltest/thirdcalltest/entry/src/main/ets/ThirdAbility/ThirdAbility.ts
+++ /dev/null
@@ -1,124 +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.application.Ability'
-import commonEvent from '@ohos.commonEvent'
-
-class MySequenceable {
- num: number = 0;
- str: String = "";
- result: String = "";
-
- constructor(num, string, result) {
- this.num = num;
- this.str = string;
- this.result = result;
- }
-
- setMySequence(num, string, result) {
- this.num = num;
- this.str = string;
- this.result = result;
- }
-
- marshalling(messageParcel) {
- messageParcel.writeInt(this.num);
- messageParcel.writeString(this.str);
- messageParcel.writeString(this.result);
- return true;
- }
-
- unmarshalling(messageParcel) {
- this.num = messageParcel.readInt();
- this.str = messageParcel.readString();
- this.result = messageParcel.readString();
- return true;
- }
-}
-
-function testCall(data) {
- let recvSequence = new MySequenceable(0, '', '');
- console.log('======>SystemCallTest ThirdAbility on testCall <======')
- data.readSequenceable(recvSequence);
- var result = recvSequence.str + 'processed';
- var commonEventData = {
- code: 0,
- data: 'calleeCheckCallParam',
- parameters: {
- num: recvSequence.num,
- str: recvSequence.str,
- result: result
- }
- }
- commonEvent.publish('CallTest', commonEventData, (err) => {
- console.log('======>CallTestSysA ThirdAbility Call_Finish<======')
- })
- return;
-}
-
-function testCallWithResult(data) {
- let recvSequence = new MySequenceable(0, '', '');
- console.log('======>SystemCallTest ThirdAbility on testCall <======')
- data.readSequenceable(recvSequence);
- let result = recvSequence.str + 'processed';
- recvSequence.setMySequence(recvSequence.num, recvSequence.str, result);
-
- return recvSequence;
-}
-
-export default class ThirdAbility extends Ability {
- onCreate(want, launchParam) {
- // Ability is creating, initialize resources for this ability
- console.log("SystemCallTest ThirdAbility onCreate")
- globalThis.abilityWant = want;
- this.callee.on('testCall', testCall);
- this.callee.on('testCallWithResult', testCallWithResult);
- }
-
- onDestroy() {
- // Ability is destroying, release resources for this ability
- console.log("SystemCallTest ThirdAbility onDestroy")
- }
-
- onWindowStageCreate(windowStage) {
- // Main window is created, set main page for this ability
- console.log("SystemCallTest ThirdAbility onWindowStageCreate")
- windowStage.setUIContent(this.context, "pages/second/second", null)
- }
-
- onWindowStageDestroy() {
- // Main window is destroyed, release UI related resources
- console.log("SystemCallTest ThirdAbility onWindowStageDestroy")
- }
-
- onForeground() {
- // Ability has brought to foreground
- console.log("SystemCallTest ThirdAbility onForeground")
- if ((globalThis.abilityWant.parameters.case_num == "case1300") ||
- (globalThis.abilityWant.parameters.case_num == "case1400")) {
- var publishData = globalThis.abilityWant.parameters.case_num + "targetForeground";
- var commonEventData = {
- data: publishData,
- }
- commonEvent.publish('CallTest', commonEventData, (err) => {
- console.log('======>SystemAppCallerA ThirdAbility Call_Finish<======')
- })
- }
- }
-
- onBackground() {
- // Ability has back to background
- console.log("SystemCallTest ThirdAbility onBackground")
- }
-};
diff --git a/aafwk/aafwk_standard/actscalltest/thirdcalltest/entry/src/main/ets/pages/index/index.ets b/aafwk/aafwk_standard/actscalltest/thirdcalltest/entry/src/main/ets/pages/index/index.ets
deleted file mode 100755
index 26746b5a84730dfe5b9220652170de21d515737f..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/actscalltest/thirdcalltest/entry/src/main/ets/pages/index/index.ets
+++ /dev/null
@@ -1,66 +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 {Core, ExpectExtend, InstrumentLog, ReportExtend} from "deccjsunit/index.ets"
-import testsuite from "../../test/List.test.ets"
-
-
-@Entry
-@Component
-struct Index {
-
- aboutToAppear(){
- console.info("start run testcase!!!!")
- const core = Core.getInstance()
- const expectExtend = new ExpectExtend({
- 'id': 'extend'
- })
- core.addService('expect', expectExtend)
- const reportExtend = new ReportExtend(file)
-
- core.addService('report', reportExtend)
- core.init()
- core.subscribeEvent('task', reportExtend)
- const configService = core.getDefaultService('config')
- console.info('parameters---->' + JSON.stringify(globalThis.abilityWant.parameters))
- globalThis.abilityWant.parameters.timeout = 10000;
- configService.setConfig(globalThis.abilityWant.parameters)
- testsuite(globalThis.abilityContext)
- core.execute()
- }
-
- build() {
- Flex({ direction:FlexDirection.Column, alignItems:ItemAlign.Center, justifyContent: FlexAlign.Center }) {
- Text('Hello World')
- .fontSize(50)
- .fontWeight(FontWeight.Bold)
- Button() {
- Text('next page')
- .fontSize(25)
- .fontWeight(FontWeight.Bold)
- }.type(ButtonType.Capsule)
- .margin({
- top: 20
- })
- .backgroundColor('#0D9FFB')
- .onClick(() => {
-
- })
- }
- .width('100%')
- .height('100%')
- }
-}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/actsfwkdataaccessortest/actsdataabilityrelyhap/entry/src/main/ets/TestDataAbility/data.ts b/aafwk/aafwk_standard/actsfwkdataaccessortest/actsdataabilityrelyhap/entry/src/main/ets/TestDataAbility/data.ts
deleted file mode 100644
index bc472bcb26f454ccd2a9413f3a69a9ee3526bb69..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/actsfwkdataaccessortest/actsdataabilityrelyhap/entry/src/main/ets/TestDataAbility/data.ts
+++ /dev/null
@@ -1,253 +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 dataAbility from '@ohos.data.dataability'
-import featureAbility from '@ohos.ability.featureAbility'
-import fileio from '@ohos.fileio'
-import dataRdb from '@ohos.data.rdb'
-
-const TABLE_NAME = 'book'
-const STORE_CONFIG = { name: 'book.db', encryptKey: new Uint8Array([]) }
-const SQL_CREATE_TABLE = 'CREATE TABLE IF NOT EXISTS book' +
- '(id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT NOT NULL, age INTEGER, introduction TEXT NOT NULL)'
-let rdbStore: any = undefined
-const TAG = 'ACTS_ DataAbility.data'
-
-let defaultReturn = 1;
-let returnError = 0;
-let returnError1 = -1;
-let returnError2 = -2;
-let returnError3 = -3;
-let dataAbilityUri = ("dataability:///com.example.myapplication.DataAbility");
-
-export default {
-
- onInitialized(abilityInfo) {
- console.debug('ACTS_ DataAbility onInitialized,abilityInfo=' + abilityInfo.bundleName)
- dataRdb.getRdbStore(STORE_CONFIG, 1, (err, store) => {
- console.debug('ACTS_ [data]getRdbStoreThen')
- store.executeSql(SQL_CREATE_TABLE, [])
- rdbStore = store
- });
- },
-
- insert(uri, valueBucket, callback) {
- console.debug(TAG + ' insert start 1121')
- console.debug(TAG + ' valueBucket json=>' + JSON.stringify(valueBucket))
-
- let err = "Error Uri"
- if (uri != dataAbilityUri) {
- console.debug(TAG + ' uri != dataAbilityUri')
- callback(err, returnError1);
- }
-
- console.debug(TAG + ' valueBucket.age =>' + valueBucket.age)
- console.debug(TAG + ' valueBucket.name =>' + valueBucket.name)
- console.debug(TAG + ' valueBucket.salary =>' + valueBucket.salary)
- if (valueBucket.age != 24) {
- err = "Error age"
- callback(err, returnError2);
- }
- if (valueBucket.name != "ActsDataAbilityHelperTest") {
- err = "Error name"
- callback(err, returnError2);
- }
- if (valueBucket.salary != 2024.20) {
- err = "Error salary"
- callback(err, returnError2);
- }
-
- err = "Error insert"
- console.debug(TAG + ' rdbStore.insert ')
- rdbStore.insert(TABLE_NAME, valueBucket, function (err, resultSet) {
- console.log(TAG + "insert callback resultSet:" + resultSet
- + " ,json=" + JSON.stringify(resultSet) + ' ,err' + err)
- callback(err, defaultReturn);
- })
- },
-
- query(uri, columns, predicates, callback) {
- console.debug(TAG + ' query start')
-
- let err = "Error Uri"
- if (uri != dataAbilityUri) {
- console.debug(TAG + ' uri != dataAbilityUri')
- callback(err, returnError1);
- }
-
- let rdbPredicates = dataAbility.createRdbPredicates(TABLE_NAME, predicates)
- rdbStore.query(rdbPredicates, columns, callback)
- },
-
- update(uri, valueBucket, predicates, callback) {
- console.debug(TAG + 'update start')
-
- let err = "Error Uri"
- if (uri != dataAbilityUri) {
- console.debug(TAG + ' uri != dataAbilityUri')
- callback(err, returnError1);
- }
-
- console.debug(TAG + ' valueBucket.age =>' + valueBucket.age)
- console.debug(TAG + ' valueBucket.name =>' + valueBucket.name)
- console.debug(TAG + ' valueBucket.salary =>' + valueBucket.salary)
- if (valueBucket.age != 24) {
- err = "Error age"
- callback(err, returnError2);
- }
- if (valueBucket.name != "ActsDataAbilityHelperTest") {
- err = "Error name"
- callback(err, returnError2);
- }
- if (valueBucket.salary != 2024.20) {
- err = "Error salary"
- callback(err, returnError2);
- }
-
- err = "Error update"
- let rdbPredicates = dataAbility.createRdbPredicates(TABLE_NAME, predicates)
- rdbStore.update(valueBucket, rdbPredicates, function (err, resultSet) {
- console.log(TAG + "insert callback resultSet:" + resultSet
- + " ,json=" + JSON.stringify(resultSet) + ' ,err' + err)
- callback(err, defaultReturn);
- })
- },
-
- delete(uri, predicates, callback) {
- console.debug(TAG + 'delete start')
-
- let err = "Error Uri"
- if (uri != dataAbilityUri) {
- console.debug(TAG + ' uri != dataAbilityUri')
- callback(err, returnError1);
- }
-
- let rdbPredicates = dataAbility.createRdbPredicates(TABLE_NAME, predicates)
- rdbStore.delete(rdbPredicates, function (err, resultSet) {
- console.log(TAG + "insert callback resultSet:" + resultSet
- + " ,json=" + JSON.stringify(resultSet) + ' ,err' + err)
- callback(err, defaultReturn);
- })
- },
- call(uri, method, arg, extras, callback) {
- console.debug(TAG + 'call start')
- console.debug(TAG + 'uri---->' + uri)
- console.debug(TAG + 'method---->' + uri)
- },
-
- batchInsert(uri, values, callback) {
- let err = "Error Uri"
- if (uri != dataAbilityUri) {
- console.debug(TAG + ' uri != dataAbilityUri')
- callback(err, returnError1);
- }
-
- for (var j = 0; j < values.length; j++) {
- rdbStore.insert("EMPLOYEE", values[j], function (err, ret) {
- console.log(TAG + "batchInsert callback ret:" + JSON.stringify(ret))
- })
- }
- console.log(TAG + "batchInsert values.length:" + values.length + ' ,json=' + JSON.stringify(values.length))
- callback(err, values.length);
- },
-
- getType(uri, callback) {
- console.info(TAG + '==================== DataAbility test interface by getType ================');
- let err = "Error Uri"
- if (uri != dataAbilityUri) {
- console.debug(TAG + ' uri != dataAbilityUri')
- callback(err, returnError1);
- }
- callback("success", uri);
- },
-
- getFileTypes(uri, mimeTypeFilter, callback) {
- console.info(TAG + '==================== DataAbility test interface by GetFileTypes ================');
- let err = "Error Uri"
- if (uri != dataAbilityUri) {
- console.debug(TAG + ' uri != dataAbilityUri')
- callback(err, returnError1);
- }
- let type1 = " ";
- let type2 = " ";
- let type3 = " ";
- let types;
- if (mimeTypeFilter == "*/*") {
- type1 = ("hap");
- type2 = ("jpg");
- type3 = ("image/png");
- types = [type1, type2, type3];
- } else if (mimeTypeFilter == "image/*") {
- type1 = ("image/png");
- types = [type1];
- } else if (mimeTypeFilter == "*/jpg") {
- type1 = ("jpg");
- types = [type1];
- }
-
- console.log(TAG + "GetFileTypes callback ret:" + JSON.stringify(types))
- callback("success", types);
- },
-
- openFile(uri, mode, callback) {
- console.info(TAG + '==================== DataAbility test interface by openFile ================');
- let defaultReturn = 1;
- let returnError1 = -1;
-
- let err = "Error Uri"
- if (uri != dataAbilityUri) {
- console.debug(TAG + ' uri != dataAbilityUri')
- callback(err, returnError1);
- }
- if (!(mode == ("r") || mode == ("w") || mode == ("wt") || mode == ("wa") ||
- mode == ("rw") || mode == ("rwt"))) {
- if (mode == ("A1@k#4%$,.<>)(oioiu*((*&(&*giIGT^%&^Ug;sdfk;losd*7873iug8%&^$&%]ERFUy&^%&&R7")) {
- defaultReturn = returnError2;
- } else
- defaultReturn = returnError3;
- }
- console.info(TAG + " path = /data/test ");
- let path = "/data/test"
- fileio.stat(path).then(function (stat) {
- console.info(TAG + "openFile getFileInfo successfully callback ret:" + JSON.stringify(stat));
- }).catch(function (err) {
- console.info(TAG + "openFile getFileInfo failed with error callback ret:" + err);
- defaultReturn = returnError1;
- });
- console.info(TAG + " path ==>" + path);
- callback("success", defaultReturn);
- },
-
- normalizeUri(uri, callback) {
- console.info(TAG + '==================== DataAbility test interface by normalizeUri ================');
- let err = "Error Uri"
- if (uri != dataAbilityUri) {
- console.debug(TAG + ' uri != dataAbilityUri')
- callback(err, "");
- }
- callback("success", uri);
- },
-
- denormalizeUri(uri, callback) {
- console.info(TAG + '==================== DataAbility test interface by denormalizeUri ================');
- console.info(TAG + "denormalizeUri uri:" + JSON.stringify(uri));
-
- let err = "Error Uri"
- if (uri != dataAbilityUri) {
- console.debug(TAG + ' uri != dataAbilityUri')
- callback(err, "");
- }
- callback("success", uri);
- }
-};
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/actsfwkdataaccessortest/actsdataabilityrelyhap/entry/src/main/ets/TestDataAbility2/data.ts b/aafwk/aafwk_standard/actsfwkdataaccessortest/actsdataabilityrelyhap/entry/src/main/ets/TestDataAbility2/data.ts
deleted file mode 100644
index 1efa7ced163d2d4edca3c4b7ad3c695babb1a888..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/actsfwkdataaccessortest/actsdataabilityrelyhap/entry/src/main/ets/TestDataAbility2/data.ts
+++ /dev/null
@@ -1,253 +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 dataAbility from '@ohos.data.dataability'
-import featureAbility from '@ohos.ability.featureAbility'
-import fileio from '@ohos.fileio'
-import dataRdb from '@ohos.data.rdb'
-
-const TABLE_NAME = 'book'
-const STORE_CONFIG = { name: 'book.db', encryptKey: new Uint8Array([]) }
-const SQL_CREATE_TABLE = 'CREATE TABLE IF NOT EXISTS book' +
- '(id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT NOT NULL, age INTEGER, introduction TEXT NOT NULL)'
-let rdbStore: any = undefined
-const TAG = 'ACTS_ DataAbility.data'
-
-let defaultReturn = 1;
-let returnError = 0;
-let returnError1 = -1;
-let returnError2 = -2;
-let returnError3 = -3;
-let dataAbilityUri = ("dataability:///com.example.myapplication.DataAbility2");
-
-export default {
-
- onInitialized(abilityInfo) {
- console.debug('ACTS_ DataAbility onInitialized,abilityInfo=' + abilityInfo.bundleName)
- dataRdb.getRdbStore(STORE_CONFIG, 1, (err, store) => {
- console.debug('ACTS_ [data]getRdbStoreThen')
- store.executeSql(SQL_CREATE_TABLE, [])
- rdbStore = store
- });
- },
-
- insert(uri, valueBucket, callback) {
- console.debug(TAG + ' insert start 1121')
- console.debug(TAG + ' valueBucket json=>' + JSON.stringify(valueBucket))
-
- let err = "Error Uri"
- if (uri != dataAbilityUri) {
- console.debug(TAG + ' uri != dataAbilityUri')
- callback(err, returnError1);
- }
-
- console.debug(TAG + ' valueBucket.age =>' + valueBucket.age)
- console.debug(TAG + ' valueBucket.name =>' + valueBucket.name)
- console.debug(TAG + ' valueBucket.salary =>' + valueBucket.salary)
- if (valueBucket.age != 24) {
- err = "Error age"
- callback(err, returnError2);
- }
- if (valueBucket.name != "ActsDataAbilityHelperTest") {
- err = "Error name"
- callback(err, returnError2);
- }
- if (valueBucket.salary != 2024.20) {
- err = "Error salary"
- callback(err, returnError2);
- }
-
- err = "Error insert"
- console.debug(TAG + ' rdbStore.insert ')
- rdbStore.insert(TABLE_NAME, valueBucket, function (err, resultSet) {
- console.log(TAG + "insert callback resultSet:" + resultSet
- + " ,json=" + JSON.stringify(resultSet) + ' ,err' + err)
- callback(err, defaultReturn);
- })
- },
-
- query(uri, columns, predicates, callback) {
- console.debug(TAG + ' query start')
-
- let err = "Error Uri"
- if (uri != dataAbilityUri) {
- console.debug(TAG + ' uri != dataAbilityUri')
- callback(err, returnError1);
- }
-
- let rdbPredicates = dataAbility.createRdbPredicates(TABLE_NAME, predicates)
- rdbStore.query(rdbPredicates, columns, callback)
- },
-
- update(uri, valueBucket, predicates, callback) {
- console.debug(TAG + 'update start')
-
- let err = "Error Uri"
- if (uri != dataAbilityUri) {
- console.debug(TAG + ' uri != dataAbilityUri')
- callback(err, returnError1);
- }
-
- console.debug(TAG + ' valueBucket.age =>' + valueBucket.age)
- console.debug(TAG + ' valueBucket.name =>' + valueBucket.name)
- console.debug(TAG + ' valueBucket.salary =>' + valueBucket.salary)
- if (valueBucket.age != 24) {
- err = "Error age"
- callback(err, returnError2);
- }
- if (valueBucket.name != "ActsDataAbilityHelperTest") {
- err = "Error name"
- callback(err, returnError2);
- }
- if (valueBucket.salary != 2024.20) {
- err = "Error salary"
- callback(err, returnError2);
- }
-
- err = "Error update"
- let rdbPredicates = dataAbility.createRdbPredicates(TABLE_NAME, predicates)
- rdbStore.update(valueBucket, rdbPredicates, function (err, resultSet) {
- console.log(TAG + "insert callback resultSet:" + resultSet
- + " ,json=" + JSON.stringify(resultSet) + ' ,err' + err)
- callback(err, defaultReturn);
- })
- },
-
- delete(uri, predicates, callback) {
- console.debug(TAG + 'delete start')
-
- let err = "Error Uri"
- if (uri != dataAbilityUri) {
- console.debug(TAG + ' uri != dataAbilityUri')
- callback(err, returnError1);
- }
-
- let rdbPredicates = dataAbility.createRdbPredicates(TABLE_NAME, predicates)
- rdbStore.delete(rdbPredicates, function (err, resultSet) {
- console.log(TAG + "insert callback resultSet:" + resultSet
- + " ,json=" + JSON.stringify(resultSet) + ' ,err' + err)
- callback(err, defaultReturn);
- })
- },
- call(uri, method, arg, extras, callback) {
- console.debug(TAG + 'call start')
- console.debug(TAG + 'uri---->' + uri)
- console.debug(TAG + 'method---->' + uri)
- },
-
- batchInsert(uri, values, callback) {
- let err = "Error Uri"
- if (uri != dataAbilityUri) {
- console.debug(TAG + ' uri != dataAbilityUri')
- callback(err, returnError1);
- }
-
- for (var j = 0; j < values.length; j++) {
- rdbStore.insert("EMPLOYEE", values[j], function (err, ret) {
- console.log(TAG + "batchInsert callback ret:" + JSON.stringify(ret))
- })
- }
- console.log(TAG + "batchInsert values.length:" + values.length + ' ,json=' + JSON.stringify(values.length))
- callback(err, values.length);
- },
-
- getType(uri, callback) {
- console.info(TAG + '==================== DataAbility test interface by getType ================');
- let err = "Error Uri"
- if (uri != dataAbilityUri) {
- console.debug(TAG + ' uri != dataAbilityUri')
- callback(err, returnError1);
- }
- callback("success", uri);
- },
-
- getFileTypes(uri, mimeTypeFilter, callback) {
- console.info(TAG + '==================== DataAbility test interface by GetFileTypes ================');
- let err = "Error Uri"
- if (uri != dataAbilityUri) {
- console.debug(TAG + ' uri != dataAbilityUri')
- callback(err, returnError1);
- }
- let type1 = " ";
- let type2 = " ";
- let type3 = " ";
- let types;
- if (mimeTypeFilter == "*/*") {
- type1 = ("hap");
- type2 = ("jpg");
- type3 = ("image/png");
- types = [type1, type2, type3];
- } else if (mimeTypeFilter == "image/*") {
- type1 = ("image/png");
- types = [type1];
- } else if (mimeTypeFilter == "*/jpg") {
- type1 = ("jpg");
- types = [type1];
- }
-
- console.log(TAG + "GetFileTypes callback ret:" + JSON.stringify(types))
- callback("success", types);
- },
-
- openFile(uri, mode, callback) {
- console.info(TAG + '==================== DataAbility test interface by openFile ================');
- let defaultReturn = 1;
- let returnError1 = -1;
-
- let err = "Error Uri"
- if (uri != dataAbilityUri) {
- console.debug(TAG + ' uri != dataAbilityUri')
- callback(err, returnError1);
- }
- if (!(mode == ("r") || mode == ("w") || mode == ("wt") || mode == ("wa") ||
- mode == ("rw") || mode == ("rwt"))) {
- if (mode == ("A1@k#4%$,.<>)(oioiu*((*&(&*giIGT^%&^Ug;sdfk;losd*7873iug8%&^$&%]ERFUy&^%&&R7")) {
- defaultReturn = returnError2;
- } else
- defaultReturn = returnError3;
- }
- console.info(TAG + " path = /data/test ");
- let path = "/data/test"
- fileio.stat(path).then(function (stat) {
- console.info(TAG + "openFile getFileInfo successfully callback ret:" + JSON.stringify(stat));
- }).catch(function (err) {
- console.info(TAG + "openFile getFileInfo failed with error callback ret:" + err);
- defaultReturn = returnError1;
- });
- console.info(TAG + " path ==>" + path);
- callback("success", defaultReturn);
- },
-
- normalizeUri(uri, callback) {
- console.info(TAG + '==================== DataAbility test interface by normalizeUri ================');
- let err = "Error Uri"
- if (uri != dataAbilityUri) {
- console.debug(TAG + ' uri != dataAbilityUri')
- callback(err, "");
- }
- callback("success", uri);
- },
-
- denormalizeUri(uri, callback) {
- console.info(TAG + '==================== DataAbility test interface by denormalizeUri ================');
- console.info(TAG + "denormalizeUri uri:" + JSON.stringify(uri));
-
- let err = "Error Uri"
- if (uri != dataAbilityUri) {
- console.debug(TAG + ' uri != dataAbilityUri')
- callback(err, "");
- }
- callback("success", uri);
- }
-};
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/actsfwkdataaccessortest/actsfwkdataaccessortest/entry/src/main/js/test/DataAbilityHelperJsSt.test.js b/aafwk/aafwk_standard/actsfwkdataaccessortest/actsfwkdataaccessortest/entry/src/main/js/test/DataAbilityHelperJsSt.test.js
deleted file mode 100644
index 0831dc042aaf302af040548463c7ae513a61dc87..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/actsfwkdataaccessortest/actsfwkdataaccessortest/entry/src/main/js/test/DataAbilityHelperJsSt.test.js
+++ /dev/null
@@ -1,8525 +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 featureAbility from '@ohos.ability.featureAbility'
-import ohosDataAbility from '@ohos.data.dataability'
-
-import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index'
-
-describe('ActsDataAbilityHelperTest', function () {
- let dataAbilityUri = ("dataability:///com.example.myapplication.DataAbility");
- let dataAbilityUri2 = ("dataability:///com.example.myapplication.DataAbility2");
- let dataAbilityUri3 = ("dataability:///com.example.myapplication.DataAbility3");
- let DAHelper;
- let gSetTimeout = 500;
- var valueBucket = {
- "name": "ActsDataAbilityHelperTest",
- "age": 24,
- "salary": 2024.20,
- }
-
- beforeAll(async (done) => {
- console.debug('= ACTS_beforeAll ====: ' + DAHelper + " ,JSON. " + JSON.stringify(DAHelper));
- if(DAHelper == null){
- console.debug('ACTS_beforeAll DAHelper ====>: DAHelper == null');
- }
- } catch (err) {
- console.error('=ACTS_beforeAll acquireDataAbilityHelper catch(err)====>:' + err);
- }
- console.debug('= ACTS_beforeAll ==== {
- console.debug('= ACTS_afterAll ====" + dataAbilityUri)
- try {
- var abilityHelper = featureAbility.acquireDataAbilityHelper(dataAbilityUri)
- console.log('ACTS_AcquireDataAbilityHelper_0100 abilityHelper ====>: '
- + abilityHelper + " ,JSON. " + JSON.stringify(abilityHelper))
- if(DAHelper == null){
- DAHelper = abilityHelper;
- }
- expect(typeof (abilityHelper)).assertEqual("object");
- } catch (err) {
- console.error('=ACTS_GetDataAbilityHelper_0100 acquireDataAbilityHelper catch(err)====>:' + err);
- expect(false).assertTrue();
- }
- done();
- console.log('ACTS_AcquireDataAbilityHelper_0100====: '
- + abilityHelper + " ,JSON. " + JSON.stringify(abilityHelper))
- expect(abilityHelper).assertEqual(null);
- } catch (err) {
- console.error('=ACTS_GetDataAbilityHelper_0200 acquireDataAbilityHelper catch(err)====>:' + err);
- expect(false).assertTrue();
- }
- done();
- console.log('ACTS_AcquireDataAbilityHelper_0200====: '
- + abilityHelper + " ,JSON. " + JSON.stringify(abilityHelper))
- expect(abilityHelper).assertEqual(null);
- } catch (err) {
- console.error('=ACTS_GetDataAbilityHelper_0300 acquireDataAbilityHelper catch(err)====>:' + err);
- expect(false).assertTrue();
- }
- done();
- console.log('ACTS_AcquireDataAbilityHelper_0300====: '
- + abilityHelper + " ,JSON. " + JSON.stringify(abilityHelper))
- expect(JSON.stringify(abilityHelper)).assertEqual("null");
- } catch (err) {
- console.error('=ACTS_GetDataAbilityHelper_0400 acquireDataAbilityHelper catch(err)====>:' + err);
- expect(false).assertTrue();
- }
- done();
- console.log('ACTS_AcquireDataAbilityHelper_0400====: '
- + abilityHelper + " ,JSON. " + JSON.stringify(abilityHelper))
- expect(JSON.stringify(abilityHelper)).assertEqual("null");
- } catch (err) {
- console.error('=ACTS_GetDataAbilityHelper_0500 acquireDataAbilityHelper catch(err)====>:' + err);
- expect(false).assertTrue();
- }
- done();
- console.log('ACTS_AcquireDataAbilityHelper_0500====: ' + DAHelper)
- let valueBucketM
- try {
- DAHelper.insert(dataAbilityUri, valueBucketM)
- .then(function (data) {
- console.debug("=ACTS_Insert_0100 then data====>"
- + ("json data 【") + JSON.stringify(data) + (" 】"));
- expect(data).assertEqual(-2);
- console.log('ACTS_Insert_0100===="
- + ("json err 【") + JSON.stringify(err) + (" 】 "));
- expect(false).assertTrue();
- console.log('ACTS_Insert_0100====:' + err);
- expect(false).assertTrue();
- console.log('ACTS_Insert_0100====: ' + DAHelper)
- let valueBucketM = 'undefined';
- try {
- await DAHelper.insert(dataAbilityUri, valueBucketM,
- (err, data) => {
- console.debug("=ACTS_Insert_0200 err,data=======>"
- + ("json err【") + JSON.stringify(err) + (" 】data【") + data + (" 】;"));
- expect(data).assertEqual(-2);
- console.log('ACTS_Insert_0200====:' + err);
- console.log('ACTS_Insert_0200==== {
- console.debug("=ACTS_Insert_0300 then data====>"
- + ("json data 【") + JSON.stringify(data) + (" 】"));
- expect(data).assertEqual(1);
- console.log('ACTS_Insert_0300==== {
- console.debug("=ACTS_Insert_0300 catch err ====>"
- + ("json err 【") + JSON.stringify(err) + (" 】 "));
- console.log('ACTS_Insert_0300====:' + err);
- console.log('ACTS_Insert_0300====: ' + DAHelper)
- try {
- await DAHelper.insert(dataAbilityUri, valueBucket,
- (err, data) => {
- console.debug("=ACTS_Insert_0400 err,data=======>"
- + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;"));
- expect(data).assertEqual(1);
- console.log('ACTS_Insert_0400====:' + err);
- console.log('ACTS_Insert_0400==== {
- console.debug("=ACTS_Insert_0500 then data====>"
- + ("json data 【") + JSON.stringify(data) + (" 】"));
- expect(data).assertEqual(0);
- console.log('ACTS_Insert_0500==== {
- console.debug("=ACTS_Insert_0500 catch err ====>"
- + ("json err 【") + JSON.stringify(err) + (" 】 "));
- console.log('ACTS_Insert_0500====:' + err);
- console.log('ACTS_Insert_0500====: ' + DAHelper)
- try {
- await DAHelper.insert(undefined, valueBucket,
- (err, data) => {
- console.debug("=ACTS_Insert_0600 err,data=======>"
- + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;"));
- expect(err.code).assertEqual(-1);
- expect(data).assertEqual(0);
- console.log('ACTS_Insert_0600====:' + err);
- console.log('ACTS_Insert_0600==== {
- console.debug("=ACTS_Insert_0700 then data====>"
- + ("json data 【") + JSON.stringify(data) + (" 】"));
- expect(data).assertEqual(1);
-
- currentAlertTimeout = setTimeout(() => {
- console.log('ACTS_Insert_0700==== {
- console.debug("=ACTS_Insert_0700 catch err ====>"
- + ("json err 【") + JSON.stringify(err) + (" 】 "));
- console.log('ACTS_Insert_0700====:' + err);
- console.log('ACTS_Insert_0700====: ' + DAHelper)
- var currentAlertTimeout;
- try {
- function onAsyncCallbackInsert0800(err) {
- clearTimeout(currentAlertTimeout);
- expect(err.code).assertEqual(0);
- console.log('ACTS_Insert_0800==== {
- console.debug("=ACTS_Insert_0800 err,data=======>"
- + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;"));
- expect(data).assertEqual(1);
-
- currentAlertTimeout = setTimeout(() => {
- console.log('ACTS_Insert_0800====:' + err);
- console.log('ACTS_Insert_0800==== {
- console.debug("=ACTS_Insert_0900 then data====>"
- + ("json data 【") + JSON.stringify(data) + (" 】"));
- expect(data).assertEqual(0);
- console.log('ACTS_Insert_0900==== {
- console.debug("=ACTS_Insert_0900 catch err ====>"
- + ("json err 【") + JSON.stringify(err) + (" 】 "));
- console.log('ACTS_Insert_0900====:' + err);
- console.log('ACTS_Insert_0900====: ' + DAHelper)
- try {
- await DAHelper.insert(123456, valueBucket,
- (err, data) => {
- console.debug("=ACTS_Insert_1000 err,data=======>"
- + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;"));
- expect(err.code).assertEqual(-1);
- expect(data).assertEqual(0);
- console.log('ACTS_Insert_1000====:' + err);
- console.log('ACTS_Insert_1000==== {
- console.debug("=ACTS_Insert_1100 then data====>"
- + ("json data 【") + JSON.stringify(data) + (" 】"));
- expect(data).assertEqual(-1);
- console.log('ACTS_Insert_1100==== {
- console.debug("=ACTS_Insert_1100 catch err ====>"
- + ("json err 【") + JSON.stringify(err) + (" 】 "));
- console.log('ACTS_Insert_1100====:' + err);
- console.log('ACTS_Insert_1100====: ' + DAHelper)
- try {
- await DAHelper.insert(dataAbilityUri2, valueBucket,
- (err, data) => {
- console.debug("=ACTS_Insert_1200 err,data=======>"
- + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;"));
- expect(data).assertEqual(-1);
- console.log('ACTS_Insert_1200====:' + err);
- console.log('ACTS_Insert_1200==== {
- console.debug("=ACTS_Insert_1300 then data====>"
- + ("json data 【") + JSON.stringify(data) + (" 】"));
- expect(data).assertEqual(-1);
- console.log('ACTS_Insert_1300==== {
- console.debug("=ACTS_Insert_1300 catch err ====>"
- + ("json err 【") + JSON.stringify(err) + (" 】 "));
- console.log('ACTS_Insert_1300====:' + err);
- console.log('ACTS_Insert_1300====: ' + DAHelper)
- try {
- await DAHelper.insert("errorUri", valueBucket,
- (err, data) => {
- console.debug("=ACTS_Insert_1400 err,data=======>"
- + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;"));
- expect(data).assertEqual(-1);
- console.log('ACTS_Insert_1400====:' + err);
- console.log('ACTS_Insert_1400==== {
- console.debug("=ACTS_Insert_1500 then data====>"
- + ("json data 【") + JSON.stringify(data) + (" 】"));
- expect(data).assertEqual(-2);
- console.log('ACTS_Insert_1500==== {
- console.debug("=ACTS_Insert_1500 catch err ====>"
- + ("json err 【") + JSON.stringify(err) + (" 】 "));
- console.log('ACTS_Insert_1500====:' + err);
- console.log('ACTS_Insert_1500====: ' + DAHelper)
- var valueBucketK = {};
- try {
- await DAHelper.insert(dataAbilityUri, valueBucketK,
- (err, data) => {
- console.debug("=ACTS_Insert_1600 err,data=======>"
- + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;"));
- expect(data).assertEqual(-2);
- console.log('ACTS_Insert_1600====:' + err);
- console.log('ACTS_Insert_1600====: ' + DAHelper)
- var valueBucketM;
- try {
- DAHelper.batchInsert(
- dataAbilityUri,
- valueBucketM
- ).then((data) => {
- console.debug("=ACTS_BatchInsert_0100 then data====>"
- + ("json data 【") + JSON.stringify(data) + (" 】; ====>"));
- expect(data).assertEqual(0);
- console.log('ACTS_BatchInsert_0100==== {
- console.debug("=ACTS_BatchInsert_0100 catch err ====>"
- + ("json err 【") + JSON.stringify(err) + (" 】 "));
- console.log('ACTS_BatchInsert_0100====:' + err);
- console.log('ACTS_BatchInsert_0100====: ' + DAHelper)
- var valueBucketM;
- try {
- await DAHelper.batchInsert(
- dataAbilityUri,
- valueBucketM,
- (err, data) => {
- console.debug("=ACTS_BatchInsert_0200 err,data=======>"
- + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;"));
- expect(data).assertEqual(0);
- console.log('ACTS_BatchInsert_0200====:' + err);
- console.log('ACTS_BatchInsert_0200====: ' + DAHelper)
- var valueBucketArray = new Array({}, {}, {})
- try {
- DAHelper.batchInsert(
- dataAbilityUri,
- valueBucketArray,
- ).then((data) => {
- console.debug("=ACTS_BatchInsert_0300 then data====>"
- + ("json data 【") + JSON.stringify(data) + (" 】; ====>"));
- expect(data).assertEqual(3);
- console.log('ACTS_BatchInsert_0300==== {
- console.debug("=ACTS_BatchInsert_0300 catch err ====>"
- + ("json err 【") + JSON.stringify(err) + (" 】 "));
- console.log('ACTS_BatchInsert_0300====:' + err);
- console.log('ACTS_BatchInsert_0300====: ' + DAHelper)
- var valueBucketArray = new Array({}, {}, {})
- try {
- await DAHelper.batchInsert(
- dataAbilityUri,
- valueBucketArray,
- (err, data) => {
- console.debug("=ACTS_BatchInsert_0400 err,data=======>"
- + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;"));
- expect(data).assertEqual(3);
- console.log('ACTS_BatchInsert_0400====:' + err);
- console.log('ACTS_BatchInsert_0400====: ' + DAHelper)
- try {
- var valueBucketArray = new Array({ "name": "ActsDataAbilityHelperTest", "age": 24, "salary": 2024.20, },
- { "name": "ActsDataAbilityHelperTest", "age": 24, "salary": 2024.20, },
- { "name": "ActsDataAbilityHelperTest", "age": 24, "salary": 2024.20, })
-
- DAHelper.batchInsert(
- dataAbilityUri,
- valueBucketArray,
- ).then((data) => {
- console.debug("=ACTS_BatchInsert_0500 BatchInsert Promise then data====>"
- + ("json data 【") + JSON.stringify(data) + (" 】"));
- expect(data).assertEqual(3);
- console.log('ACTS_BatchInsert_0500==== {
- console.debug("=ACTS_BatchInsert_0500 BatchInsert Promise catch err ====>"
- + ("json err 【") + JSON.stringify(err) + (" 】 "));
- console.log('ACTS_BatchInsert_0500====:' + err);
- console.log('ACTS_BatchInsert_0500====: ' + DAHelper)
- var valueBucketArray = new Array({ "name": "ActsDataAbilityHelperTest", "age": 24, "salary": 2024.20, },
- { "name": "ActsDataAbilityHelperTest", "age": 24, "salary": 2024.20, },
- { "name": "ActsDataAbilityHelperTest", "age": 24, "salary": 2024.20, })
- try {
- await DAHelper.batchInsert(
- dataAbilityUri,
- valueBucketArray,
- (err, data) => {
- console.debug("=ACTS_BatchInsert_0600 err,data=======>"
- + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;"));
- expect(data).assertEqual(3);
- console.log('ACTS_BatchInsert_0600====:' + err);
- console.log('ACTS_BatchInsert_0600====: ' + DAHelper)
- try {
- var valueBucketArray = new Array({ "name": "ActsDataAbilityHelperTest", "age": 24, "salary": 2024.20, },
- { "name": "ActsDataAbilityHelperTest", "age": 24, "salary": 2024.20, },
- { "name": "ActsDataAbilityHelperTest", "age": 24, "salary": 2024.20, })
-
- DAHelper.batchInsert(
- dataAbilityUri2,
- valueBucketArray,
- ).then((data) => {
- console.debug("=ACTS_BatchInsert_0700 BatchInsert Promise then data====>"
- + ("json data 【") + JSON.stringify(data) + (" 】"));
- expect(data).assertEqual(-1);
- console.log('ACTS_BatchInsert_0700==== {
- console.debug("=ACTS_BatchInsert_0700 BatchInsert Promise catch err ====>"
- + ("json err 【") + JSON.stringify(err) + (" 】 "));
- console.log('ACTS_BatchInsert_0700====:' + err);
- console.log('ACTS_BatchInsert_0700====: ' + DAHelper)
- var valueBucketArray = new Array({ "name": "ActsDataAbilityHelperTest", "age": 24, "salary": 2024.20, },
- { "name": "ActsDataAbilityHelperTest", "age": 24, "salary": 2024.20, },
- { "name": "ActsDataAbilityHelperTest", "age": 24, "salary": 2024.20, })
- try {
- await DAHelper.batchInsert(
- dataAbilityUri2,
- valueBucketArray,
- (err, data) => {
- console.debug("=ACTS_BatchInsert_0800 err,data=======>"
- + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;"));
- expect(data).assertEqual(-1);
- console.log('ACTS_BatchInsert_0800====:' + err);
- console.log('ACTS_BatchInsert_0800====: ' + DAHelper)
- try {
- var valueBucketArray = new Array({ "name": "ActsDataAbilityHelperTest", "age": 24, "salary": 2024.20, },
- { "name": "ActsDataAbilityHelperTest", "age": 24, "salary": 2024.20, },
- { "name": "ActsDataAbilityHelperTest", "age": 24, "salary": 2024.20, })
-
- DAHelper.batchInsert(
- undefined,
- valueBucketArray,
- ).then((data) => {
- console.debug("=ACTS_BatchInsert_0900 BatchInsert Promise then data====>"
- + ("json data 【") + JSON.stringify(data) + (" 】"));
- expect(data).assertEqual(0);
- console.log('ACTS_BatchInsert_0900==== {
- console.debug("=ACTS_BatchInsert_0900 BatchInsert Promise catch err ====>"
- + ("json err 【") + JSON.stringify(err) + (" 】 "));
- console.log('ACTS_BatchInsert_0900====:' + err);
- console.log('ACTS_BatchInsert_0900====: ' + DAHelper)
- var valueBucketArray = new Array({ "name": "ActsDataAbilityHelperTest", "age": 24, "salary": 2024.20, },
- { "name": "ActsDataAbilityHelperTest", "age": 24, "salary": 2024.20, },
- { "name": "ActsDataAbilityHelperTest", "age": 24, "salary": 2024.20, })
- try {
- await DAHelper.batchInsert(
- undefined,
- valueBucketArray,
- (err, data) => {
- console.debug("=ACTS_BatchInsert_1000 err,data=======>"
- + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;"));
- expect(err.code).assertEqual(-1);
- console.log('ACTS_BatchInsert_1000====:' + err);
- console.log('ACTS_BatchInsert_1000====: ' + DAHelper)
- try {
- var valueBucketArray = new Array({ "name": "ActsDataAbilityHelperTest", "age": 24, "salary": 2024.20, },
- { "name": "ActsDataAbilityHelperTest", "age": 24, "salary": 2024.20, },
- { "name": "ActsDataAbilityHelperTest", "age": 24, "salary": 2024.20, })
-
- DAHelper.batchInsert(
- "error",
- valueBucketArray,
- ).then((data) => {
- console.debug("=ACTS_BatchInsert_1100 BatchInsert Promise then data====>"
- + ("json data 【") + JSON.stringify(data) + (" 】"));
- expect(data).assertEqual(-1);
- console.log('ACTS_BatchInsert_1100==== {
- console.debug("=ACTS_BatchInsert_1100 BatchInsert Promise catch err ====>"
- + ("json err 【") + JSON.stringify(err) + (" 】 "));
- console.log('ACTS_BatchInsert_1100====:' + err);
- console.log('ACTS_BatchInsert_1100====: ' + DAHelper)
- var valueBucketArray = new Array({ "name": "ActsDataAbilityHelperTest", "age": 24, "salary": 2024.20, },
- { "name": "ActsDataAbilityHelperTest", "age": 24, "salary": 2024.20, },
- { "name": "ActsDataAbilityHelperTest", "age": 24, "salary": 2024.20, })
- try {
- await DAHelper.batchInsert(
- "error",
- valueBucketArray,
- (err, data) => {
- console.debug("=ACTS_BatchInsert_1200 err,data=======>"
- + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;"));
- expect(data).assertEqual(-1);
- console.log('ACTS_BatchInsert_1200====:' + err);
- console.log('ACTS_BatchInsert_1200====: ' + DAHelper)
- try {
- var valueBucketArray = new Array({ "name": "ActsDataAbilityHelperTest", "age": 24, "salary": 2024.20, },
- { "name": "ActsDataAbilityHelperTest", "age": 24, "salary": 2024.20, },
- { "name": "ActsDataAbilityHelperTest", "age": 24, "salary": 2024.20, })
-
- DAHelper.batchInsert(
- 123456,
- valueBucketArray,
- ).then((data) => {
- console.debug("=ACTS_BatchInsert_1300 BatchInsert Promise then data====>"
- + ("json data 【") + JSON.stringify(data) + (" 】"));
- expect(data).assertEqual(0);
- console.log('ACTS_BatchInsert_1300==== {
- console.debug("=ACTS_BatchInsert_1300 BatchInsert Promise catch err ====>"
- + ("json err 【") + JSON.stringify(err) + (" 】 "));
- console.log('ACTS_BatchInsert_1300====:' + err);
- console.log('ACTS_BatchInsert_1300====: ' + DAHelper)
- var valueBucketArray = new Array({ "name": "ActsDataAbilityHelperTest", "age": 24, "salary": 2024.20, },
- { "name": "ActsDataAbilityHelperTest", "age": 24, "salary": 2024.20, },
- { "name": "ActsDataAbilityHelperTest", "age": 24, "salary": 2024.20, })
- try {
- await DAHelper.batchInsert(
- 123456,
- valueBucketArray,
- (err, data) => {
- console.debug("=ACTS_BatchInsert_1400 err,data=======>"
- + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;"));
- expect(err.code).assertEqual(-1);
- console.log('ACTS_BatchInsert_1400====:' + err);
- console.log('ACTS_BatchInsert_1400====: ' + DAHelper)
- try {
- DAHelper.batchInsert(
- dataAbilityUri,
- valueBucket,
- ).then((data) => {
- console.debug("=ACTS_BatchInsert_1500 BatchInsert Promise then data====>"
- + ("json data 【") + JSON.stringify(data) + (" 】"));
- expect(data).assertEqual(0);
- console.log('ACTS_BatchInsert_1500==== {
- console.debug("=ACTS_BatchInsert_1500 BatchInsert Promise catch err ====>"
- + ("json err 【") + JSON.stringify(err) + (" 】 "));
- console.log('ACTS_BatchInsert_1500====:' + err);
- console.log('ACTS_BatchInsert_1500====: ' + DAHelper)
- try {
- await DAHelper.batchInsert(
- dataAbilityUri,
- valueBucket,
- (err, data) => {
- console.debug("=ACTS_BatchInsert_1600 err,data=======>"
- + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;"));
- expect(data).assertEqual(0);
- console.log('ACTS_BatchInsert_1600====:' + err);
- console.log('ACTS_BatchInsert_1600===="
- + ("json queryPromise 【") + JSON.stringify(queryPromise) + (" 】 ") + " , " + queryPromise);
- expect(typeof (queryPromise)).assertEqual("object");
- console.log('ACTS_Query_0100====:' + err);
- console.log('ACTS_Query_0100==== {
- console.debug("=ACTS_Query_0200 query err,data=======>"
- + ("json err【") + JSON.stringify(err) + (" 】json data【")
- + JSON.stringify(data) + (" 】;") + " , " + data);
- expect(typeof (data)).assertEqual("object");
- console.log('ACTS_Query_0200====:' + err);
- console.log('ACTS_Query_0200===="
- + ("json queryPromise 【") + JSON.stringify(queryPromise) + (" 】 ") + " , " + queryPromise);
- expect(typeof (queryPromise)).assertEqual("object");
- console.log('ACTS_Query_0300====:' + err);
- console.log('ACTS_Query_0300==== {
- console.debug("=ACTS_Query_0400 query err,data=======>"
- + ("json err【") + JSON.stringify(err) + (" 】json data【")
- + JSON.stringify(data) + (" 】;") + " , " + data);
- expect(typeof (data)).assertEqual("object");
- console.log('ACTS_Query_0400====:' + err);
- console.log('ACTS_Query_0400===="
- + ("json queryPromise 【") + JSON.stringify(queryPromise) + (" 】 ") + " , " + queryPromise);
- expect(typeof (queryPromise)).assertEqual("object");
- console.log('ACTS_Query_0500====:' + err);
- console.log('ACTS_Query_0500==== {
- console.debug("=ACTS_Query_0600 query err,data=======>"
- + ("json err【") + JSON.stringify(err) + (" 】json data【")
- + JSON.stringify(data) + (" 】;") + " , " + data);
- expect(typeof (data)).assertEqual("object");
- console.log('ACTS_Query_0600====:' + err);
- console.log('ACTS_Query_0600===="
- + ("json queryPromise 【") + JSON.stringify(queryPromise) + (" 】 ") + " , " + queryPromise);
- expect(typeof (queryPromise)).assertEqual("object");
- console.log('ACTS_Query_0700====:' + err);
- console.log('ACTS_Query_0700==== {
- console.debug("=ACTS_Query_0800 query err,data=======>"
- + ("json err【") + JSON.stringify(err) + (" 】json data【")
- + JSON.stringify(data) + (" 】;") + " , " + data);
- expect(typeof (data)).assertEqual("object");
- console.log('ACTS_Query_0800====:' + err);
- console.log('ACTS_Query_0800===="
- + ("json queryPromise 【") + JSON.stringify(queryPromise) + (" 】 ") + " , " + queryPromise);
- expect(typeof (queryPromise)).assertEqual("object");
- console.log('ACTS_Query_0900====:' + err);
- console.log('ACTS_Query_0900==== {
- console.debug("=ACTS_Query_1000 query err,data=======>"
- + ("json err【") + JSON.stringify(err) + (" 】json data【")
- + JSON.stringify(data) + (" 】;") + " , " + data);
- expect(typeof (data)).assertEqual("object");
- console.log('ACTS_Query_1000====:' + err);
- console.log('ACTS_Query_1000===="
- + ("json queryPromise 【") + JSON.stringify(queryPromise) + (" 】 ") + " , " + queryPromise);
- expect(typeof (queryPromise)).assertEqual("object");
- console.log('ACTS_Query_1100====:' + err);
- console.log('ACTS_Query_1100==== {
- console.debug("=ACTS_Query_1200 query err,data=======>"
- + ("json err【") + JSON.stringify(err) + (" 】json data【")
- + JSON.stringify(data) + (" 】;") + " , " + data);
- expect(typeof (data)).assertEqual("object");
- console.log('ACTS_Query_1200====:' + err);
- console.log('ACTS_Query_1200===="
- + ("json queryPromise 【") + JSON.stringify(queryPromise) + (" 】 ") + " , " + queryPromise);
- expect(typeof (queryPromise)).assertEqual("object");
- console.log('ACTS_Query_1300====:' + err);
- console.log('ACTS_Query_1300==== {
- console.debug("=ACTS_Query_1400 query err,data=======>"
- + ("json err【") + JSON.stringify(err) + (" 】json data【")
- + JSON.stringify(data) + (" 】;") + " , " + data);
- expect(typeof (data)).assertEqual("object");
- console.log('ACTS_Query_1400====:' + err);
- console.log('ACTS_Query_1400====: ' + DAHelper)
- try {
- let valueBucketNull = {};
- let predicates = new ohosDataAbility.DataAbilityPredicates();
- console.debug("=ACTS_Update_0100 predicates====>"
- + ("json predicates 【") + JSON.stringify(predicates) + (" 】") + " , " + predicates);
- DAHelper.update(
- dataAbilityUri,
- valueBucketNull,
- predicates
- ).then((data) => {
- console.debug("=ACTS_Update_0100 then data====>"
- + ("json data 【") + JSON.stringify(data) + (" 】"));
- expect(data).assertEqual(-2);
- console.log('ACTS_Update_0100==== {
- console.debug("=ACTS_Update_0100 catch err ====>"
- + ("json err 【") + JSON.stringify(err) + (" 】 "));
- expect(false).assertTrue();
- console.log('ACTS_Update_0100====:' + err);
- expect(false).assertTrue();
- console.log('ACTS_Update_0100===="
- + ("json predicates 【") + JSON.stringify(predicates) + (" 】") + " , " + predicates);
- await DAHelper.update(
- dataAbilityUri,
- valueBucketNull,
- predicates,
- (err, data) => {
- console.debug("=ACTS_Update_0200 err,data=======>"
- + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;"));
- expect(data).assertEqual(-2);
- console.log('ACTS_Update_0200====:' + err);
- expect(false).assertTrue();
- console.log('ACTS_Update_0200====: ' + DAHelper)
- try {
- let predicates = new ohosDataAbility.DataAbilityPredicates();
- predicates.equalTo('contact_id', 1);
- predicates.limitAs(10);
- predicates.orderByAsc("order_by_class");
- predicates.offsetAs(1);
- console.debug("=ACTS_Update_0300 predicates====>"
- + ("json predicates 【") + JSON.stringify(predicates) + (" 】") + " , " + predicates);
- DAHelper.update(
- dataAbilityUri,
- valueBucket,
- predicates
- ).then((data) => {
- console.debug("=ACTS_Update_0300 then data====>"
- + ("json data 【") + JSON.stringify(data) + (" 】"));
- expect(data).assertEqual(1);
- console.log('ACTS_Update_0300==== {
- console.debug("=ACTS_Update_0300 catch err ====>"
- + ("json err 【") + JSON.stringify(err) + (" 】 "));
- console.log('ACTS_Update_0300====:' + err);
- console.log('ACTS_Update_0300====: ' + DAHelper)
- try {
- let predicates = new ohosDataAbility.DataAbilityPredicates();
- predicates.equalTo('contact_id', 1);
- predicates.limitAs(10);
- predicates.orderByAsc("order_by_class");
- predicates.offsetAs(1);
- console.debug("=ACTS_Update_0400 predicates====>"
- + ("json predicates 【") + JSON.stringify(predicates) + (" 】") + " , " + predicates);
- await DAHelper.update(
- dataAbilityUri,
- valueBucket,
- predicates,
- (err, data) => {
- console.debug("=ACTS_Update_0400 err,data=======>"
- + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;"));
- expect(data).assertEqual(1);
- console.log('ACTS_Update_0400====:' + err);
- console.log('ACTS_Update_0400====: ' + DAHelper)
- try {
- let predicates = new ohosDataAbility.DataAbilityPredicates();
- predicates.equalTo('contact_id', 1);
- predicates.limitAs(10);
- predicates.orderByAsc("order_by_class");
- predicates.offsetAs(1);
- console.debug("=ACTS_Update_0500 predicates====>"
- + ("json predicates 【") + JSON.stringify(predicates) + (" 】") + " , " + predicates);
- DAHelper.update(
- undefined,
- valueBucket,
- predicates
- ).then((data) => {
- console.debug("=ACTS_Update_0500 then data====>"
- + ("json data 【") + JSON.stringify(data) + (" 】"));
- expect(data).assertEqual(0);
- console.log('ACTS_Update_0500==== {
- console.debug("=ACTS_Update_0500 catch err ====>"
- + ("json err 【") + JSON.stringify(err) + (" 】 "));
- console.log('ACTS_Update_0500====:' + err);
- console.log('ACTS_Update_0500====: ' + DAHelper)
- try {
- let predicates = new ohosDataAbility.DataAbilityPredicates();
- predicates.equalTo('contact_id', 1);
- predicates.limitAs(10);
- predicates.orderByAsc("order_by_class");
- predicates.offsetAs(1);
- console.debug("=ACTS_Update_0600 predicates====>"
- + ("json predicates 【") + JSON.stringify(predicates) + (" 】") + " , " + predicates);
- await DAHelper.update(
- undefined,
- valueBucket,
- predicates,
- (err, data) => {
- console.debug("=ACTS_Update_0600 err,data=======>"
- + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;"));
- expect(err.code).assertEqual(-1);
- expect(data).assertEqual(0);
- console.log('ACTS_Update_0600====:' + err);
- console.log('ACTS_Update_0600====: ' + DAHelper)
- var currentAlertTimeout;
- try {
- function onAsyncCallbackUpdate0700(err) {
- expect(err.code).assertEqual(0);
- clearTimeout(currentAlertTimeout);
- console.log('ACTS_Update_0700===="
- + ("json predicates 【") + JSON.stringify(predicates) + (" 】") + " , " + predicates);
- DAHelper.update(
- dataAbilityUri,
- valueBucket,
- predicates
- ).then((data) => {
- console.debug("=ACTS_Update_0700 then data====>"
- + ("json data 【") + JSON.stringify(data) + (" 】"));
- expect(data).assertEqual(1);
- currentAlertTimeout = setTimeout(() => {
- console.log('ACTS_Update_0700==== {
- console.debug("=ACTS_Update_0700 catch err ====>"
- + ("json err 【") + JSON.stringify(err) + (" 】 ") + err);
- console.log('ACTS_Update_0700====:' + err);
- console.log('ACTS_Update_0700====: ' + DAHelper)
- var currentAlertTimeout;
- try {
- function onAsyncCallbackUpdate0800(err) {
- expect(err.code).assertEqual(0);
- clearTimeout(currentAlertTimeout);
- console.log('ACTS_Update_0800===="
- + ("json predicates 【") + JSON.stringify(predicates) + (" 】") + " , " + predicates);
- await DAHelper.update(
- dataAbilityUri,
- valueBucket,
- predicates,
- (err, data) => {
- console.debug("=ACTS_Update_0800 err,data=======>"
- + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;"));
- expect(data).assertEqual(1);
- currentAlertTimeout = setTimeout(() => {
- console.log('ACTS_Update_0800====:' + err);
- console.log('ACTS_Update_0800====: ' + DAHelper)
- try {
- let predicates = new ohosDataAbility.DataAbilityPredicates();
- predicates.equalTo('contact_id', 1);
- predicates.limitAs(10);
- predicates.orderByAsc("order_by_class");
- predicates.offsetAs(1);
- console.debug("=ACTS_Update_0900 predicates====>"
- + ("json predicates 【") + JSON.stringify(predicates) + (" 】") + " , " + predicates);
- DAHelper.update(
- 123456,
- valueBucket,
- predicates
- ).then((data) => {
- console.debug("=ACTS_Update_0900 then data====>"
- + ("json data 【") + JSON.stringify(data) + (" 】"));
- expect(data).assertEqual(0);
- console.log('ACTS_Update_0900==== {
- console.debug("=ACTS_Update_0900 catch err ====>"
- + ("json err 【") + JSON.stringify(err) + (" 】 "));
- console.log('ACTS_Update_0900====:' + err);
- console.log('ACTS_Update_0900====: ' + DAHelper)
- try {
- let predicates = new ohosDataAbility.DataAbilityPredicates();
- predicates.equalTo('contact_id', 1);
- predicates.limitAs(10);
- predicates.orderByAsc("order_by_class");
- predicates.offsetAs(1);
- console.debug("=ACTS_Update_1000 predicates====>"
- + ("json predicates 【") + JSON.stringify(predicates) + (" 】") + " , " + predicates);
- await DAHelper.update(
- 123456,
- valueBucket,
- predicates,
- (err, data) => {
- console.debug("=ACTS_Update_1000 err,data=======>"
- + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;"));
- expect(err.code).assertEqual(-1);
- expect(data).assertEqual(0);
- console.log('ACTS_Update_1000====:' + err);
- console.log('ACTS_Update_1000====: ' + DAHelper)
- try {
- let predicates = new ohosDataAbility.DataAbilityPredicates();
- predicates.equalTo('contact_id', 1);
- predicates.limitAs(10);
- predicates.orderByAsc("order_by_class");
- predicates.offsetAs(1);
- console.debug("=ACTS_Update_1100 predicates====>"
- + ("json predicates 【") + JSON.stringify(predicates) + (" 】") + " , " + predicates);
- DAHelper.update(
- dataAbilityUri2,
- valueBucket,
- predicates
- ).then((data) => {
- console.debug("=ACTS_Update_1100 then data====>"
- + ("json data 【") + JSON.stringify(data) + (" 】"));
- expect(data).assertEqual(-1);
- console.log('ACTS_Update_1100==== {
- console.debug("=ACTS_Update_1100 catch err ====>"
- + ("json err 【") + JSON.stringify(err) + (" 】 "));
- console.log('ACTS_Update_1100====:' + err);
- console.log('ACTS_Update_1100====: ' + DAHelper)
- try {
- let predicates = new ohosDataAbility.DataAbilityPredicates();
- predicates.equalTo('contact_id', 1);
- predicates.limitAs(10);
- predicates.orderByAsc("order_by_class");
- predicates.offsetAs(1);
- console.debug("=ACTS_Update_1200 predicates====>"
- + ("json predicates 【") + JSON.stringify(predicates) + (" 】") + " , " + predicates);
- await DAHelper.update(
- dataAbilityUri2,
- valueBucket,
- predicates,
- (err, data) => {
- console.debug("=ACTS_Update_1200 err,data=======>"
- + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;"));
- expect(data).assertEqual(-1);
- console.log('ACTS_Update_1200====:' + err);
- console.log('ACTS_Update_1200====: ' + DAHelper)
- try {
- let predicates = new ohosDataAbility.DataAbilityPredicates();
- predicates.equalTo('contact_id', 1);
- predicates.limitAs(10);
- predicates.orderByAsc("order_by_class");
- predicates.offsetAs(1);
- console.debug("=ACTS_Update_1300 predicates====>"
- + ("json predicates 【") + JSON.stringify(predicates) + (" 】") + " , " + predicates);
- DAHelper.update(
- "error_uri",
- valueBucket,
- predicates
- ).then((data) => {
- console.debug("=ACTS_Update_1300 then data====>"
- + ("json data 【") + JSON.stringify(data) + (" 】"));
- expect(data).assertEqual(-1);
- console.log('ACTS_Update_1300==== {
- console.debug("=ACTS_Update_1300 catch err ====>"
- + ("json err 【") + JSON.stringify(err) + (" 】 "));
- console.log('ACTS_Update_1300====:' + err);
- console.log('ACTS_Update_1300====: ' + DAHelper)
- try {
- let predicates = new ohosDataAbility.DataAbilityPredicates();
- predicates.equalTo('contact_id', 1);
- predicates.limitAs(10);
- predicates.orderByAsc("order_by_class");
- predicates.offsetAs(1);
- console.debug("=ACTS_Update_1400 predicates====>"
- + ("json predicates 【") + JSON.stringify(predicates) + (" 】") + " , " + predicates);
- await DAHelper.update(
- "error_uri",
- valueBucket,
- predicates,
- (err, data) => {
- console.debug("=ACTS_Update_1400 err,data=======>"
- + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;"));
- expect(data).assertEqual(-1);
- console.log('ACTS_Update_1400====:' + err);
- console.log('ACTS_Update_1400====: ' + DAHelper)
- try {
- let predicates = new ohosDataAbility.DataAbilityPredicates();
- console.debug("=ACTS_Delete_0100 predicates====>"
- + ("json predicates 【") + JSON.stringify(predicates) + (" 】") + " , " + predicates);
- DAHelper.delete(
- dataAbilityUri,
- predicates
- ).then((data) => {
- console.debug("=ACTS_Delete_0100 then data====>"
- + ("json data 【") + JSON.stringify(data) + (" 】"));
- expect(data).assertEqual(1);
- console.log('ACTS_Delete_0100==== {
- console.debug("=ACTS_Delete_0100 catch err ====>"
- + ("json err 【") + JSON.stringify(err) + (" 】 "));
- expect(false).assertTrue();
- console.log('ACTS_Delete_0100====:' + err);
- expect(false).assertTrue();
- console.log('ACTS_Delete_0100====: ' + DAHelper)
- try {
- let predicates = new ohosDataAbility.DataAbilityPredicates();
- console.debug("=ACTS_Delete_0200 predicates====>"
- + ("json predicates 【") + JSON.stringify(predicates) + (" 】") + " , " + predicates);
- await DAHelper.delete(
- dataAbilityUri,
- predicates,
- (err, data) => {
- console.debug("=ACTS_Delete_0200 err,data=======>"
- + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;"));
- expect(data).assertEqual(1);
- console.log('ACTS_Delete_0200====:' + err);
- expect(false).assertTrue();
- console.log('ACTS_Delete_0200===="
- + ("json predicates 【") + JSON.stringify(predicates) + (" 】") + " , " + predicates);
- DAHelper.delete(
- dataAbilityUri,
- predicates
- ).then((data) => {
- console.debug("=ACTS_Delete_0300 then data====>"
- + ("json data 【") + JSON.stringify(data) + (" 】"));
- expect(data).assertEqual(1);
- console.log('ACTS_Delete_0300==== {
- console.debug("=ACTS_Delete_0300 catch err ====>"
- + ("json err 【") + JSON.stringify(err) + (" 】 "));
- console.log('ACTS_Delete_0300====:' + err);
- expect(false).assertTrue();
- console.log('ACTS_Delete_0300====: ' + DAHelper)
- try {
- let predicates = new ohosDataAbility.DataAbilityPredicates();
- predicates.equalTo('contact_id', 1);
- predicates.limitAs(10);
- predicates.orderByAsc("order_by_class");
- predicates.offsetAs(1);
- console.debug("=ACTS_Delete_0400 predicates====>"
- + ("json predicates 【") + JSON.stringify(predicates) + (" 】") + " , " + predicates);
- await DAHelper.delete(
- dataAbilityUri,
- predicates,
- (err, data) => {
- console.debug("=ACTS_Delete_0400 err,data=======>"
- + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;"));
- expect(data).assertEqual(1);
- console.log('ACTS_Delete_0400====:' + err);
- console.log('ACTS_Delete_0400===="
- + ("json predicates 【") + JSON.stringify(predicates) + (" 】") + " , " + predicates);
- DAHelper.delete(
- undefined,
- predicates
- ).then((data) => {
- console.debug("=ACTS_Delete_0500 then data====>"
- + ("json data 【") + JSON.stringify(data) + (" 】"));
- expect(data).assertEqual(0);
- console.log('ACTS_Delete_0500==== {
- console.debug("=ACTS_Delete_0500 catch err ====>"
- + ("json err 【") + JSON.stringify(err) + (" 】 "));
- console.log('ACTS_Delete_0500====:' + err);
- expect(false).assertTrue();
- console.log('ACTS_Delete_0500====: ' + DAHelper)
- try {
- let predicates = new ohosDataAbility.DataAbilityPredicates();
- predicates.equalTo('contact_id', 1);
- predicates.limitAs(10);
- predicates.orderByAsc("order_by_class");
- predicates.offsetAs(1);
- console.debug("=ACTS_Delete_0600 predicates====>"
- + ("json predicates 【") + JSON.stringify(predicates) + (" 】") + " , " + predicates);
- await DAHelper.delete(
- undefined,
- predicates,
- (err, data) => {
- console.debug("=ACTS_Delete_0600 err,data=======>"
- + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;"));
- expect(err.code).assertEqual(-1);
- expect(data).assertEqual(0);
- console.log('ACTS_Delete_0600====:' + err);
- console.log('ACTS_Delete_0600===="
- + ("json predicates 【") + JSON.stringify(predicates) + (" 】") + " , " + predicates);
- DAHelper.delete(
- dataAbilityUri,
- predicates
- ).then((data) => {
- console.debug("=ACTS_Delete_0700 then data====>"
- + ("json data 【") + JSON.stringify(data) + (" 】"));
- expect(data).assertEqual(1);
- currentAlertTimeout = setTimeout(() => {
- console.log('ACTS_Delete_0700==== {
- console.debug("=ACTS_Delete_0700 catch err ====>"
- + ("json err 【") + JSON.stringify(err) + (" 】 "));
- console.log('ACTS_Delete_0700====:' + err);
- expect(false).assertTrue();
- console.log('ACTS_Delete_0700====: ' + DAHelper)
- var currentAlertTimeout;
- try {
- function onAsyncCallbackDelete0800(err) {
- expect(err.code).assertEqual(0);
- clearTimeout(currentAlertTimeout);
- console.log('ACTS_Delete_0800===="
- + ("json predicates 【") + JSON.stringify(predicates) + (" 】") + " , " + predicates);
- await DAHelper.delete(
- dataAbilityUri,
- predicates,
- (err, data) => {
- console.debug("=ACTS_Delete_0800 err,data=======>"
- + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;"));
- expect(data).assertEqual(1);
- currentAlertTimeout = setTimeout(() => {
- console.log('ACTS_Delete_0800====:' + err);
- console.log('ACTS_Delete_0800===="
- + ("json predicates 【") + JSON.stringify(predicates) + (" 】") + " , " + predicates);
- DAHelper.delete(
- dataAbilityUri2,
- predicates
- ).then((data) => {
- console.debug("=ACTS_Delete_0900 then data====>"
- + ("json data 【") + JSON.stringify(data) + (" 】"));
- expect(data).assertEqual(-1);
- console.log('ACTS_Delete_0900==== {
- console.debug("=ACTS_Delete_0900 catch err ====>"
- + ("json err 【") + JSON.stringify(err) + (" 】 "));
- console.log('ACTS_Delete_0900====:' + err);
- expect(false).assertTrue();
- console.log('ACTS_Delete_0900====: ' + DAHelper)
- try {
- let predicates = new ohosDataAbility.DataAbilityPredicates();
- predicates.equalTo('contact_id', 1);
- predicates.limitAs(10);
- predicates.orderByAsc("order_by_class");
- predicates.offsetAs(1);
- console.debug("=ACTS_Delete_1000 predicates====>"
- + ("json predicates 【") + JSON.stringify(predicates) + (" 】") + " , " + predicates);
- await DAHelper.delete(
- dataAbilityUri2,
- predicates,
- (err, data) => {
- console.debug("=ACTS_Delete_1000 err,data=======>"
- + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;"));
- expect(data).assertEqual(-1);
- console.log('ACTS_Delete_1000====:' + err);
- console.log('ACTS_Delete_1000===="
- + ("json predicates 【") + JSON.stringify(predicates) + (" 】") + " , " + predicates);
- DAHelper.delete(
- "error",
- predicates
- ).then((data) => {
- console.debug("=ACTS_Delete_1100 then data====>"
- + ("json data 【") + JSON.stringify(data) + (" 】"));
- expect(data).assertEqual(-1);
- console.log('ACTS_Delete_1100==== {
- console.debug("=ACTS_Delete_1100 catch err ====>"
- + ("json err 【") + JSON.stringify(err) + (" 】 "));
- console.log('ACTS_Delete_1100====:' + err);
- expect(false).assertTrue();
- console.log('ACTS_Delete_1100====: ' + DAHelper)
- try {
- let predicates = new ohosDataAbility.DataAbilityPredicates();
- predicates.equalTo('contact_id', 1);
- predicates.limitAs(10);
- predicates.orderByAsc("order_by_class");
- predicates.offsetAs(1);
- console.debug("=ACTS_Delete_1200 predicates====>"
- + ("json predicates 【") + JSON.stringify(predicates) + (" 】") + " , " + predicates);
- await DAHelper.delete(
- "error",
- predicates,
- (err, data) => {
- console.debug("=ACTS_Delete_1200 err,data=======>"
- + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;"));
- expect(data).assertEqual(-1);
- console.log('ACTS_Delete_1200====:' + err);
- console.log('ACTS_Delete_1200===="
- + ("json predicates 【") + JSON.stringify(predicates) + (" 】") + " , " + predicates);
- DAHelper.delete(
- 123456,
- predicates
- ).then((data) => {
- console.debug("=ACTS_Delete_1300 then data====>"
- + ("json data 【") + JSON.stringify(data) + (" 】"));
- expect(data).assertEqual(0);
- console.log('ACTS_Delete_1300==== {
- console.debug("=ACTS_Delete_1300 catch err ====>"
- + ("json err 【") + JSON.stringify(err) + (" 】 "));
- console.log('ACTS_Delete_1300====:' + err);
- expect(false).assertTrue();
- console.log('ACTS_Delete_1300====: ' + DAHelper)
- try {
- let predicates = new ohosDataAbility.DataAbilityPredicates();
- predicates.equalTo('contact_id', 1);
- predicates.limitAs(10);
- predicates.orderByAsc("order_by_class");
- predicates.offsetAs(1);
- console.debug("=ACTS_Delete_1400 predicates====>"
- + ("json predicates 【") + JSON.stringify(predicates) + (" 】") + " , " + predicates);
- await DAHelper.delete(
- 123456,
- predicates,
- (err, data) => {
- console.debug("=ACTS_Delete_1400 err,data=======>"
- + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;"));
- expect(err.code).assertEqual(-1);
- console.log('ACTS_Delete_1400====:' + err);
- console.log('ACTS_Delete_1400==== {
- console.debug("=ACTS_GetFileTypes_0100 getFileTypes then data====>"
- + ("json data 【") + JSON.stringify(data) + (" 】"));
- console.log('DataAbilityHelper getFileTypes data.length ====>: ' + data.length);
- expect(data.length).assertEqual(3);
- for (var i = 0; i < data.length; i++) {
- expect(typeof (data[i])).assertEqual("string");
- console.log('=ACTS_GetFileTypes_0100 for data[' + i + '] ====>: ' + data[i])
- if (i == 0) {
- expect(data[i]).assertEqual("hap");
- } else if (i == 1) {
- expect(data[i]).assertEqual("jpg");
- } else if (i == 2) {
- expect(data[i]).assertEqual("image/png");
- }
- }
- console.log('ACTS_GetFileTypes_0100==== {
- console.debug("=ACTS_GetFileTypes_0100 getFileTypes catch err ====>"
- + ("json err 【") + JSON.stringify(err) + (" 】 "));
- console.log('ACTS_GetFileTypes_0100====: ' + promise)
- } catch (err) {
- console.error('=ACTS_GetFileTypes_0100 getFileTypes AsyncCallback catch(err)====>:' + err);
- console.log('ACTS_GetFileTypes_0100====: ' + DAHelper)
- let mimeTypeFilter = '*/*'
- try {
- await DAHelper.getFileTypes(
- dataAbilityUri,
- mimeTypeFilter,
- (err, data) => {
- console.debug("=ACTS_GetFileTypes_0200 getFileTypes err,data=======>"
- + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;"));
- console.log('=ACTS_GetFileTypes_0200 data.length ====>: ' + data.length);
- expect(data.length).assertEqual(3);
- for (var i = 0; i < data.length; i++) {
- expect(typeof (data[i])).assertEqual("string");
- console.log('=ACTS_GetFileTypes_0200 for data ====>: ' + err.code +
- " data[" + i + "]: " + data[i]);
- if (i == 0) {
- expect(data[i]).assertEqual("hap");
- } else if (i == 1) {
- expect(data[i]).assertEqual("jpg");
- } else if (i == 2) {
- expect(data[i]).assertEqual("image/png");
- }
- }
- console.log('ACTS_GetFileTypes_0200====:' + err);
- console.log('ACTS_GetFileTypes_0200==== {
- console.debug("=ACTS_GetFileTypes_0300 then data====>"
- + ("json data 【") + JSON.stringify(data) + (" 】"));
- console.log('DataAbilityHelper getFileTypes data.length ====>: ' + data.length);
- expect(data.length).assertEqual(1);
- for (var i = 0; i < data.length; i++) {
- expect(typeof (data[i])).assertEqual("string");
- console.log('= =ACTS_GetFileTypes_0300 for data[' + i + '] ====>: ' + data[i])
- if (i == 0) {
- expect(data[i]).assertEqual("image/png");
- }
- }
- console.log('ACTS_GetFileTypes_0300==== {
- console.debug("=ACTS_GetFileTypes_0300 catch err ====>"
- + ("json err 【") + JSON.stringify(err) + (" 】 "));
- console.log('DataAbilityHelper getFileTypes error ====>: ' + err)
- console.log('ACTS_GetFileTypes_0300====: ' + promise)
- } catch (err) {
- console.error('=ACTS_GetFileTypes_0300 getFileTypes AsyncCallback catch(err)====>:' + err);
- console.log('ACTS_GetFileTypes_0300====: ' + DAHelper)
- let mimeTypeFilter = 'image/*'
- try {
- await DAHelper.getFileTypes(
- dataAbilityUri,
- mimeTypeFilter,
- (err, data) => {
- console.debug("=ACTS_GetFileTypes_0400 err,data=======>"
- + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;"));
- console.log('DataAbilityHelper getFileTypes data.length ====>: ' + data.length);
- expect(data.length).assertEqual(1);
- for (var i = 0; i < data.length; i++) {
- expect(typeof (data[i])).assertEqual("string");
- console.log('=ACTS_GetFileTypes_0400 for ====>: '
- + err.code + " data[" + i + "]: " + data[i]);
- if (i == 0) {
- expect(data[i]).assertEqual("image/png");
- }
- }
- console.log('ACTS_GetFileTypes_0400====:' + err);
- console.log('ACTS_GetFileTypes_0400==== {
- console.debug("=ACTS_GetFileTypes_0500 then data====>"
- + ("json data 【") + JSON.stringify(data) + (" 】"));
- console.log('DataAbilityHelper getFileTypes data.length ====>: ' + data.length);
- expect(data.length).assertEqual(1);
- for (var i = 0; i < data.length; i++) {
- expect(typeof (data[i])).assertEqual("string");
- console.log('=ACTS_GetFileTypes_0500 for data [' + i + '] ====>: ' + data[i])
- if (i == 0) {
- expect(data[i]).assertEqual("jpg");
- }
- }
- console.log('ACTS_GetFileTypes_0500==== {
- console.debug("=ACTS_GetFileTypes_0500 catch err ====>"
- + ("json err 【") + JSON.stringify(err) + (" 】 "));
- console.log('DataAbilityHelper getFileTypes error ====>: ' + err)
- console.log('ACTS_GetFileTypes_0500====: ' + promise)
- } catch (err) {
- console.error('=ACTS_GetFileTypes_0500 getFileTypes AsyncCallback catch(err)====>:' + err);
- console.log('ACTS_GetFileTypes_0500====: ' + DAHelper)
- let mimeTypeFilter = '*/jpg'
- try {
- await DAHelper.getFileTypes(
- dataAbilityUri,
- mimeTypeFilter,
- (err, data) => {
- console.debug("=ACTS_GetFileTypes_0600 err,data=======>"
- + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;"));
- console.log('=ACTS_GetFileTypes_0600 data.length ====>: ' + data.length);
- expect(data.length).assertEqual(1);
- for (var i = 0; i < data.length; i++) {
- console.log('=ACTS_GetFileTypes_0600 for errCode ====>: ' + err.code +
- " data[" + i + "]: " + data[i]);
- if (i == 0)
- expect(data[i]).assertEqual("jpg");
- }
- console.log('ACTS_GetFileTypes_0600====:' + err);
- console.log('ACTS_GetFileTypes_0600==== {
- console.debug("=ACTS_GetFileTypes_0700 getFileTypes then data====>"
- + ("json data 【") + JSON.stringify(data) + (" 】"));
- console.log('DataAbilityHelper getFileTypes data.length ====>: ' + data.length);
- expect(data.length).assertEqual(0);
- console.log('ACTS_GetFileTypes_0700==== {
- console.debug("=ACTS_GetFileTypes_0700 getFileTypes catch err ====>"
- + ("json err 【") + JSON.stringify(err) + (" 】 "));
- console.log('ACTS_GetFileTypes_0700====: ' + promise)
- } catch (err) {
- console.error('=ACTS_GetFileTypes_0700 getFileTypes AsyncCallback catch(err)====>:' + err);
- console.log('ACTS_GetFileTypes_0700====: ' + DAHelper)
- let mimeTypeFilter = '*/*'
- try {
- await DAHelper.getFileTypes(
- undefined,
- mimeTypeFilter,
- (err, data) => {
- console.debug("=ACTS_GetFileTypes_0800 getFileTypes err,data=======>"
- + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;"));
- console.log('=ACTS_GetFileTypes_0800 data.length ====>: ' + data.length);
- expect(data.length).assertEqual(0);
- console.log('ACTS_GetFileTypes_0800====:' + err);
- console.log('ACTS_GetFileTypes_0800==== {
- console.debug("=ACTS_GetFileTypes_0900 getFileTypes then data====>"
- + ("json data 【") + JSON.stringify(data) + (" 】"));
- console.log('DataAbilityHelper getFileTypes data.length ====>: ' + data.length);
- for (var i = 0; i < data.length; i++) {
- expect(typeof (data[i])).assertEqual("string");
- console.log('=ACTS_GetFileTypes_0900 for data[' + i + '] ====>: ' + data[i])
- if (i == 0) {
- expect(data[i]).assertEqual("");
- }
- }
- console.log('ACTS_GetFileTypes_0900==== {
- console.debug("=ACTS_GetFileTypes_0900 getFileTypes catch err ====>"
- + ("json err 【") + JSON.stringify(err) + (" 】 "));
- console.log('ACTS_GetFileTypes_0900====: ' + promise)
- } catch (err) {
- console.error('=ACTS_GetFileTypes_0900 getFileTypes AsyncCallback catch(err)====>:' + err);
- console.log('ACTS_GetFileTypes_0900====: ' + DAHelper)
- try {
- await DAHelper.getFileTypes(
- dataAbilityUri,
- undefined,
- (err, data) => {
- console.debug("=ACTS_GetFileTypes_1000 getFileTypes err,data=======>"
- + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;"));
- console.log('=ACTS_GetFileTypes_1000 data.length ====>: ' + data.length);
- for (var i = 0; i < data.length; i++) {
- expect(typeof (data[i])).assertEqual("string");
- console.log('=ACTS_GetFileTypes_1000 for data ====>: ' + err.code +
- " data[" + i + "]: " + data[i]);
- if (i == 0) {
- expect(data[i]).assertEqual("");
- }
- }
- console.log('ACTS_GetFileTypes_1000====:' + err);
- console.log('ACTS_GetFileTypes_1000==== {
- console.debug("=ACTS_GetFileTypes_1100 getFileTypes then data====>"
- + ("json data 【") + JSON.stringify(data) + (" 】"));
- console.log('DataAbilityHelper getFileTypes data.length ====>: ' + data.length);
- expect(data.length).assertEqual(0);
- console.log('ACTS_GetFileTypes_1100==== {
- console.debug("=ACTS_GetFileTypes_1100 getFileTypes catch err ====>"
- + ("json err 【") + JSON.stringify(err) + (" 】 "));
- console.log('ACTS_GetFileTypes_1100====: ' + promise)
- } catch (err) {
- console.error('=ACTS_GetFileTypes_1100 getFileTypes AsyncCallback catch(err)====>:' + err);
- console.log('ACTS_GetFileTypes_1100====: ' + DAHelper)
- let mimeTypeFilter = '*/*'
- try {
- await DAHelper.getFileTypes(
- "error_uri",
- mimeTypeFilter,
- (err, data) => {
- console.debug("=ACTS_GetFileTypes_1200 getFileTypes err,data=======>"
- + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;"));
- console.log('=ACTS_GetFileTypes_1200 data.length ====>: ' + data.length);
- expect(data.length).assertEqual(0);
- console.log('ACTS_GetFileTypes_1200====:' + err);
- console.log('ACTS_GetFileTypes_1200==== {
- console.debug("=ACTS_GetFileTypes_1300 getFileTypes then data====>"
- + ("json data 【") + JSON.stringify(data) + (" 】"));
- console.log('DataAbilityHelper getFileTypes data.length ====>: ' + data.length);
- expect(data.length).assertEqual(0);
- console.log('ACTS_GetFileTypes_1300==== {
- console.debug("=ACTS_GetFileTypes_1300 getFileTypes catch err ====>"
- + ("json err 【") + JSON.stringify(err) + (" 】 "));
- console.log('ACTS_GetFileTypes_1300====: ' + promise)
- } catch (err) {
- console.error('=ACTS_GetFileTypes_1300 getFileTypes AsyncCallback catch(err)====>:' + err);
- console.log('ACTS_GetFileTypes_1300====: ' + DAHelper)
- let mimeTypeFilter = '*/*'
- try {
- await DAHelper.getFileTypes(
- 123456,
- mimeTypeFilter,
- (err, data) => {
- console.debug("=ACTS_GetFileTypes_1400 getFileTypes err,data=======>"
- + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;"));
- console.log('=ACTS_GetFileTypes_1400 data.length ====>: ' + data.length);
- expect(data.length).assertEqual(0);
- console.log('ACTS_GetFileTypes_1400====:' + err);
- console.log('ACTS_GetFileTypes_1400==== {
- console.debug("=ACTS_GetFileTypes_1500 getFileTypes then data====>"
- + ("json data 【") + JSON.stringify(data) + (" 】"));
- console.log('DataAbilityHelper getFileTypes data.length ====>: ' + data.length);
- expect(data.length).assertEqual(0);
- console.log('ACTS_GetFileTypes_1500==== {
- console.debug("=ACTS_GetFileTypes_1500 getFileTypes catch err ====>"
- + ("json err 【") + JSON.stringify(err) + (" 】 "));
- console.log('ACTS_GetFileTypes_1500====: ' + promise)
- } catch (err) {
- console.error('=ACTS_GetFileTypes_1500 getFileTypes AsyncCallback catch(err)====>:' + err);
- console.log('ACTS_GetFileTypes_1500====: ' + DAHelper)
- let mimeTypeFilter = 'asdfasdEDF)(#@*7fasdf546546a1ds3v16a4sd6v54@*(e7';
- try {
- await DAHelper.getFileTypes(
- dataAbilityUri,
- mimeTypeFilter,
- (err, data) => {
- console.debug("=ACTS_GetFileTypes_1600 getFileTypes err,data=======>"
- + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;"));
- console.log('=ACTS_GetFileTypes_1600 data.length ====>: ' + data.length);
- expect(data.length).assertEqual(0);
- console.log('ACTS_GetFileTypes_1600====:' + err);
- console.log('ACTS_GetFileTypes_1600==== {
- console.debug("=ACTS_GetFileTypes_1700 getFileTypes then data====>"
- + ("json data 【") + JSON.stringify(data) + (" 】"));
- console.log('DataAbilityHelper getFileTypes data.length ====>: ' + data.length);
- expect(data.length).assertEqual(0);
- console.log('ACTS_GetFileTypes_1700==== {
- console.debug("=ACTS_GetFileTypes_1700 getFileTypes catch err ====>"
- + ("json err 【") + JSON.stringify(err) + (" 】 "));
- console.log('ACTS_GetFileTypes_1700====: ' + promise)
- } catch (err) {
- console.error('=ACTS_GetFileTypes_1700 getFileTypes AsyncCallback catch(err)====>:' + err);
- console.log('ACTS_GetFileTypes_1700====: ' + DAHelper)
- let mimeTypeFilter = 'returnUndefined';
- try {
- await DAHelper.getFileTypes(
- dataAbilityUri,
- mimeTypeFilter,
- (err, data) => {
- console.debug("=ACTS_GetFileTypes_1800 getFileTypes err,data=======>"
- + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;"));
- console.log('=ACTS_GetFileTypes_1800 data.length ====>: ' + data.length);
- expect(data.length).assertEqual(0);
- console.log('ACTS_GetFileTypes_1800====:' + err);
- console.log('ACTS_GetFileTypes_1800==== {
- console.debug("=ACTS_GetType_0100 then data====>"
- + ("json data 【") + JSON.stringify(data) + (" 】"));
- expect(data).assertEqual(dataAbilityUri);
- console.log('ACTS_GetType_0100==== {
- console.debug("=ACTS_GetType_0100 catch err ====>"
- + ("json err 【") + JSON.stringify(err) + (" 】 "));
- console.log('ACTS_GetType_0100====: ' + promise)
- } catch (err) {
- console.error('=ACTS_GetType_0100 getType AsyncCallback catch(err)====>:' + err);
- console.log('ACTS_GetType_0100====: ' + DAHelper)
- try {
- await DAHelper.getType(
- dataAbilityUri,
- (err, data) => {
- console.debug("=ACTS_GetType_0200 err,data=======>"
- + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;"));
- expect(data).assertEqual(dataAbilityUri);
- console.log('ACTS_GetType_0200====:' + err);
- console.log('ACTS_GetType_0200==== {
- console.debug("=ACTS_GetType_0300 then data====>"
- + ("json data 【") + JSON.stringify(data) + (" 】"));
- expect(data).assertEqual("");
- console.log('ACTS_GetType_0300==== {
- console.debug("=ACTS_GetType_0300 catch err ====>"
- + ("json err 【") + JSON.stringify(err) + (" 】 "));
- console.log('ACTS_GetType_0300====: ' + promise)
- } catch (err) {
- console.error('=ACTS_GetType_0300 getType AsyncCallback catch(err)====>:' + err);
- console.log('ACTS_GetType_0300====: ' + DAHelper)
- try {
- await DAHelper.getType(
- undefined,
- (err, data) => {
- console.debug("=ACTS_GetType_0400 err,data=======>"
- + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;"));
- expect(data).assertEqual("");
- console.log('ACTS_GetType_0400====:' + err);
- console.log('ACTS_GetType_0400==== {
- console.debug("=ACTS_GetType_0500 then data====>"
- + ("json data 【") + JSON.stringify(data) + (" 】"));
- expect(data).assertEqual("");
- console.log('ACTS_GetType_0500==== {
- console.debug("=ACTS_GetType_0500 catch err ====>"
- + ("json err 【") + JSON.stringify(err) + (" 】 "));
- console.log('ACTS_GetType_0500====: ' + promise)
- } catch (err) {
- console.error('=ACTS_GetType_0500 getType AsyncCallback catch(err)====>:' + err);
- console.log('ACTS_GetType_0500====: ' + DAHelper)
- try {
- await DAHelper.getType(
- 123456,
- (err, data) => {
- console.debug("=ACTS_GetType_0600 err,data=======>"
- + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;"));
- expect(data).assertEqual("");
- console.log('ACTS_GetType_0600====:' + err);
- console.log('ACTS_GetType_0600==== {
- console.debug("=ACTS_GetType_0700 then data====>"
- + ("json data 【") + JSON.stringify(data) + (" 】"));
- expect(data).assertEqual("");
- console.log('ACTS_GetType_0700==== {
- console.debug("=ACTS_GetType_0700 catch err ====>"
- + ("json err 【") + JSON.stringify(err) + (" 】 "));
- console.log('ACTS_GetType_0700====: ' + promise)
- } catch (err) {
- console.error('=ACTS_GetType_0700 getType AsyncCallback catch(err)====>:' + err);
- console.log('ACTS_GetType_0700====: ' + DAHelper)
- try {
- await DAHelper.getType(
- "error_uri",
- (err, data) => {
- console.debug("=ACTS_GetType_0800 err,data=======>"
- + ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;"));
- expect(data).assertEqual("");
- console.log('ACTS_GetType_0800====:' + err);
- console.log('ACTS_GetType_0800==== {
- console.debug("=ACTS_GetType_0900 then data====>"
- + ("json data 【") + JSON.stringify(data) + (" 】"));
- expect(data).assertEqual("");
- console.log('ACTS_GetType_0900====