diff --git a/aafwk/aafwk_standard/fa/fa_applicationinfo_test/BUILD.gn b/aafwk/aafwk_standard/fa/fa_applicationinfo_test/BUILD.gn
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_applicationinfo_test/Test.json b/aafwk/aafwk_standard/fa/fa_applicationinfo_test/Test.json
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_applicationinfo_test/entry/src/main/config.json b/aafwk/aafwk_standard/fa/fa_applicationinfo_test/entry/src/main/config.json
index ff28e61a948fc3bcf428e9dd1f7321261cfd3a90..6daf6bd8ae8e84f9e9879e560c7b35fbf7197d6f 100644
--- a/aafwk/aafwk_standard/fa/fa_applicationinfo_test/entry/src/main/config.json
+++ b/aafwk/aafwk_standard/fa/fa_applicationinfo_test/entry/src/main/config.json
@@ -1,87 +1,87 @@
-{
- "app": {
- "bundleName": "com.example.applicationinfo",
- "vendor": "example",
- "version": {
- "code": 1000000,
- "name": "1.0.0"
- }
- },
- "deviceConfig": {},
- "module": {
- "package": "com.example.applicationinfo",
- "name": ".MyApplication",
- "mainAbility": ".MainAbility",
- "srcPath": "",
- "deviceType": [
- "phone"
- ],
- "distro": {
- "deliveryWithInstall": true,
- "moduleName": "entry",
- "moduleType": "entry",
- "installationFree": false
- },
- "abilities": [
- {
- "skills": [
- {
- "entities": [
- "entity.system.home"
- ],
- "actions": [
- "action.system.home"
- ]
- }
- ],
- "orientation": "unspecified",
- "visible": true,
- "srcPath": "MainAbility",
- "name": ".MainAbility",
- "srcLanguage": "js",
- "icon": "$media:icon",
- "description": "$string:description_mainability",
- "formsEnabled": false,
- "label": "$string:entry_MainAbility",
- "type": "page",
- "launchType": "standard"
- },
- {
- "orientation": "unspecified",
- "srcPath": "MainAbility2",
- "name": ".MainAbility2",
- "srcLanguage": "js",
- "icon": "$media:icon",
- "description": "$string:description_mainability2",
- "formsEnabled": false,
- "label": "$string:entry_MainAbility2",
- "type": "page",
- "launchType": "standard"
- }
- ],
- "js": [
- {
- "pages": [
- "pages/index/index",
- "pages/second/second"
- ],
- "name": ".MainAbility",
- "window": {
- "designWidth": 720,
- "autoDesignWidth": false
- }
- },
- {
- "pages": [
- "pages/index/index",
- "pages/second/second"
- ],
- "name": ".MainAbility2",
- "window": {
- "designWidth": 720,
- "autoDesignWidth": false
- }
- }
- ]
- }
+{
+ "app": {
+ "bundleName": "com.example.applicationinfo",
+ "vendor": "example",
+ "version": {
+ "code": 1000000,
+ "name": "1.0.0"
+ }
+ },
+ "deviceConfig": {},
+ "module": {
+ "package": "com.example.applicationinfo",
+ "name": ".MyApplication",
+ "mainAbility": ".MainAbility",
+ "srcPath": "",
+ "deviceType": [
+ "phone"
+ ],
+ "distro": {
+ "deliveryWithInstall": true,
+ "moduleName": "entry",
+ "moduleType": "entry",
+ "installationFree": false
+ },
+ "abilities": [
+ {
+ "skills": [
+ {
+ "entities": [
+ "entity.system.home"
+ ],
+ "actions": [
+ "action.system.home"
+ ]
+ }
+ ],
+ "orientation": "unspecified",
+ "visible": true,
+ "srcPath": "MainAbility",
+ "name": ".MainAbility",
+ "srcLanguage": "js",
+ "icon": "$media:icon",
+ "description": "$string:description_mainability",
+ "formsEnabled": false,
+ "label": "$string:entry_MainAbility",
+ "type": "page",
+ "launchType": "standard"
+ },
+ {
+ "orientation": "unspecified",
+ "srcPath": "MainAbility2",
+ "name": ".MainAbility2",
+ "srcLanguage": "js",
+ "icon": "$media:icon",
+ "description": "$string:description_mainability2",
+ "formsEnabled": false,
+ "label": "$string:entry_MainAbility2",
+ "type": "page",
+ "launchType": "standard"
+ }
+ ],
+ "js": [
+ {
+ "pages": [
+ "pages/index/index",
+ "pages/second/second"
+ ],
+ "name": ".MainAbility",
+ "window": {
+ "designWidth": 720,
+ "autoDesignWidth": false
+ }
+ },
+ {
+ "pages": [
+ "pages/index/index",
+ "pages/second/second"
+ ],
+ "name": ".MainAbility2",
+ "window": {
+ "designWidth": 720,
+ "autoDesignWidth": false
+ }
+ }
+ ]
+ }
}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/fa/fa_applicationinfo_test/entry/src/main/js/test/ApplicationInfoJsunit.test.js b/aafwk/aafwk_standard/fa/fa_applicationinfo_test/entry/src/main/js/test/ApplicationInfoJsunit.test.js
index eadc55ff45860b6ad2cef7b6f1c9579af175c712..01cf6ddd7ea5f71c7e3d86d99ad81bad4f1fc29f 100644
--- a/aafwk/aafwk_standard/fa/fa_applicationinfo_test/entry/src/main/js/test/ApplicationInfoJsunit.test.js
+++ b/aafwk/aafwk_standard/fa/fa_applicationinfo_test/entry/src/main/js/test/ApplicationInfoJsunit.test.js
@@ -1,136 +1,198 @@
-// @ts-nocheck
-/*
- * 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, expect, it} from 'deccjsunit/index'
-import commonEvent from '@ohos.commonevent'
-import featureAbility from '@ohos.ability.featureability'
-import formBindingData from '@ohos.application.formBindingData'
-
-var getCallingBundleUri = {
- events: ["uri"]
-}
-
-var getCallingBundleType = {
- events: ["type"]
-}
-
-describe("ApplicationInfoTest", function () {
- var TAG = "";
-
- /*
- * @tc.number SUB_AA_OpenHarmony_FormBase_1000
- * @tc.name Validate formbindingdata creation data
- * @tc.desc Function test
- * @tc.level 0
- */
- it('SUB_AA_OpenHarmony_FormBase_1000', 0, async function (done) {
- console.log("------------start SUB_AA_OpenHarmony_FormBase_1000-------------");
- TAG = "SUB_AA_OpenHarmony_FormBase_1000";
- var dataObj = {
- temperature:"11c",
- "time":"11:00",
- "test":11,
- "test3":true
- }
- var result = formBindingData.createFormBindingData(dataObj)
- console.log(TAG + " result is : " + JSON.stringify(result))
- expect(JSON.stringify(result)).
- assertEqual(JSON.stringify({"data":"{\"temperature\":\"11c\",\"time\":\"11:00\",\"test\":11,\"test3\":true}"}));
- done();
- console.log("------------end SUB_AA_OpenHarmony_FormBase_1000-------------");
- });
-
- /*
- * @tc.number SUB_AA_OpenHarmony_Want_0200
- * @tc.name Switching the mission in the launcherlist to the foreground is not supported
- * @tc.desc Function test
- * @tc.level 0
- */
- it('SUB_AA_OpenHarmony_Want_0200', 0, async function (done) {
- console.log("------------start SUB_AA_OpenHarmony_Want_0200-------------");
- TAG = "SUB_AA_OpenHarmony_Want_0200";
- var Subscriber = "";
-
- function SubscribeCallBackUri(err, data) {
- console.log(TAG + " Subscribe CallBack data:" + JSON.stringify(data));
- if(data.event != ""){
- for (var key in data.parameters){
- console.log(TAG + "data.parameters[key] is :" + data.parameters[key])
- }
- expect(data.parameters[key] == "key={true,true,false}").assertTrue();
- }
- done();
- }
-
- commonEvent.createSubscriber(getCallingBundleUri).then(async (data) => {
- console.debug(TAG + "====>Create Subscriber====>");
- Subscriber = data;
- await commonEvent.subscribe(Subscriber, SubscribeCallBackUri);
- });
-
- featureAbility.startAbility({
- want: {
- abilityName: "com.example.applicationinfo.MainAbility2",
- bundleName: "com.example.applicationinfo",
- uri: "key={true,true,false}"
- }
- }, (err, data) => {
- console.log(TAG + ":startAbility success , err:" + JSON.stringify(err) + ",data:" + JSON.stringify(data));
- });
- console.log("------------end SUB_AA_OpenHarmony_Want_0200-------------");
- });
-
- /*
- * @tc.number SUB_AA_OpenHarmony_Want_0300
- * @tc.name Switching the mission in the launcherlist to the foreground is not supported
- * @tc.desc Function test
- * @tc.level 0
- */
- it('SUB_AA_OpenHarmony_Want_0300', 0, async function (done) {
- console.log("------------start SUB_AA_OpenHarmony_Want_0300-------------");
- TAG = "SUB_AA_OpenHarmony_Want_0300";
- var Subscriber = "";
-
- function SubscribeCallBackType(err, data) {
- console.log(TAG + " Subscribe CallBack data:" + JSON.stringify(data));
- if(data.event != ""){
- for (var key in data.parameters){
- console.log(TAG + "data.parameters[key] is :" + data.parameters[key])
- }
- expect(data.parameters[key] == "MIMETYPE").assertTrue();
- }
- done();
- }
-
- commonEvent.createSubscriber(getCallingBundleType).then(async (data) => {
- console.debug(TAG + "====>Create Subscriber====>");
- Subscriber = data;
- await commonEvent.subscribe(Subscriber, SubscribeCallBackType);
- });
-
- featureAbility.startAbility({
- want: {
- abilityName: "com.example.applicationinfo.MainAbility2",
- bundleName: "com.example.applicationinfo",
- type: "MIMETYPE",
- }
- }, (err, data) => {
- console.log(TAG + ":startAbility success , err:" + JSON.stringify(err) + ",data:" + JSON.stringify(data));
- });
- console.log("------------end SUB_AA_OpenHarmony_Want_0300-------------");
- })
-
+// @ts-nocheck
+/*
+ * 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, expect, it} from 'deccjsunit/index'
+import commonEvent from '@ohos.commonevent'
+import featureAbility from '@ohos.ability.featureability'
+import formBindingData from '@ohos.application.formBindingData'
+import bundle from '@ohos.bundle';
+
+var getCallingBundleUri = {
+ events: ["uri"]
+}
+
+var getCallingBundleType = {
+ events: ["type"]
+}
+
+describe("ApplicationInfoTest", function () {
+ var TAG = "";
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_FormBase_1000
+ * @tc.name Validate formbindingdata creation data
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_FormBase_1000', 0, async function (done) {
+ console.log("------------start SUB_AA_OpenHarmony_FormBase_1000-------------");
+ TAG = "SUB_AA_OpenHarmony_FormBase_1000";
+ var dataObj = {
+ temperature:"11c",
+ "time":"11:00",
+ "test":11,
+ "test3":true
+ }
+ var result = formBindingData.createFormBindingData(dataObj)
+ console.log(TAG + " result is : " + JSON.stringify(result))
+ expect(JSON.stringify(result)).
+ assertEqual(JSON.stringify({"data":"{\"temperature\":\"11c\",\"time\":\"11:00\",\"test\":11,\"test3\":true}"}));
+ done();
+ console.log("------------end SUB_AA_OpenHarmony_FormBase_1000-------------");
+ });
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_Want_0200
+ * @tc.name Switching the mission in the launcherlist to the foreground is not supported
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_Want_0200', 0, async function (done) {
+ console.log("------------start SUB_AA_OpenHarmony_Want_0200-------------");
+ TAG = "SUB_AA_OpenHarmony_Want_0200";
+ var Subscriber = "";
+
+ function SubscribeCallBackUri(err, data) {
+ console.log(TAG + " Subscribe CallBack data:" + JSON.stringify(data));
+ if(data.event != ""){
+ for (var key in data.parameters){
+ console.log(TAG + "data.parameters[key] is :" + data.parameters[key])
+ }
+ expect(data.parameters[key] == "key={true,true,false}").assertTrue();
+ }
+ done();
+ }
+
+ commonEvent.createSubscriber(getCallingBundleUri).then(async (data) => {
+ console.debug(TAG + "====>Create Subscriber====>");
+ Subscriber = data;
+ await commonEvent.subscribe(Subscriber, SubscribeCallBackUri);
+ });
+
+ featureAbility.startAbility({
+ want: {
+ abilityName: "com.example.applicationinfo.MainAbility2",
+ bundleName: "com.example.applicationinfo",
+ uri: "key={true,true,false}"
+ }
+ }, (err, data) => {
+ console.log(TAG + ":startAbility success , err:" + JSON.stringify(err) + ",data:" + JSON.stringify(data));
+ });
+ console.log("------------end SUB_AA_OpenHarmony_Want_0200-------------");
+ });
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_Want_0300
+ * @tc.name Switching the mission in the launcherlist to the foreground is not supported
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_Want_0300', 0, async function (done) {
+ console.log("------------start SUB_AA_OpenHarmony_Want_0300-------------");
+ TAG = "SUB_AA_OpenHarmony_Want_0300";
+ var Subscriber = "";
+
+ function SubscribeCallBackType(err, data) {
+ console.log(TAG + " Subscribe CallBack data:" + JSON.stringify(data));
+ if(data.event != ""){
+ for (var key in data.parameters){
+ console.log(TAG + "data.parameters[key] is :" + data.parameters[key])
+ }
+ expect(data.parameters[key] == "MIMETYPE").assertTrue();
+ }
+ done();
+ }
+
+ commonEvent.createSubscriber(getCallingBundleType).then(async (data) => {
+ console.debug(TAG + "====>Create Subscriber====>");
+ Subscriber = data;
+ await commonEvent.subscribe(Subscriber, SubscribeCallBackType);
+ });
+
+ featureAbility.startAbility({
+ want: {
+ abilityName: "com.example.applicationinfo.MainAbility2",
+ bundleName: "com.example.applicationinfo",
+ type: "MIMETYPE",
+ }
+ }, (err, data) => {
+ console.log(TAG + ":startAbility success , err:" + JSON.stringify(err) + ",data:" + JSON.stringify(data));
+ });
+ console.log("------------end SUB_AA_OpenHarmony_Want_0300-------------");
+ })
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_ApplicationInfo_0100
+ * @tc.name Verify the CodePath of applicationinfo
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_ApplicationInfo_0100', 0, async function (done) {
+ console.log("------------start SUB_AA_OpenHarmony_ApplicationInfo_0100-------------");
+ TAG = "SUB_AA_OpenHarmony_ApplicationInfo_0100";
+
+ bundle.getApplicationInfo("com.example.applicationinfo", 1, (error, data)=> {
+ console.log(TAG + "getApplicationInfo success, error: "
+ + JSON.stringify(error) + ", data: " + JSON.stringify(data))
+ console.log(TAG + "data.condePath: " + JSON.stringify(data.codePath))
+ expect(JSON.stringify(data.codePath)).
+ assertEqual(JSON.stringify("/data/app/el1/bundle/public/com.example.applicationinfo"))
+ done()
+ })
+ console.log("------------end SUB_AA_OpenHarmony_ApplicationInfo_0100-------------");
+ })
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_ApplicationInfo_0200
+ * @tc.name Verify the removable of applicationinfo
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_ApplicationInfo_0200', 0, async function (done) {
+ console.log("------------start SUB_AA_OpenHarmony_ApplicationInfo_0200-------------");
+ TAG = "SUB_AA_OpenHarmony_ApplicationInfo_0200";
+
+ bundle.getApplicationInfo("com.example.applicationinfo", 1, (error, data)=> {
+ console.log(TAG + "getApplicationInfo success, error: "
+ + JSON.stringify(error) + ", data: " + JSON.stringify(data))
+ console.log(TAG + "data.removable: " + JSON.stringify(data.removable))
+ expect(JSON.stringify(data.removable)).assertEqual("true")
+ done()
+ })
+ console.log("------------end SUB_AA_OpenHarmony_ApplicationInfo_0200-------------");
+ })
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_ApplicationInfo_0300
+ * @tc.name Verify the accesstokenid of applicationinfo
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_ApplicationInfo_0300', 0, async function (done) {
+ console.log("------------start SUB_AA_OpenHarmony_ApplicationInfo_0300-------------");
+ TAG = "SUB_AA_OpenHarmony_ApplicationInfo_0300";
+
+ bundle.getApplicationInfo("com.example.applicationinfo", 1, (error, data)=> {
+ console.log(TAG + "getApplicationInfo success, error: "
+ + JSON.stringify(error) + ", data: " + JSON.stringify(data))
+ console.log(TAG + "data.accessTokenId: " + JSON.stringify(data.accessTokenId))
+ expect(data.accessTokenId == 537317578).assertTrue();
+ done()
+ })
+ console.log("------------end SUB_AA_OpenHarmony_ApplicationInfo_0300-------------");
+ })
+
})
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/fa/fa_applicationinfo_test/entry/src/main/js/test/List.test.js b/aafwk/aafwk_standard/fa/fa_applicationinfo_test/entry/src/main/js/test/List.test.js
index 88675b3f381a06d55ab21604fed9e80b0a1da267..7750127a75256ba92ced6c8d5128d3a614c77cbb 100644
--- a/aafwk/aafwk_standard/fa/fa_applicationinfo_test/entry/src/main/js/test/List.test.js
+++ b/aafwk/aafwk_standard/fa/fa_applicationinfo_test/entry/src/main/js/test/List.test.js
@@ -1,16 +1,16 @@
-/*
- * 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.
- */
-
+/*
+ * 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.
+ */
+
require('./ApplicationInfoJsunit.test.js')
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/fa/fa_applicationinfo_test/entry/src/main/resources/base/element/string.json b/aafwk/aafwk_standard/fa/fa_applicationinfo_test/entry/src/main/resources/base/element/string.json
index 425cf6173c67c2ba92f95274b86903e6a494222b..92f5ff8a48403b37a65f5b6f6e5fe285f277d21e 100644
--- a/aafwk/aafwk_standard/fa/fa_applicationinfo_test/entry/src/main/resources/base/element/string.json
+++ b/aafwk/aafwk_standard/fa/fa_applicationinfo_test/entry/src/main/resources/base/element/string.json
@@ -1,20 +1,20 @@
-{
- "string": [
- {
- "name": "entry_MainAbility",
- "value": "entry_MainAbility"
- },
- {
- "name": "description_mainability",
- "value": "JS_Empty Ability"
- },
- {
- "name": "description_mainability2",
- "value": "JS_Empty Ability"
- },
- {
- "name": "entry_MainAbility2",
- "value": "entry_MainAbility2"
- }
- ]
+{
+ "string": [
+ {
+ "name": "entry_MainAbility",
+ "value": "entry_MainAbility"
+ },
+ {
+ "name": "description_mainability",
+ "value": "JS_Empty Ability"
+ },
+ {
+ "name": "description_mainability2",
+ "value": "JS_Empty Ability"
+ },
+ {
+ "name": "entry_MainAbility2",
+ "value": "entry_MainAbility2"
+ }
+ ]
}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/fa/fa_applicationinfo_test/signature/openharmony_sx.p7b b/aafwk/aafwk_standard/fa/fa_applicationinfo_test/signature/openharmony_sx.p7b
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_auxstate_test/BUILD.gn b/aafwk/aafwk_standard/fa/fa_auxstate_test/BUILD.gn
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_auxstate_test/Test.json b/aafwk/aafwk_standard/fa/fa_auxstate_test/Test.json
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_auxstate_test/entry/src/main/config.json b/aafwk/aafwk_standard/fa/fa_auxstate_test/entry/src/main/config.json
index e3db34077fc049069eb7cbfe4e1435ee77022165..9f2d104a5879bd7a111bbea65cf4523fb26070c5 100644
--- a/aafwk/aafwk_standard/fa/fa_auxstate_test/entry/src/main/config.json
+++ b/aafwk/aafwk_standard/fa/fa_auxstate_test/entry/src/main/config.json
@@ -1,64 +1,64 @@
-{
- "app": {
- "bundleName": "com.example.fzgc",
- "vendor": "example",
- "version": {
- "code": 1000000,
- "name": "1.0.0"
- }
- },
- "deviceConfig": {},
- "module": {
- "package": "com.example.fzgc",
- "name": ".MyApplication",
- "mainAbility": ".MainAbility",
- "srcPath": "",
- "deviceType": [
- "phone"
- ],
- "distro": {
- "deliveryWithInstall": true,
- "moduleName": "entry",
- "moduleType": "entry",
- "installationFree": false
- },
- "abilities": [
- {
- "skills": [
- {
- "entities": [
- "entity.system.home"
- ],
- "actions": [
- "action.system.home"
- ]
- }
- ],
- "orientation": "unspecified",
- "visible": true,
- "srcPath": "MainAbility",
- "name": ".MainAbility",
- "srcLanguage": "js",
- "icon": "$media:icon",
- "description": "$string:description_mainability",
- "formsEnabled": false,
- "label": "$string:entry_MainAbility",
- "type": "page",
- "launchType": "standard"
- }
- ],
- "js": [
- {
- "pages": [
- "pages/index/index",
- "pages/second/second"
- ],
- "name": ".MainAbility",
- "window": {
- "designWidth": 720,
- "autoDesignWidth": false
- }
- }
- ]
- }
+{
+ "app": {
+ "bundleName": "com.example.fzgc",
+ "vendor": "example",
+ "version": {
+ "code": 1000000,
+ "name": "1.0.0"
+ }
+ },
+ "deviceConfig": {},
+ "module": {
+ "package": "com.example.fzgc",
+ "name": ".MyApplication",
+ "mainAbility": ".MainAbility",
+ "srcPath": "",
+ "deviceType": [
+ "phone"
+ ],
+ "distro": {
+ "deliveryWithInstall": true,
+ "moduleName": "entry",
+ "moduleType": "entry",
+ "installationFree": false
+ },
+ "abilities": [
+ {
+ "skills": [
+ {
+ "entities": [
+ "entity.system.home"
+ ],
+ "actions": [
+ "action.system.home"
+ ]
+ }
+ ],
+ "orientation": "unspecified",
+ "visible": true,
+ "srcPath": "MainAbility",
+ "name": ".MainAbility",
+ "srcLanguage": "js",
+ "icon": "$media:icon",
+ "description": "$string:description_mainability",
+ "formsEnabled": false,
+ "label": "$string:entry_MainAbility",
+ "type": "page",
+ "launchType": "standard"
+ }
+ ],
+ "js": [
+ {
+ "pages": [
+ "pages/index/index",
+ "pages/second/second"
+ ],
+ "name": ".MainAbility",
+ "window": {
+ "designWidth": 720,
+ "autoDesignWidth": false
+ }
+ }
+ ]
+ }
}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/fa/fa_auxstate_test/entry/src/main/resources/base/element/string.json b/aafwk/aafwk_standard/fa/fa_auxstate_test/entry/src/main/resources/base/element/string.json
index 610d89afcb84069982cf1fd49782a75e2d0ef089..d1321867f15bbb87342c4263a8579a7c1b6f68c6 100644
--- a/aafwk/aafwk_standard/fa/fa_auxstate_test/entry/src/main/resources/base/element/string.json
+++ b/aafwk/aafwk_standard/fa/fa_auxstate_test/entry/src/main/resources/base/element/string.json
@@ -1,12 +1,12 @@
-{
- "string": [
- {
- "name": "entry_MainAbility",
- "value": "entry_MainAbility"
- },
- {
- "name": "description_mainability",
- "value": "JS_Empty Ability"
- }
- ]
+{
+ "string": [
+ {
+ "name": "entry_MainAbility",
+ "value": "entry_MainAbility"
+ },
+ {
+ "name": "description_mainability",
+ "value": "JS_Empty Ability"
+ }
+ ]
}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/fa/fa_auxstate_test/signature/openharmony_sx.p7b b/aafwk/aafwk_standard/fa/fa_auxstate_test/signature/openharmony_sx.p7b
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_auxsumstate_test/BUILD.gn b/aafwk/aafwk_standard/fa/fa_auxsumstate_test/BUILD.gn
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_auxsumstate_test/Test.json b/aafwk/aafwk_standard/fa/fa_auxsumstate_test/Test.json
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_auxsumstate_test/entry/src/main/config.json b/aafwk/aafwk_standard/fa/fa_auxsumstate_test/entry/src/main/config.json
index 622611075a6dbbce449de73b698201aafe2fe875..2caea87e88dbf40f24bdfd94dca1b7bac95ad67b 100644
--- a/aafwk/aafwk_standard/fa/fa_auxsumstate_test/entry/src/main/config.json
+++ b/aafwk/aafwk_standard/fa/fa_auxsumstate_test/entry/src/main/config.json
@@ -1,64 +1,64 @@
-{
- "app": {
- "bundleName": "com.example.fzstatelistener",
- "vendor": "example",
- "version": {
- "code": 1000000,
- "name": "1.0.0"
- }
- },
- "deviceConfig": {},
- "module": {
- "package": "com.example.fzstatelistener",
- "name": ".MyApplication",
- "mainAbility": ".MainAbility",
- "srcPath": "",
- "deviceType": [
- "phone"
- ],
- "distro": {
- "deliveryWithInstall": true,
- "moduleName": "entry",
- "moduleType": "entry",
- "installationFree": false
- },
- "abilities": [
- {
- "skills": [
- {
- "entities": [
- "entity.system.home"
- ],
- "actions": [
- "action.system.home"
- ]
- }
- ],
- "orientation": "unspecified",
- "visible": true,
- "srcPath": "MainAbility",
- "name": ".MainAbility",
- "srcLanguage": "js",
- "icon": "$media:icon",
- "description": "$string:description_mainability",
- "formsEnabled": false,
- "label": "$string:entry_MainAbility",
- "type": "page",
- "launchType": "standard"
- }
- ],
- "js": [
- {
- "pages": [
- "pages/index/index",
- "pages/second/second"
- ],
- "name": ".MainAbility",
- "window": {
- "designWidth": 720,
- "autoDesignWidth": false
- }
- }
- ]
- }
+{
+ "app": {
+ "bundleName": "com.example.fzstatelistener",
+ "vendor": "example",
+ "version": {
+ "code": 1000000,
+ "name": "1.0.0"
+ }
+ },
+ "deviceConfig": {},
+ "module": {
+ "package": "com.example.fzstatelistener",
+ "name": ".MyApplication",
+ "mainAbility": ".MainAbility",
+ "srcPath": "",
+ "deviceType": [
+ "phone"
+ ],
+ "distro": {
+ "deliveryWithInstall": true,
+ "moduleName": "entry",
+ "moduleType": "entry",
+ "installationFree": false
+ },
+ "abilities": [
+ {
+ "skills": [
+ {
+ "entities": [
+ "entity.system.home"
+ ],
+ "actions": [
+ "action.system.home"
+ ]
+ }
+ ],
+ "orientation": "unspecified",
+ "visible": true,
+ "srcPath": "MainAbility",
+ "name": ".MainAbility",
+ "srcLanguage": "js",
+ "icon": "$media:icon",
+ "description": "$string:description_mainability",
+ "formsEnabled": false,
+ "label": "$string:entry_MainAbility",
+ "type": "page",
+ "launchType": "standard"
+ }
+ ],
+ "js": [
+ {
+ "pages": [
+ "pages/index/index",
+ "pages/second/second"
+ ],
+ "name": ".MainAbility",
+ "window": {
+ "designWidth": 720,
+ "autoDesignWidth": false
+ }
+ }
+ ]
+ }
}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/fa/fa_auxsumstate_test/entry/src/main/resources/base/element/string.json b/aafwk/aafwk_standard/fa/fa_auxsumstate_test/entry/src/main/resources/base/element/string.json
index 610d89afcb84069982cf1fd49782a75e2d0ef089..d1321867f15bbb87342c4263a8579a7c1b6f68c6 100644
--- a/aafwk/aafwk_standard/fa/fa_auxsumstate_test/entry/src/main/resources/base/element/string.json
+++ b/aafwk/aafwk_standard/fa/fa_auxsumstate_test/entry/src/main/resources/base/element/string.json
@@ -1,12 +1,12 @@
-{
- "string": [
- {
- "name": "entry_MainAbility",
- "value": "entry_MainAbility"
- },
- {
- "name": "description_mainability",
- "value": "JS_Empty Ability"
- }
- ]
+{
+ "string": [
+ {
+ "name": "entry_MainAbility",
+ "value": "entry_MainAbility"
+ },
+ {
+ "name": "description_mainability",
+ "value": "JS_Empty Ability"
+ }
+ ]
}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/fa/fa_auxsumstate_test/signature/openharmony_sx.p7b b/aafwk/aafwk_standard/fa/fa_auxsumstate_test/signature/openharmony_sx.p7b
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_clear_test/BUILD.gn b/aafwk/aafwk_standard/fa/fa_clear_test/BUILD.gn
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_clear_test/Test.json b/aafwk/aafwk_standard/fa/fa_clear_test/Test.json
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/config.json b/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/config.json
old mode 100644
new mode 100755
index 27dbde076509ae6e30d5c38f1642c6791368b901..c87ecdceec6a0bf50377926024e50570718cdefb
--- a/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/config.json
+++ b/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/config.json
@@ -1,141 +1,141 @@
-{
- "app": {
- "bundleName": "com.example.abilitydisable",
- "vendor": "example",
- "version": {
- "code": 1000000,
- "name": "1.0.0"
- }
- },
- "deviceConfig": {},
- "module": {
- "package": "com.example.abilitydisable",
- "name": ".MyApplication",
- "mainAbility": ".MainAbility",
- "srcPath": "",
- "deviceType": [
- "phone"
- ],
- "distro": {
- "deliveryWithInstall": true,
- "moduleName": "entry",
- "moduleType": "entry",
- "installationFree": false
- },
- "abilities": [
- {
- "skills": [
- {
- "entities": [
- "entity.system.home"
- ],
- "actions": [
- "action.system.home"
- ]
- }
- ],
- "orientation": "unspecified",
- "visible": true,
- "srcPath": "MainAbility",
- "name": ".MainAbility",
- "srcLanguage": "js",
- "icon": "$media:icon",
- "description": "$string:description_mainability",
- "formsEnabled": false,
- "label": "$string:entry_MainAbility",
- "type": "page",
- "launchType": "standard"
- },
- {
- "orientation": "unspecified",
- "srcPath": "MainAbility2",
- "name": ".MainAbility2",
- "srcLanguage": "js",
- "icon": "$media:icon",
- "description": "$string:description_mainability2",
- "formsEnabled": false,
- "label": "$string:entry_MainAbility",
- "type": "page",
- "launchType": "standard"
- },
- {
- "orientation": "unspecified",
- "srcPath": "MainAbility3",
- "name": ".MainAbility3",
- "srcLanguage": "js",
- "icon": "$media:icon",
- "description": "$string:description_mainability3",
- "formsEnabled": false,
- "label": "$string:entry_MainAbility",
- "type": "page",
- "launchType": "standard"
- },
- {
- "orientation": "unspecified",
- "srcPath": "MainAbility4",
- "name": ".MainAbility4",
- "srcLanguage": "js",
- "icon": "$media:icon",
- "description": "$string:description_mainability4",
- "formsEnabled": false,
- "label": "$string:entry_MainAbility",
- "type": "page",
- "launchType": "standard"
- },
- {
- "srcPath": "ServiceAbility",
- "name": ".ServiceAbility",
- "icon": "$media:icon",
- "srcLanguage": "js",
- "description": "$string:description_serviceability",
- "type": "service"
- }
- ],
- "js": [
- {
- "pages": [
- "pages/index/index",
- "pages/second/second"
- ],
- "name": ".MainAbility",
- "window": {
- "designWidth": 720,
- "autoDesignWidth": false
- }
- },
- {
- "pages": [
- "pages/index/index",
- "pages/second/second"
- ],
- "name": ".MainAbility2",
- "window": {
- "designWidth": 720,
- "autoDesignWidth": false
- }
- },
- {
- "pages": [
- "pages/index/index",
- "pages/second/second"
- ],
- "name": ".MainAbility3",
- "window": {
- "designWidth": 720,
- "autoDesignWidth": false
- }
- },
- {
- "pages": [
- "pages/index/index",
- "pages/second/second"
- ],
- "name": ".MainAbility4",
- "window": {
- "designWidth": 720,
- "autoDesignWidth": false
- }
- }
- ]
- }
+{
+ "app": {
+ "bundleName": "com.example.abilitydisable",
+ "vendor": "example",
+ "version": {
+ "code": 1000000,
+ "name": "1.0.0"
+ }
+ },
+ "deviceConfig": {},
+ "module": {
+ "package": "com.example.abilitydisable",
+ "name": ".MyApplication",
+ "mainAbility": ".MainAbility",
+ "srcPath": "",
+ "deviceType": [
+ "phone"
+ ],
+ "distro": {
+ "deliveryWithInstall": true,
+ "moduleName": "entry",
+ "moduleType": "entry",
+ "installationFree": false
+ },
+ "abilities": [
+ {
+ "skills": [
+ {
+ "entities": [
+ "entity.system.home"
+ ],
+ "actions": [
+ "action.system.home"
+ ]
+ }
+ ],
+ "orientation": "unspecified",
+ "visible": true,
+ "srcPath": "MainAbility",
+ "name": ".MainAbility",
+ "srcLanguage": "js",
+ "icon": "$media:icon",
+ "description": "$string:description_mainability",
+ "formsEnabled": false,
+ "label": "$string:entry_MainAbility",
+ "type": "page",
+ "launchType": "standard"
+ },
+ {
+ "orientation": "unspecified",
+ "srcPath": "MainAbility2",
+ "name": ".MainAbility2",
+ "srcLanguage": "js",
+ "icon": "$media:icon",
+ "description": "$string:description_mainability2",
+ "formsEnabled": false,
+ "label": "$string:entry_MainAbility",
+ "type": "page",
+ "launchType": "standard"
+ },
+ {
+ "orientation": "unspecified",
+ "srcPath": "MainAbility3",
+ "name": ".MainAbility3",
+ "srcLanguage": "js",
+ "icon": "$media:icon",
+ "description": "$string:description_mainability3",
+ "formsEnabled": false,
+ "label": "$string:entry_MainAbility",
+ "type": "page",
+ "launchType": "standard"
+ },
+ {
+ "orientation": "unspecified",
+ "srcPath": "MainAbility4",
+ "name": ".MainAbility4",
+ "srcLanguage": "js",
+ "icon": "$media:icon",
+ "description": "$string:description_mainability4",
+ "formsEnabled": false,
+ "label": "$string:entry_MainAbility",
+ "type": "page",
+ "launchType": "standard"
+ },
+ {
+ "srcPath": "ServiceAbility",
+ "name": ".ServiceAbility",
+ "icon": "$media:icon",
+ "srcLanguage": "js",
+ "description": "$string:description_serviceability",
+ "type": "service"
+ }
+ ],
+ "js": [
+ {
+ "pages": [
+ "pages/index/index",
+ "pages/second/second"
+ ],
+ "name": ".MainAbility",
+ "window": {
+ "designWidth": 720,
+ "autoDesignWidth": false
+ }
+ },
+ {
+ "pages": [
+ "pages/index/index",
+ "pages/second/second"
+ ],
+ "name": ".MainAbility2",
+ "window": {
+ "designWidth": 720,
+ "autoDesignWidth": false
+ }
+ },
+ {
+ "pages": [
+ "pages/index/index",
+ "pages/second/second"
+ ],
+ "name": ".MainAbility3",
+ "window": {
+ "designWidth": 720,
+ "autoDesignWidth": false
+ }
+ },
+ {
+ "pages": [
+ "pages/index/index",
+ "pages/second/second"
+ ],
+ "name": ".MainAbility4",
+ "window": {
+ "designWidth": 720,
+ "autoDesignWidth": false
+ }
+ }
+ ]
+ }
}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/MainAbility/app.js b/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/MainAbility/app.js
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/MainAbility/i18n/en-US.json b/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/MainAbility/i18n/en-US.json
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/MainAbility/i18n/zh-CN.json b/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/MainAbility/i18n/zh-CN.json
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/MainAbility/pages/index/index.css b/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/MainAbility/pages/index/index.css
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/MainAbility/pages/index/index.hml b/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/MainAbility/pages/index/index.hml
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/MainAbility/pages/index/index.js b/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/MainAbility/pages/index/index.js
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/MainAbility/pages/second/second.css b/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/MainAbility/pages/second/second.css
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/MainAbility/pages/second/second.hml b/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/MainAbility/pages/second/second.hml
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/MainAbility/pages/second/second.js b/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/MainAbility/pages/second/second.js
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/MainAbility2/app.js b/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/MainAbility2/app.js
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/MainAbility2/i18n/en-US.json b/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/MainAbility2/i18n/en-US.json
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/MainAbility2/i18n/zh-CN.json b/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/MainAbility2/i18n/zh-CN.json
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/MainAbility2/pages/index/index.css b/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/MainAbility2/pages/index/index.css
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/MainAbility2/pages/index/index.hml b/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/MainAbility2/pages/index/index.hml
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/MainAbility2/pages/index/index.js b/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/MainAbility2/pages/index/index.js
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/MainAbility2/pages/second/second.css b/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/MainAbility2/pages/second/second.css
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/MainAbility2/pages/second/second.hml b/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/MainAbility2/pages/second/second.hml
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/MainAbility2/pages/second/second.js b/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/MainAbility2/pages/second/second.js
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/MainAbility3/app.js b/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/MainAbility3/app.js
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/MainAbility3/i18n/en-US.json b/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/MainAbility3/i18n/en-US.json
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/MainAbility3/i18n/zh-CN.json b/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/MainAbility3/i18n/zh-CN.json
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/MainAbility3/pages/index/index.css b/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/MainAbility3/pages/index/index.css
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/MainAbility3/pages/index/index.hml b/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/MainAbility3/pages/index/index.hml
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/MainAbility3/pages/index/index.js b/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/MainAbility3/pages/index/index.js
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/MainAbility3/pages/second/second.css b/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/MainAbility3/pages/second/second.css
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/MainAbility3/pages/second/second.hml b/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/MainAbility3/pages/second/second.hml
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/MainAbility3/pages/second/second.js b/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/MainAbility3/pages/second/second.js
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/MainAbility4/app.js b/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/MainAbility4/app.js
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/MainAbility4/i18n/en-US.json b/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/MainAbility4/i18n/en-US.json
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/MainAbility4/i18n/zh-CN.json b/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/MainAbility4/i18n/zh-CN.json
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/MainAbility4/pages/index/index.css b/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/MainAbility4/pages/index/index.css
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/MainAbility4/pages/index/index.hml b/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/MainAbility4/pages/index/index.hml
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/MainAbility4/pages/index/index.js b/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/MainAbility4/pages/index/index.js
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/MainAbility4/pages/second/second.css b/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/MainAbility4/pages/second/second.css
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/MainAbility4/pages/second/second.hml b/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/MainAbility4/pages/second/second.hml
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/MainAbility4/pages/second/second.js b/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/MainAbility4/pages/second/second.js
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/ServiceAbility/service.js b/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/ServiceAbility/service.js
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/test/AbilityDisableTest.js b/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/test/AbilityDisableTest.js
old mode 100644
new mode 100755
index e4a8acbd27d852e14c5e74d231ae8fb0e2370bf8..95c7f37888c15d7dec5c59aaba5e5f99c658cbd1
--- a/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/test/AbilityDisableTest.js
+++ b/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/test/AbilityDisableTest.js
@@ -1,256 +1,256 @@
-
-/*
- * 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.
- */
-// @ts-nocheck
-import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index"
-import missionManager from '@ohos.application.missionManager';
-import abilityFeatureAbility from '@ohos.ability.featureAbility';
-import bundleManager from '@ohos.bundle';
-
-describe('AbilityDisableTests', function () {
- console.log("AbilityDisableTests --- start");
-
- function fns(){
- setTimeout(()=>{
- abilityFeatureAbility.startAbility({ want: {
- bundleName: "com.example.abilitydisable",
- abilityName: "com.example.abilitydisable.MainAbility2"
- } }, (error, data) => {
- console.log('SUB_AA_OpenHarmony_Clear_0100 - startMainAbility2: '
- + JSON.stringify(error) + ", " + JSON.stringify(data))
- expect(err.code == 0).assertTrue();
- });
- },500)
- setTimeout(()=>{
- abilityFeatureAbility.startAbility({ want: {
- bundleName: "com.example.abilitydisable",
- abilityName: "com.example.abilitydisable.MainAbility4"
- } }, (error, data) => {
- console.log('SUB_AA_OpenHarmony_Clear_0100 - startMainAbility4: '
- + JSON.stringify(error) + ", " + JSON.stringify(data))
- expect(err.code == 0).assertTrue();
- });
- },1000)
- setTimeout(()=>{
- abilityFeatureAbility.startAbility({ want: {
- bundleName: "com.example.abilitydisable",
- abilityName: "com.example.abilitydisable.MainAbility3"
- } }, (error, data) => {
- console.log('SUB_AA_OpenHarmony_Clear_0100 - startMainAbility3: '
- + JSON.stringify(error) + ", " + JSON.stringify(data))
- expect(err.code == 0).assertTrue();
- });
- },1500)
- setTimeout(()=>{
- missionManager.getMissionInfos("", 20, (err, data) => {
- console.log('SUB_AA_OpenHarmony_Clear_0100 getMissionInfos errCode : '
- + JSON.stringify(err) + " data: " + JSON.stringify(data));
- for (var i = 0;i < data.length; i++) {
- console.log("bundleName:"+data[i].want["abilityName"])
- if(data[i].want["abilityName"] == "com.example.abilitydisable.MainAbility3"
- || data[i].want["abilityName"] == "com.example.abilitydisable.MainAbility4"
- ||data[i].want["abilityName"] == "com.example.abilitydisable.MainAbility"
- ||data[i].want["abilityName"] == "com.example.abilitydisable.MainAbility2"){
- console.log("data[i]['lockedState']::::"+data[i]['lockedState']);
- console.log("data[i].missionId" + data[i].missionId);
- console.log("SUB_AA_OpenHarmony_Clear_0100, missionId:" + data[i].missionId);
- missionIds.push(data[i].missionId);
- }
- }
- console.log('SUB_AA_OpenHarmony_Clear_0100 missionId:'+ missionIds +
- typeof missionIds + ":::::"+missionIds[1] + typeof missionIds[1]);
- })
- console.log("SUB_AA_OpenHarmony_Clear_0100" + JSON.stringify(missionIds));
- },2000)
- setTimeout(()=>{
- missionManager.lockMission(parseInt(missionIds[1]),(err,data)=>{
-
- console.log('SUB_AA_OpenHarmony_Clear_0100 lockMission1 missionIds[1] : ' +
- JSON.stringify(missionIds[1]), + parseInt(missionIds[1]));
-
- console.log('SUB_AA_OpenHarmony_Clear_0100 lockMission1 errCode : ' +
- JSON.stringify(err) + " data: " + JSON.stringify(data));
- })
- },2500)
- setTimeout(()=>{
- missionManager.lockMission(parseInt(missionIds[2]),(err,data)=>{
- console.log('SUB_AA_OpenHarmony_Clear_0100 lockMission2 errCode : ' +
- JSON.stringify(err) + " data: " + JSON.stringify(data));
- })
- },2500)
- setTimeout(()=>{
- missionManager.getMissionInfos("", 20, (err, data) => {
- console.log("SUB_AA_OpenHarmony_Clear_0100, twosgetMissionInfos:" +
- JSON.stringify(data));
- for (var i = 0;i < data.length; i++) {
- console.log("data[i].missionId:missionIds[2] news missionIds[1]" +
- data[i].missionId + missionIds[2] + missionIds[1])
- if(data[i].missionId == missionIds[1] || data[i].missionId == missionIds[2]){
- console.log("data[i]['lockedState']222:::::::"+data[i]['lockedState']);
- expect(data[i]['lockedState'] == true).assertTrue();
- }
- }
- })
- console.log("SUB_AA_OpenHarmony_Clear_0100" + JSON.stringify(missionIds));
- },3100)
- setTimeout(()=>{
- missionManager.getMissionInfos("", 20, (err, data) => {
- console.log('SUB_AA_OpenHarmony_Clear_0100 getMissionInfos errCode : '
- + JSON.stringify(err) + " data: " + JSON.stringify(data));
- for (var i = 0;i < data.length; i++) {
- console.log("bundleName:"+data[i].want["abilityName"])
- if(data[i].want["abilityName"] == "com.example.abilitydisable.MainAbility3"
- || data[i].want["abilityName"] == "com.example.abilitydisable.MainAbility4"
- ||data[i].want["abilityName"] == "com.example.abilitydisable.MainAbility"
- ||data[i].want["abilityName"] == "com.example.abilitydisable.MainAbility2"){
- console.log("data[i]['lockedState']::::"+data[i]['lockedState']);
- expect(data[i].lockedState == false).assertTrue();
- }
- }
- console.log('SUB_AA_OpenHarmony_Clear_0100 missionId:'+ missionIds +
- typeof missionIds + ":::::"+missionIds[1] + typeof missionIds[1]);
- })
- console.log("SUB_AA_OpenHarmony_Clear_0100" + JSON.stringify(missionIds));
- },5000)
- setTimeout(()=>{
- missionManager.moveMissionToFront(parseInt(missionIds[2]),(err,data)=>{
- console.log('SUB_AA_OpenHarmony_Clear_0100 moveMissionToFront errCode : ' +
- JSON.stringify(err) + " data: " + JSON.stringify(data));
- })
- },6000)
- setTimeout(()=>{
- missionManager.clearAllMissions((err,data)=>{
- console.log('SUB_AA_OpenHarmony_Clear_0100 clearAllMissions errCode: ' +
- JSON.stringify(err) + " data: " + JSON.stringify(data));
-
- })
- },7000)
- setTimeout(()=>{
- missionManager.getMissionInfos("", 20, (err, data) => {
- console.log('SUB_AA_OpenHarmony_Clear_0100 getMissionInfos errCode : ' +
- JSON.stringify(err) + " data: " + JSON.stringify(data));
- for (var i = 0;i < data.length; i++) {
- console.log("bundleName:"+data[i].want["abilityName"])
- if(data[i].want["abilityName"] == "com.example.abilitydisable.MainAbility3" ||
- data[i].want["abilityName"] == "com.example.abilitydisable.MainAbility4" ||
- data[i].want["abilityName"] == "com.example.abilitydisable.MainAbility"||
- data[i].want["abilityName"] == "com.example.abilitydisable.MainAbility2"){
- console.log("data[i]['lockedState']end::::"+data[i]['lockedState']);
- expect(data[i]['lockedState'] == true).assertTrue();
- }
- }
- console.log('SUB_AA_OpenHarmony_Clear_0100 missionId:'+
- missionIds + typeof missionIds + ":::::"+missionIds[1] + typeof missionIds[1]);
- })
- console.log("SUB_AA_OpenHarmony_Clear_0100" +
- JSON.stringify(missionIds));
- },8000)
- }
-
- /*
- * @tc.number SUB_AA_OpenHarmony_Clear_1200
- * @tc.name missionId for undefined
- * @tc.desc Function test
- * @tc.level 0
- */
- it("SUB_AA_OpenHarmony_Clear_1200", 0, async function (done) {
- console.info("------------------logMessage SUB_AA_OpenHarmony_Clear_1200-------------------");
- missionManager.clearMission(undefined, (data, err) => {
- console.log('SUB_AA_OpenHarmony_Clear_1200 asyncCallback errCode : '
- + JSON.stringify(err) + " data: " + JSON.stringify(data));
- expect(data["code"]==-1).assertTrue();
- })
- done();
- });
-
- /*
- * @tc.number SUB_AA_OpenHarmony_Clear_1300
- * @tc.name MissionId: does not exist
- * @tc.desc Function test
- * @tc.level 0
- */
- it("SUB_AA_OpenHarmony_Clear_1300", 0, async function (done) {
- console.info("------------------logMessage SUB_AA_OpenHarmony_Clear_1300-------------------");
- missionManager.clearMission("xxxx", (data, err) => {
- console.log('SUB_AA_OpenHarmony_Clear_1300 asyncCallback errCode : '
- + JSON.stringify(err) + " data: " + JSON.stringify(data));
- expect(data["code"]==-1).assertTrue();
- })
- done();
- });
-
- /*
- * @tc.number SUB_AA_OpenHarmony_Clear_1400
- * @tc.name MissionId is a string number
- * @tc.desc Function test
- * @tc.level 0
- */
- it("SUB_AA_OpenHarmony_Clear_1400", 0, async function (done) {
- console.info("------------------logMessage SUB_AA_OpenHarmony_Clear_1400-------------------");
- missionManager.clearMission("123456", (data, err) => {
- console.log('SUB_AA_OpenHarmony_Clear_1400 asyncCallback errCode : '
- + JSON.stringify(err) + " data: " + JSON.stringify(data));
- expect(data["code"]==-1).assertTrue();
- })
- done();
- });
-
- /*
- * @tc.number SUB_AA_OpenHarmony_Clear_1500
- * @tc.name The missionId is a non-number string
- * @tc.desc Function test
- * @tc.level 0
- */
- it("SUB_AA_OpenHarmony_Clear_1500", 0, async function (done) {
- console.info("------------------logMessage SUB_AA_OpenHarmony_Clear_1500-------------------");
- missionManager.clearMission("abc@@#$", (data, err) => {
- console.log('SUB_AA_OpenHarmony_Clear_1500 asyncCallback errCode : '
- + JSON.stringify(err) + " data: " + JSON.stringify(data));
- expect(data["code"]==-1).assertTrue();
- })
- done();
- });
-
- /*
- * @tc.number SUB_AA_OpenHarmony_Clear_1600
- * @tc.name MissionId is an existing floating point type
- * @tc.desc Function test
- * @tc.level 0
- */
- it("SUB_AA_OpenHarmony_Clear_1600", 0, async function (done) {
- console.info("------------------logMessage SUB_AA_OpenHarmony_Clear_1600-------------------");
- missionManager.clearMission(1.1234, (data, err) => {
- console.log('SUB_AA_OpenHarmony_Clear_1600 asyncCallback errCode : '
- + JSON.stringify(err) + " data: " + JSON.stringify(data));
- expect(data["code"]==-1).assertTrue();
- })
- done();
- });
-
- /*
- * @tc.number SUB_AA_OpenHarmony_Clear_0100
- * @tc.name Locking is terminated after mission, switching to the front desk for cleanup
- * @tc.desc Function test
- * @tc.level 0
- */
- it('SUB_AA_OpenHarmony_Clear_0100', 0, async function (done) {
- var missionIds = [];
- console.log("SUB_AA_OpenHarmony_Clear_0100 --- start")
- fns()
- done()
- });
-
-
+
+/*
+ * 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.
+ */
+// @ts-nocheck
+import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index"
+import missionManager from '@ohos.application.missionManager';
+import abilityFeatureAbility from '@ohos.ability.featureAbility';
+import bundleManager from '@ohos.bundle';
+
+describe('AbilityDisableTests', function () {
+ console.log("AbilityDisableTests --- start");
+
+ function fns(){
+ setTimeout(()=>{
+ abilityFeatureAbility.startAbility({ want: {
+ bundleName: "com.example.abilitydisable",
+ abilityName: "com.example.abilitydisable.MainAbility2"
+ } }, (error, data) => {
+ console.log('SUB_AA_OpenHarmony_Clear_0100 - startMainAbility2: '
+ + JSON.stringify(error) + ", " + JSON.stringify(data))
+ expect(err.code == 0).assertTrue();
+ });
+ },500)
+ setTimeout(()=>{
+ abilityFeatureAbility.startAbility({ want: {
+ bundleName: "com.example.abilitydisable",
+ abilityName: "com.example.abilitydisable.MainAbility4"
+ } }, (error, data) => {
+ console.log('SUB_AA_OpenHarmony_Clear_0100 - startMainAbility4: '
+ + JSON.stringify(error) + ", " + JSON.stringify(data))
+ expect(err.code == 0).assertTrue();
+ });
+ },1000)
+ setTimeout(()=>{
+ abilityFeatureAbility.startAbility({ want: {
+ bundleName: "com.example.abilitydisable",
+ abilityName: "com.example.abilitydisable.MainAbility3"
+ } }, (error, data) => {
+ console.log('SUB_AA_OpenHarmony_Clear_0100 - startMainAbility3: '
+ + JSON.stringify(error) + ", " + JSON.stringify(data))
+ expect(err.code == 0).assertTrue();
+ });
+ },1500)
+ setTimeout(()=>{
+ missionManager.getMissionInfos("", 20, (err, data) => {
+ console.log('SUB_AA_OpenHarmony_Clear_0100 getMissionInfos errCode : '
+ + JSON.stringify(err) + " data: " + JSON.stringify(data));
+ for (var i = 0;i < data.length; i++) {
+ console.log("bundleName:"+data[i].want["abilityName"])
+ if(data[i].want["abilityName"] == "com.example.abilitydisable.MainAbility3"
+ || data[i].want["abilityName"] == "com.example.abilitydisable.MainAbility4"
+ ||data[i].want["abilityName"] == "com.example.abilitydisable.MainAbility"
+ ||data[i].want["abilityName"] == "com.example.abilitydisable.MainAbility2"){
+ console.log("data[i]['lockedState']::::"+data[i]['lockedState']);
+ console.log("data[i].missionId" + data[i].missionId);
+ console.log("SUB_AA_OpenHarmony_Clear_0100, missionId:" + data[i].missionId);
+ missionIds.push(data[i].missionId);
+ }
+ }
+ console.log('SUB_AA_OpenHarmony_Clear_0100 missionId:'+ missionIds +
+ typeof missionIds + ":::::"+missionIds[1] + typeof missionIds[1]);
+ })
+ console.log("SUB_AA_OpenHarmony_Clear_0100" + JSON.stringify(missionIds));
+ },2000)
+ setTimeout(()=>{
+ missionManager.lockMission(parseInt(missionIds[1]),(err,data)=>{
+
+ console.log('SUB_AA_OpenHarmony_Clear_0100 lockMission1 missionIds[1] : ' +
+ JSON.stringify(missionIds[1]), + parseInt(missionIds[1]));
+
+ console.log('SUB_AA_OpenHarmony_Clear_0100 lockMission1 errCode : ' +
+ JSON.stringify(err) + " data: " + JSON.stringify(data));
+ })
+ },2500)
+ setTimeout(()=>{
+ missionManager.lockMission(parseInt(missionIds[2]),(err,data)=>{
+ console.log('SUB_AA_OpenHarmony_Clear_0100 lockMission2 errCode : ' +
+ JSON.stringify(err) + " data: " + JSON.stringify(data));
+ })
+ },2500)
+ setTimeout(()=>{
+ missionManager.getMissionInfos("", 20, (err, data) => {
+ console.log("SUB_AA_OpenHarmony_Clear_0100, twosgetMissionInfos:" +
+ JSON.stringify(data));
+ for (var i = 0;i < data.length; i++) {
+ console.log("data[i].missionId:missionIds[2] news missionIds[1]" +
+ data[i].missionId + missionIds[2] + missionIds[1])
+ if(data[i].missionId == missionIds[1] || data[i].missionId == missionIds[2]){
+ console.log("data[i]['lockedState']222:::::::"+data[i]['lockedState']);
+ expect(data[i]['lockedState'] == true).assertTrue();
+ }
+ }
+ })
+ console.log("SUB_AA_OpenHarmony_Clear_0100" + JSON.stringify(missionIds));
+ },3100)
+ setTimeout(()=>{
+ missionManager.getMissionInfos("", 20, (err, data) => {
+ console.log('SUB_AA_OpenHarmony_Clear_0100 getMissionInfos errCode : '
+ + JSON.stringify(err) + " data: " + JSON.stringify(data));
+ for (var i = 0;i < data.length; i++) {
+ console.log("bundleName:"+data[i].want["abilityName"])
+ if(data[i].want["abilityName"] == "com.example.abilitydisable.MainAbility3"
+ || data[i].want["abilityName"] == "com.example.abilitydisable.MainAbility4"
+ ||data[i].want["abilityName"] == "com.example.abilitydisable.MainAbility"
+ ||data[i].want["abilityName"] == "com.example.abilitydisable.MainAbility2"){
+ console.log("data[i]['lockedState']::::"+data[i]['lockedState']);
+ expect(data[i].lockedState == false).assertTrue();
+ }
+ }
+ console.log('SUB_AA_OpenHarmony_Clear_0100 missionId:'+ missionIds +
+ typeof missionIds + ":::::"+missionIds[1] + typeof missionIds[1]);
+ })
+ console.log("SUB_AA_OpenHarmony_Clear_0100" + JSON.stringify(missionIds));
+ },5000)
+ setTimeout(()=>{
+ missionManager.moveMissionToFront(parseInt(missionIds[2]),(err,data)=>{
+ console.log('SUB_AA_OpenHarmony_Clear_0100 moveMissionToFront errCode : ' +
+ JSON.stringify(err) + " data: " + JSON.stringify(data));
+ })
+ },6000)
+ setTimeout(()=>{
+ missionManager.clearAllMissions((err,data)=>{
+ console.log('SUB_AA_OpenHarmony_Clear_0100 clearAllMissions errCode: ' +
+ JSON.stringify(err) + " data: " + JSON.stringify(data));
+
+ })
+ },7000)
+ setTimeout(()=>{
+ missionManager.getMissionInfos("", 20, (err, data) => {
+ console.log('SUB_AA_OpenHarmony_Clear_0100 getMissionInfos errCode : ' +
+ JSON.stringify(err) + " data: " + JSON.stringify(data));
+ for (var i = 0;i < data.length; i++) {
+ console.log("bundleName:"+data[i].want["abilityName"])
+ if(data[i].want["abilityName"] == "com.example.abilitydisable.MainAbility3" ||
+ data[i].want["abilityName"] == "com.example.abilitydisable.MainAbility4" ||
+ data[i].want["abilityName"] == "com.example.abilitydisable.MainAbility"||
+ data[i].want["abilityName"] == "com.example.abilitydisable.MainAbility2"){
+ console.log("data[i]['lockedState']end::::"+data[i]['lockedState']);
+ expect(data[i]['lockedState'] == true).assertTrue();
+ }
+ }
+ console.log('SUB_AA_OpenHarmony_Clear_0100 missionId:'+
+ missionIds + typeof missionIds + ":::::"+missionIds[1] + typeof missionIds[1]);
+ })
+ console.log("SUB_AA_OpenHarmony_Clear_0100" +
+ JSON.stringify(missionIds));
+ },8000)
+ }
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_Clear_1200
+ * @tc.name missionId for undefined
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it("SUB_AA_OpenHarmony_Clear_1200", 0, async function (done) {
+ console.info("------------------logMessage SUB_AA_OpenHarmony_Clear_1200-------------------");
+ missionManager.clearMission(undefined, (data, err) => {
+ console.log('SUB_AA_OpenHarmony_Clear_1200 asyncCallback errCode : '
+ + JSON.stringify(err) + " data: " + JSON.stringify(data));
+ expect(data["code"]==-1).assertTrue();
+ })
+ done();
+ });
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_Clear_1300
+ * @tc.name MissionId: does not exist
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it("SUB_AA_OpenHarmony_Clear_1300", 0, async function (done) {
+ console.info("------------------logMessage SUB_AA_OpenHarmony_Clear_1300-------------------");
+ missionManager.clearMission("xxxx", (data, err) => {
+ console.log('SUB_AA_OpenHarmony_Clear_1300 asyncCallback errCode : '
+ + JSON.stringify(err) + " data: " + JSON.stringify(data));
+ expect(data["code"]==-1).assertTrue();
+ })
+ done();
+ });
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_Clear_1400
+ * @tc.name MissionId is a string number
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it("SUB_AA_OpenHarmony_Clear_1400", 0, async function (done) {
+ console.info("------------------logMessage SUB_AA_OpenHarmony_Clear_1400-------------------");
+ missionManager.clearMission("123456", (data, err) => {
+ console.log('SUB_AA_OpenHarmony_Clear_1400 asyncCallback errCode : '
+ + JSON.stringify(err) + " data: " + JSON.stringify(data));
+ expect(data["code"]==-1).assertTrue();
+ })
+ done();
+ });
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_Clear_1500
+ * @tc.name The missionId is a non-number string
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it("SUB_AA_OpenHarmony_Clear_1500", 0, async function (done) {
+ console.info("------------------logMessage SUB_AA_OpenHarmony_Clear_1500-------------------");
+ missionManager.clearMission("abc@@#$", (data, err) => {
+ console.log('SUB_AA_OpenHarmony_Clear_1500 asyncCallback errCode : '
+ + JSON.stringify(err) + " data: " + JSON.stringify(data));
+ expect(data["code"]==-1).assertTrue();
+ })
+ done();
+ });
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_Clear_1600
+ * @tc.name MissionId is an existing floating point type
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it("SUB_AA_OpenHarmony_Clear_1600", 0, async function (done) {
+ console.info("------------------logMessage SUB_AA_OpenHarmony_Clear_1600-------------------");
+ missionManager.clearMission(1.1234, (data, err) => {
+ console.log('SUB_AA_OpenHarmony_Clear_1600 asyncCallback errCode : '
+ + JSON.stringify(err) + " data: " + JSON.stringify(data));
+ expect(data["code"]==-1).assertTrue();
+ })
+ done();
+ });
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_Clear_0100
+ * @tc.name Locking is terminated after mission, switching to the front desk for cleanup
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_Clear_0100', 0, async function (done) {
+ var missionIds = [];
+ console.log("SUB_AA_OpenHarmony_Clear_0100 --- start")
+ fns()
+ done()
+ });
+
+
})
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/test/List.test.js b/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/test/List.test.js
old mode 100644
new mode 100755
index d12ff02b85beb1eae1f5960a0254d25ec4c60c85..2a20073318a8774f47c27170e1bb49c564a5fe5b
--- a/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/test/List.test.js
+++ b/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/js/test/List.test.js
@@ -1,15 +1,15 @@
-/*
- * 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.
- */
-require('./AbilityDisableTest.js');
+/*
+ * 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.
+ */
+require('./AbilityDisableTest.js');
diff --git a/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/resources/base/element/string.json b/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/resources/base/element/string.json
old mode 100644
new mode 100755
index 1d2808e5cc8d694e37f10acd62ce27334db762e6..2e8b3cf8ad2f92e47882e62285122d098547a872
--- a/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/resources/base/element/string.json
+++ b/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/resources/base/element/string.json
@@ -1,40 +1,40 @@
-{
- "string": [
- {
- "name": "entry_MainAbility",
- "value": "entry_MainAbility"
- },
- {
- "name": "description_mainability",
- "value": "JS_Empty Ability"
- },
- {
- "name": "description_mainability2",
- "value": "JS_Empty Ability"
- },
- {
- "name": "entry_MainAbility2",
- "value": "entry_MainAbility2"
- },
- {
- "name": "description_mainability3",
- "value": "JS_Empty Ability"
- },
- {
- "name": "entry_MainAbility3",
- "value": "entry_MainAbility3"
- },
- {
- "name": "description_mainability4",
- "value": "JS_Empty Ability"
- },
- {
- "name": "entry_MainAbility4",
- "value": "entry_MainAbility4"
- },
- {
- "name": "description_serviceability",
- "value": "hap sample empty service"
- }
- ]
+{
+ "string": [
+ {
+ "name": "entry_MainAbility",
+ "value": "entry_MainAbility"
+ },
+ {
+ "name": "description_mainability",
+ "value": "JS_Empty Ability"
+ },
+ {
+ "name": "description_mainability2",
+ "value": "JS_Empty Ability"
+ },
+ {
+ "name": "entry_MainAbility2",
+ "value": "entry_MainAbility2"
+ },
+ {
+ "name": "description_mainability3",
+ "value": "JS_Empty Ability"
+ },
+ {
+ "name": "entry_MainAbility3",
+ "value": "entry_MainAbility3"
+ },
+ {
+ "name": "description_mainability4",
+ "value": "JS_Empty Ability"
+ },
+ {
+ "name": "entry_MainAbility4",
+ "value": "entry_MainAbility4"
+ },
+ {
+ "name": "description_serviceability",
+ "value": "hap sample empty service"
+ }
+ ]
}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/resources/base/media/icon.png b/aafwk/aafwk_standard/fa/fa_clear_test/entry/src/main/resources/base/media/icon.png
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_clear_test/signature/openharmony_sx.p7b b/aafwk/aafwk_standard/fa/fa_clear_test/signature/openharmony_sx.p7b
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/BUILD.gn b/aafwk/aafwk_standard/fa/fa_configurationconstant_test/BUILD.gn
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/Test.json b/aafwk/aafwk_standard/fa/fa_configurationconstant_test/Test.json
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/.gitignore b/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/.gitignore
index 7d5b7a94f4dcf381f03ff21f28f8a2494b58023f..f77260b1509284d42a7f8a2449ad1e8f4b489a3a 100644
--- a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/.gitignore
+++ b/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/.gitignore
@@ -1,2 +1,2 @@
-/build
-/node_modules
+/build
+/node_modules
diff --git a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/build.gradle b/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/build.gradle
index cef7b37de8f320938458ca42edde1462669836d2..c40c1f08c819a404fc2312634d97bee84d939ba3 100644
--- a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/build.gradle
+++ b/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/build.gradle
@@ -1,21 +1,21 @@
-apply plugin: 'com.huawei.ohos.hap'
-//For instructions on signature configuration, see https://developer.harmonyos.com/cn/docs/documentation/doc-guides/ide_debug_device-0000001053822404#section1112183053510
-ohos {
- compileSdkVersion 8
- defaultConfig {
- compatibleSdkVersion 7
- }
- buildTypes {
- release {
- proguardOpt {
- proguardEnabled false
- rulesFiles 'proguard-rules.pro'
- }
- }
- }
-}
-
-dependencies {
- implementation fileTree(dir: 'libs', include: ['*.jar', '*.har'])
- testImplementation 'junit:junit:4.13.1'
-}
+apply plugin: 'com.huawei.ohos.hap'
+//For instructions on signature configuration, see https://developer.harmonyos.com/cn/docs/documentation/doc-guides/ide_debug_device-0000001053822404#section1112183053510
+ohos {
+ compileSdkVersion 8
+ defaultConfig {
+ compatibleSdkVersion 7
+ }
+ buildTypes {
+ release {
+ proguardOpt {
+ proguardEnabled false
+ rulesFiles 'proguard-rules.pro'
+ }
+ }
+ }
+}
+
+dependencies {
+ implementation fileTree(dir: 'libs', include: ['*.jar', '*.har'])
+ testImplementation 'junit:junit:4.13.1'
+}
diff --git a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/package.json b/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/package.json
index 0967ef424bce6791893e9a57bb952f80fd536e93..69a88e3b65423624fe7ea8b0f8beefcc62cc3d5f 100644
--- a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/package.json
+++ b/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/package.json
@@ -1 +1 @@
-{}
+{}
diff --git a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/config.json b/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/config.json
index 28902fb2a71d62484cf1284313c948108afc01c2..d2f4b1957784f43a986253e966c8cbb570b9c006 100644
--- a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/config.json
+++ b/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/config.json
@@ -1,6 +1,6 @@
{
"app": {
- "bundleName": "com.example.abilitydisable",
+ "bundleName": "com.example.jsmyapplication",
"vendor": "example",
"version": {
"code": 1000000,
@@ -9,7 +9,7 @@
},
"deviceConfig": {},
"module": {
- "package": "com.example.abilitydisable",
+ "package": "com.example.jsmyapplication",
"name": ".MyApplication",
"mainAbility": ".MainAbility",
"srcPath": "",
@@ -45,42 +45,6 @@
"label": "$string:entry_MainAbility",
"type": "page",
"launchType": "standard"
- },
- {
- "orientation": "unspecified",
- "srcPath": "MainAbility2",
- "name": ".MainAbility2",
- "srcLanguage": "js",
- "icon": "$media:icon",
- "description": "$string:description_mainability2",
- "formsEnabled": false,
- "label": "$string:entry_MainAbility",
- "type": "page",
- "launchType": "standard"
- },
- {
- "orientation": "unspecified",
- "srcPath": "MainAbility3",
- "name": ".MainAbility3",
- "srcLanguage": "js",
- "icon": "$media:icon",
- "description": "$string:description_mainability3",
- "formsEnabled": false,
- "label": "$string:entry_MainAbility",
- "type": "page",
- "launchType": "standard"
- },
- {
- "orientation": "unspecified",
- "srcPath": "MainAbility4",
- "name": ".MainAbility4",
- "srcLanguage": "js",
- "icon": "$media:icon",
- "description": "$string:description_mainability4",
- "formsEnabled": false,
- "label": "$string:entry_MainAbility",
- "type": "page",
- "launchType": "standard"
}
],
"js": [
@@ -94,56 +58,15 @@
"designWidth": 720,
"autoDesignWidth": false
}
- },
- {
- "pages": [
- "pages/index/index",
- "pages/second/second"
- ],
- "name": ".MainAbility2",
- "window": {
- "designWidth": 720,
- "autoDesignWidth": false
- }
- },
- {
- "pages": [
- "pages/index/index",
- "pages/second/second"
- ],
- "name": ".MainAbility3",
- "window": {
- "designWidth": 720,
- "autoDesignWidth": false
- }
- },
- {
- "pages": [
- "pages/index/index",
- "pages/second/second"
- ],
- "name": ".MainAbility4",
- "window": {
- "designWidth": 720,
- "autoDesignWidth": false
- }
}
],
"reqPermissions": [
{
- "name": "ohos.permission.MANAGE_LOCAL_ACCOUNTS"
- },
- {
- "name": "ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS_EXTENSION"
- },
- {
- "name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"
- },
- {
- "name": "ohos.permission.MANAGE_MISSIONS"
+ "name": "ohos.permission.GET_BUNDLE_INFO",
+ "reason": "need use ohos.permission.INSTALL_BUNDLE"
},
{
- "name": "ohos.permission.GET_BUNDLE_INFO",
+ "name": "ohos.permission.UPDATE_CONFIGURATION",
"reason": "need use ohos.permission.INSTALL_BUNDLE"
}
]
diff --git a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility/app.js b/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility/app.js
index 89314a93de2dd774b46cd9fed890aed6eb56eb53..a8f63230f272f052ebb2e6a48b7e0309e26a3b5d 100644
--- a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility/app.js
+++ b/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility/app.js
@@ -1,3 +1,4 @@
+// @ts-nocheck
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -12,27 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-import commonEvent from '@ohos.commonEvent';
-import abilityFeatureAbility from '@ohos.ability.featureAbility';
export default {
onCreate() {
- commonEvent.publish("ApplicationMainAbility1_onCreate",()=>{
- console.log("ApplicationMainAbility1_onCreate publish callBack ApplicationMainAbility1_onCreate");
- });
- setTimeout(()=>{
- abilityFeatureAbility.terminateSelf().then((data)=>{
- console.log("ApplicationMainAbility2 terminateSelf data:" + JSON.stringify(data) )
- }).catch((error)=>{
- console.log("ApplicationMainAbility2 terminateSelf error:" + JSON.stringify(error) )
- })
- },3000)
-
- console.info("Application onCreate");
+ console.info("Application onCreate 1");
},
onDestroy() {
- console.info("Application onDestroy");
- },
- onForgeGround(){
- console.info("Application onForgeGround");
+ console.info("Application onDestroy 1");
+
}
};
diff --git a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility/i18n/zh-CN.json b/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility/i18n/zh-CN.json
index 3dd53b3a8b808aec9396fa663cb00ef22ba61e0a..195f303be71cd519749ec6e65e98f067ed99a51b 100644
--- a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility/i18n/zh-CN.json
+++ b/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility/i18n/zh-CN.json
@@ -1,10 +1,10 @@
{
"strings": {
- "hello": "您好",
- "world": "世界",
- "page": "第二页",
- "next": "下一页",
- "back": "返回"
+ "hello": "您好 1 js",
+ "world": "世界 1 js",
+ "page": "第二页 1",
+ "next": "下一页 1",
+ "back": "返回 1"
},
"Files": {
}
diff --git a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility/pages/index/index.hml b/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility/pages/index/index.hml
index 9c27d02f668220192c6ceaa0c7e6a83f189bd7f0..534abd5a9522e8fa018871561b8fa4bb8b4f6d23 100644
--- a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility/pages/index/index.hml
+++ b/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility/pages/index/index.hml
@@ -1,17 +1,17 @@
+ * 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.
+ -->
{{ $t('strings.hello') }} {{ title }}
diff --git a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility/pages/index/index.js b/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility/pages/index/index.js
index 56e613e12909c46ca3e79910459ad3a24b34eff1..7d7c4a74c04f4ea22049ab036daa894a3331ac98 100644
--- a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility/pages/index/index.js
+++ b/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility/pages/index/index.js
@@ -1,3 +1,4 @@
+// @ts-nocheck
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -12,54 +13,27 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
-import commonEvent from '@ohos.commonEvent';
import router from '@system.router'
import {Core} from 'deccjsunit/index'
-
export default {
data: {
title: ""
},
onInit() {
- this.title = 'yingyong1';
- },
- onclick: function () {
- router.replace({
- uri: "pages/second/second"
- })
+ this.title = this.$t('strings.world');
},
- onShow() {
- console.log("singletonEntryAbulity1_onShow")
- commonEvent.publish("singletonEntryAbulity1_onShow",()=>{
- console.log("singletonEntryAbulity1_onHide publish callBack singletonEntryAbulity1_onHide");
- });
+ onShow(){
const core = Core.getInstance()
- core.init()
+ core.init();
const configService = core.getDefaultService('config')
configService.setConfig(this)
- console.info('onShow ')
- require('../../../test/List.test')
- console.info('onShow start5')
- core.execute()
+ require('../../../test/List.test');
+ core.execute();
},
- onHide(){
- console.log("singletonEntryAbulity_onHide")
- commonEvent.publish("singletonEntryAbulity1_onHide",()=>{
- console.log("singletonEntryAbulity1_onHide publish callBack singletonEntryAbulity1_onHide");
- });
- },
- onActive(){
- console.log("singletonEntryAbulity_onActive")
- commonEvent.publish("singletonEntryAbulity1_onActive",()=>{
- console.log("singletonEntryAbulity1_onActive publish callBack singletonEntryAbulity1_onActive");
- });
- },
- onInactive(){
- console.log("singletonEntryAbulity_onInactive")
- commonEvent.publish("singletonEntryAbulity1_onInactive",()=>{
- console.log("singletonEntryAbulity1_onInactive publish callBack singletonEntryAbulity1_onInactive");
- });
+ onclick: function () {
+ router.replace({
+ uri: "pages/second/second"
+ })
}
}
diff --git a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility/pages/second/second.hml b/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility/pages/second/second.hml
index 232a295e9245fb2e09d7be62626850bfd281062a..7ef73cefb6495463e8ab08143aeb0741d7c8dee3 100644
--- a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility/pages/second/second.hml
+++ b/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility/pages/second/second.hml
@@ -1,17 +1,17 @@
+ * 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.
+ -->
{{ $t('strings.page') }}
diff --git a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility/pages/second/second.js b/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility/pages/second/second.js
index 55c229adf9b349ff9a374f8d91be5b5b31d7c6aa..1d7012a6359fa81eae18f16b418f28c806076923 100644
--- a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility/pages/second/second.js
+++ b/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility/pages/second/second.js
@@ -1,3 +1,4 @@
+// @ts-nocheck
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility2/app.js b/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility2/app.js
deleted file mode 100644
index e0c38971a1cf382d5f77c7435d00347866fc23ed..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility2/app.js
+++ /dev/null
@@ -1,32 +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 commonEvent from '@ohos.commonEvent';
-
-export default {
- onCreate() {
- commonEvent.publish("ApplicationMainAbility2_onCreate",()=>{
- console.log("ApplicationMainAbility2_onCreate publish callBack ApplicationMainAbility2_onCreate");
- });
- console.info("ApplicationMainAbility2 onCreate");
- },
- onDestroy() {
- console.log("singletonEntryAbulity_onDestroy222");
- commonEvent.publish("ApplicationMainAbility2_onDestroy",()=>{
- console.log("singletonEntryAbulity2_onDestroy publish callBack singletonEntryAbulity2onDestroy");
- });
- },
-};
-
diff --git a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility2/i18n/en-US.json b/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility2/i18n/en-US.json
deleted file mode 100644
index 08e34eac912bf2651eefc20e26aa479b5e4e7ec2..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility2/i18n/en-US.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "strings": {
- "hello": "Hello",
- "world": "World",
- "page": "Second Page",
- "next": "Next Page",
- "back": "Back"
- },
- "Files": {
- }
-}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility2/i18n/zh-CN.json b/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility2/i18n/zh-CN.json
deleted file mode 100644
index 3dd53b3a8b808aec9396fa663cb00ef22ba61e0a..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility2/i18n/zh-CN.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "strings": {
- "hello": "您好",
- "world": "世界",
- "page": "第二页",
- "next": "下一页",
- "back": "返回"
- },
- "Files": {
- }
-}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility2/pages/index/index.css b/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility2/pages/index/index.css
deleted file mode 100644
index 737096ca1070d46824d8173dd029de7e4144f3a9..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility2/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/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility2/pages/index/index.hml b/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility2/pages/index/index.hml
deleted file mode 100644
index 83ae6b784af095aa173906f7aa7468eb2bf2e5e3..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility2/pages/index/index.hml
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
- {{ $t('strings.hello') }} {{ title }}
-
-
-
diff --git a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility2/pages/index/index.js b/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility2/pages/index/index.js
deleted file mode 100644
index caadb951daa23bb4f633d417aca566875ef31e17..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility2/pages/index/index.js
+++ /dev/null
@@ -1,59 +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 router from '@system.router'
-import {Core} from 'deccjsunit/index'
-import commonEvent from '@ohos.commonEvent';
-
-export default {
- data: {
- title: ""
- },
- onInit() {
- this.title = 'yingyong2';
- },
- onclick: function () {
- router.replace({
- uri: "pages/second/second"
- })
- },
- onShow() {
- console.log("singletonEntryAbulity_onShow")
- commonEvent.publish("singletonEntryAbulity2_onShow",()=>{
- console.log("singletonEntryAbulity2_onShow publish callBack singletonEntryAbulity2_onShow");
- });
- },
- onHide(){
- console.log("singletonEntryAbulity_onHide")
- commonEvent.publish("singletonEntryAbulity2_onHide",()=>{
- console.log("singletonEntryAbulity2_onHide publish callBack singletonEntryAbulity2onHide");
- });
- },
- onActive(){
- console.log("singletonEntryAbulity_onActive")
- commonEvent.publish("singletonEntryAbulity2_onActive",()=>{
- console.log("singletonEntryAbulity2_onActive publish callBack singletonEntryAbulity2_onActive");
- });
- },
- onInactive(){
- console.log("singletonEntryAbulity_onInactive");
- commonEvent.publish("singletonEntryAbulity2_onInactive",()=>{
- console.log("singletonEntryAbulity2_onInactive publish callBack singletonEntryAbulity2_onInactive");
- });
- }
-
-}
-
-
-
diff --git a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility2/pages/second/second.css b/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility2/pages/second/second.css
deleted file mode 100644
index 737096ca1070d46824d8173dd029de7e4144f3a9..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility2/pages/second/second.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/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility2/pages/second/second.hml b/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility2/pages/second/second.hml
deleted file mode 100644
index 4503365d59184ec671bb489b6c2b64134daf0849..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility2/pages/second/second.hml
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
- {{ $t('strings.page') }}
-
-
-
diff --git a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility3/app.js b/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility3/app.js
deleted file mode 100644
index aa30315f0817e62217ed004dce86a1e57a99342b..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility3/app.js
+++ /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.
- */
-import abilityFeatureAbility from '@ohos.ability.featureAbility';
-import commonEvent from '@ohos.commonEvent';
-export default {
- onCreate() {
- console.info("Application onCreate MainAbility3");
- setTimeout(()=>{
- abilityFeatureAbility.terminateSelf().then((data)=>{
- console.log("Application terminateSelf data:" + JSON.stringify(data) )
- }).catch((error)=>{
- console.log("Application terminateSelf data:" + JSON.stringify(error) )
- })
- },2500)
- },
- onDestroy() {
- console.log("singletonEntryAbulity_onDestroy222");
- commonEvent.publish("ApplicationMainAbility3_onDestroy",()=>{
- console.log("ApplicationMainAbility3_onDestroy publish callBack ApplicationMainAbility2_onDestroy");
- });
- },
- onForgeGround(){
- console.log("singletonEntryAbulity_onForgeGround");
- commonEvent.publish("ApplicationMainAbility3_onForgeGround",()=>{
- console.log("ApplicationMainAbility3_onHide publish callBack ApplicationMainAbility2_onForgeGround");
- });
- }
-};
diff --git a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility3/i18n/en-US.json b/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility3/i18n/en-US.json
deleted file mode 100644
index 08e34eac912bf2651eefc20e26aa479b5e4e7ec2..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility3/i18n/en-US.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "strings": {
- "hello": "Hello",
- "world": "World",
- "page": "Second Page",
- "next": "Next Page",
- "back": "Back"
- },
- "Files": {
- }
-}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility3/i18n/zh-CN.json b/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility3/i18n/zh-CN.json
deleted file mode 100644
index 3dd53b3a8b808aec9396fa663cb00ef22ba61e0a..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility3/i18n/zh-CN.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "strings": {
- "hello": "您好",
- "world": "世界",
- "page": "第二页",
- "next": "下一页",
- "back": "返回"
- },
- "Files": {
- }
-}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility3/pages/index/index.css b/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility3/pages/index/index.css
deleted file mode 100644
index 737096ca1070d46824d8173dd029de7e4144f3a9..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility3/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/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility3/pages/index/index.hml b/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility3/pages/index/index.hml
deleted file mode 100644
index 9c27d02f668220192c6ceaa0c7e6a83f189bd7f0..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility3/pages/index/index.hml
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
- {{ $t('strings.hello') }} {{ title }}
-
-
-
diff --git a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility3/pages/index/index.js b/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility3/pages/index/index.js
deleted file mode 100644
index 4749e825224c0d6b8e38fed4e4a0acc714e3fc9d..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility3/pages/index/index.js
+++ /dev/null
@@ -1,55 +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 router from '@system.router'
-import {Core} from 'deccjsunit/index'
-import commonEvent from '@ohos.commonEvent';
-
-export default {
- data: {
- title: ""
- },
- onInit() {
- this.title = 'yingyong3';
- },
- onclick: function () {
- router.replace({
- uri: "pages/second/second"
- })
- },
- onShow() {
- console.info('onShow start')
- },
- onHide(){
- console.log("singletonEntryAbulity_onHide")
- commonEvent.publish("singletonEntryAbulity3_onHide",()=>{
- console.log("singletonEntryAbulity3_onHide publish callBack singletonEntryAbulity3_onHide");
- });
- },
- onActive(){
- console.log("singletonEntryAbulity_onActive")
- commonEvent.publish("singletonEntryAbulity3_onActive",()=>{
- console.log("singletonEntryAbulity3_onActive publish callBack singletonEntryAbulity3_onActive");
- });
- },
- onInactive(){
- console.log("singletonEntryAbulity_onInactive")
- commonEvent.publish("singletonEntryAbulity3_onHide",()=>{
- console.log("singletonEntryAbulity3_onInactive publish callBack singletonEntryAbulity3_onInactive");
- });
- }
-}
-
-
-
diff --git a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility3/pages/second/second.css b/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility3/pages/second/second.css
deleted file mode 100644
index 737096ca1070d46824d8173dd029de7e4144f3a9..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility3/pages/second/second.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/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility3/pages/second/second.hml b/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility3/pages/second/second.hml
deleted file mode 100644
index 232a295e9245fb2e09d7be62626850bfd281062a..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility3/pages/second/second.hml
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
- {{ $t('strings.page') }}
-
-
-
diff --git a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility4/app.js b/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility4/app.js
deleted file mode 100644
index 7cb7248bdc90dac7fded8362a9cd8dfb4bfc637c..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility4/app.js
+++ /dev/null
@@ -1,29 +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");
-// setTimeout(()=>{
-// this.content.terminateSelf().then((data)=>{
-// console.log("Application terminateSelf data:" + JSON.stringify(data) )
-// }).catch((error)=>{
-// console.log("Application terminateSelf data:" + JSON.stringify(error) )
-// })
-// },8000)
- },
- onDestroy() {
- console.info("Application onDestroy");
- }
-};
diff --git a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility4/i18n/en-US.json b/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility4/i18n/en-US.json
deleted file mode 100644
index 08e34eac912bf2651eefc20e26aa479b5e4e7ec2..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility4/i18n/en-US.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "strings": {
- "hello": "Hello",
- "world": "World",
- "page": "Second Page",
- "next": "Next Page",
- "back": "Back"
- },
- "Files": {
- }
-}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility4/i18n/zh-CN.json b/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility4/i18n/zh-CN.json
deleted file mode 100644
index 3dd53b3a8b808aec9396fa663cb00ef22ba61e0a..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility4/i18n/zh-CN.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "strings": {
- "hello": "您好",
- "world": "世界",
- "page": "第二页",
- "next": "下一页",
- "back": "返回"
- },
- "Files": {
- }
-}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility4/pages/index/index.css b/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility4/pages/index/index.css
deleted file mode 100644
index 737096ca1070d46824d8173dd029de7e4144f3a9..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility4/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/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility4/pages/index/index.hml b/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility4/pages/index/index.hml
deleted file mode 100644
index 9c27d02f668220192c6ceaa0c7e6a83f189bd7f0..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility4/pages/index/index.hml
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
- {{ $t('strings.hello') }} {{ title }}
-
-
-
diff --git a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility4/pages/index/index.js b/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility4/pages/index/index.js
deleted file mode 100644
index e73299287b52395279b39401cb978522c0195053..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility4/pages/index/index.js
+++ /dev/null
@@ -1,56 +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 router from '@system.router'
-import {Core} from 'deccjsunit/index'
-import commonEvent from '@ohos.commonEvent';
-
-export default {
- data: {
- title: ""
- },
- onInit() {
- this.title = 'yingyong4';
- },
- onclick: function () {
- router.replace({
- uri: "pages/second/second"
- })
- },
- onShow() {
- console.info('onShow start')
-
- },
- onHide(){
- console.log("singletonEntryAbulity_onHide")
- commonEvent.publish("singletonEntryAbulity1_onHide",()=>{
- console.log("singletonEntryAbulity1_onHide publish callBack singletonEntryAbulity1_onHide");
- });
- },
- onActive(){
- console.log("singletonEntryAbulity_onActive")
- commonEvent.publish("singletonEntryAbulity1_onActive",()=>{
- console.log("singletonEntryAbulity1_onActive publish callBack singletonEntryAbulity1_onActive");
- });
- },
- onInactive(){
- console.log("singletonEntryAbulity_onInactive")
- commonEvent.publish("singletonEntryAbulity1_onHide",()=>{
- console.log("singletonEntryAbulity1_onInactive publish callBack singletonEntryAbulity1_onInactive");
- });
- }
-}
-
-
-
diff --git a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility4/pages/second/second.css b/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility4/pages/second/second.css
deleted file mode 100644
index 737096ca1070d46824d8173dd029de7e4144f3a9..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility4/pages/second/second.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/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility4/pages/second/second.hml b/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility4/pages/second/second.hml
deleted file mode 100644
index 232a295e9245fb2e09d7be62626850bfd281062a..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility4/pages/second/second.hml
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
- {{ $t('strings.page') }}
-
-
-
diff --git a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/test/AbilityDisableTest.js b/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/test/AbilityDisableTest.js
deleted file mode 100644
index 3012918efd3f321467b0854dc269db4a57b42422..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/test/AbilityDisableTest.js
+++ /dev/null
@@ -1,390 +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.
- */
-// @ts-nocheck
-import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index"
-import missionManager from '@ohos.application.missionManager';
-import featureAbility from '@ohos.ability.featureAbility';
-import bundleManager from '@ohos.bundle';
-import appManager from "@ohos.application.appManager"
-import commonEvent from '@ohos.commonEvent';
-import {onDestroys} from "../MainAbility2/app.js"
-import abilityManager from '@ohos.application.abilityManager'
-import ConfigurationConstant from "@ohos.application.ConfigurationConstant";
-
-function startAility(){
- setTimeout(()=>{
- featureAbility.startAbility({ want: {
- bundleName: "com.example.abilitydisable",
- abilityName: "com.example.abilitydisable.MainAbility2"
- } }, (error, data) => {
- console.log('SUB_AA_OpenHarmony_Clear_0400 - startMainAbility2: '
- + JSON.stringify(error) + ", " + JSON.stringify(data))
- });
- },100)
- setTimeout(()=>{
- featureAbility.startAbility({ want: {
- bundleName: "com.example.abilitydisable",
- abilityName: "com.example.abilitydisable.MainAbility3"
- } }, (error, data) => {
- console.log('SUB_AA_OpenHarmony_Clear_0400 - startMainAbility3: '
- + JSON.stringify(error) + ", " + JSON.stringify(data));
- });
- },400)
-}
-function lockMissions(titles,missionId,times){
- setTimeout(()=>{
- for(var i=0;i{
- console.log(titles+'lockMission1 errCode:' + JSON.stringify(err) + " data: " + JSON.stringify(data));
- });
- };
- },times);
-}
-function clearAllMissions(){
- missionManager.clearAllMissions((err,data)=>{
- console.log('clearAllMissions errCode: ' +
- JSON.stringify(err) + " data: " + JSON.stringify(data));
- })
-}
-
-function fns(){
- setTimeout(()=>{
- featureAbility.startAbility({ want: {
- bundleName: "com.example.abilitydisable",
- abilityName: "com.example.abilitydisable.MainAbility2"
- } }, (error, data) => {
- console.log('SUB_AA_OpenHarmony_Clear_0100 - startMainAbility2: '
- + JSON.stringify(error) + ", " + JSON.stringify(data))
- expect(err.code == 0).assertTrue();
- });
- },100)
- setTimeout(()=>{
- featureAbility.startAbility({ want: {
- bundleName: "com.example.abilitydisable",
- abilityName: "com.example.abilitydisable.MainAbility4"
- } }, (error, data) => {
- console.log('SUB_AA_OpenHarmony_Clear_0100 - startMainAbility4: '
- + JSON.stringify(error) + ", " + JSON.stringify(data))
- expect(err.code == 0).assertTrue();
- });
- },300)
- setTimeout(()=>{
- featureAbility.startAbility({ want: {
- bundleName: "com.example.abilitydisable",
- abilityName: "com.example.abilitydisable.MainAbility3"
- } }, (error, data) => {
- console.log('SUB_AA_OpenHarmony_Clear_0100 - startMainAbility3: '
- + JSON.stringify(error) + ", " + JSON.stringify(data))
- expect(err.code == 0).assertTrue();
- });
- },500)
- setTimeout(()=>{
- missionManager.getMissionInfos("", 20, (err, data) => {
- console.log('SUB_AA_OpenHarmony_Clear_0100 getMissionInfos errCode : '
- + JSON.stringify(err) + " data: " + JSON.stringify(data));
- for (var i = 0;i < data.length; i++) {
- console.log("bundleName:"+data[i].want["abilityName"])
- if(data[i].want["abilityName"] == "com.example.abilitydisable.MainAbility3"
- || data[i].want["abilityName"] == "com.example.abilitydisable.MainAbility4"
- ||data[i].want["abilityName"] == "com.example.abilitydisable.MainAbility"
- ||data[i].want["abilityName"] == "com.example.abilitydisable.MainAbility2"){
- console.log("data[i]['lockedState']::::"+data[i]['lockedState']);
- console.log("data[i].missionId" + data[i].missionId);
- console.log("SUB_AA_OpenHarmony_Clear_0100, missionId:" + data[i].missionId);
- missionIds.push(data[i].missionId);
- }
- }
- console.log('SUB_AA_OpenHarmony_Clear_0100 missionId:'+ missionIds +
- typeof missionIds +missionIds[1] + typeof missionIds[1]);
- })
- console.log("SUB_AA_OpenHarmony_Clear_0100" + JSON.stringify(missionIds));
- },800)
- setTimeout(()=>{
- missionManager.lockMission(parseInt(missionIds[1]),(err,data)=>{
- console.log('SUB_AA_OpenHarmony_Clear_0100 lockMission1 missionIds[1] : ' +
- JSON.stringify(missionIds[1]), + parseInt(missionIds[1]));
- console.log('SUB_AA_OpenHarmony_Clear_0100 lockMission1 errCode : ' +
- JSON.stringify(err) + " data: " + JSON.stringify(data));
- })
- },1200)
- setTimeout(()=>{
- missionManager.lockMission(parseInt(missionIds[2]),(err,data)=>{
- console.log('SUB_AA_OpenHarmony_Clear_0100 lockMission2 errCode : ' +
- JSON.stringify(err) + " data: " + JSON.stringify(data));
- })
- },1500)
- setTimeout(()=>{
- missionManager.getMissionInfos("", 20, (err, data) => {
- console.log("SUB_AA_OpenHarmony_Clear_0100, twosgetMissionInfos:" +
- JSON.stringify(data));
- for (var i = 0;i < data.length; i++) {
- console.log("data[i].missionId:missionIds[2] news missionIds[1]" +
- data[i].missionId + missionIds[2] + missionIds[1])
- if(data[i].missionId == missionIds[1] || data[i].missionId == missionIds[2]){
- console.log("data[i]['lockedState']222:::::::"+data[i]['lockedState']);
- expect(data[i]['lockedState'] == true).assertTrue();
- }
- }
- })
- console.log("SUB_AA_OpenHarmony_Clear_0100" + JSON.stringify(missionIds));
- },3500)
- setTimeout(()=>{
- missionManager.getMissionInfos("", 20, (err, data) => {
- console.log('SUB_AA_OpenHarmony_Clear_0100 getMissionInfos errCode : '
- + JSON.stringify(err) + " data: " + JSON.stringify(data));
- for (var i = 0;i < data.length; i++) {
- console.log("bundleName:"+data[i].want["abilityName"])
- if(data[i].want["abilityName"] == "com.example.abilitydisable.MainAbility3"
- || data[i].want["abilityName"] == "com.example.abilitydisable.MainAbility4"
- ||data[i].want["abilityName"] == "com.example.abilitydisable.MainAbility"
- ||data[i].want["abilityName"] == "com.example.abilitydisable.MainAbility2"){
- console.log("data[i]['lockedState']::::"+data[i]['lockedState']);
- expect(data[i].lockedState == false).assertTrue();
- }
- }
- })
- console.log("SUB_AA_OpenHarmony_Clear_0100" + JSON.stringify(missionIds));
- },4000)
- setTimeout(()=>{
- missionManager.moveMissionToFront(parseInt(missionIds[2]),(err,data)=>{
- console.log('SUB_AA_OpenHarmony_Clear_0100 moveMissionToFront errCode : ' +
- JSON.stringify(err) + " data: " + JSON.stringify(data));
- })
- },4500)
- setTimeout(()=>{
- missionManager.clearAllMissions((err,data)=>{
- console.log('SUB_AA_OpenHarmony_Clear_0100 clearAllMissions errCode: ' +
- JSON.stringify(err) + " data: " + JSON.stringify(data));
-
- })
- },5000)
- setTimeout(()=>{
- missionManager.getMissionInfos("", 20, (err, data) => {
- console.log('SUB_AA_OpenHarmony_Clear_0100 getMissionInfos errCode : ' +
- JSON.stringify(err) + " data: " + JSON.stringify(data));
- for (var i = 0;i < data.length; i++) {
- console.log("bundleName:"+data[i].want["abilityName"])
- if(data[i].want["abilityName"] == "com.example.abilitydisable.MainAbility3" ||
- data[i].want["abilityName"] == "com.example.abilitydisable.MainAbility4" ||
- data[i].want["abilityName"] == "com.example.abilitydisable.MainAbility"||
- data[i].want["abilityName"] == "com.example.abilitydisable.MainAbility2"){
- console.log("data[i]['lockedState']end::::"+data[i]['lockedState']);
- expect(data[i]['lockedState'] == true).assertTrue();
- }
- }
- })
- console.log("SUB_AA_OpenHarmony_Clear_0100" +
- JSON.stringify(missionIds));
- },8000)
- expect(lists.indexOf(JSON.stringify("singletonEntryAbulity2_onShow"))!=-1).assertTrue();
-
-}
-describe('AbilityDisableTests', function () {
- let mainAbility1ListS = new Array()
- let lists = new Array()
- function subscriberCallBackMainAbility2Destory(err,data){
- console.log("Subscribe2 CallBack data:" + JSON.stringify(data));
- lists.push(data["event"]);
- console.log("subscriberCallBackMainAbility2Destory lists:"+lists);
- };
- function subscriberCallBackMainAbility1Destory(err,data){
- console.log("Subscribe3 CallBack data:" + JSON.stringify(data));
- mainAbility1ListS.push(data["event"])
- console.log("subscriberCallBack_mainAbility3_Destory mainAbility1ListS:"+mainAbility1ListS);
- }
- console.log("AbilityDisableTests --- start");
- var ability2LifeEvents = {
- events:["ApplicationMainAbility2_onDestroy",
- "singletonEntryAbulity2_onHide",
- "singletonEntryAbulity2_onActive",
- "singletonEntryAbulity2_onInactive",
- "singletonEntryAbility2_onDestroy",
- "singletonEntryAbulity2_onShow",
- "ApplicationMainAbility2_onCreate",]
- };
- var ability1LifeEvents = {
- events:["singletonEntryAbulity3_onHide",
- "singletonEntryAbulity3_onActive",
- "singletonEntryAbulity3_onInactive",
- "singletonEntryAbility3_onDestroy",
- "singletonEntryAbulity3_onShow",
- "ApplicationMainAbility3_onCreate",
- "ApplicationMainAbility3_onDestroy",
- ]
- };
-
- /*
- * @tc.number SUB_AA_OpenHarmony_MoveMissionToFront_2900
- * @tc.name Verify the full-screen switching application
- * @tc.desc Function test
- * @tc.level 0
- */
- it('SUB_AA_OpenHarmony_MoveMissionToFront_2900', 0, async function (done) {
-
- var Subscriber2 = [];
- var Subscriber1 = [];
- var mainAbility1missinds = []
- console.log("SUB_AA_OpenHarmony_MoveMissionToFront_2900 --- start")
- commonEvent.createSubscriber(ability2LifeEvents).then(async (data)=>{
- console.log("Create Subscriber2=======>:"+JSON.stringify(data));
- Subscriber2 = data;
- console.log("data2 is:" + JSON.stringify(Subscriber2));
- await commonEvent.subscribe(Subscriber2,subscriberCallBackMainAbility2Destory)
- });
- commonEvent.createSubscriber(ability1LifeEvents).then(async (data)=>{
- console.log("Create Subscriber1=======>:"+JSON.stringify(data));
- Subscriber1 = data;
- console.log("data2 is:" + JSON.stringify(Subscriber1));
- await commonEvent.subscribe(Subscriber1,subscriberCallBackMainAbility1Destory)
- });
- setTimeout(()=>{
- featureAbility.startAbility({ want: {
- bundleName: "com.example.abilitydisable",
- abilityName: "com.example.abilitydisable.MainAbility2"
- } }, (error, data) => {
- console.log('SUB_AA_OpenHarmony_MoveMissionToFront_2900 - startMainAbility2: '
- + JSON.stringify(error) + ", " + JSON.stringify(data));
- });
- },500)
- setTimeout(()=>{
- featureAbility.startAbility({ want: {
- bundleName: "com.example.abilitydisable",
- abilityName: "com.example.abilitydisable.MainAbility3"
- } }, (error, data) => {
- console.log('SUB_AA_OpenHarmony_MoveMissionToFront_2900 - startMainAbility3: '
- + JSON.stringify(error) + ", " + JSON.stringify(data));
- });
- },1000);
- setTimeout(()=>{
- console.log("1111subscriberCallBackMainAbility2Destory lists:"+lists);
- expect(lists.indexOf(JSON.stringify("singletonEntryAbulity2_onShow"))!=-1).assertTrue();
- expect(lists.indexOf(JSON.stringify("ApplicationMainAbility2_onCreate"))!=-1).assertTrue();
- },2500)
- setTimeout(()=>{
- missionManager.getMissionInfos("", 100, (err, data) => {
- console.log('SUB_AA_OpenHarmony_MoveMissionToFront_2900 getMissionInfos errCode: '+
-JSON.stringify(err) + " data: " + JSON.stringify(data));
- for (var i = 0;i < data.length; i++) {
- if(data[i].want["abilityName"] == "com.example.abilitydisable.MainAbility2"){
- mainAbility1missinds.push(data[i]["missionId"])
- }
-
- }
- console.log("mainAbility1missinds:"+mainAbility1missinds);
- });
- },3000)
- setTimeout(()=>{
- console.log('SUB_AA_OpenHarmony_MoveMissionToFront_2900 moveMissionToFront dataCode:++++++');
- missionManager.moveMissionToFront(parseInt(mainAbility1missinds[0]),{
- parameters:{ "windowMode":1 }}).then((data)=>{
- console.log('SUB_AA_OpenHarmony_MoveMissionToFront_2900 moveMissionToFront dataCode:'+ " data:"
- + JSON.stringify(data));
- expect().assertFail();
- }).catch((err)=>{
- console.log('SUB_AA_OpenHarmony_MoveMissionToFront_2900 moveMissionToFront errCode:'+ " err:"
- + JSON.stringify(err));
- });
- },3888);
- setTimeout(()=>{
- console.log("1111subscriberCallBackMainAbility1Destory lists:"+ mainAbility1ListS);
- expect(mainAbility1ListS.indexOf(JSON.stringify("singletonEntrymainAb" +
- "ility1ListSAbulity1_onInactive"))!=-1).assertTrue();
- expect(mainAbility1ListS.indexOf(JSON.stringify("singletonEntryA" +
- "bulity1_onHide"))!=-1).assertTrue();
- },3999);
- done()
- });
-
- /*
- * @tc.number SUB_AA_OpenHarmony_MoveMissionToFront_3000
- * @tc.name Verify the left split screen switching application
- * @tc.desc Function test
- * @tc.level 0
- */
- it('SUB_AA_OpenHarmony_MoveMissionToFront_3000', 0, async function (done) {
- var Subscriber2 = "";
- var Subscriber1 = "";
- var mainAbility1missinds = []
- console.log("SUB_AA_OpenHarmony_MoveMissionToFront_3000 --- start")
- commonEvent.createSubscriber(ability2LifeEvents).then(async (data)=>{
- console.log("Create Subscriber2=======>:"+JSON.stringify(data));
- Subscriber2 = data;
- console.log("data2 is:" + JSON.stringify(Subscriber2));
- await commonEvent.subscribe(Subscriber2,subscriberCallBackMainAbility2Destory)
- });
- commonEvent.createSubscriber(ability1LifeEvents).then(async (data)=>{
- console.log("Create Subscriber1=======>:"+JSON.stringify(data));
- Subscriber1 = data;
- console.log("data2 is:" + JSON.stringify(Subscriber1));
- await commonEvent.subscribe(Subscriber1,subscriberCallBackMainAbility1Destory)
- });
-
- setTimeout(()=>{
- featureAbility.startAbility({ want: {
- bundleName: "com.example.abilitydisable",
- abilityName: "com.example.abilitydisable.MainAbility2"
- } }, (error, data) => {
- console.log('SUB_AA_OpenHarmony_MoveMissionToFront_3000 - startMainAbility2: '
- + JSON.stringify(error) + ", " + JSON.stringify(data));
- });
- },500);
- setTimeout(()=>{
- featureAbility.startAbility({ want: {
- bundleName: "com.example.abilitydisable",
- abilityName: "com.example.abilitydisable.MainAbility3"
- } }, (error, data) => {
- console.log('SUB_AA_OpenHarmony_MoveMissionToFront_3000 - startMainAbility3: '
- + JSON.stringify(error) + ", " + JSON.stringify(data));
- });
- },1000);
- setTimeout(()=>{
- console.log("1111subscriberCallBack_mainAbility2_lists:
-singletonEntryAbulity2_onShow:"+lists);
- console.log("+++++++++++++++++"+lists.indexOf("singletonEntryAbulity2_onShow")+"+++++++"+lists.indexOf("ApplicationMainAbility2_onCreate")+lists)
- expect(lists.indexOf(JSON.stringify("singletonEntryAbulity2_onShow"))!=-1).assertTrue();
- expect(lists.indexOf(JSON.stringify("ApplicationMainAbility2_onCreate"))!=-1).assertTrue();
- },2500);
- setTimeout(()=>{
- missionManager.getMissionInfos("", 100, (err, data) => {
- console.log('SUB_AA_OpenHarmony_MoveMissionToFront_3000 getMissionInfos errCode: '+ JSON.stringify(err) + " data: " + JSON.stringify(data));
- for (var i = 0;i < data.length; i++) {
- console.log("bundleName222222:"+data[i].want["abilityName"]+"data[i]['lockedState']::::"+data[i]['lockedState']);
- if(data[i].want["abilityName"] == "com.example.abilitydisable.MainAbility3"){
- console.log('data[i]["missionId"]'+data[i]["missionId"] + "::::"+data[i].want["abilityName"]);
- mainAbility1missinds.push(data[i]["missionId"])
- }
- }
- console.log("mainAbility1missinds:"+mainAbility1missinds);
- });
- },3000);
- setTimeout(()=>{
- console.log('SUB_AA_OpenHarmony_MoveMissionToFront_3000 moveMissionToFront dataCode:++++++');
- missionManager.moveMissionToFront(parseInt(mainAbility1missinds[0]),{
- parameters:{ "windowMode":100 }}).then((data)=>{
- console.log('SUB_AA_OpenHarmony_MoveMissionToFront_3000
-moveMissionToFront dataCode:'+ " data:" + JSON.stringify(data));
- }).catch((err)=>{
- console.log('SUB_AA_OpenHarmony_MoveMissionToFront_3000
-moveMissionToFront errCode:'+ " err:" + JSON.stringify(err));
- });
- },3888);
- setTimeout(()=>{
- expect(mainAbility1ListS.indexOf(JSON.stringify("singletonEntryAbulity1_onInactive"))==-1).assertTrue();
- expect(mainAbility1ListS.indexOf(JSON.stringify("singletonEntryAbulity1_onHide"))==-1).assertTrue();
- },3999);
- done();
- });
-})
diff --git a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/test/ClearTest.js b/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/test/ClearTest.js
deleted file mode 100644
index 52da30d873b7f71c6a206a1f9d116af6dfe3657a..0000000000000000000000000000000000000000
--- a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/test/ClearTest.js
+++ /dev/null
@@ -1,126 +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.
- */
-// @ts-nocheck
-import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index"
-import missionManager from '@ohos.application.missionManager';
-import abilityFeatureAbility from '@ohos.ability.featureAbility';
-import bundleManager from '@ohos.bundle';
-import appManager from "@ohos.application.appManager"
-import commonEvent from '@ohos.commonEvent';
-import {onDestroys} from "../MainAbility2/app.js"
-import abilityManager from '@ohos.application.abilityManager'
-import ConfigurationConstant from "@ohos.application.ConfigurationConstant";
-import AbilityConstant from '@ohos.application.AbilityConstant'
-describe('AbilityDisableTests', function () {
-
- /*
- * @tc.number SUB_AA_OpenHarmony_AbilityStart_6200
- * @tc.name Verify the enumeration values LaunchReason. CONTINUATION
- * @tc.desc Function test
- * @tc.level 0
- */
- it("SUB_AA_OpenHarmony_AbilityStart_6200", 0, async function (done) {
- console.info("--------logMessage SUB_AA_OpenHarmony_AbilityStart_6300----");
- console.info("SUB_AA_OpenHarmony_AbilityStart_6200 LaunchReason.CONTINUATION: "
- + AbilityConstant.LaunchReason.CONTINUATION);
- expect(AbilityConstant.LaunchReason.CONTINUATION==3).assertTrue();
- done();
- });
-
- /*
- * @tc.number SUB_AA_OpenHarmony_AbilityStart_6300
- * @tc.name Verify the enumeration value launchreason.start UNKNOWN
- * @tc.desc Function test
- * @tc.level 0
- */
- it("SUB_AA_OpenHarmony_AbilityStart_6300", 0, async function (done) {
- console.info("--------logMessage SUB_AA_OpenHarmony_AbilityStart_6300----");
- console.info("SUB_AA_OpenHarmony_AbilityStart_6300 LaunchReason.UNKNOWN: " +
-AbilityConstant.LaunchReason.UNKNOWN);
- expect(AbilityConstant.LaunchReason.UNKNOWN==0).assertTrue();
- done();
- });
-
- /*
- * @tc.number SUB_AA_OpenHarmony_AbilityStart_6400
- * @tc.name Verify the enumeration value launchreason.START_ABILITY
- * @tc.desc Function test
- * @tc.level 0
- */
- it("SUB_AA_OpenHarmony_AbilityStart_6400", 0, async function (done) {
- console.info("------logMessage SUB_AA_OpenHarmony_AbilityStart_6400-----");
- console.info("SUB_AA_OpenHarmony_AbilityStart_6400 LaunchReason.START_ABILITY: " +
- AbilityConstant.LaunchReason.START_ABILITY);
- expect(AbilityConstant.LaunchReason.START_ABILITY==1).assertTrue();
- done();
- });
-
- /*
- * @tc.number SUB_AA_OpenHarmony_AbilityStart_6500
- * @tc.name Verify the enumeration values LaunchReason. CALL
- * @tc.desc Function test
- * @tc.level 0
- */
- it("SUB_AA_OpenHarmony_AbilityStart_6500", 0, async function (done) {
- console.info("-------logMessage SUB_AA_OpenHarmony_AbilityStart_6500-----");
- console.info("SUB_AA_OpenHarmony_AbilityStart_6500 LaunchReason.CALL: " +
-AbilityConstant.LaunchReason.CALL);
- expect(AbilityConstant.LaunchReason.CALL==2).assertTrue();
- done();
- });
-
- /*
- * @tc.number SUB_AA_OpenHarmony_AbilityStart_6600
- * @tc.name Verify the enumeration values LastExitReason.UNKNOWN
- * @tc.desc Function test
- * @tc.level 0
- */
- it("SUB_AA_OpenHarmony_AbilityStart_6600", 0, async function (done) {
- console.info("---------logMessage SUB_AA_OpenHarmony_AbilityStart_6600---------");
- console.info("SUB_AA_OpenHarmony_AbilityStart_6600 LastExitReason.UNKNOWN: " +
- AbilityConstant.LastExitReason.UNKNOWN);
- expect(AbilityConstant.LastExitReason.UNKNOWN==0).assertTrue();
- done();
- });
-
- /*
- * @tc.number SUB_AA_OpenHarmony_AbilityStart_6700
- * @tc.name Verify the enumeration values LastExitReason.ABILITY_NOT_RESPONDING
- * @tc.desc Function test
- * @tc.level 0
- */
- it("SUB_AA_OpenHarmony_AbilityStart_6700", 0, async function (done) {
- console.info("--------logMessage SUB_AA_OpenHarmony_AbilityStart_6700---------");
- console.info("SUB_AA_OpenHarmony_AbilityStart_6700 LastExitReason.ABILITY_NOT_RESPONDING: " +
- AbilityConstant.LastExitReason.ABILITY_NOT_RESPONDING);
- expect(AbilityConstant.LastExitReason.ABILITY_NOT_RESPONDING==1).assertTrue();
- done();
- });
-
- /*
- * @tc.number SUB_AA_OpenHarmony_AbilityStart_6700
- * @tc.name Verify the enumeration values LastExitReason.NORMAL
- * @tc.desc Function test
- * @tc.level 0
- */
- it("SUB_AA_OpenHarmony_AbilityStart_6800", 0, async function (done) {
- console.info("-----logMessage SUB_AA_OpenHarmony_AbilityStart_6800-----------");
- console.info("SUB_AA_OpenHarmony_AbilityStart_6800 LastExitReason.NORMAL: " +
- AbilityConstant.LastExitReason.NORMAL);
- expect(AbilityConstant.LastExitReason.NORMAL==2).assertTrue();
- done();
- });
-})
diff --git a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/test/JSMyapplicationJsunit.test.js b/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/test/JSMyapplicationJsunit.test.js
new file mode 100644
index 0000000000000000000000000000000000000000..82b0450101f7c33e64b80759d589847f7658830b
--- /dev/null
+++ b/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/test/JSMyapplicationJsunit.test.js
@@ -0,0 +1,191 @@
+// @ts-nocheck
+/*
+ * 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, expect, it} from 'deccjsunit/index'
+import ConfigurationConstant from '@ohos.application.ConfigurationConstant'
+
+describe("ConfigurationTest", function () {
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_ConfigurationConstant_colorMode_0100
+ * @tc.name colorMode is "ConfigurationConstant.ColorMode.COLOR_MODE_LIGHT"
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_ConfigurationConstant_colorMode_0100', 0, async function (done) {
+ console.log("------------start SUB_AA_OpenHarmony_ConfigurationConstant_colorMode_0100-------------");
+ expect(ConfigurationConstant.ColorMode.COLOR_MODE_LIGHT).assertEqual(1);
+ done();
+ console.log("------------end SUB_AA_OpenHarmony_ConfigurationConstant_colorMode_0100-------------");
+ });
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_ConfigurationConstant_colorMode_0200
+ * @tc.name colorMode is "ConfigurationConstant.ColorMode.COLOR_MODE_DARK"
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_ConfigurationConstant_colorMode_0200', 0, async function (done) {
+ console.log("------------start SUB_AA_OpenHarmony_ConfigurationConstant_colorMode_0200-------------");
+ expect(ConfigurationConstant.ColorMode.COLOR_MODE_DARK).assertEqual(0);
+ done();
+ console.log("------------end SUB_AA_OpenHarmony_ConfigurationConstant_colorMode_0200-------------");
+ });
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_ConfigurationConstant_colorMode_0300
+ * @tc.name colorMode is "ConfigurationConstant.ColorMode.COLOR_MODE_NOT_SET"
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_ConfigurationConstant_colorMode_0300', 0, async function (done) {
+ console.log("------------start SUB_AA_OpenHarmony_ConfigurationConstant_colorMode_0300-------------");
+ expect(ConfigurationConstant.ColorMode.COLOR_MODE_NOT_SET).assertEqual(-1);
+ done();
+ console.log("------------end SUB_AA_OpenHarmony_ConfigurationConstant_colorMode_0300-------------");
+ });
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_ConfigurationConstant_Direction_0100
+ * @tc.name Direction is "ConfigurationConstant.Direction.DIRECTION_VERTICAL"
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_ConfigurationConstant_Direction_0100', 0, async function (done) {
+ console.log("------------start SUB_AA_OpenHarmony_ConfigurationConstant_Direction_0100-------------");
+ expect(ConfigurationConstant.Direction.DIRECTION_VERTICAL).assertEqual(0);
+ done();
+ console.log("------------end SUB_AA_OpenHarmony_ConfigurationConstant_Direction_0100-------------");
+ });
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_ConfigurationConstant_Direction_0200
+ * @tc.name Direction is "ConfigurationConstant.Direction.DIRECTION_HORIZONTAL"
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_ConfigurationConstant_Direction_0200', 0, async function (done) {
+ console.log("------------start SUB_AA_OpenHarmony_ConfigurationConstant_Direction_0200-------------");
+ expect(ConfigurationConstant.Direction.DIRECTION_HORIZONTAL).assertEqual(1);
+ done();
+ console.log("------------end SUB_AA_OpenHarmony_ConfigurationConstant_Direction_0200-------------");
+ });
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_ConfigurationConstant_Direction_0300
+ * @tc.name Direction is "ConfigurationConstant.Direction.DIRECTION_NOT_SET"
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_ConfigurationConstant_Direction_0300', 0, async function (done) {
+ console.log("------------start SUB_AA_OpenHarmony_ConfigurationConstant_Direction_0300-------------");
+ expect(ConfigurationConstant.Direction.DIRECTION_NOT_SET).assertEqual(-1);
+ done();
+ console.log("------------end SUB_AA_OpenHarmony_ConfigurationConstant_Direction_0300-------------");
+ });
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_ConfigurationConstant_ScreenDensity_0100
+ * @tc.name ScreenDensity is "ConfigurationConstant.ScreenDensity.SCREEN_DENSITY_SDPI"
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_ConfigurationConstant_ScreenDensity_0100', 0, async function (done) {
+ console.log("------------start SUB_AA_OpenHarmony_ConfigurationConstant_ScreenDensity_0100-------------");
+ expect(ConfigurationConstant.ScreenDensity.SCREEN_DENSITY_SDPI).assertEqual(120);
+ done();
+ console.log("------------end SUB_AA_OpenHarmony_ConfigurationConstant_ScreenDensity_0100-------------");
+ });
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_ConfigurationConstant_ScreenDensity_0200
+ * @tc.name ScreenDensity is "ConfigurationConstant.ScreenDensity.SCREEN_DENSITY_MDPI"
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_ConfigurationConstant_ScreenDensity_0200', 0, async function (done) {
+ console.log("------------start SUB_AA_OpenHarmony_ConfigurationConstant_ScreenDensity_0200-------------");
+ expect(ConfigurationConstant.ScreenDensity.SCREEN_DENSITY_MDPI).assertEqual(160);
+ done();
+ console.log("------------end SUB_AA_OpenHarmony_ConfigurationConstant_ScreenDensity_0200-------------");
+ });
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_ConfigurationConstant_ScreenDensity_0300
+ * @tc.name ScreenDensity is "ConfigurationConstant.ScreenDensity.SCREEN_DENSITY_LDPI"
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_ConfigurationConstant_ScreenDensity_0300', 0, async function (done) {
+ console.log("------------start SUB_AA_OpenHarmony_ConfigurationConstant_ScreenDensity_0300-------------");
+ expect(ConfigurationConstant.ScreenDensity.SCREEN_DENSITY_LDPI).assertEqual(240);
+ done();
+ console.log("------------end SUB_AA_OpenHarmony_ConfigurationConstant_ScreenDensity_0300-------------");
+ });
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_ConfigurationConstant_ScreenDensity_0400
+ * @tc.name ScreenDensity is "ConfigurationConstant.ScreenDensity.SCREEN_DENSITY_XLDPI"
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_ConfigurationConstant_ScreenDensity_0400', 0, async function (done) {
+ console.log("------------start SUB_AA_OpenHarmony_ConfigurationConstant_ScreenDensity_0400-------------");
+ expect(ConfigurationConstant.ScreenDensity.SCREEN_DENSITY_XLDPI).assertEqual(320);
+ done();
+ console.log("------------end SUB_AA_OpenHarmony_ConfigurationConstant_ScreenDensity_0400-------------");
+ });
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_ConfigurationConstant_ScreenDensity_0500
+ * @tc.name ScreenDensity is "ConfigurationConstant.ScreenDensity.SCREEN_DENSITY_XXLDPI"
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_ConfigurationConstant_ScreenDensity_0500', 0, async function (done) {
+ console.log("------------start SUB_AA_OpenHarmony_ConfigurationConstant_ScreenDensity_0500-------------");
+ expect(ConfigurationConstant.ScreenDensity.SCREEN_DENSITY_XXLDPI).assertEqual(480);
+ done();
+ console.log("------------end SUB_AA_OpenHarmony_ConfigurationConstant_ScreenDensity_0500-------------");
+ });
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_ConfigurationConstant_ScreenDensity_0600
+ * @tc.name ScreenDensity is "ConfigurationConstant.ScreenDensity.SCREEN_DENSITY_XXXLDPI"
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_ConfigurationConstant_ScreenDensity_0600', 0, async function (done) {
+ console.log("------------start SUB_AA_OpenHarmony_ConfigurationConstant_ScreenDensity_0600-------------");
+ expect(ConfigurationConstant.ScreenDensity.SCREEN_DENSITY_XXXLDPI).assertEqual(640);
+ done();
+ console.log("------------end SUB_AA_OpenHarmony_ConfigurationConstant_ScreenDensity_0600-------------");
+ });
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_ConfigurationConstant_ScreenDensity_0700
+ * @tc.name ScreenDensity is "ConfigurationConstant.ScreenDensity.SCREEN_DENSITY_NOT_SET"
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_ConfigurationConstant_ScreenDensity_0700', 0, async function (done) {
+ console.log("------------start SUB_AA_OpenHarmony_ConfigurationConstant_ScreenDensity_0700-------------");
+ expect(ConfigurationConstant.ScreenDensity.SCREEN_DENSITY_NOT_SET).assertEqual(0);
+ done();
+ console.log("------------end SUB_AA_OpenHarmony_ConfigurationConstant_ScreenDensity_0700-------------");
+ });
+
+
+})
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/test/List.test.js b/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/test/List.test.js
index e97a120f99a12abf8ff68a76ee85e851a440bee2..ebef389aeeddf912af2bfed5edb5657204b68f38 100644
--- a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/test/List.test.js
+++ b/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/test/List.test.js
@@ -1,18 +1,16 @@
-/*
- * 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.
- */
-require('./ClearTest.js');
-require('./AbilityDisableTest.js');
-
-
+// @ts-nocheck
+/*
+ * 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.
+ */
+require('./JSMyapplicationJsunit.test.js');
diff --git a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/resources/base/element/string.json b/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/resources/base/element/string.json
index 1d2808e5cc8d694e37f10acd62ce27334db762e6..92f5ff8a48403b37a65f5b6f6e5fe285f277d21e 100644
--- a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/resources/base/element/string.json
+++ b/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/resources/base/element/string.json
@@ -1,40 +1,20 @@
-{
- "string": [
- {
- "name": "entry_MainAbility",
- "value": "entry_MainAbility"
- },
- {
- "name": "description_mainability",
- "value": "JS_Empty Ability"
- },
- {
- "name": "description_mainability2",
- "value": "JS_Empty Ability"
- },
- {
- "name": "entry_MainAbility2",
- "value": "entry_MainAbility2"
- },
- {
- "name": "description_mainability3",
- "value": "JS_Empty Ability"
- },
- {
- "name": "entry_MainAbility3",
- "value": "entry_MainAbility3"
- },
- {
- "name": "description_mainability4",
- "value": "JS_Empty Ability"
- },
- {
- "name": "entry_MainAbility4",
- "value": "entry_MainAbility4"
- },
- {
- "name": "description_serviceability",
- "value": "hap sample empty service"
- }
- ]
+{
+ "string": [
+ {
+ "name": "entry_MainAbility",
+ "value": "entry_MainAbility"
+ },
+ {
+ "name": "description_mainability",
+ "value": "JS_Empty Ability"
+ },
+ {
+ "name": "description_mainability2",
+ "value": "JS_Empty Ability"
+ },
+ {
+ "name": "entry_MainAbility2",
+ "value": "entry_MainAbility2"
+ }
+ ]
}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/signature/openharmony_sx.p7b b/aafwk/aafwk_standard/fa/fa_configurationconstant_test/signature/openharmony_sx.p7b
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_coverapi_test/BUILD.gn b/aafwk/aafwk_standard/fa/fa_coverapi_test/BUILD.gn
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_coverapi_test/Test.json b/aafwk/aafwk_standard/fa/fa_coverapi_test/Test.json
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_coverapi_test/entry/src/main/config.json b/aafwk/aafwk_standard/fa/fa_coverapi_test/entry/src/main/config.json
old mode 100644
new mode 100755
index 8680ab4004ef3d04a2206eb22d6e3711e1a54ba6..82127c2999b91ecb979a2818a4aabe17e8190cc7
--- a/aafwk/aafwk_standard/fa/fa_coverapi_test/entry/src/main/config.json
+++ b/aafwk/aafwk_standard/fa/fa_coverapi_test/entry/src/main/config.json
@@ -1,64 +1,64 @@
-{
- "app":{
- "bundleName":"com.example.coverapi",
- "vendor":"example",
- "version":{
- "code":1000000,
- "name":"1.0.0"
- }
- },
- "deviceConfig":{},
- "module":{
- "package":"com.example.coverapi",
- "name":".MyApplication",
- "mainAbility":".MainAbility",
- "srcPath":"",
- "deviceType":[
- "phone"
- ],
- "distro":{
- "deliveryWithInstall":true,
- "moduleName":"entry",
- "moduleType":"entry",
- "installationFree":false
- },
- "abilities":[
- {
- "skills":[
- {
- "entities":[
- "entity.system.home"
- ],
- "actions":[
- "action.system.home"
- ]
- }
- ],
- "orientation":"unspecified",
- "visible":true,
- "srcPath":"MainAbility",
- "name":".MainAbility",
- "srcLanguage":"js",
- "icon":"$media:icon",
- "description":"$string:description_mainability",
- "formsEnabled":false,
- "label":"$string:entry_MainAbility",
- "type":"page",
- "launchType":"standard"
- }
- ],
- "js":[
- {
- "pages":[
- "pages/index/index",
- "pages/second/second"
- ],
- "name":".MainAbility",
- "window":{
- "designWidth":720,
- "autoDesignWidth":false
- }
- }
- ]
- }
+{
+ "app":{
+ "bundleName":"com.example.coverapi",
+ "vendor":"example",
+ "version":{
+ "code":1000000,
+ "name":"1.0.0"
+ }
+ },
+ "deviceConfig":{},
+ "module":{
+ "package":"com.example.coverapi",
+ "name":".MyApplication",
+ "mainAbility":".MainAbility",
+ "srcPath":"",
+ "deviceType":[
+ "phone"
+ ],
+ "distro":{
+ "deliveryWithInstall":true,
+ "moduleName":"entry",
+ "moduleType":"entry",
+ "installationFree":false
+ },
+ "abilities":[
+ {
+ "skills":[
+ {
+ "entities":[
+ "entity.system.home"
+ ],
+ "actions":[
+ "action.system.home"
+ ]
+ }
+ ],
+ "orientation":"unspecified",
+ "visible":true,
+ "srcPath":"MainAbility",
+ "name":".MainAbility",
+ "srcLanguage":"js",
+ "icon":"$media:icon",
+ "description":"$string:description_mainability",
+ "formsEnabled":false,
+ "label":"$string:entry_MainAbility",
+ "type":"page",
+ "launchType":"standard"
+ }
+ ],
+ "js":[
+ {
+ "pages":[
+ "pages/index/index",
+ "pages/second/second"
+ ],
+ "name":".MainAbility",
+ "window":{
+ "designWidth":720,
+ "autoDesignWidth":false
+ }
+ }
+ ]
+ }
}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/fa/fa_coverapi_test/entry/src/main/js/MainAbility/app.js b/aafwk/aafwk_standard/fa/fa_coverapi_test/entry/src/main/js/MainAbility/app.js
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_coverapi_test/entry/src/main/js/MainAbility/i18n/en-US.json b/aafwk/aafwk_standard/fa/fa_coverapi_test/entry/src/main/js/MainAbility/i18n/en-US.json
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_coverapi_test/entry/src/main/js/MainAbility/i18n/zh-CN.json b/aafwk/aafwk_standard/fa/fa_coverapi_test/entry/src/main/js/MainAbility/i18n/zh-CN.json
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_coverapi_test/entry/src/main/js/MainAbility/pages/index/index.css b/aafwk/aafwk_standard/fa/fa_coverapi_test/entry/src/main/js/MainAbility/pages/index/index.css
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_coverapi_test/entry/src/main/js/MainAbility/pages/index/index.hml b/aafwk/aafwk_standard/fa/fa_coverapi_test/entry/src/main/js/MainAbility/pages/index/index.hml
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_coverapi_test/entry/src/main/js/MainAbility/pages/index/index.js b/aafwk/aafwk_standard/fa/fa_coverapi_test/entry/src/main/js/MainAbility/pages/index/index.js
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_coverapi_test/entry/src/main/js/MainAbility/pages/second/second.css b/aafwk/aafwk_standard/fa/fa_coverapi_test/entry/src/main/js/MainAbility/pages/second/second.css
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_coverapi_test/entry/src/main/js/MainAbility/pages/second/second.hml b/aafwk/aafwk_standard/fa/fa_coverapi_test/entry/src/main/js/MainAbility/pages/second/second.hml
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_coverapi_test/entry/src/main/js/MainAbility/pages/second/second.js b/aafwk/aafwk_standard/fa/fa_coverapi_test/entry/src/main/js/MainAbility/pages/second/second.js
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_coverapi_test/entry/src/main/js/test/List.test.js b/aafwk/aafwk_standard/fa/fa_coverapi_test/entry/src/main/js/test/List.test.js
old mode 100644
new mode 100755
index 5aa0cf281c7a8603a3e8343e44f4a84314645ca9..dc2d4ef93424cb25a4c1f86ca15892eb788dc21a
--- a/aafwk/aafwk_standard/fa/fa_coverapi_test/entry/src/main/js/test/List.test.js
+++ b/aafwk/aafwk_standard/fa/fa_coverapi_test/entry/src/main/js/test/List.test.js
@@ -1,16 +1,16 @@
-/*
- * 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.
- */
-
+/*
+ * 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.
+ */
+
require('./coverApiTest.js');
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/fa/fa_coverapi_test/entry/src/main/js/test/coverApiTest.js b/aafwk/aafwk_standard/fa/fa_coverapi_test/entry/src/main/js/test/coverApiTest.js
old mode 100644
new mode 100755
index 3646bee67c8ddfcde187f0075df894b8fcd652d5..651ba17f22c3b183d9bafef7a77263ce74914356
--- a/aafwk/aafwk_standard/fa/fa_coverapi_test/entry/src/main/js/test/coverApiTest.js
+++ b/aafwk/aafwk_standard/fa/fa_coverapi_test/entry/src/main/js/test/coverApiTest.js
@@ -1,124 +1,124 @@
-// @ts-nocheck
-/*
- * 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 commonEvent from '@ohos.commonevent'
-import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index";
-import appManager from '@ohos.application.appManager';
-import abilityManager from '@ohos.application.abilityManager';
-
-const START_ABILITY_TIMEOUT = 5000;
-describe('CoverApiTest', function () {
- console.log("CoverApiTest --- start");
- var subscriberInfoMainAbility = {
- events: ["mainAbilityOnConfigurationUpdated"]
- }
-
- /*
- * @tc.number SUB_AA_OpenHarmony_CoverApi_0500
- * @tc.name whether the system is under stability test
- * @tc.desc Function test
- * @tc.level 0
- */
- it('SUB_AA_OpenHarmony_CoverApi_0500', 0, async function (done) {
- console.log("------------start SUB_AA_OpenHarmony_CoverApi_0500-------------");
- appManager.isRunningInStabilityTest()
- .then((data) => {
- console.info('SUB_AA_OpenHarmony_CoverApi_0500 successful. data: ' + JSON.stringify(data));
- expect(data == false).assertTrue();
- done();
- }).catch((error) => {
- console.error('SUB_AA_OpenHarmony_CoverApi_0500 failed. error: ' + JSON.stringify(error));
- expect().assertFalse();
- done();
- })
- });
-
- /*
- * @tc.number SUB_AA_OpenHarmony_CoverApi_0700
- * @tc.name Verify that the data of nonexistent apps is cleared
- * @tc.desc Function test
- * @tc.level 0
- */
- it('SUB_AA_OpenHarmony_CoverApi_0700', 0, async function (done) {
- console.log("SUB_AA_OpenHarmony_CoverApi_0700 --- start");
- appManager.clearUpApplicationData('com.example.coverapi')
- .then((data) => {
- console.info('SUB_AA_OpenHarmony_CoverApi_0700 successful. data: ' + JSON.stringify(data));
- expect(data == 0).assertTrue();
- done();
- }).catch((error) => {
- console.error('SUB_AA_OpenHarmony_CoverApi_0700 failed. error: ' + JSON.stringify(error));
- expect().assertFalse();
- done();
- })
- })
-
- /**
- * @tc.number: SUB_AA_OpenHarmony_CoverApi_0500
- * @tc.name: wantConstant : Check specific enum
- * @tc.desc: Check the return type of the interface (by Promise)
- */
- it('SUB_AA_OpenHarmony_CoverApi_0800', 0, async function (done) {
- console.log("SUB_AA_OpenHarmony_CoverApi_0800 --- start");
-
- var Subscriber;
- let id;
-
- function SubscribeCallBack(err, data) {
- console.debug("SUB_AA_OpenHarmony_CoverApi_0800====>Subscribe CallBack data:====>" + JSON.stringify(data));
- expect(data.event == 'mainAbilityOnConfigurationUpdated').assertTrue();
- if (data.event == 'mainAbility_onConfigurationUpdated') {
- clearTimeout(id);
- commonEvent.unsubscribe(Subscriber, UnSubscribeCallback);
- done();
- }
- }
-
- commonEvent.createSubscriber(subscriberInfoMainAbility).then(async (data) => {
- console.debug("SUB_AA_OpenHarmony_CoverApi_0800====>Create Subscriber====>");
- Subscriber = data;
- await commonEvent.subscribe(Subscriber, SubscribeCallBack);
- })
-
-
- function UnSubscribeCallback() {
- console.debug("SUB_AA_OpenHarmony_CoverApi_0800====>UnSubscribe CallBack====>");
- done();
- }
-
- function timeout() {
- expect().assertFail();
- console.debug('SUB_AA_OpenHarmony_CoverApi_0800 - timeout');
- commonEvent.unsubscribe(Subscriber, UnSubscribeCallback)
- done();
- }
-
- id = setTimeout(timeout, START_ABILITY_TIMEOUT);
-
- var Configuration = { language: "en" };
- abilityManager.updateConfiguration(Configuration)
- .then((data) => {
- console.log("SUB_AA_OpenHarmony_CoverApi_0800 --- updateConfiguration " + JSON.stringify(data));
- done();
- }).catch((error) => {
- console.error('SUB_AA_OpenHarmony_CoverApi_0800 failed. error: ' + JSON.stringify(error));
- done();
- })
-
- console.log("SUB_AA_OpenHarmony_CoverApi_0800 --- end");
- })
-
-})
+// @ts-nocheck
+/*
+ * 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 commonEvent from '@ohos.commonevent'
+import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index";
+import appManager from '@ohos.application.appManager';
+import abilityManager from '@ohos.application.abilityManager';
+
+const START_ABILITY_TIMEOUT = 5000;
+describe('CoverApiTest', function () {
+ console.log("CoverApiTest --- start");
+ var subscriberInfoMainAbility = {
+ events: ["mainAbilityOnConfigurationUpdated"]
+ }
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_CoverApi_0500
+ * @tc.name whether the system is under stability test
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_CoverApi_0500', 0, async function (done) {
+ console.log("------------start SUB_AA_OpenHarmony_CoverApi_0500-------------");
+ appManager.isRunningInStabilityTest()
+ .then((data) => {
+ console.info('SUB_AA_OpenHarmony_CoverApi_0500 successful. data: ' + JSON.stringify(data));
+ expect(data == false).assertTrue();
+ done();
+ }).catch((error) => {
+ console.error('SUB_AA_OpenHarmony_CoverApi_0500 failed. error: ' + JSON.stringify(error));
+ expect().assertFalse();
+ done();
+ })
+ });
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_CoverApi_0700
+ * @tc.name Verify that the data of nonexistent apps is cleared
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_CoverApi_0700', 0, async function (done) {
+ console.log("SUB_AA_OpenHarmony_CoverApi_0700 --- start");
+ appManager.clearUpApplicationData('com.example.coverapi')
+ .then((data) => {
+ console.info('SUB_AA_OpenHarmony_CoverApi_0700 successful. data: ' + JSON.stringify(data));
+ expect(data == 0).assertTrue();
+ done();
+ }).catch((error) => {
+ console.error('SUB_AA_OpenHarmony_CoverApi_0700 failed. error: ' + JSON.stringify(error));
+ expect().assertFalse();
+ done();
+ })
+ })
+
+ /**
+ * @tc.number: SUB_AA_OpenHarmony_CoverApi_0500
+ * @tc.name: wantConstant : Check specific enum
+ * @tc.desc: Check the return type of the interface (by Promise)
+ */
+ it('SUB_AA_OpenHarmony_CoverApi_0800', 0, async function (done) {
+ console.log("SUB_AA_OpenHarmony_CoverApi_0800 --- start");
+
+ var Subscriber;
+ let id;
+
+ function SubscribeCallBack(err, data) {
+ console.debug("SUB_AA_OpenHarmony_CoverApi_0800====>Subscribe CallBack data:====>" + JSON.stringify(data));
+ expect(data.event == 'mainAbilityOnConfigurationUpdated').assertTrue();
+ if (data.event == 'mainAbility_onConfigurationUpdated') {
+ clearTimeout(id);
+ commonEvent.unsubscribe(Subscriber, UnSubscribeCallback);
+ done();
+ }
+ }
+
+ commonEvent.createSubscriber(subscriberInfoMainAbility).then(async (data) => {
+ console.debug("SUB_AA_OpenHarmony_CoverApi_0800====>Create Subscriber====>");
+ Subscriber = data;
+ await commonEvent.subscribe(Subscriber, SubscribeCallBack);
+ })
+
+
+ function UnSubscribeCallback() {
+ console.debug("SUB_AA_OpenHarmony_CoverApi_0800====>UnSubscribe CallBack====>");
+ done();
+ }
+
+ function timeout() {
+ expect().assertFail();
+ console.debug('SUB_AA_OpenHarmony_CoverApi_0800 - timeout');
+ commonEvent.unsubscribe(Subscriber, UnSubscribeCallback)
+ done();
+ }
+
+ id = setTimeout(timeout, START_ABILITY_TIMEOUT);
+
+ var Configuration = { language: "en" };
+ abilityManager.updateConfiguration(Configuration)
+ .then((data) => {
+ console.log("SUB_AA_OpenHarmony_CoverApi_0800 --- updateConfiguration " + JSON.stringify(data));
+ done();
+ }).catch((error) => {
+ console.error('SUB_AA_OpenHarmony_CoverApi_0800 failed. error: ' + JSON.stringify(error));
+ done();
+ })
+
+ console.log("SUB_AA_OpenHarmony_CoverApi_0800 --- end");
+ })
+
+})
diff --git a/aafwk/aafwk_standard/fa/fa_coverapi_test/entry/src/main/resources/base/element/string.json b/aafwk/aafwk_standard/fa/fa_coverapi_test/entry/src/main/resources/base/element/string.json
old mode 100644
new mode 100755
index 7d78639231aaafe68e08c97c78c206d6fe6bb02c..1c3bf7e77137c9d4006f48e7bb143f85f6dc1e92
--- a/aafwk/aafwk_standard/fa/fa_coverapi_test/entry/src/main/resources/base/element/string.json
+++ b/aafwk/aafwk_standard/fa/fa_coverapi_test/entry/src/main/resources/base/element/string.json
@@ -1,12 +1,12 @@
-{
- "string":[
- {
- "name":"entry_MainAbility",
- "value":"entry_MainAbility"
- },
- {
- "name":"description_mainability",
- "value":"JS_Empty Ability"
- }
- ]
+{
+ "string":[
+ {
+ "name":"entry_MainAbility",
+ "value":"entry_MainAbility"
+ },
+ {
+ "name":"description_mainability",
+ "value":"JS_Empty Ability"
+ }
+ ]
}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/fa/fa_coverapi_test/entry/src/main/resources/base/media/icon.png b/aafwk/aafwk_standard/fa/fa_coverapi_test/entry/src/main/resources/base/media/icon.png
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_coverapi_test/signature/openharmony_sx.p7b b/aafwk/aafwk_standard/fa/fa_coverapi_test/signature/openharmony_sx.p7b
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/BUILD.gn b/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/BUILD.gn
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/Test.json b/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/Test.json
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/config.json b/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/config.json
old mode 100644
new mode 100755
index 27dbde076509ae6e30d5c38f1642c6791368b901..c87ecdceec6a0bf50377926024e50570718cdefb
--- a/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/config.json
+++ b/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/config.json
@@ -1,141 +1,141 @@
-{
- "app": {
- "bundleName": "com.example.abilitydisable",
- "vendor": "example",
- "version": {
- "code": 1000000,
- "name": "1.0.0"
- }
- },
- "deviceConfig": {},
- "module": {
- "package": "com.example.abilitydisable",
- "name": ".MyApplication",
- "mainAbility": ".MainAbility",
- "srcPath": "",
- "deviceType": [
- "phone"
- ],
- "distro": {
- "deliveryWithInstall": true,
- "moduleName": "entry",
- "moduleType": "entry",
- "installationFree": false
- },
- "abilities": [
- {
- "skills": [
- {
- "entities": [
- "entity.system.home"
- ],
- "actions": [
- "action.system.home"
- ]
- }
- ],
- "orientation": "unspecified",
- "visible": true,
- "srcPath": "MainAbility",
- "name": ".MainAbility",
- "srcLanguage": "js",
- "icon": "$media:icon",
- "description": "$string:description_mainability",
- "formsEnabled": false,
- "label": "$string:entry_MainAbility",
- "type": "page",
- "launchType": "standard"
- },
- {
- "orientation": "unspecified",
- "srcPath": "MainAbility2",
- "name": ".MainAbility2",
- "srcLanguage": "js",
- "icon": "$media:icon",
- "description": "$string:description_mainability2",
- "formsEnabled": false,
- "label": "$string:entry_MainAbility",
- "type": "page",
- "launchType": "standard"
- },
- {
- "orientation": "unspecified",
- "srcPath": "MainAbility3",
- "name": ".MainAbility3",
- "srcLanguage": "js",
- "icon": "$media:icon",
- "description": "$string:description_mainability3",
- "formsEnabled": false,
- "label": "$string:entry_MainAbility",
- "type": "page",
- "launchType": "standard"
- },
- {
- "orientation": "unspecified",
- "srcPath": "MainAbility4",
- "name": ".MainAbility4",
- "srcLanguage": "js",
- "icon": "$media:icon",
- "description": "$string:description_mainability4",
- "formsEnabled": false,
- "label": "$string:entry_MainAbility",
- "type": "page",
- "launchType": "standard"
- },
- {
- "srcPath": "ServiceAbility",
- "name": ".ServiceAbility",
- "icon": "$media:icon",
- "srcLanguage": "js",
- "description": "$string:description_serviceability",
- "type": "service"
- }
- ],
- "js": [
- {
- "pages": [
- "pages/index/index",
- "pages/second/second"
- ],
- "name": ".MainAbility",
- "window": {
- "designWidth": 720,
- "autoDesignWidth": false
- }
- },
- {
- "pages": [
- "pages/index/index",
- "pages/second/second"
- ],
- "name": ".MainAbility2",
- "window": {
- "designWidth": 720,
- "autoDesignWidth": false
- }
- },
- {
- "pages": [
- "pages/index/index",
- "pages/second/second"
- ],
- "name": ".MainAbility3",
- "window": {
- "designWidth": 720,
- "autoDesignWidth": false
- }
- },
- {
- "pages": [
- "pages/index/index",
- "pages/second/second"
- ],
- "name": ".MainAbility4",
- "window": {
- "designWidth": 720,
- "autoDesignWidth": false
- }
- }
- ]
- }
+{
+ "app": {
+ "bundleName": "com.example.abilitydisable",
+ "vendor": "example",
+ "version": {
+ "code": 1000000,
+ "name": "1.0.0"
+ }
+ },
+ "deviceConfig": {},
+ "module": {
+ "package": "com.example.abilitydisable",
+ "name": ".MyApplication",
+ "mainAbility": ".MainAbility",
+ "srcPath": "",
+ "deviceType": [
+ "phone"
+ ],
+ "distro": {
+ "deliveryWithInstall": true,
+ "moduleName": "entry",
+ "moduleType": "entry",
+ "installationFree": false
+ },
+ "abilities": [
+ {
+ "skills": [
+ {
+ "entities": [
+ "entity.system.home"
+ ],
+ "actions": [
+ "action.system.home"
+ ]
+ }
+ ],
+ "orientation": "unspecified",
+ "visible": true,
+ "srcPath": "MainAbility",
+ "name": ".MainAbility",
+ "srcLanguage": "js",
+ "icon": "$media:icon",
+ "description": "$string:description_mainability",
+ "formsEnabled": false,
+ "label": "$string:entry_MainAbility",
+ "type": "page",
+ "launchType": "standard"
+ },
+ {
+ "orientation": "unspecified",
+ "srcPath": "MainAbility2",
+ "name": ".MainAbility2",
+ "srcLanguage": "js",
+ "icon": "$media:icon",
+ "description": "$string:description_mainability2",
+ "formsEnabled": false,
+ "label": "$string:entry_MainAbility",
+ "type": "page",
+ "launchType": "standard"
+ },
+ {
+ "orientation": "unspecified",
+ "srcPath": "MainAbility3",
+ "name": ".MainAbility3",
+ "srcLanguage": "js",
+ "icon": "$media:icon",
+ "description": "$string:description_mainability3",
+ "formsEnabled": false,
+ "label": "$string:entry_MainAbility",
+ "type": "page",
+ "launchType": "standard"
+ },
+ {
+ "orientation": "unspecified",
+ "srcPath": "MainAbility4",
+ "name": ".MainAbility4",
+ "srcLanguage": "js",
+ "icon": "$media:icon",
+ "description": "$string:description_mainability4",
+ "formsEnabled": false,
+ "label": "$string:entry_MainAbility",
+ "type": "page",
+ "launchType": "standard"
+ },
+ {
+ "srcPath": "ServiceAbility",
+ "name": ".ServiceAbility",
+ "icon": "$media:icon",
+ "srcLanguage": "js",
+ "description": "$string:description_serviceability",
+ "type": "service"
+ }
+ ],
+ "js": [
+ {
+ "pages": [
+ "pages/index/index",
+ "pages/second/second"
+ ],
+ "name": ".MainAbility",
+ "window": {
+ "designWidth": 720,
+ "autoDesignWidth": false
+ }
+ },
+ {
+ "pages": [
+ "pages/index/index",
+ "pages/second/second"
+ ],
+ "name": ".MainAbility2",
+ "window": {
+ "designWidth": 720,
+ "autoDesignWidth": false
+ }
+ },
+ {
+ "pages": [
+ "pages/index/index",
+ "pages/second/second"
+ ],
+ "name": ".MainAbility3",
+ "window": {
+ "designWidth": 720,
+ "autoDesignWidth": false
+ }
+ },
+ {
+ "pages": [
+ "pages/index/index",
+ "pages/second/second"
+ ],
+ "name": ".MainAbility4",
+ "window": {
+ "designWidth": 720,
+ "autoDesignWidth": false
+ }
+ }
+ ]
+ }
}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/MainAbility/app.js b/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/MainAbility/app.js
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/MainAbility/i18n/en-US.json b/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/MainAbility/i18n/en-US.json
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/MainAbility/i18n/zh-CN.json b/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/MainAbility/i18n/zh-CN.json
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/MainAbility/pages/index/index.css b/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/MainAbility/pages/index/index.css
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/MainAbility/pages/index/index.hml b/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/MainAbility/pages/index/index.hml
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/MainAbility/pages/index/index.js b/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/MainAbility/pages/index/index.js
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/MainAbility/pages/second/second.css b/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/MainAbility/pages/second/second.css
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/MainAbility/pages/second/second.hml b/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/MainAbility/pages/second/second.hml
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/MainAbility/pages/second/second.js b/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/MainAbility/pages/second/second.js
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/MainAbility2/app.js b/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/MainAbility2/app.js
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/MainAbility2/i18n/en-US.json b/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/MainAbility2/i18n/en-US.json
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/MainAbility2/i18n/zh-CN.json b/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/MainAbility2/i18n/zh-CN.json
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/MainAbility2/pages/index/index.css b/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/MainAbility2/pages/index/index.css
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/MainAbility2/pages/index/index.hml b/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/MainAbility2/pages/index/index.hml
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/MainAbility2/pages/index/index.js b/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/MainAbility2/pages/index/index.js
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/MainAbility2/pages/second/second.css b/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/MainAbility2/pages/second/second.css
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/MainAbility2/pages/second/second.hml b/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/MainAbility2/pages/second/second.hml
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/MainAbility2/pages/second/second.js b/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/MainAbility2/pages/second/second.js
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/MainAbility3/app.js b/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/MainAbility3/app.js
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/MainAbility3/i18n/en-US.json b/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/MainAbility3/i18n/en-US.json
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/MainAbility3/i18n/zh-CN.json b/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/MainAbility3/i18n/zh-CN.json
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/MainAbility3/pages/index/index.css b/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/MainAbility3/pages/index/index.css
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/MainAbility3/pages/index/index.hml b/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/MainAbility3/pages/index/index.hml
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/MainAbility3/pages/index/index.js b/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/MainAbility3/pages/index/index.js
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/MainAbility3/pages/second/second.css b/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/MainAbility3/pages/second/second.css
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/MainAbility3/pages/second/second.hml b/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/MainAbility3/pages/second/second.hml
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/MainAbility3/pages/second/second.js b/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/MainAbility3/pages/second/second.js
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/MainAbility4/app.js b/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/MainAbility4/app.js
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/MainAbility4/i18n/en-US.json b/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/MainAbility4/i18n/en-US.json
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/MainAbility4/i18n/zh-CN.json b/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/MainAbility4/i18n/zh-CN.json
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/MainAbility4/pages/index/index.css b/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/MainAbility4/pages/index/index.css
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/MainAbility4/pages/index/index.hml b/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/MainAbility4/pages/index/index.hml
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/MainAbility4/pages/index/index.js b/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/MainAbility4/pages/index/index.js
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/MainAbility4/pages/second/second.css b/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/MainAbility4/pages/second/second.css
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/MainAbility4/pages/second/second.hml b/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/MainAbility4/pages/second/second.hml
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/MainAbility4/pages/second/second.js b/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/MainAbility4/pages/second/second.js
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/ServiceAbility/service.js b/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/ServiceAbility/service.js
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/test/AbilityDisableTest.js b/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/test/AbilityDisableTest.js
old mode 100644
new mode 100755
index ce05bafcced689c759a9bf712b465a1b8b833ca8..a3b8feb2362839068843371b236bd0df1142d753
--- a/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/test/AbilityDisableTest.js
+++ b/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/test/AbilityDisableTest.js
@@ -1,132 +1,132 @@
-
-/*
- * 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.
- */
-// @ts-nocheck
-import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index"
-import abilityFeatureAbility from '@ohos.ability.featureAbility';
-import bundleManager from '@ohos.bundle';
-import appManager from "@ohos.application.appManager"
-
-describe('AbilityDisableTests', function () {
- console.log("AbilityDisableTests --- start");
-
- /*
- * @tc.number SUB_AA_OpenHarmony_EqueryAbilityByWant_0100
- * @tc.name Call queryAbilityByWant to get moduleName
- * @tc.desc Function test
- * @tc.level 0
- */
- it("SUB_AA_OpenHarmony_EqueryAbilityByWant_0100", 0, async function (done) {
- console.info("------------------logMessage SUB_AA_OpenHarmony_EqueryAbilityByWant_0100-------------------");
- var context = abilityFeatureAbility.getContext();
- console.log("+++++++++++++",context);
- let bundleFlags=bundleManager.BundleFlag.GET_ABILITY_INFO_WITH_PERMISSION;
- let userId=100;
- let want={
- bundleName:"com.example.abilitydisable",
- abilityName:"com.example.abilitydisable.MainAbility"
- };
- bundleManager.queryAbilityByWant(want,bundleFlags,userId,(err, data) => {
- console.log('SUB_AA_OpenHarmony_Clear_0100 queryAbilityByWant errCode : '
- + JSON.stringify(err) + " data: " + JSON.stringify(data));
- for(var i=0;i {
- console.log('SUB_AA_OpenHarmony_EqueryAbilityByWant_0200 queryAbilityByWant errCode : '
- + JSON.stringify(err) + " data: " + JSON.stringify(data));
- for(var i=0;i {
- console.log('SUB_AA_OpenHarmony_EqueryAbilityByWant_0300 getapplicationInfo errCode : '
- + JSON.stringify(err) + " data: " + JSON.stringify(data));
- expect(data['name']).assertEqual("com.example.abilitydisable");
- })
- done();
- });
-
- /*
- * @tc.number SUB_AA_OpenHarmony_EqueryAbilityByWant_0300
- * @tc.name Call AbilityStateData to get abilityType
- * @tc.desc Function test
- * @tc.level 0
- */
- it("SUB_AA_OpenHarmony_EqueryAbilityByWant_0400", 0, async function (done) {
- console.log("------------start SUB_AA_OpenHarmony_EqueryAbilityByWant_0400-------------");
- var registerId = appManager.registerApplicationStateObserver({
- onForegroundApplicationChanged: (data) => {
- console.log("SUB_onForegroundApplicationChanged")
- },
- onAbilityStateChanged: (data) => {
- console.log("SUB_onAbilityStateChanged")
- },
- onProcessCreated: (data) => {
- console.log("SUB_onProcessCreated")
- },
- onProcessDied: (data) => {
- console.log("SUB_onProcessDied")
- }
- })
- console.log('SUB_AA_OpenHarmony_EqueryAbilityByWant_0400 registerId : ' + JSON.stringify(registerId));
- console.log('SUB_AA_OpenHarmony_EqueryAbilityByWant_0400 registerId : ' + typeof registerId);
- expect(typeof(registerId) == "number").assertTrue();
-
- await appManager.unregisterApplicationStateObserver(parseInt(registerId), async(err, data) => {
- console.log("SUB_AA_OpenHarmony_StateListener_0200 err1:"
- + JSON.stringify(err) + ",data: " + JSON.stringify(data));
- expect(err["code"] == "1").assertTrue();
- })
- done();
- })
-
-
+
+/*
+ * 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.
+ */
+// @ts-nocheck
+import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index"
+import abilityFeatureAbility from '@ohos.ability.featureAbility';
+import bundleManager from '@ohos.bundle';
+import appManager from "@ohos.application.appManager"
+
+describe('AbilityDisableTests', function () {
+ console.log("AbilityDisableTests --- start");
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_EqueryAbilityByWant_0100
+ * @tc.name Call queryAbilityByWant to get moduleName
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it("SUB_AA_OpenHarmony_EqueryAbilityByWant_0100", 0, async function (done) {
+ console.info("------------------logMessage SUB_AA_OpenHarmony_EqueryAbilityByWant_0100-------------------");
+ var context = abilityFeatureAbility.getContext();
+ console.log("+++++++++++++",context);
+ let bundleFlags=bundleManager.BundleFlag.GET_ABILITY_INFO_WITH_PERMISSION;
+ let userId=100;
+ let want={
+ bundleName:"com.example.abilitydisable",
+ abilityName:"com.example.abilitydisable.MainAbility"
+ };
+ bundleManager.queryAbilityByWant(want,bundleFlags,userId,(err, data) => {
+ console.log('SUB_AA_OpenHarmony_Clear_0100 queryAbilityByWant errCode : '
+ + JSON.stringify(err) + " data: " + JSON.stringify(data));
+ for(var i=0;i {
+ console.log('SUB_AA_OpenHarmony_EqueryAbilityByWant_0200 queryAbilityByWant errCode : '
+ + JSON.stringify(err) + " data: " + JSON.stringify(data));
+ for(var i=0;i {
+ console.log('SUB_AA_OpenHarmony_EqueryAbilityByWant_0300 getapplicationInfo errCode : '
+ + JSON.stringify(err) + " data: " + JSON.stringify(data));
+ expect(data['name']).assertEqual("com.example.abilitydisable");
+ })
+ done();
+ });
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_EqueryAbilityByWant_0300
+ * @tc.name Call AbilityStateData to get abilityType
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it("SUB_AA_OpenHarmony_EqueryAbilityByWant_0400", 0, async function (done) {
+ console.log("------------start SUB_AA_OpenHarmony_EqueryAbilityByWant_0400-------------");
+ var registerId = appManager.registerApplicationStateObserver({
+ onForegroundApplicationChanged: (data) => {
+ console.log("SUB_onForegroundApplicationChanged")
+ },
+ onAbilityStateChanged: (data) => {
+ console.log("SUB_onAbilityStateChanged")
+ },
+ onProcessCreated: (data) => {
+ console.log("SUB_onProcessCreated")
+ },
+ onProcessDied: (data) => {
+ console.log("SUB_onProcessDied")
+ }
+ })
+ console.log('SUB_AA_OpenHarmony_EqueryAbilityByWant_0400 registerId : ' + JSON.stringify(registerId));
+ console.log('SUB_AA_OpenHarmony_EqueryAbilityByWant_0400 registerId : ' + typeof registerId);
+ expect(typeof(registerId) == "number").assertTrue();
+
+ await appManager.unregisterApplicationStateObserver(parseInt(registerId), async(err, data) => {
+ console.log("SUB_AA_OpenHarmony_StateListener_0200 err1:"
+ + JSON.stringify(err) + ",data: " + JSON.stringify(data));
+ expect(err["code"] == "1").assertTrue();
+ })
+ done();
+ })
+
+
})
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/test/List.test.js b/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/test/List.test.js
old mode 100644
new mode 100755
index d12ff02b85beb1eae1f5960a0254d25ec4c60c85..2a20073318a8774f47c27170e1bb49c564a5fe5b
--- a/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/test/List.test.js
+++ b/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/js/test/List.test.js
@@ -1,15 +1,15 @@
-/*
- * 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.
- */
-require('./AbilityDisableTest.js');
+/*
+ * 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.
+ */
+require('./AbilityDisableTest.js');
diff --git a/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/resources/base/element/string.json b/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/resources/base/element/string.json
old mode 100644
new mode 100755
index 1d2808e5cc8d694e37f10acd62ce27334db762e6..2e8b3cf8ad2f92e47882e62285122d098547a872
--- a/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/resources/base/element/string.json
+++ b/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/resources/base/element/string.json
@@ -1,40 +1,40 @@
-{
- "string": [
- {
- "name": "entry_MainAbility",
- "value": "entry_MainAbility"
- },
- {
- "name": "description_mainability",
- "value": "JS_Empty Ability"
- },
- {
- "name": "description_mainability2",
- "value": "JS_Empty Ability"
- },
- {
- "name": "entry_MainAbility2",
- "value": "entry_MainAbility2"
- },
- {
- "name": "description_mainability3",
- "value": "JS_Empty Ability"
- },
- {
- "name": "entry_MainAbility3",
- "value": "entry_MainAbility3"
- },
- {
- "name": "description_mainability4",
- "value": "JS_Empty Ability"
- },
- {
- "name": "entry_MainAbility4",
- "value": "entry_MainAbility4"
- },
- {
- "name": "description_serviceability",
- "value": "hap sample empty service"
- }
- ]
+{
+ "string": [
+ {
+ "name": "entry_MainAbility",
+ "value": "entry_MainAbility"
+ },
+ {
+ "name": "description_mainability",
+ "value": "JS_Empty Ability"
+ },
+ {
+ "name": "description_mainability2",
+ "value": "JS_Empty Ability"
+ },
+ {
+ "name": "entry_MainAbility2",
+ "value": "entry_MainAbility2"
+ },
+ {
+ "name": "description_mainability3",
+ "value": "JS_Empty Ability"
+ },
+ {
+ "name": "entry_MainAbility3",
+ "value": "entry_MainAbility3"
+ },
+ {
+ "name": "description_mainability4",
+ "value": "JS_Empty Ability"
+ },
+ {
+ "name": "entry_MainAbility4",
+ "value": "entry_MainAbility4"
+ },
+ {
+ "name": "description_serviceability",
+ "value": "hap sample empty service"
+ }
+ ]
}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/resources/base/media/icon.png b/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/entry/src/main/resources/base/media/icon.png
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/signature/openharmony_sx.p7b b/aafwk/aafwk_standard/fa/fa_equeryabilitybywant_test/signature/openharmony_sx.p7b
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_lock_test/BUILD.gn b/aafwk/aafwk_standard/fa/fa_lock_test/BUILD.gn
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_lock_test/Test.json b/aafwk/aafwk_standard/fa/fa_lock_test/Test.json
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_lock_test/entry/.gitignore b/aafwk/aafwk_standard/fa/fa_lock_test/entry/.gitignore
index 7d5b7a94f4dcf381f03ff21f28f8a2494b58023f..f77260b1509284d42a7f8a2449ad1e8f4b489a3a 100644
--- a/aafwk/aafwk_standard/fa/fa_lock_test/entry/.gitignore
+++ b/aafwk/aafwk_standard/fa/fa_lock_test/entry/.gitignore
@@ -1,2 +1,2 @@
-/build
-/node_modules
+/build
+/node_modules
diff --git a/aafwk/aafwk_standard/fa/fa_lock_test/entry/build.gradle b/aafwk/aafwk_standard/fa/fa_lock_test/entry/build.gradle
index 05a33cd3adb09a68a581b9f7c02c57d3911630e8..f104aa556203da6c8747ad6b6a2481d3f9bd3abd 100644
--- a/aafwk/aafwk_standard/fa/fa_lock_test/entry/build.gradle
+++ b/aafwk/aafwk_standard/fa/fa_lock_test/entry/build.gradle
@@ -1,21 +1,21 @@
-apply plugin: 'com.huawei.ohos.hap'
-//For instructions on signature configuration, see https://developer.harmonyos.com/cn/docs/documentation/doc-guides/ide_debug_device-0000001053822404#section1112183053510
-ohos {
- compileSdkVersion 8
- defaultConfig {
- compatibleSdkVersion 8
- }
- buildTypes {
- release {
- proguardOpt {
- proguardEnabled false
- rulesFiles 'proguard-rules.pro'
- }
- }
- }
-}
-
-dependencies {
- implementation fileTree(dir: 'libs', include: ['*.jar', '*.har'])
- testImplementation 'junit:junit:4.13.1'
-}
+apply plugin: 'com.huawei.ohos.hap'
+//For instructions on signature configuration, see https://developer.harmonyos.com/cn/docs/documentation/doc-guides/ide_debug_device-0000001053822404#section1112183053510
+ohos {
+ compileSdkVersion 8
+ defaultConfig {
+ compatibleSdkVersion 8
+ }
+ buildTypes {
+ release {
+ proguardOpt {
+ proguardEnabled false
+ rulesFiles 'proguard-rules.pro'
+ }
+ }
+ }
+}
+
+dependencies {
+ implementation fileTree(dir: 'libs', include: ['*.jar', '*.har'])
+ testImplementation 'junit:junit:4.13.1'
+}
diff --git a/aafwk/aafwk_standard/fa/fa_lock_test/entry/package.json b/aafwk/aafwk_standard/fa/fa_lock_test/entry/package.json
index 0967ef424bce6791893e9a57bb952f80fd536e93..69a88e3b65423624fe7ea8b0f8beefcc62cc3d5f 100644
--- a/aafwk/aafwk_standard/fa/fa_lock_test/entry/package.json
+++ b/aafwk/aafwk_standard/fa/fa_lock_test/entry/package.json
@@ -1 +1 @@
-{}
+{}
diff --git a/aafwk/aafwk_standard/fa/fa_lock_test/entry/src/main/config.json b/aafwk/aafwk_standard/fa/fa_lock_test/entry/src/main/config.json
index fc80d6060ebec2a98ffcc3c94c04cca0a02b4a30..3923280793e00709142a38ee1f5d9b319e6c816f 100644
--- a/aafwk/aafwk_standard/fa/fa_lock_test/entry/src/main/config.json
+++ b/aafwk/aafwk_standard/fa/fa_lock_test/entry/src/main/config.json
@@ -1,185 +1,185 @@
-{
- "app": {
- "bundleName": "com.example.lock",
- "vendor": "example",
- "version": {
- "code": 1000000,
- "name": "1.0.0"
- }
- },
- "deviceConfig": {},
- "module": {
- "package": "com.example.lock",
- "name": ".MyApplication",
- "mainAbility": ".MainAbility",
- "srcPath": "",
- "deviceType": [
- "phone"
- ],
- "distro": {
- "deliveryWithInstall": true,
- "moduleName": "entry",
- "moduleType": "entry",
- "installationFree": false
- },
- "abilities": [
- {
- "skills": [
- {
- "entities": [
- "entity.system.home"
- ],
- "actions": [
- "action.system.home"
- ]
- }
- ],
- "orientation": "unspecified",
- "visible": true,
- "srcPath": "MainAbility",
- "name": ".MainAbility",
- "srcLanguage": "js",
- "icon": "$media:icon",
- "description": "$string:description_mainability",
- "formsEnabled": false,
- "label": "$string:entry_MainAbility",
- "type": "page",
- "launchType": "standard"
- },
- {
- "orientation": "unspecified",
- "srcPath": "Ability2",
- "name": ".Ability2",
- "srcLanguage": "js",
- "icon": "$media:icon",
- "description": "$string:description_ability2",
- "formsEnabled": false,
- "label": "$string:entry_Ability2",
- "type": "page",
- "launchType": "standard"
- },
- {
- "orientation": "unspecified",
- "srcPath": "Ability1",
- "name": ".Ability1",
- "srcLanguage": "js",
- "icon": "$media:icon",
- "description": "$string:description_ability1",
- "formsEnabled": false,
- "label": "$string:entry_Ability1",
- "type": "page",
- "launchType": "standard"
- },
- {
- "orientation": "unspecified",
- "srcPath": "Ability3",
- "name": ".Ability3",
- "srcLanguage": "js",
- "icon": "$media:icon",
- "description": "$string:description_ability3",
- "formsEnabled": false,
- "label": "$string:entry_Ability3",
- "type": "page",
- "launchType": "standard"
- },
- {
- "orientation": "unspecified",
- "srcPath": "Ability4",
- "name": ".Ability4",
- "srcLanguage": "js",
- "icon": "$media:icon",
- "description": "$string:description_ability4",
- "formsEnabled": false,
- "label": "$string:entry_Ability4",
- "type": "page",
- "launchType": "standard"
- }
- ],
- "js": [
- {
- "pages": [
- "pages/index/index",
- "pages/second/second"
- ],
- "name": ".MainAbility",
- "window": {
- "designWidth": 720,
- "autoDesignWidth": false
- }
- },
- {
- "pages": [
- "pages/index/index",
- "pages/second/second"
- ],
- "name": ".Ability2",
- "window": {
- "designWidth": 720,
- "autoDesignWidth": false
- }
- },
- {
- "pages": [
- "pages/index/index",
- "pages/second/second"
- ],
- "name": ".Ability1",
- "window": {
- "designWidth": 720,
- "autoDesignWidth": false
- }
- },
- {
- "pages": [
- "pages/index/index",
- "pages/second/second"
- ],
- "name": ".Ability3",
- "window": {
- "designWidth": 720,
- "autoDesignWidth": false
- }
- },
- {
- "pages": [
- "pages/index/index",
- "pages/second/second"
- ],
- "name": ".Ability4",
- "window": {
- "designWidth": 720,
- "autoDesignWidth": false
- }
- }
- ],
- "reqPermissions": [
- {
- "name": "ohos.permission.GET_BUNDLE_INFO",
- "reason": "need use ohos.permission.INSTALL_BUNDLE"
- },
- {
- "name": "ohos.permission.MANAGE_MISSIONS"
- },
- {
- "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"
- }
- ]
- }
+{
+ "app": {
+ "bundleName": "com.example.lock",
+ "vendor": "example",
+ "version": {
+ "code": 1000000,
+ "name": "1.0.0"
+ }
+ },
+ "deviceConfig": {},
+ "module": {
+ "package": "com.example.lock",
+ "name": ".MyApplication",
+ "mainAbility": ".MainAbility",
+ "srcPath": "",
+ "deviceType": [
+ "phone"
+ ],
+ "distro": {
+ "deliveryWithInstall": true,
+ "moduleName": "entry",
+ "moduleType": "entry",
+ "installationFree": false
+ },
+ "abilities": [
+ {
+ "skills": [
+ {
+ "entities": [
+ "entity.system.home"
+ ],
+ "actions": [
+ "action.system.home"
+ ]
+ }
+ ],
+ "orientation": "unspecified",
+ "visible": true,
+ "srcPath": "MainAbility",
+ "name": ".MainAbility",
+ "srcLanguage": "js",
+ "icon": "$media:icon",
+ "description": "$string:description_mainability",
+ "formsEnabled": false,
+ "label": "$string:entry_MainAbility",
+ "type": "page",
+ "launchType": "standard"
+ },
+ {
+ "orientation": "unspecified",
+ "srcPath": "Ability2",
+ "name": ".Ability2",
+ "srcLanguage": "js",
+ "icon": "$media:icon",
+ "description": "$string:description_ability2",
+ "formsEnabled": false,
+ "label": "$string:entry_Ability2",
+ "type": "page",
+ "launchType": "standard"
+ },
+ {
+ "orientation": "unspecified",
+ "srcPath": "Ability1",
+ "name": ".Ability1",
+ "srcLanguage": "js",
+ "icon": "$media:icon",
+ "description": "$string:description_ability1",
+ "formsEnabled": false,
+ "label": "$string:entry_Ability1",
+ "type": "page",
+ "launchType": "standard"
+ },
+ {
+ "orientation": "unspecified",
+ "srcPath": "Ability3",
+ "name": ".Ability3",
+ "srcLanguage": "js",
+ "icon": "$media:icon",
+ "description": "$string:description_ability3",
+ "formsEnabled": false,
+ "label": "$string:entry_Ability3",
+ "type": "page",
+ "launchType": "standard"
+ },
+ {
+ "orientation": "unspecified",
+ "srcPath": "Ability4",
+ "name": ".Ability4",
+ "srcLanguage": "js",
+ "icon": "$media:icon",
+ "description": "$string:description_ability4",
+ "formsEnabled": false,
+ "label": "$string:entry_Ability4",
+ "type": "page",
+ "launchType": "standard"
+ }
+ ],
+ "js": [
+ {
+ "pages": [
+ "pages/index/index",
+ "pages/second/second"
+ ],
+ "name": ".MainAbility",
+ "window": {
+ "designWidth": 720,
+ "autoDesignWidth": false
+ }
+ },
+ {
+ "pages": [
+ "pages/index/index",
+ "pages/second/second"
+ ],
+ "name": ".Ability2",
+ "window": {
+ "designWidth": 720,
+ "autoDesignWidth": false
+ }
+ },
+ {
+ "pages": [
+ "pages/index/index",
+ "pages/second/second"
+ ],
+ "name": ".Ability1",
+ "window": {
+ "designWidth": 720,
+ "autoDesignWidth": false
+ }
+ },
+ {
+ "pages": [
+ "pages/index/index",
+ "pages/second/second"
+ ],
+ "name": ".Ability3",
+ "window": {
+ "designWidth": 720,
+ "autoDesignWidth": false
+ }
+ },
+ {
+ "pages": [
+ "pages/index/index",
+ "pages/second/second"
+ ],
+ "name": ".Ability4",
+ "window": {
+ "designWidth": 720,
+ "autoDesignWidth": false
+ }
+ }
+ ],
+ "reqPermissions": [
+ {
+ "name": "ohos.permission.GET_BUNDLE_INFO",
+ "reason": "need use ohos.permission.INSTALL_BUNDLE"
+ },
+ {
+ "name": "ohos.permission.MANAGE_MISSIONS"
+ },
+ {
+ "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"
+ }
+ ]
+ }
}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/fa/fa_lock_test/entry/src/main/js/test/List.test.js b/aafwk/aafwk_standard/fa/fa_lock_test/entry/src/main/js/test/List.test.js
index 6e84dfb51be5db59df75098e262919401355716d..499f41fea716f35948cfac56e42ac0d0f9d10c59 100644
--- a/aafwk/aafwk_standard/fa/fa_lock_test/entry/src/main/js/test/List.test.js
+++ b/aafwk/aafwk_standard/fa/fa_lock_test/entry/src/main/js/test/List.test.js
@@ -1,18 +1,18 @@
-/*
- * 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.
- */
-
-//require('./Lock0200Test.js');
-require('./LockNew.js');
+/*
+ * 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.
+ */
+
+//require('./Lock0200Test.js');
+require('./LockNew.js');
require('./LockMission.test.js');
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/fa/fa_lock_test/entry/src/main/js/test/LockMission.test.js b/aafwk/aafwk_standard/fa/fa_lock_test/entry/src/main/js/test/LockMission.test.js
index ffba776bea19852953503e9dc74c267bbc459750..0a3a273e76072cd45daf792783befd60093d660c 100644
--- a/aafwk/aafwk_standard/fa/fa_lock_test/entry/src/main/js/test/LockMission.test.js
+++ b/aafwk/aafwk_standard/fa/fa_lock_test/entry/src/main/js/test/LockMission.test.js
@@ -1,269 +1,269 @@
-/*
- * 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 missionManager from "@ohos.application.missionManager";
-
-describe('missionManager', function () {
- console.info("----------------logMessage SUB_AA_OpenHarmony_Lock-------------------");
-
- /*
- * @tc.number SUB_AA_OpenHarmony_Lock_1500
- * @tc.name Locking function abnormal parameter_-1
- * @tc.desc Function test
- * @tc.level 0
- */
- it('SUB_AA_OpenHarmony_Lock_1500', 0, async function (done) {
- console.info("-------------logMessage SUB_AA_OpenHarmony_Lock_1500---------")
- missionManager.lockMission(-1, (err, data) => {
- console.log('SUB_AA_OpenHarmony_Lock_1500 AsyncCallback errCode : ' +
- JSON.stringify(err) + " data: " + JSON.stringify(data));
- expect(err.code != 0).assertTrue();
- done();
- })
- })
-
- /*
- * @tc.number SUB_AA_OpenHarmony_Lock_1800
- * @tc.name Lock function abnormal parameter _number decimal 0.2
- * @tc.desc Function test
- * @tc.level 0
- */
- it('SUB_AA_OpenHarmony_Lock_1800', 0, async function (done) {
- console.log("------------start SUB_AA_OpenHarmony_Lock_1800-------------");
- var missionId = 0.2;
- setTimeout(() => {
- missionManager.lockMission(missionId).then((data) => {
- console.log("SUB_AA_OpenHarmony_Lock_1800 lockMission data: " +
- JSON.stringify(data));
- }).catch((error) => {
- console.log("SUB_AA_OpenHarmony_Lock_1800 lockMission error: " +
- JSON.stringify(error));
- expect(error.code != 0).assertTrue();
- done();
- })
- }, 1000)
- console.log("------------end SUB_AA_OpenHarmony_Lock_1800-------------");
- })
-
- /*
- * @tc.number SUB_AA_OpenHarmony_Lock_1900
- * @tc.name Lock function abnormal parameter _number decimal 1.2
- * @tc.desc Function test
- * @tc.level 0
- */
- it('SUB_AA_OpenHarmony_Lock_1900', 0, async function (done) {
- console.info("------------------logMessage SUB_AA_OpenHarmony_Lock_1900-------------------")
- missionManager.lockMission(1.2, (err, data) => {
- console.log('SUB_AA_OpenHarmony_Lock_1900 AsyncCallback errCode : ' +
- JSON.stringify(err) + " data: " + JSON.stringify(data));
- expect(data == undefined).assertTrue();
- done();
- })
- })
-
- /*
- * @tc.number SUB_AA_OpenHarmony_Lock_1700
- * @tc.name Lock function exception parameter _string type is not a number
- * @tc.desc Function test
- * @tc.level 0
- */
- it('SUB_AA_OpenHarmony_Lock_1700', 0, async function (done) {
- console.info("------------logMessage SUB_AA_OpenHarmony_Lock_1700-----------")
- missionManager.lockMission("A", (err, data) => {
- console.log('SUB_AA_OpenHarmony_Lock_1700 AsyncCallback errCode : ' +
- JSON.stringify(err) + " data: " + JSON.stringify(data));
- expect(err.code != 0).assertTrue();
- done();
- })
- })
-
- /*
- * @tc.number SUB_AA_OpenHarmony_Lock_1600
- * @tc.name Lock function exception parameter _string type number
- * @tc.desc Function test
- * @tc.level 0
- */
- it('SUB_AA_OpenHarmony_Lock_1600', 0, async function (done) {
- console.info("---------------logMessage SUB_AA_OpenHarmony_Lock_1600------------")
- missionManager.lockMission("12", (err, data) => {
- console.log('SUB_AA_OpenHarmony_Lock_1600 AsyncCallback errCode : ' +
- JSON.stringify(err) + " data: " + JSON.stringify(data));
- expect(err.code != 0).assertTrue();
- done();
- })
- })
-
- /*
- * @tc.number SUB_AA_OpenHarmony_Lock_1400
- * @tc.name Lock function exception parameter _undefined
- * @tc.desc Function test
- * @tc.level 0
- */
- it('SUB_AA_OpenHarmony_Lock_1400', 0, async function (done) {
- console.info("---------------logMessage SUB_AA_OpenHarmony_Lock_1400-------------")
- missionManager.lockMission(undefined, (err, data) => {
- console.log('SUB_AA_OpenHarmony_Lock_1400 AsyncCallback errCode : ' +
- JSON.stringify(err) + " data: " + JSON.stringify(data));
- expect(err.code != 0).assertTrue();
- done();
- })
- })
-
- /*
- * @tc.number SUB_AA_OpenHarmony_Lock_2200
- * @tc.name Unlock function abnormal parameter_-1
- * @tc.desc Function test
- * @tc.level 0
- */
- it('SUB_AA_OpenHarmony_Lock_2200', 0, async function (done) {
- console.info("------------------logMessage SUB_AA_OpenHarmony_Lock_2200-------------")
- missionManager.unlockMission(-1, (err, data) => {
- console.log('SUB_AA_OpenHarmony_Lock_2200 AsyncCallback errCode : ' +
- JSON.stringify(err) + " data: " + JSON.stringify(data));
- expect(err.code != 0).assertTrue();
- done();
- })
- })
-
- /*
- * @tc.number SUB_AA_OpenHarmony_Lock_2500
- * @tc.name Unlock function abnormal parameter _number decimal 0.2
- * @tc.desc Function test
- * @tc.level 0
- */
- it('SUB_AA_OpenHarmony_Lock_2500', 0, async function (done) {
- console.info("------------------logMessage SUB_AA_OpenHarmony_Lock_2500--------------")
- missionManager.unlockMission(0.2, (err, data) => {
- console.log('SUB_AA_OpenHarmony_Lock_2500 AsyncCallback errCode : ' +
- JSON.stringify(err) + " data: " + JSON.stringify(data));
- expect(err.code != 0).assertTrue();
- done();
- })
- })
-
- /*
- * @tc.number SUB_AA_OpenHarmony_Lock_2400
- * @tc.name Unlock function exception parameter _string type non-numeric
- * @tc.desc Function test
- * @tc.level 0
- */
- it('SUB_AA_OpenHarmony_Lock_2400', 0, async function (done) {
- console.info("------------------logMessage SUB_AA_OpenHarmony_Lock_2400-----------")
- missionManager.unlockMission("a", (err, data) => {
- console.log('SUB_AA_OpenHarmony_Lock_2400 AsyncCallback errCode : ' +
- JSON.stringify(err) + " data: " + JSON.stringify(data));
- expect(err.code != 0).assertTrue();
- done();
- })
- })
-
- /*
- * @tc.number SUB_AA_OpenHarmony_Lock_2300
- * @tc.name Unlock function exception parameter _string type number
- * @tc.desc Function test
- * @tc.level 0
- */
- it('SUB_AA_OpenHarmony_Lock_2300', 0, async function (done) {
- console.info("------------------logMessage SUB_AA_OpenHarmony_Lock_2300--------------")
- missionManager.unlockMission("123", (err, data) => {
- console.log('SUB_AA_OpenHarmony_Lock_2300 AsyncCallback errCode : ' +
- JSON.stringify(err) + " data: " + JSON.stringify(data));
- expect(err.code != 0).assertTrue();
- done();
- })
- })
-
- /*
- * @tc.number SUB_AA_OpenHarmony_Lock_2100
- * @tc.name Unlock function exception parameter _undefined
- * @tc.desc Function test
- * @tc.level 0
- */
- it('SUB_AA_OpenHarmony_Lock_2100', 0, async function (done) {
- console.info("------------------logMessage SUB_AA_OpenHarmony_Lock_2100--------------")
- missionManager.unlockMission(undefined, (err, data) => {
- console.log('SUB_AA_OpenHarmony_Lock_2100 AsyncCallback errCode : ' +
- JSON.stringify(err) + " data: " + JSON.stringify(data));
- expect(err.code != 0).assertTrue();
- done();
- })
- })
-
- /*
- * @tc.number SUB_AA_OpenHarmony_Lock_2600
- * @tc.name Unlock function abnormal parameter _number decimal 1.2
- * @tc.desc Function test
- * @tc.level 0
- */
- it('SUB_AA_OpenHarmony_Lock_2600', 0, async function (done) {
- console.log("------------SUB_AA_OpenHarmony_Lock_2600-------------");
- var missionId = 1.2;
- setTimeout(() => {
- missionManager.unlockMission(missionId).then((data) => {
- console.log("SUB_AA_OpenHarmony_Lock_2600 unlockMission data: " +
- JSON.stringify(data));
-
- }).catch((error) => {
- console.log("SUB_AA_OpenHarmony_Lock_2600 unlockMission error: " +
- JSON.stringify(error));
- expect(error.code != 0).assertTrue();
- done();
- })
- }, 1000)
- console.log("------------end SUB_AA_OpenHarmony_Lock_2600-------------");
- })
-
- /*
- * @tc.number SUB_AA_OpenHarmony_Lock_2000
- * @tc.name Repeat lock
- * @tc.desc Function test
- * @tc.level 0
- */
- it('SUB_AA_OpenHarmony_Lock_2000',0,async function (done){
- console.log("------------start SUB_AA_OpenHarmony_Lock_2000-------------");
- for(var i=0;i<2;i++){
- missionManager.lockMission(1.2, (error, data) => {
- console.log("SUB_AA_OpenHarmony_Lock_0900, twosgetMissionInfos:" +
- JSON.stringify(error) + ", " + JSON.stringify(data));
- expect(data == undefined).assertTrue();
- })
- }
- done();
- })
-
- /*
- * @tc.number SUB_AA_OpenHarmony_Lock_2700
- * @tc.name Repeat unlock
- * @tc.desc Function test
- * @tc.level 0
- */
- it('SUB_AA_OpenHarmony_Lock_2700',0,async function (done){
- var missionId = 1.2
- console.log("------------start SUB_AA_OpenHarmony_Lock_2700-------------");
- missionManager.lockMission(missionId, (error, data) => {
- console.log("lockMission info" + JSON.stringify(data));
- })
- missionManager.unlockMission(missionId,(error, data) => {
- for(var i=0;i<2;i++){
- missionManager.unlockMission(missionId,(error, data1) => {
- console.log("unlockMission info" + JSON.stringify(data1));
- expect(data1 == undefined);
- })
- }
- })
- done();
- })
-})
+/*
+ * 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 missionManager from "@ohos.application.missionManager";
+
+describe('missionManager', function () {
+ console.info("----------------logMessage SUB_AA_OpenHarmony_Lock-------------------");
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_Lock_1500
+ * @tc.name Locking function abnormal parameter_-1
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_Lock_1500', 0, async function (done) {
+ console.info("-------------logMessage SUB_AA_OpenHarmony_Lock_1500---------")
+ missionManager.lockMission(-1, (err, data) => {
+ console.log('SUB_AA_OpenHarmony_Lock_1500 AsyncCallback errCode : ' +
+ JSON.stringify(err) + " data: " + JSON.stringify(data));
+ expect(err.code != 0).assertTrue();
+ done();
+ })
+ })
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_Lock_1800
+ * @tc.name Lock function abnormal parameter _number decimal 0.2
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_Lock_1800', 0, async function (done) {
+ console.log("------------start SUB_AA_OpenHarmony_Lock_1800-------------");
+ var missionId = 0.2;
+ setTimeout(() => {
+ missionManager.lockMission(missionId).then((data) => {
+ console.log("SUB_AA_OpenHarmony_Lock_1800 lockMission data: " +
+ JSON.stringify(data));
+ }).catch((error) => {
+ console.log("SUB_AA_OpenHarmony_Lock_1800 lockMission error: " +
+ JSON.stringify(error));
+ expect(error.code != 0).assertTrue();
+ done();
+ })
+ }, 1000)
+ console.log("------------end SUB_AA_OpenHarmony_Lock_1800-------------");
+ })
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_Lock_1900
+ * @tc.name Lock function abnormal parameter _number decimal 1.2
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_Lock_1900', 0, async function (done) {
+ console.info("------------------logMessage SUB_AA_OpenHarmony_Lock_1900-------------------")
+ missionManager.lockMission(1.2, (err, data) => {
+ console.log('SUB_AA_OpenHarmony_Lock_1900 AsyncCallback errCode : ' +
+ JSON.stringify(err) + " data: " + JSON.stringify(data));
+ expect(data == undefined).assertTrue();
+ done();
+ })
+ })
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_Lock_1700
+ * @tc.name Lock function exception parameter _string type is not a number
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_Lock_1700', 0, async function (done) {
+ console.info("------------logMessage SUB_AA_OpenHarmony_Lock_1700-----------")
+ missionManager.lockMission("A", (err, data) => {
+ console.log('SUB_AA_OpenHarmony_Lock_1700 AsyncCallback errCode : ' +
+ JSON.stringify(err) + " data: " + JSON.stringify(data));
+ expect(err.code != 0).assertTrue();
+ done();
+ })
+ })
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_Lock_1600
+ * @tc.name Lock function exception parameter _string type number
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_Lock_1600', 0, async function (done) {
+ console.info("---------------logMessage SUB_AA_OpenHarmony_Lock_1600------------")
+ missionManager.lockMission("12", (err, data) => {
+ console.log('SUB_AA_OpenHarmony_Lock_1600 AsyncCallback errCode : ' +
+ JSON.stringify(err) + " data: " + JSON.stringify(data));
+ expect(err.code != 0).assertTrue();
+ done();
+ })
+ })
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_Lock_1400
+ * @tc.name Lock function exception parameter _undefined
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_Lock_1400', 0, async function (done) {
+ console.info("---------------logMessage SUB_AA_OpenHarmony_Lock_1400-------------")
+ missionManager.lockMission(undefined, (err, data) => {
+ console.log('SUB_AA_OpenHarmony_Lock_1400 AsyncCallback errCode : ' +
+ JSON.stringify(err) + " data: " + JSON.stringify(data));
+ expect(err.code != 0).assertTrue();
+ done();
+ })
+ })
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_Lock_2200
+ * @tc.name Unlock function abnormal parameter_-1
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_Lock_2200', 0, async function (done) {
+ console.info("------------------logMessage SUB_AA_OpenHarmony_Lock_2200-------------")
+ missionManager.unlockMission(-1, (err, data) => {
+ console.log('SUB_AA_OpenHarmony_Lock_2200 AsyncCallback errCode : ' +
+ JSON.stringify(err) + " data: " + JSON.stringify(data));
+ expect(err.code != 0).assertTrue();
+ done();
+ })
+ })
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_Lock_2500
+ * @tc.name Unlock function abnormal parameter _number decimal 0.2
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_Lock_2500', 0, async function (done) {
+ console.info("------------------logMessage SUB_AA_OpenHarmony_Lock_2500--------------")
+ missionManager.unlockMission(0.2, (err, data) => {
+ console.log('SUB_AA_OpenHarmony_Lock_2500 AsyncCallback errCode : ' +
+ JSON.stringify(err) + " data: " + JSON.stringify(data));
+ expect(err.code != 0).assertTrue();
+ done();
+ })
+ })
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_Lock_2400
+ * @tc.name Unlock function exception parameter _string type non-numeric
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_Lock_2400', 0, async function (done) {
+ console.info("------------------logMessage SUB_AA_OpenHarmony_Lock_2400-----------")
+ missionManager.unlockMission("a", (err, data) => {
+ console.log('SUB_AA_OpenHarmony_Lock_2400 AsyncCallback errCode : ' +
+ JSON.stringify(err) + " data: " + JSON.stringify(data));
+ expect(err.code != 0).assertTrue();
+ done();
+ })
+ })
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_Lock_2300
+ * @tc.name Unlock function exception parameter _string type number
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_Lock_2300', 0, async function (done) {
+ console.info("------------------logMessage SUB_AA_OpenHarmony_Lock_2300--------------")
+ missionManager.unlockMission("123", (err, data) => {
+ console.log('SUB_AA_OpenHarmony_Lock_2300 AsyncCallback errCode : ' +
+ JSON.stringify(err) + " data: " + JSON.stringify(data));
+ expect(err.code != 0).assertTrue();
+ done();
+ })
+ })
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_Lock_2100
+ * @tc.name Unlock function exception parameter _undefined
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_Lock_2100', 0, async function (done) {
+ console.info("------------------logMessage SUB_AA_OpenHarmony_Lock_2100--------------")
+ missionManager.unlockMission(undefined, (err, data) => {
+ console.log('SUB_AA_OpenHarmony_Lock_2100 AsyncCallback errCode : ' +
+ JSON.stringify(err) + " data: " + JSON.stringify(data));
+ expect(err.code != 0).assertTrue();
+ done();
+ })
+ })
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_Lock_2600
+ * @tc.name Unlock function abnormal parameter _number decimal 1.2
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_Lock_2600', 0, async function (done) {
+ console.log("------------SUB_AA_OpenHarmony_Lock_2600-------------");
+ var missionId = 1.2;
+ setTimeout(() => {
+ missionManager.unlockMission(missionId).then((data) => {
+ console.log("SUB_AA_OpenHarmony_Lock_2600 unlockMission data: " +
+ JSON.stringify(data));
+
+ }).catch((error) => {
+ console.log("SUB_AA_OpenHarmony_Lock_2600 unlockMission error: " +
+ JSON.stringify(error));
+ expect(error.code != 0).assertTrue();
+ done();
+ })
+ }, 1000)
+ console.log("------------end SUB_AA_OpenHarmony_Lock_2600-------------");
+ })
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_Lock_2000
+ * @tc.name Repeat lock
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_Lock_2000',0,async function (done){
+ console.log("------------start SUB_AA_OpenHarmony_Lock_2000-------------");
+ for(var i=0;i<2;i++){
+ missionManager.lockMission(1.2, (error, data) => {
+ console.log("SUB_AA_OpenHarmony_Lock_0900, twosgetMissionInfos:" +
+ JSON.stringify(error) + ", " + JSON.stringify(data));
+ expect(data == undefined).assertTrue();
+ })
+ }
+ done();
+ })
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_Lock_2700
+ * @tc.name Repeat unlock
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_Lock_2700',0,async function (done){
+ var missionId = 1.2
+ console.log("------------start SUB_AA_OpenHarmony_Lock_2700-------------");
+ missionManager.lockMission(missionId, (error, data) => {
+ console.log("lockMission info" + JSON.stringify(data));
+ })
+ missionManager.unlockMission(missionId,(error, data) => {
+ for(var i=0;i<2;i++){
+ missionManager.unlockMission(missionId,(error, data1) => {
+ console.log("unlockMission info" + JSON.stringify(data1));
+ expect(data1 == undefined);
+ })
+ }
+ })
+ done();
+ })
+})
diff --git a/aafwk/aafwk_standard/fa/fa_lock_test/entry/src/main/js/test/LockNew.js b/aafwk/aafwk_standard/fa/fa_lock_test/entry/src/main/js/test/LockNew.js
index 731f2f33666b796dc649a4f8dfad1fe04bde3692..8b7014a6399d1c3469fb7482639131a2dba8e63b 100644
--- a/aafwk/aafwk_standard/fa/fa_lock_test/entry/src/main/js/test/LockNew.js
+++ b/aafwk/aafwk_standard/fa/fa_lock_test/entry/src/main/js/test/LockNew.js
@@ -1,376 +1,376 @@
-/*
- * 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, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index";
-import missionManager from '@ohos.application.missionManager';
-import abilityFeatureAbility from '@ohos.ability.featureAbility';
-import commonEvent from '@ohos.commonEvent';
-
-var START_ABILITY_TIMEOUT = 5000;
-
-describe('LockTest', function () {
- console.log("LockTest --- start");
- var missionArray = [];
- function sleep(numberMillis) {
- var now = new Date();
- var exitTime = now.getTime() + numberMillis;
- while (true) {
- now = new Date();
- if (now.getTime() > exitTime)
- return;
- }
- }
-
- /**
- * @tc.number: SUB_AA_OpenHarmony_Lock_0400
- * @tc.name: wantConstant : Check specific enum
- * @tc.desc: Check the return type of the interface (by Promise)
- */
- it('SUB_AA_OpenHarmony_Lock_0700', 0, async function (done) {
- console.info('=======SUB_AA_OpenHarmony_Lock_0700 step1 start=====startActivity=====');
- abilityFeatureAbility.startAbility({ want: {
- bundleName: "com.example.lock",
- abilityName: "com.example.lock.Ability1"
- } })
- .then((data) => {
- console.info('SUB_AA_OpenHarmony_Lock_0300 startAbility1: ' +
- JSON.stringify(data));
- console.info('SUB_AA_OpenHarmony_Lock_0300 - startAbility2 start: ')
- abilityFeatureAbility.startAbility({ "want": {
- bundleName: "com.example.lock",
- abilityName: "com.example.lock.Ability2"
- } }, (error, data) => {
- console.log('SUB_AA_OpenHarmony_Lock_0300 - startAbility2: ' +
- JSON.stringify(error) + ", " + JSON.stringify(data))
- console.info('SUB_AA_OpenHarmony_Lock_0300 - startAbility3 start');
- abilityFeatureAbility.startAbility({ "want": {
- bundleName: "com.example.lock",
- abilityName: "com.example.lock.Ability3"
- } }, (error, data) => {
- console.log('SUB_AA_OpenHarmony_Lock_0300 - startAbility3: ' +
- JSON.stringify(error) + ", " + JSON.stringify(data))
- console.info('SUB_AA_OpenHarmony_Lock_0300 - startAbility4 start');
- abilityFeatureAbility.startAbility({ "want": {
- bundleName: "com.example.lock",
- abilityName: "com.example.lock.Ability4"
- } }, (error, data) => {
- console.log('SUB_AA_OpenHarmony_Lock_0300 - startAbility4: ' +
- JSON.stringify(error) + ", " + JSON.stringify(data))
- getMissionInfosOne();
- });
- });
- });
- }).catch((error) => {
- console.error('SUB_AA_OpenHarmony_Lock_0700 startAbility1 error ' +
- JSON.stringify(error));
- })
- setTimeout(() => {
- done();
- }, 5000);
- })
-
- function getMissionInfosOne() {
- console.log('=======SUB_AA_OpenHarmony_Lock_0700 step2 start==========getMissionInfos=====');
- missionArray = [];
- missionManager.getMissionInfos('', 500, (err, data) => {
- console.log('SUB_AA_OpenHarmony_Lock_0700 getMissionInfo err: '
- + JSON.stringify(err) + " data: " + JSON.stringify(data));
- expect(err.code == 0).assertTrue();
- var i;
- for (i = 0; i < data.length; i++) {
- console.log("getMissionInfos return1 " + JSON.stringify(data[i]));
- if (data[i].want.abilityName == 'com.example.lock.Ability1' &&
- data[i].runningState == 0) {
- missionArray[0] = new Object();
- missionArray[0].id = data[i].missionId;
- missionArray[0].name = data[i].want.abilityName;
- }
- if (data[i].want.abilityName == 'com.example.lock.Ability2' &&
- data[i].runningState == 0) {
- missionArray[1] = new Object();
- missionArray[1].id = data[i].missionId;
- missionArray[1].name = data[i].want.abilityName;
- }
- if (data[i].want.abilityName == 'com.example.lock.Ability3' &&
- data[i].runningState == 0) {
- missionArray[2] = new Object();
- missionArray[2].id = data[i].missionId;
- missionArray[2].name = data[i].want.abilityName;
- }
- if (data[i].want.abilityName == 'com.example.lock.Ability4' &&
- data[i].runningState == 0) {
- missionArray[3] = new Object();
- missionArray[3].id = data[i].missionId;
- missionArray[3].name = data[i].want.abilityName;
- }
- if (data[i].want.abilityName == 'com.example.lock.MainAbility' &&
- data[i].runningState == 0) {
- missionArray[4] = new Object();
- missionArray[4].id = data[i].missionId;
- missionArray[4].name = data[i].want.abilityName;
- }
- }
- console.log("###" + JSON.stringify(missionArray));
- expect(missionArray.length == 5).assertTrue();
- lockMissionMy();
- })
- }
-
- function lockMissionMy() {
- console.log('===============SUB_AA_OpenHarmony_Lock_0700 step3 start=====lockMission======');
- console.log('SUB_AA_OpenHarmony_Lock_0700 missionArray' + JSON.stringify(missionArray));
- var i;
- var j = 0;
- for (i = 0; i < missionArray.length; i++) {
- if (missionArray[i].name == 'com.example.lock.Ability1' || missionArray[i].name ==
- 'com.example.lock.Ability4'|| missionArray[i].name == 'com.example.lock.MainAbility') {
- console.log('SUB_AA_OpenHarmony_Lock_0700 j===' + j);
- console.log('SUB_AA_OpenHarmony_Lock_0700 ' + JSON.stringify(missionArray[i].id));
- missionManager.lockMission(missionArray[i].id, (err, data) => {
- console.log('SUB_AA_OpenHarmony_Lock_0700 lockMission err:'
- + JSON.stringify(err) + " data: " + JSON.stringify(data));
- expect(data == undefined).assertTrue();
- j++;
- if (j == 3) {
- getMissionInfosTest();
- //clearAllMission();
- }
- })
- }
- }
- }
-
- function unlockMissionTest() {
- console.log('===============SUB_AA_OpenHarmony_Lock_0700 step6 start=====unLockMission======');
- console.log("unlockMissionMy start " + JSON.stringify(missionArray));
- missionManager.unlockMission(missionArray[1].id, (err, data) => {
- console.log('SUB_AA_OpenHarmony_Lock_0700 unlockMission err:'
- + JSON.stringify(err) + " data: " + JSON.stringify(data));
- expect(data == undefined).assertTrue();
- });
- }
-
- function getMissionInfosTest(){
- console.log('==========SUB_AA_OpenHarmony_Lock_0700 step5 start=====getMissionInfosTest======');
- missionArray = []
- missionManager.getMissionInfos('', 500, (err, data) => {
- console.log('getMissionInfosTwo getMissionInfos4 err: '
- + JSON.stringify(err) + " data: " + JSON.stringify(data));
- expect(err.code == 0).assertTrue();
- var i;
- for (i = 0; i < data.length; i++) {
- console.log("getMissionInfos return1 " + JSON.stringify(data[i]));
- if (data[i].want.abilityName == 'com.example.lock.Ability1' &&
- data[i].runningState == 0) {
- expect(data[i].lockedState == true).assertTrue();
- expect(data[i].timestamp != 0).assertTrue();
- expect(data[i].label).assertEquals("$string:entry_MainAbility");
- missionArray[0] = new Object();
- missionArray[0].id = data[i].missionId;
- missionArray[0].name = data[i].want.abilityName;
- }
- if (data[i].want.abilityName == 'com.example.lock.Ability4' &&
- data[i].runningState == 0) {
- expect(data[i].lockedState == true).assertTrue();
- expect(data[i].timestamp != 0).assertTrue();
- expect(data[i].label).assertEquals("$string:entry_MainAbility");
- missionArray[1] = new Object();
- missionArray[1].id = data[i].missionId;
- missionArray[1].name = data[i].want.abilityName;
- }
- }
- console.log("###" + JSON.stringify(missionArray));
- console.log("###" + JSON.stringify(missionArray.length));
- expect(missionArray.length == 2).assertTrue();
- unlockMissionTest();
- })
- }
-
- function clearAllMission(done) {
- console.log('==========SUB_AA_OpenHarmony_Lock_0700 step4 start=====clearAllMissions======');
- missionManager.clearAllMissions((err, data) => {
- console.log('getMissionInfosTwo clearAllMission err: '
- + JSON.stringify(err) + " data: " + JSON.stringify(data));
- getMissionInfosTwo();
- });
- }
-
- function getMissionInfosTwo(done) {
- console.log('==========SUB_AA_OpenHarmony_Lock_0700 step5 start=====getMissionInfos======');
- missionArray = []
- missionManager.getMissionInfos('', 500, (err, data) => {
- console.log('getMissionInfosTwo getMissionInfo err: '
- + JSON.stringify(err) + " data: " + JSON.stringify(data));
- expect(err.code == 0).assertTrue();
- var i;
- for (i = 0; i < data.length; i++) {
- console.log("getMissionInfos return1 " + JSON.stringify(data[i]));
- if (data[i].want.abilityName == 'com.example.lock.Ability1' &&
- data[i].runningState == 0) {
- expect(data[i].lockedState == true).assertTrue();
- missionArray[0] = new Object();
- missionArray[0].id = data[i].missionId;
- missionArray[0].name = data[i].want.abilityName;
- }
- if (data[i].want.abilityName == 'com.example.lock.Ability2') {
- expect().assertFail();
- }
- if (data[i].want.abilityName == 'com.example.lock.Ability3' &&
- data[i].runningState == 0) {
- expect().assertFail();
- }
- if (data[i].want.abilityName == 'com.example.lock.Ability4' &&
- data[i].runningState == 0) {
- expect(data[i].lockedState == true).assertTrue();
- missionArray[1] = new Object();
- missionArray[1].id = data[i].missionId;
- missionArray[1].name = data[i].want.abilityName;
- }
- }
- console.log("###" + JSON.stringify(missionArray));
- console.log("###" + JSON.stringify(missionArray.length));
- done();
- expect(missionArray.length == 2).assertTrue();
- //unlockMissionMy();
- })
- }
-
- function unlockMissionMy() {
- console.log('===========SUB_AA_OpenHarmony_Lock_0700 step6 start=====unLockMission======');
- console.log("unlockMissionMy start " + JSON.stringify(missionArray));
- missionManager.unlockMission(missionArray[1].id, (err, data) => {
- console.log('SUB_AA_OpenHarmony_Lock_0700 unlockMission err:'
- + JSON.stringify(err) + " data: " + JSON.stringify(data));
- expect(data == undefined).assertTrue();
- clearAllMission2();
- });
- }
-
- function clearAllMission2(done) {
- console.log('===========SUB_AA_OpenHarmony_Lock_0700 step7 start=====clearAllMissions======');
- var myEvents = {
- events:
- [
- "Ability1_onShow",
- "Ability4_onDestroy"
- ]
- };
- var Subscriber;
- let id;
- var data = [];
-
- function SubscribeCallBack(err, data) {
- console.debug("beforeAll====>Subscribe CallBack data:====>" + JSON.stringify(data));
- switch (data.event) {
- case "Ability1_onShow":
- console.log("Ability1_onShow");
- data[0] = "Ability1_onCreate";
- break;
- case "Ability4_onDestroy":
- console.log("Ability4_onDestroy");
- data[1] = "Ability2_onCreate";
- break;
- default:
- }
- if (data.length == 2) {
- clearTimeout(id);
- commonEvent.unsubscribe(Subscriber, UnSubscribeCallback);
-
- }
- };
- commonEvent.createSubscriber(myEvents).then(async (data) => {
- console.debug("SUB_AA_OpenHarmony_Lock_0400====>Create Subscriber====>");
- Subscriber = data;
- console.log("SUB_AA_OpenHarmony_Lock_0700 Subscriber " + JSON.stringify(Subscriber));
- await commonEvent.subscribe(Subscriber, SubscribeCallBack);
- }).catch((error) => {
- console.error('Operation failed. Cause: ' + JSON.stringify(error));
- done();
- });
-
- function UnSubscribeCallback() {
- console.debug("====>UnSubscribe CallBack====>");
- }
-
- function timeout() {
- expect().assertFail();
- console.debug('SUB_AA_OpenHarmony_Lock_0700=====timeout======');
- commonEvent.unsubscribe(Subscriber, UnSubscribeCallback);
- done();
- }
-
- id = setTimeout(timeout, START_ABILITY_TIMEOUT);
-
- missionManager.clearAllMissions();
- sleep(500);
- getMissionInfosThree();
- }
-
- function getMissionInfosThree(done) {
- console.log('===========SUB_AA_OpenHarmony_Lock_0700 step8 start=====getMissonInfos======');
- missionArray = [];
- missionManager.getMissionInfos('', 500, (err, data) => {
- console.log('getMissionInfosThree getMissionInfo err: '
- + JSON.stringify(err) + " data: " + JSON.stringify(data));
- expect(err.code == 0).assertTrue();
- var i;
- for (i = 0; i < data.length; i++) {
- console.log("getMissionInfos return1 " + JSON.stringify(data[i]));
- if (data[i].want.abilityName == 'com.example.lock.Ability1' &&
- data[i].runningState == 0) {
- expect(data[i].lockedState == true).assertTrue();
- missionArray[0] = new Object();
- missionArray[0].id = data[i].missionId;
- missionArray[0].name = data[i].want.abilityName;
- }
- if (data[i].want.abilityName == 'com.example.lock.Ability2') {
- expect().assertFail();
- done();
- }
- if (data[i].want.abilityName == 'com.example.lock.Ability3' &&
- data[i].runningState == 0) {
- expect().assertFail();
- done();
- }
- if (data[i].want.abilityName == 'com.example.lock.Ability4' &&
- data[i].runningState == 0) {
- expect().assertFail();
- done();
- }
- }
- console.log("###" + JSON.stringify(missionArray));
- expect(missionArray.length == 1).assertTrue();
- console.log('===============SUB_AA_OpenHarmony_Lock_0700 step9 start===========');
- console.info('LockTest TearDown: ' + JSON.stringify(missionArray));
- var i;
- for (i = 0; i < missionArray.length; i++) {
- missionManager.unlockMission(missionArray[i].id, (err, data) => {
- console.log('SUB_AA_OpenHarmony_Lock_0700 unlockMission err:'
- + JSON.stringify(err) + " data: " + JSON.stringify(data));
- expect(data == undefined).assertTrue();
- missionManager.clearAllMissions();
- if (i == missionArray.length) {
- console.info('LockTest - myTearDown: done');
- missionManager.clearAllMissions();
- done();
- }
- console.info('LockTest - myTearDown%%: i' + i);
- console.info('LockTest - myTearDown%%: length' + missionArray.length);
- });
- }
- })
- }
-}
-)
+/*
+ * 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, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index";
+import missionManager from '@ohos.application.missionManager';
+import abilityFeatureAbility from '@ohos.ability.featureAbility';
+import commonEvent from '@ohos.commonEvent';
+
+var START_ABILITY_TIMEOUT = 5000;
+
+describe('LockTest', function () {
+ console.log("LockTest --- start");
+ var missionArray = [];
+ function sleep(numberMillis) {
+ var now = new Date();
+ var exitTime = now.getTime() + numberMillis;
+ while (true) {
+ now = new Date();
+ if (now.getTime() > exitTime)
+ return;
+ }
+ }
+
+ /**
+ * @tc.number: SUB_AA_OpenHarmony_Lock_0400
+ * @tc.name: wantConstant : Check specific enum
+ * @tc.desc: Check the return type of the interface (by Promise)
+ */
+ it('SUB_AA_OpenHarmony_Lock_0700', 0, async function (done) {
+ console.info('=======SUB_AA_OpenHarmony_Lock_0700 step1 start=====startActivity=====');
+ abilityFeatureAbility.startAbility({ want: {
+ bundleName: "com.example.lock",
+ abilityName: "com.example.lock.Ability1"
+ } })
+ .then((data) => {
+ console.info('SUB_AA_OpenHarmony_Lock_0300 startAbility1: ' +
+ JSON.stringify(data));
+ console.info('SUB_AA_OpenHarmony_Lock_0300 - startAbility2 start: ')
+ abilityFeatureAbility.startAbility({ "want": {
+ bundleName: "com.example.lock",
+ abilityName: "com.example.lock.Ability2"
+ } }, (error, data) => {
+ console.log('SUB_AA_OpenHarmony_Lock_0300 - startAbility2: ' +
+ JSON.stringify(error) + ", " + JSON.stringify(data))
+ console.info('SUB_AA_OpenHarmony_Lock_0300 - startAbility3 start');
+ abilityFeatureAbility.startAbility({ "want": {
+ bundleName: "com.example.lock",
+ abilityName: "com.example.lock.Ability3"
+ } }, (error, data) => {
+ console.log('SUB_AA_OpenHarmony_Lock_0300 - startAbility3: ' +
+ JSON.stringify(error) + ", " + JSON.stringify(data))
+ console.info('SUB_AA_OpenHarmony_Lock_0300 - startAbility4 start');
+ abilityFeatureAbility.startAbility({ "want": {
+ bundleName: "com.example.lock",
+ abilityName: "com.example.lock.Ability4"
+ } }, (error, data) => {
+ console.log('SUB_AA_OpenHarmony_Lock_0300 - startAbility4: ' +
+ JSON.stringify(error) + ", " + JSON.stringify(data))
+ getMissionInfosOne();
+ });
+ });
+ });
+ }).catch((error) => {
+ console.error('SUB_AA_OpenHarmony_Lock_0700 startAbility1 error ' +
+ JSON.stringify(error));
+ })
+ setTimeout(() => {
+ done();
+ }, 5000);
+ })
+
+ function getMissionInfosOne() {
+ console.log('=======SUB_AA_OpenHarmony_Lock_0700 step2 start==========getMissionInfos=====');
+ missionArray = [];
+ missionManager.getMissionInfos('', 500, (err, data) => {
+ console.log('SUB_AA_OpenHarmony_Lock_0700 getMissionInfo err: '
+ + JSON.stringify(err) + " data: " + JSON.stringify(data));
+ expect(err.code == 0).assertTrue();
+ var i;
+ for (i = 0; i < data.length; i++) {
+ console.log("getMissionInfos return1 " + JSON.stringify(data[i]));
+ if (data[i].want.abilityName == 'com.example.lock.Ability1' &&
+ data[i].runningState == 0) {
+ missionArray[0] = new Object();
+ missionArray[0].id = data[i].missionId;
+ missionArray[0].name = data[i].want.abilityName;
+ }
+ if (data[i].want.abilityName == 'com.example.lock.Ability2' &&
+ data[i].runningState == 0) {
+ missionArray[1] = new Object();
+ missionArray[1].id = data[i].missionId;
+ missionArray[1].name = data[i].want.abilityName;
+ }
+ if (data[i].want.abilityName == 'com.example.lock.Ability3' &&
+ data[i].runningState == 0) {
+ missionArray[2] = new Object();
+ missionArray[2].id = data[i].missionId;
+ missionArray[2].name = data[i].want.abilityName;
+ }
+ if (data[i].want.abilityName == 'com.example.lock.Ability4' &&
+ data[i].runningState == 0) {
+ missionArray[3] = new Object();
+ missionArray[3].id = data[i].missionId;
+ missionArray[3].name = data[i].want.abilityName;
+ }
+ if (data[i].want.abilityName == 'com.example.lock.MainAbility' &&
+ data[i].runningState == 0) {
+ missionArray[4] = new Object();
+ missionArray[4].id = data[i].missionId;
+ missionArray[4].name = data[i].want.abilityName;
+ }
+ }
+ console.log("###" + JSON.stringify(missionArray));
+ expect(missionArray.length == 5).assertTrue();
+ lockMissionMy();
+ })
+ }
+
+ function lockMissionMy() {
+ console.log('===============SUB_AA_OpenHarmony_Lock_0700 step3 start=====lockMission======');
+ console.log('SUB_AA_OpenHarmony_Lock_0700 missionArray' + JSON.stringify(missionArray));
+ var i;
+ var j = 0;
+ for (i = 0; i < missionArray.length; i++) {
+ if (missionArray[i].name == 'com.example.lock.Ability1' || missionArray[i].name ==
+ 'com.example.lock.Ability4'|| missionArray[i].name == 'com.example.lock.MainAbility') {
+ console.log('SUB_AA_OpenHarmony_Lock_0700 j===' + j);
+ console.log('SUB_AA_OpenHarmony_Lock_0700 ' + JSON.stringify(missionArray[i].id));
+ missionManager.lockMission(missionArray[i].id, (err, data) => {
+ console.log('SUB_AA_OpenHarmony_Lock_0700 lockMission err:'
+ + JSON.stringify(err) + " data: " + JSON.stringify(data));
+ expect(data == undefined).assertTrue();
+ j++;
+ if (j == 3) {
+ getMissionInfosTest();
+ //clearAllMission();
+ }
+ })
+ }
+ }
+ }
+
+ function unlockMissionTest() {
+ console.log('===============SUB_AA_OpenHarmony_Lock_0700 step6 start=====unLockMission======');
+ console.log("unlockMissionMy start " + JSON.stringify(missionArray));
+ missionManager.unlockMission(missionArray[1].id, (err, data) => {
+ console.log('SUB_AA_OpenHarmony_Lock_0700 unlockMission err:'
+ + JSON.stringify(err) + " data: " + JSON.stringify(data));
+ expect(data == undefined).assertTrue();
+ });
+ }
+
+ function getMissionInfosTest(){
+ console.log('==========SUB_AA_OpenHarmony_Lock_0700 step5 start=====getMissionInfosTest======');
+ missionArray = []
+ missionManager.getMissionInfos('', 500, (err, data) => {
+ console.log('getMissionInfosTwo getMissionInfos4 err: '
+ + JSON.stringify(err) + " data: " + JSON.stringify(data));
+ expect(err.code == 0).assertTrue();
+ var i;
+ for (i = 0; i < data.length; i++) {
+ console.log("getMissionInfos return1 " + JSON.stringify(data[i]));
+ if (data[i].want.abilityName == 'com.example.lock.Ability1' &&
+ data[i].runningState == 0) {
+ expect(data[i].lockedState == true).assertTrue();
+ expect(data[i].timestamp != 0).assertTrue();
+ expect(data[i].label).assertEquals("$string:entry_MainAbility");
+ missionArray[0] = new Object();
+ missionArray[0].id = data[i].missionId;
+ missionArray[0].name = data[i].want.abilityName;
+ }
+ if (data[i].want.abilityName == 'com.example.lock.Ability4' &&
+ data[i].runningState == 0) {
+ expect(data[i].lockedState == true).assertTrue();
+ expect(data[i].timestamp != 0).assertTrue();
+ expect(data[i].label).assertEquals("$string:entry_MainAbility");
+ missionArray[1] = new Object();
+ missionArray[1].id = data[i].missionId;
+ missionArray[1].name = data[i].want.abilityName;
+ }
+ }
+ console.log("###" + JSON.stringify(missionArray));
+ console.log("###" + JSON.stringify(missionArray.length));
+ expect(missionArray.length == 2).assertTrue();
+ unlockMissionTest();
+ })
+ }
+
+ function clearAllMission(done) {
+ console.log('==========SUB_AA_OpenHarmony_Lock_0700 step4 start=====clearAllMissions======');
+ missionManager.clearAllMissions((err, data) => {
+ console.log('getMissionInfosTwo clearAllMission err: '
+ + JSON.stringify(err) + " data: " + JSON.stringify(data));
+ getMissionInfosTwo();
+ });
+ }
+
+ function getMissionInfosTwo(done) {
+ console.log('==========SUB_AA_OpenHarmony_Lock_0700 step5 start=====getMissionInfos======');
+ missionArray = []
+ missionManager.getMissionInfos('', 500, (err, data) => {
+ console.log('getMissionInfosTwo getMissionInfo err: '
+ + JSON.stringify(err) + " data: " + JSON.stringify(data));
+ expect(err.code == 0).assertTrue();
+ var i;
+ for (i = 0; i < data.length; i++) {
+ console.log("getMissionInfos return1 " + JSON.stringify(data[i]));
+ if (data[i].want.abilityName == 'com.example.lock.Ability1' &&
+ data[i].runningState == 0) {
+ expect(data[i].lockedState == true).assertTrue();
+ missionArray[0] = new Object();
+ missionArray[0].id = data[i].missionId;
+ missionArray[0].name = data[i].want.abilityName;
+ }
+ if (data[i].want.abilityName == 'com.example.lock.Ability2') {
+ expect().assertFail();
+ }
+ if (data[i].want.abilityName == 'com.example.lock.Ability3' &&
+ data[i].runningState == 0) {
+ expect().assertFail();
+ }
+ if (data[i].want.abilityName == 'com.example.lock.Ability4' &&
+ data[i].runningState == 0) {
+ expect(data[i].lockedState == true).assertTrue();
+ missionArray[1] = new Object();
+ missionArray[1].id = data[i].missionId;
+ missionArray[1].name = data[i].want.abilityName;
+ }
+ }
+ console.log("###" + JSON.stringify(missionArray));
+ console.log("###" + JSON.stringify(missionArray.length));
+ done();
+ expect(missionArray.length == 2).assertTrue();
+ //unlockMissionMy();
+ })
+ }
+
+ function unlockMissionMy() {
+ console.log('===========SUB_AA_OpenHarmony_Lock_0700 step6 start=====unLockMission======');
+ console.log("unlockMissionMy start " + JSON.stringify(missionArray));
+ missionManager.unlockMission(missionArray[1].id, (err, data) => {
+ console.log('SUB_AA_OpenHarmony_Lock_0700 unlockMission err:'
+ + JSON.stringify(err) + " data: " + JSON.stringify(data));
+ expect(data == undefined).assertTrue();
+ clearAllMission2();
+ });
+ }
+
+ function clearAllMission2(done) {
+ console.log('===========SUB_AA_OpenHarmony_Lock_0700 step7 start=====clearAllMissions======');
+ var myEvents = {
+ events:
+ [
+ "Ability1_onShow",
+ "Ability4_onDestroy"
+ ]
+ };
+ var Subscriber;
+ let id;
+ var data = [];
+
+ function SubscribeCallBack(err, data) {
+ console.debug("beforeAll====>Subscribe CallBack data:====>" + JSON.stringify(data));
+ switch (data.event) {
+ case "Ability1_onShow":
+ console.log("Ability1_onShow");
+ data[0] = "Ability1_onCreate";
+ break;
+ case "Ability4_onDestroy":
+ console.log("Ability4_onDestroy");
+ data[1] = "Ability2_onCreate";
+ break;
+ default:
+ }
+ if (data.length == 2) {
+ clearTimeout(id);
+ commonEvent.unsubscribe(Subscriber, UnSubscribeCallback);
+
+ }
+ };
+ commonEvent.createSubscriber(myEvents).then(async (data) => {
+ console.debug("SUB_AA_OpenHarmony_Lock_0400====>Create Subscriber====>");
+ Subscriber = data;
+ console.log("SUB_AA_OpenHarmony_Lock_0700 Subscriber " + JSON.stringify(Subscriber));
+ await commonEvent.subscribe(Subscriber, SubscribeCallBack);
+ }).catch((error) => {
+ console.error('Operation failed. Cause: ' + JSON.stringify(error));
+ done();
+ });
+
+ function UnSubscribeCallback() {
+ console.debug("====>UnSubscribe CallBack====>");
+ }
+
+ function timeout() {
+ expect().assertFail();
+ console.debug('SUB_AA_OpenHarmony_Lock_0700=====timeout======');
+ commonEvent.unsubscribe(Subscriber, UnSubscribeCallback);
+ done();
+ }
+
+ id = setTimeout(timeout, START_ABILITY_TIMEOUT);
+
+ missionManager.clearAllMissions();
+ sleep(500);
+ getMissionInfosThree();
+ }
+
+ function getMissionInfosThree(done) {
+ console.log('===========SUB_AA_OpenHarmony_Lock_0700 step8 start=====getMissonInfos======');
+ missionArray = [];
+ missionManager.getMissionInfos('', 500, (err, data) => {
+ console.log('getMissionInfosThree getMissionInfo err: '
+ + JSON.stringify(err) + " data: " + JSON.stringify(data));
+ expect(err.code == 0).assertTrue();
+ var i;
+ for (i = 0; i < data.length; i++) {
+ console.log("getMissionInfos return1 " + JSON.stringify(data[i]));
+ if (data[i].want.abilityName == 'com.example.lock.Ability1' &&
+ data[i].runningState == 0) {
+ expect(data[i].lockedState == true).assertTrue();
+ missionArray[0] = new Object();
+ missionArray[0].id = data[i].missionId;
+ missionArray[0].name = data[i].want.abilityName;
+ }
+ if (data[i].want.abilityName == 'com.example.lock.Ability2') {
+ expect().assertFail();
+ done();
+ }
+ if (data[i].want.abilityName == 'com.example.lock.Ability3' &&
+ data[i].runningState == 0) {
+ expect().assertFail();
+ done();
+ }
+ if (data[i].want.abilityName == 'com.example.lock.Ability4' &&
+ data[i].runningState == 0) {
+ expect().assertFail();
+ done();
+ }
+ }
+ console.log("###" + JSON.stringify(missionArray));
+ expect(missionArray.length == 1).assertTrue();
+ console.log('===============SUB_AA_OpenHarmony_Lock_0700 step9 start===========');
+ console.info('LockTest TearDown: ' + JSON.stringify(missionArray));
+ var i;
+ for (i = 0; i < missionArray.length; i++) {
+ missionManager.unlockMission(missionArray[i].id, (err, data) => {
+ console.log('SUB_AA_OpenHarmony_Lock_0700 unlockMission err:'
+ + JSON.stringify(err) + " data: " + JSON.stringify(data));
+ expect(data == undefined).assertTrue();
+ missionManager.clearAllMissions();
+ if (i == missionArray.length) {
+ console.info('LockTest - myTearDown: done');
+ missionManager.clearAllMissions();
+ done();
+ }
+ console.info('LockTest - myTearDown%%: i' + i);
+ console.info('LockTest - myTearDown%%: length' + missionArray.length);
+ });
+ }
+ })
+ }
+}
+)
diff --git a/aafwk/aafwk_standard/fa/fa_lock_test/entry/src/main/resources/base/element/string.json b/aafwk/aafwk_standard/fa/fa_lock_test/entry/src/main/resources/base/element/string.json
index 1164d3a591ea165837111e19a4566b1650d4cd8f..03038ecbb33b0e8c2e789cb7fd1269966a738d3d 100644
--- a/aafwk/aafwk_standard/fa/fa_lock_test/entry/src/main/resources/base/element/string.json
+++ b/aafwk/aafwk_standard/fa/fa_lock_test/entry/src/main/resources/base/element/string.json
@@ -1,44 +1,44 @@
-{
- "string": [
- {
- "name": "entry_MainAbility",
- "value": "entry_MainAbility"
- },
- {
- "name": "description_mainability",
- "value": "JS_Empty Ability"
- },
- {
- "name": "description_ability2",
- "value": "JS_Empty Ability"
- },
- {
- "name": "entry_Ability2",
- "value": "entry_Ability2"
- },
- {
- "name": "description_ability1",
- "value": "JS_Empty Ability"
- },
- {
- "name": "entry_Ability1",
- "value": "entry_Ability1"
- },
- {
- "name": "description_ability3",
- "value": "JS_Empty Ability"
- },
- {
- "name": "entry_Ability3",
- "value": "entry_Ability3"
- },
- {
- "name": "description_ability4",
- "value": "JS_Empty Ability"
- },
- {
- "name": "entry_Ability4",
- "value": "entry_Ability4"
- }
- ]
+{
+ "string": [
+ {
+ "name": "entry_MainAbility",
+ "value": "entry_MainAbility"
+ },
+ {
+ "name": "description_mainability",
+ "value": "JS_Empty Ability"
+ },
+ {
+ "name": "description_ability2",
+ "value": "JS_Empty Ability"
+ },
+ {
+ "name": "entry_Ability2",
+ "value": "entry_Ability2"
+ },
+ {
+ "name": "description_ability1",
+ "value": "JS_Empty Ability"
+ },
+ {
+ "name": "entry_Ability1",
+ "value": "entry_Ability1"
+ },
+ {
+ "name": "description_ability3",
+ "value": "JS_Empty Ability"
+ },
+ {
+ "name": "entry_Ability3",
+ "value": "entry_Ability3"
+ },
+ {
+ "name": "description_ability4",
+ "value": "JS_Empty Ability"
+ },
+ {
+ "name": "entry_Ability4",
+ "value": "entry_Ability4"
+ }
+ ]
}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/fa/fa_lock_test/signature/openharmony_sx.p7b b/aafwk/aafwk_standard/fa/fa_lock_test/signature/openharmony_sx.p7b
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_missionmanager_test/entry/.gitignore b/aafwk/aafwk_standard/fa/fa_missionmanager_test/entry/.gitignore
index 7d5b7a94f4dcf381f03ff21f28f8a2494b58023f..f77260b1509284d42a7f8a2449ad1e8f4b489a3a 100644
--- a/aafwk/aafwk_standard/fa/fa_missionmanager_test/entry/.gitignore
+++ b/aafwk/aafwk_standard/fa/fa_missionmanager_test/entry/.gitignore
@@ -1,2 +1,2 @@
-/build
-/node_modules
+/build
+/node_modules
diff --git a/aafwk/aafwk_standard/fa/fa_missionmanager_test/entry/build.gradle b/aafwk/aafwk_standard/fa/fa_missionmanager_test/entry/build.gradle
index cef7b37de8f320938458ca42edde1462669836d2..c40c1f08c819a404fc2312634d97bee84d939ba3 100644
--- a/aafwk/aafwk_standard/fa/fa_missionmanager_test/entry/build.gradle
+++ b/aafwk/aafwk_standard/fa/fa_missionmanager_test/entry/build.gradle
@@ -1,21 +1,21 @@
-apply plugin: 'com.huawei.ohos.hap'
-//For instructions on signature configuration, see https://developer.harmonyos.com/cn/docs/documentation/doc-guides/ide_debug_device-0000001053822404#section1112183053510
-ohos {
- compileSdkVersion 8
- defaultConfig {
- compatibleSdkVersion 7
- }
- buildTypes {
- release {
- proguardOpt {
- proguardEnabled false
- rulesFiles 'proguard-rules.pro'
- }
- }
- }
-}
-
-dependencies {
- implementation fileTree(dir: 'libs', include: ['*.jar', '*.har'])
- testImplementation 'junit:junit:4.13.1'
-}
+apply plugin: 'com.huawei.ohos.hap'
+//For instructions on signature configuration, see https://developer.harmonyos.com/cn/docs/documentation/doc-guides/ide_debug_device-0000001053822404#section1112183053510
+ohos {
+ compileSdkVersion 8
+ defaultConfig {
+ compatibleSdkVersion 7
+ }
+ buildTypes {
+ release {
+ proguardOpt {
+ proguardEnabled false
+ rulesFiles 'proguard-rules.pro'
+ }
+ }
+ }
+}
+
+dependencies {
+ implementation fileTree(dir: 'libs', include: ['*.jar', '*.har'])
+ testImplementation 'junit:junit:4.13.1'
+}
diff --git a/aafwk/aafwk_standard/fa/fa_missionmanager_test/entry/package.json b/aafwk/aafwk_standard/fa/fa_missionmanager_test/entry/package.json
index 0967ef424bce6791893e9a57bb952f80fd536e93..69a88e3b65423624fe7ea8b0f8beefcc62cc3d5f 100644
--- a/aafwk/aafwk_standard/fa/fa_missionmanager_test/entry/package.json
+++ b/aafwk/aafwk_standard/fa/fa_missionmanager_test/entry/package.json
@@ -1 +1 @@
-{}
+{}
diff --git a/aafwk/aafwk_standard/fa/fa_missionmanager_test/entry/src/main/config.json b/aafwk/aafwk_standard/fa/fa_missionmanager_test/entry/src/main/config.json
index 366ab4fbfcbfcd82e59fc50ec610965a31db3690..d620977247efd0c18a25b4ad7001b39f07ae4307 100644
--- a/aafwk/aafwk_standard/fa/fa_missionmanager_test/entry/src/main/config.json
+++ b/aafwk/aafwk_standard/fa/fa_missionmanager_test/entry/src/main/config.json
@@ -1,70 +1,70 @@
-{
- "app": {
- "bundleName": "com.example.missionmanager",
- "vendor": "example",
- "version": {
- "code": 1000000,
- "name": "1.0.0"
- }
- },
- "deviceConfig": {},
- "module": {
- "package": "com.example.missionmanager",
- "name": ".MyApplication",
- "mainAbility": ".MainAbility",
- "srcPath": "",
- "deviceType": [
- "phone"
- ],
- "distro": {
- "deliveryWithInstall": true,
- "moduleName": "entry",
- "moduleType": "entry",
- "installationFree": false
- },
- "abilities": [
- {
- "skills": [
- {
- "entities": [
- "entity.system.home"
- ],
- "actions": [
- "action.system.home"
- ]
- }
- ],
- "orientation": "unspecified",
- "visible": true,
- "srcPath": "MainAbility",
- "name": ".MainAbility",
- "srcLanguage": "js",
- "icon": "$media:icon",
- "description": "$string:description_mainability",
- "formsEnabled": false,
- "label": "$string:entry_MainAbility",
- "type": "page",
- "launchType": "standard"
- }
- ],
- "js": [
- {
- "pages": [
- "pages/index/index",
- "pages/second/second"
- ],
- "name": ".MainAbility",
- "window": {
- "designWidth": 720,
- "autoDesignWidth": false
- }
- }
- ],"reqPermissions": [
- {"name":"ohos.permission.MANAGE_LOCAL_ACCOUNTS"},
- {"name":"ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS_EXTENSION"},
- {"name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"},
- {"name":"ohos.permission.MANAGE_MISSIONS"}
- ]
-
- }
+{
+ "app": {
+ "bundleName": "com.example.missionmanager",
+ "vendor": "example",
+ "version": {
+ "code": 1000000,
+ "name": "1.0.0"
+ }
+ },
+ "deviceConfig": {},
+ "module": {
+ "package": "com.example.missionmanager",
+ "name": ".MyApplication",
+ "mainAbility": ".MainAbility",
+ "srcPath": "",
+ "deviceType": [
+ "phone"
+ ],
+ "distro": {
+ "deliveryWithInstall": true,
+ "moduleName": "entry",
+ "moduleType": "entry",
+ "installationFree": false
+ },
+ "abilities": [
+ {
+ "skills": [
+ {
+ "entities": [
+ "entity.system.home"
+ ],
+ "actions": [
+ "action.system.home"
+ ]
+ }
+ ],
+ "orientation": "unspecified",
+ "visible": true,
+ "srcPath": "MainAbility",
+ "name": ".MainAbility",
+ "srcLanguage": "js",
+ "icon": "$media:icon",
+ "description": "$string:description_mainability",
+ "formsEnabled": false,
+ "label": "$string:entry_MainAbility",
+ "type": "page",
+ "launchType": "standard"
+ }
+ ],
+ "js": [
+ {
+ "pages": [
+ "pages/index/index",
+ "pages/second/second"
+ ],
+ "name": ".MainAbility",
+ "window": {
+ "designWidth": 720,
+ "autoDesignWidth": false
+ }
+ }
+ ],"reqPermissions": [
+ {"name":"ohos.permission.MANAGE_LOCAL_ACCOUNTS"},
+ {"name":"ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS_EXTENSION"},
+ {"name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"},
+ {"name":"ohos.permission.MANAGE_MISSIONS"}
+ ]
+
+ }
}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/fa/fa_missionmanager_test/entry/src/main/js/test/List.test.js b/aafwk/aafwk_standard/fa/fa_missionmanager_test/entry/src/main/js/test/List.test.js
index 08f48bb00d2334d6af135acfb1631f77377f867b..70e9c38662f9c716103bf04fbf83fb692b090a4a 100644
--- a/aafwk/aafwk_standard/fa/fa_missionmanager_test/entry/src/main/js/test/List.test.js
+++ b/aafwk/aafwk_standard/fa/fa_missionmanager_test/entry/src/main/js/test/List.test.js
@@ -1,15 +1,15 @@
-/*
- * 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.
- */
+/*
+ * Copyright (c) 2022 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
require('./MissionManager.test.js');
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/fa/fa_missionmanager_test/entry/src/main/js/test/MissionManager.test.js b/aafwk/aafwk_standard/fa/fa_missionmanager_test/entry/src/main/js/test/MissionManager.test.js
index d73f1c5d257365936bdb6760036ddff4e277a0c8..c46e244f1d0e87427c021eaf9ca529dfe44c57a9 100644
--- a/aafwk/aafwk_standard/fa/fa_missionmanager_test/entry/src/main/js/test/MissionManager.test.js
+++ b/aafwk/aafwk_standard/fa/fa_missionmanager_test/entry/src/main/js/test/MissionManager.test.js
@@ -1,183 +1,183 @@
-/*
- * 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 featureAbility from '@ohos.ability.featureAbility';
-import missionManager from "@ohos.application.missionManager";
-import commonEvent from '@ohos.commonEvent';
-describe('missionManager', function () {
- console.info("------------------logMessage SUB_AA_OpenHarmony_MissionManager_6500-------------------");
- var missionIds = [];
- var timestamps = [];
- var ability1LifeEventsonHide = {
- events : [
- "singletonEntry2Ability1_onHide",
- ]
- }
- var ability1LifeEvents = {
- events : ["singletonEntry2Ability1_onShow",
- "singletonEntry2Ability1_onHide",
- "singletonEntry2Ability1_onInactive",
- "singletonEntry2Ability1_onDestroy"]
- }
- var listKey = [""];
- var Subscriber = "";
-
- /*
- * @tc.number SUB_AA_OpenHarmony_MissionManager_6500
- * @tc.name The timestamp of the verification ability will change
- * @tc.desc Function test
- * @tc.level 0
- */
- it('SUB_AA_OpenHarmony_MissionManager_6500', 0, async function (done) {
- listKey = [""];
- function SubscribeCallBack(error, data) {
- console.log(" Subscribe CallBack data:" + JSON.stringify(data));
- if(data.event == "singletonEntry2Ability1_onHide"){
- listKey[0] = "onHide";
- console.log("print listKey" + listKey);
- }
- }
- commonEvent.createSubscriber(ability1LifeEventsonHide).then(async (data) => {
- Subscriber = data;
- await commonEvent.subscribe(Subscriber, SubscribeCallBack);
- });
- setTimeout(function () {
- featureAbility.startAbility(
- { want: {
- bundleName: "com.example.missionmanager",
- abilityName: "com.example.entry2.MainAbility"
- } }, (error, data) => {
- console.log('SUB_AA_OpenHarmony_MissionManager_6500 - startAbility1: '
- + JSON.stringify(error) + ", " + JSON.stringify(data))
- });
- }, 1000)
- setTimeout(()=>{
- missionManager.getMissionInfos('', 100, (error, data) => {
- console.log("SUB_AA_OpenHarmony_MissionManager_6500, twosgetMissionInfos:" + JSON.stringify(data));
- for (var i = 0;i < data.length; i++) {
- console.log('aaaa' + JSON.stringify(data[i].missionId)+"::"+data[i]["want"].abilityName);
- if (data[i].want.abilityName == "com.example.entry2.MainAbility"){
- console.log("uuuuu"+ JSON.stringify(data[i].want.abilityName));
- missionIds.push(data[i].missionId);
- timestamps.push(data[i].timestamp);
- } else if ([i].want.abilityName != "com.example.entry2.MainAbility"){
- console.log("failed222222222222");
- }
- };
- })
- },1000)
- setTimeout(function () {
- featureAbility.startAbility(
- { want: {
- bundleName: "com.example.missionmanager",
- abilityName: "com.example.entry2.MainAbility2"
- } }, (error, data) => {
- console.log('SUB_AA_OpenHarmony_MissionManager_6500 - startAbility2: ' +
- JSON.stringify(error) + ", " + JSON.stringify(data))
- console.log("print listKey111" + listKey);
- setTimeout(function () {
- expect(listKey[0] == "onHide").assertTrue();
- done();
- }, 3000)
- });
- }, 1300)
- setTimeout(()=>{
- console.log("ttttyyyyy" + missionIds+":::"+timestamps[0]);
- for(var i=0;i {
- console.log("SUB_AA_OpenHarmony_MissionManager_6500, infos2:" + JSON.stringify(data) + "");
- console.log(data.timestamp+"::::"+timestamps[1]);
- expect(data.timestamp == timestamps[1]).assertTrue();
- })
- }
- },2000)
- console.log("------------end start SUB_AA_OpenHarmony_MissionManager_6500-------------");
- })
-
- /*
- * @tc.number SUB_AA_OpenHarmony_MissionManager_6400
- * @tc.name Verify the continuable information in the missionInfo of the ability obtained by getMissionInfos
- * @tc.desc Function test
- * @tc.level 0
- */
- it('SUB_AA_OpenHarmony_MissionManager_6400', 0, async function (done) {
- console.log("------------start SUB_AA_OpenHarmony_MissionManager_6400-------------");
- var TAG = "SUB_AA_OpenHarmony_MissionManager_6400";
- var missionInfo = ["","","","","","","","","",""];
- setTimeout(function () {
- featureAbility.startAbility(
- { want: {
- bundleName: "com.example.myapplication3",
- abilityName: "com.example.entry2.MainAbility1"
- } }, (error, data) => {
- console.log('SUB_AA_OpenHarmony_MissionManager_6400 - startAbility: '
- + JSON.stringify(error) + ", " + JSON.stringify(data))
- });
- }, 1000)
- console.log("------------end start SUB_AA_OpenHarmony_MissionManager_6400-------------");
- setTimeout(()=>{
- missionManager.getMissionInfos('', 10, (err, data) => {
- console.log("SUB_AA_OpenHarmony_MissionManager_6400, twosgetMissionInfos:" + JSON.stringify(data));
- for (var i = 0;i < data.length; i++) {
- missionInfo[i] = data[i];
- console.log('qweqweqweqweqwe' + JSON.stringify(missionInfo[i].continuable));
- if(missionInfo[i].want.abilityName == "com.example.entry2.MainAbility1"){
- expect(missionInfo[i].continuable == false).assertTrue();
- };
- }
- })
- },1000)
- done();
- })
-
- /*
- * @tc.number SUB_AA_OpenHarmony_MissionManager_6300
- * @tc.name Verify the want information in the missionInfo of the ability obtained by getMissionInfos
- * @tc.desc Function test
- * @tc.level 0
- */
- it('SUB_AA_OpenHarmony_MissionManager_6300', 0, async function (done) {
- console.log("------------start SUB_AA_OpenHarmony_MissionManager_6300-------------");
- var TAG = "SUB_AA_OpenHarmony_MissionManager_6300";
- var missionInfo = ["","","","","","","","","",""];
- setTimeout(function () {
- featureAbility.startAbility(
- { want: {
- bundleName: "com.example.myapplication3",
- abilityName: "com.example.entry2.MainAbility1"
- } }, (error, data) => {
- console.log('SUB_AA_OpenHarmony_MissionManager_6300 - startAbility: '
- + JSON.stringify(error) + ", " + JSON.stringify(data))
- });
- }, 1000)
- console.log("------------end start SUB_AA_OpenHarmony_MissionManager_6300-------------");
- setTimeout(()=>{
- missionManager.getMissionInfos('', 10, (err, data) => {
- console.log("SUB_AA_OpenHarmony_MissionManager_6300, twosgetMissionInfos:" + JSON.stringify(data));
- for (var i = 0;i < data.length; i++) {
- missionInfo[i] = data[i];
- console.log('qweqweqweqweqwe' + JSON.stringify(missionInfo[i].want));
- if(missionInfo[i].want.abilityName == "com.example.entry2.MainAbility1"){
- if(missionInfo[i].want.bundleName == "com.example.myapplication3"){
- console.log('weweqqq');
- expect(missionInfo[i].want.bundleName == "com.example.myapplication3").assertTrue();
- }
- };
- }
- })
- },1000)
- done();
- })
+/*
+ * 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 featureAbility from '@ohos.ability.featureAbility';
+import missionManager from "@ohos.application.missionManager";
+import commonEvent from '@ohos.commonEvent';
+describe('missionManager', function () {
+ console.info("------------------logMessage SUB_AA_OpenHarmony_MissionManager_6500-------------------");
+ var missionIds = [];
+ var timestamps = [];
+ var ability1LifeEventsonHide = {
+ events : [
+ "singletonEntry2Ability1_onHide",
+ ]
+ }
+ var ability1LifeEvents = {
+ events : ["singletonEntry2Ability1_onShow",
+ "singletonEntry2Ability1_onHide",
+ "singletonEntry2Ability1_onInactive",
+ "singletonEntry2Ability1_onDestroy"]
+ }
+ var listKey = [""];
+ var Subscriber = "";
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_MissionManager_6500
+ * @tc.name The timestamp of the verification ability will change
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_MissionManager_6500', 0, async function (done) {
+ listKey = [""];
+ function SubscribeCallBack(error, data) {
+ console.log(" Subscribe CallBack data:" + JSON.stringify(data));
+ if(data.event == "singletonEntry2Ability1_onHide"){
+ listKey[0] = "onHide";
+ console.log("print listKey" + listKey);
+ }
+ }
+ commonEvent.createSubscriber(ability1LifeEventsonHide).then(async (data) => {
+ Subscriber = data;
+ await commonEvent.subscribe(Subscriber, SubscribeCallBack);
+ });
+ setTimeout(function () {
+ featureAbility.startAbility(
+ { want: {
+ bundleName: "com.example.missionmanager",
+ abilityName: "com.example.entry2.MainAbility"
+ } }, (error, data) => {
+ console.log('SUB_AA_OpenHarmony_MissionManager_6500 - startAbility1: '
+ + JSON.stringify(error) + ", " + JSON.stringify(data))
+ });
+ }, 1000)
+ setTimeout(()=>{
+ missionManager.getMissionInfos('', 100, (error, data) => {
+ console.log("SUB_AA_OpenHarmony_MissionManager_6500, twosgetMissionInfos:" + JSON.stringify(data));
+ for (var i = 0;i < data.length; i++) {
+ console.log('aaaa' + JSON.stringify(data[i].missionId)+"::"+data[i]["want"].abilityName);
+ if (data[i].want.abilityName == "com.example.entry2.MainAbility"){
+ console.log("uuuuu"+ JSON.stringify(data[i].want.abilityName));
+ missionIds.push(data[i].missionId);
+ timestamps.push(data[i].timestamp);
+ } else if ([i].want.abilityName != "com.example.entry2.MainAbility"){
+ console.log("failed222222222222");
+ }
+ };
+ })
+ },1000)
+ setTimeout(function () {
+ featureAbility.startAbility(
+ { want: {
+ bundleName: "com.example.missionmanager",
+ abilityName: "com.example.entry2.MainAbility2"
+ } }, (error, data) => {
+ console.log('SUB_AA_OpenHarmony_MissionManager_6500 - startAbility2: ' +
+ JSON.stringify(error) + ", " + JSON.stringify(data))
+ console.log("print listKey111" + listKey);
+ setTimeout(function () {
+ expect(listKey[0] == "onHide").assertTrue();
+ done();
+ }, 3000)
+ });
+ }, 1300)
+ setTimeout(()=>{
+ console.log("ttttyyyyy" + missionIds+":::"+timestamps[0]);
+ for(var i=0;i {
+ console.log("SUB_AA_OpenHarmony_MissionManager_6500, infos2:" + JSON.stringify(data) + "");
+ console.log(data.timestamp+"::::"+timestamps[1]);
+ expect(data.timestamp == timestamps[1]).assertTrue();
+ })
+ }
+ },2000)
+ console.log("------------end start SUB_AA_OpenHarmony_MissionManager_6500-------------");
+ })
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_MissionManager_6400
+ * @tc.name Verify the continuable information in the missionInfo of the ability obtained by getMissionInfos
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_MissionManager_6400', 0, async function (done) {
+ console.log("------------start SUB_AA_OpenHarmony_MissionManager_6400-------------");
+ var TAG = "SUB_AA_OpenHarmony_MissionManager_6400";
+ var missionInfo = ["","","","","","","","","",""];
+ setTimeout(function () {
+ featureAbility.startAbility(
+ { want: {
+ bundleName: "com.example.myapplication3",
+ abilityName: "com.example.entry2.MainAbility1"
+ } }, (error, data) => {
+ console.log('SUB_AA_OpenHarmony_MissionManager_6400 - startAbility: '
+ + JSON.stringify(error) + ", " + JSON.stringify(data))
+ });
+ }, 1000)
+ console.log("------------end start SUB_AA_OpenHarmony_MissionManager_6400-------------");
+ setTimeout(()=>{
+ missionManager.getMissionInfos('', 10, (err, data) => {
+ console.log("SUB_AA_OpenHarmony_MissionManager_6400, twosgetMissionInfos:" + JSON.stringify(data));
+ for (var i = 0;i < data.length; i++) {
+ missionInfo[i] = data[i];
+ console.log('qweqweqweqweqwe' + JSON.stringify(missionInfo[i].continuable));
+ if(missionInfo[i].want.abilityName == "com.example.entry2.MainAbility1"){
+ expect(missionInfo[i].continuable == false).assertTrue();
+ };
+ }
+ })
+ },1000)
+ done();
+ })
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_MissionManager_6300
+ * @tc.name Verify the want information in the missionInfo of the ability obtained by getMissionInfos
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_MissionManager_6300', 0, async function (done) {
+ console.log("------------start SUB_AA_OpenHarmony_MissionManager_6300-------------");
+ var TAG = "SUB_AA_OpenHarmony_MissionManager_6300";
+ var missionInfo = ["","","","","","","","","",""];
+ setTimeout(function () {
+ featureAbility.startAbility(
+ { want: {
+ bundleName: "com.example.myapplication3",
+ abilityName: "com.example.entry2.MainAbility1"
+ } }, (error, data) => {
+ console.log('SUB_AA_OpenHarmony_MissionManager_6300 - startAbility: '
+ + JSON.stringify(error) + ", " + JSON.stringify(data))
+ });
+ }, 1000)
+ console.log("------------end start SUB_AA_OpenHarmony_MissionManager_6300-------------");
+ setTimeout(()=>{
+ missionManager.getMissionInfos('', 10, (err, data) => {
+ console.log("SUB_AA_OpenHarmony_MissionManager_6300, twosgetMissionInfos:" + JSON.stringify(data));
+ for (var i = 0;i < data.length; i++) {
+ missionInfo[i] = data[i];
+ console.log('qweqweqweqweqwe' + JSON.stringify(missionInfo[i].want));
+ if(missionInfo[i].want.abilityName == "com.example.entry2.MainAbility1"){
+ if(missionInfo[i].want.bundleName == "com.example.myapplication3"){
+ console.log('weweqqq');
+ expect(missionInfo[i].want.bundleName == "com.example.myapplication3").assertTrue();
+ }
+ };
+ }
+ })
+ },1000)
+ done();
+ })
})
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/fa/fa_missionmanager_test/entry/src/main/resources/base/element/string.json b/aafwk/aafwk_standard/fa/fa_missionmanager_test/entry/src/main/resources/base/element/string.json
index 610d89afcb84069982cf1fd49782a75e2d0ef089..d1321867f15bbb87342c4263a8579a7c1b6f68c6 100644
--- a/aafwk/aafwk_standard/fa/fa_missionmanager_test/entry/src/main/resources/base/element/string.json
+++ b/aafwk/aafwk_standard/fa/fa_missionmanager_test/entry/src/main/resources/base/element/string.json
@@ -1,12 +1,12 @@
-{
- "string": [
- {
- "name": "entry_MainAbility",
- "value": "entry_MainAbility"
- },
- {
- "name": "description_mainability",
- "value": "JS_Empty Ability"
- }
- ]
+{
+ "string": [
+ {
+ "name": "entry_MainAbility",
+ "value": "entry_MainAbility"
+ },
+ {
+ "name": "description_mainability",
+ "value": "JS_Empty Ability"
+ }
+ ]
}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/fa/fa_missionmanager_test/entry2/.gitignore b/aafwk/aafwk_standard/fa/fa_missionmanager_test/entry2/.gitignore
index 7d5b7a94f4dcf381f03ff21f28f8a2494b58023f..f77260b1509284d42a7f8a2449ad1e8f4b489a3a 100644
--- a/aafwk/aafwk_standard/fa/fa_missionmanager_test/entry2/.gitignore
+++ b/aafwk/aafwk_standard/fa/fa_missionmanager_test/entry2/.gitignore
@@ -1,2 +1,2 @@
-/build
-/node_modules
+/build
+/node_modules
diff --git a/aafwk/aafwk_standard/fa/fa_missionmanager_test/entry2/build.gradle b/aafwk/aafwk_standard/fa/fa_missionmanager_test/entry2/build.gradle
index 85b7b9eb7ac36de8f884915c5bb9027880c898a8..486ae0316289af62d5b962214b706aefc3af62db 100644
--- a/aafwk/aafwk_standard/fa/fa_missionmanager_test/entry2/build.gradle
+++ b/aafwk/aafwk_standard/fa/fa_missionmanager_test/entry2/build.gradle
@@ -1,23 +1,23 @@
-apply plugin: 'com.huawei.ohos.hap'
-//For instructions on signature configuration, see https://developer.harmonyos.com/cn/docs/documentation/doc-guides/ide_debug_device-0000001053822404#section1112183053510
-ohos {
- compileSdkVersion 8
- defaultConfig {
- compatibleSdkVersion 7
- }
- buildTypes {
- release {
- proguardOpt {
- proguardEnabled false
- rulesFiles 'proguard-rules.pro'
- }
- }
- }
- entryModules "entry"
-}
-
-dependencies {
- entryImplementation project(':entry')
- implementation fileTree(dir: 'libs', include: ['*.jar', '*.har'])
- testImplementation 'junit:junit:4.13.1'
-}
+apply plugin: 'com.huawei.ohos.hap'
+//For instructions on signature configuration, see https://developer.harmonyos.com/cn/docs/documentation/doc-guides/ide_debug_device-0000001053822404#section1112183053510
+ohos {
+ compileSdkVersion 8
+ defaultConfig {
+ compatibleSdkVersion 7
+ }
+ buildTypes {
+ release {
+ proguardOpt {
+ proguardEnabled false
+ rulesFiles 'proguard-rules.pro'
+ }
+ }
+ }
+ entryModules "entry"
+}
+
+dependencies {
+ entryImplementation project(':entry')
+ implementation fileTree(dir: 'libs', include: ['*.jar', '*.har'])
+ testImplementation 'junit:junit:4.13.1'
+}
diff --git a/aafwk/aafwk_standard/fa/fa_missionmanager_test/entry2/package.json b/aafwk/aafwk_standard/fa/fa_missionmanager_test/entry2/package.json
index 0967ef424bce6791893e9a57bb952f80fd536e93..69a88e3b65423624fe7ea8b0f8beefcc62cc3d5f 100644
--- a/aafwk/aafwk_standard/fa/fa_missionmanager_test/entry2/package.json
+++ b/aafwk/aafwk_standard/fa/fa_missionmanager_test/entry2/package.json
@@ -1 +1 @@
-{}
+{}
diff --git a/aafwk/aafwk_standard/fa/fa_missionmanager_test/entry2/src/main/config.json b/aafwk/aafwk_standard/fa/fa_missionmanager_test/entry2/src/main/config.json
index 08f551812bc8e54b972bb7d450ebd7241170447f..4b11ab57bf96d6c6b147e08fa852d20759ee77a6 100644
--- a/aafwk/aafwk_standard/fa/fa_missionmanager_test/entry2/src/main/config.json
+++ b/aafwk/aafwk_standard/fa/fa_missionmanager_test/entry2/src/main/config.json
@@ -1,83 +1,83 @@
-{
- "app": {
- "bundleName": "com.example.missionmanager",
- "vendor": "example",
- "version": {
- "code": 1000000,
- "name": "1.0.0"
- }
- },
- "deviceConfig": {},
- "module": {
- "package": "com.example.entry2",
- "name": ".MyApplication",
- "mainAbility": ".MainAbility",
- "srcPath": "",
- "deviceType": [
- "phone"
- ],
- "distro": {
- "deliveryWithInstall": true,
- "moduleName": "entry2",
- "moduleType": "feature",
- "installationFree": false
- },
- "abilities": [
- {
- "orientation": "unspecified",
- "visible": true,
- "srcPath": "MainAbility",
- "name": ".MainAbility",
- "srcLanguage": "js",
- "icon": "$media:icon",
- "description": "$string:description_mainability",
- "formsEnabled": false,
- "label": "$string:entry2_MainAbility",
- "type": "page",
- "launchType": "standard"
- },
- {
- "orientation": "unspecified",
- "visible": true,
- "srcPath": "MainAbility2",
- "name": ".MainAbility2",
- "srcLanguage": "js",
- "icon": "$media:icon",
- "description": "$string:description_mainability2",
- "formsEnabled": false,
- "label": "$string:entry2_MainAbility2",
- "type": "page",
- "launchType": "standard"
- }
- ],
- "js": [
- {
- "pages": [
- "pages/index/index",
- "pages/second/second"
- ],
- "name": ".MainAbility",
- "window": {
- "designWidth": 720,
- "autoDesignWidth": false
- }
- },
- {
- "pages": [
- "pages/index/index",
- "pages/second/second"
- ],
- "name": ".MainAbility2",
- "window": {
- "designWidth": 720,
- "autoDesignWidth": false
- }
- }
- ],"reqPermissions": [
- {"name":"ohos.permission.MANAGE_LOCAL_ACCOUNTS"},
- {"name":"ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS_EXTENSION"},
- {"name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"},
- {"name":"ohos.permission.MANAGE_MISSIONS"}
- ]
- }
+{
+ "app": {
+ "bundleName": "com.example.missionmanager",
+ "vendor": "example",
+ "version": {
+ "code": 1000000,
+ "name": "1.0.0"
+ }
+ },
+ "deviceConfig": {},
+ "module": {
+ "package": "com.example.entry2",
+ "name": ".MyApplication",
+ "mainAbility": ".MainAbility",
+ "srcPath": "",
+ "deviceType": [
+ "phone"
+ ],
+ "distro": {
+ "deliveryWithInstall": true,
+ "moduleName": "entry2",
+ "moduleType": "feature",
+ "installationFree": false
+ },
+ "abilities": [
+ {
+ "orientation": "unspecified",
+ "visible": true,
+ "srcPath": "MainAbility",
+ "name": ".MainAbility",
+ "srcLanguage": "js",
+ "icon": "$media:icon",
+ "description": "$string:description_mainability",
+ "formsEnabled": false,
+ "label": "$string:entry2_MainAbility",
+ "type": "page",
+ "launchType": "standard"
+ },
+ {
+ "orientation": "unspecified",
+ "visible": true,
+ "srcPath": "MainAbility2",
+ "name": ".MainAbility2",
+ "srcLanguage": "js",
+ "icon": "$media:icon",
+ "description": "$string:description_mainability2",
+ "formsEnabled": false,
+ "label": "$string:entry2_MainAbility2",
+ "type": "page",
+ "launchType": "standard"
+ }
+ ],
+ "js": [
+ {
+ "pages": [
+ "pages/index/index",
+ "pages/second/second"
+ ],
+ "name": ".MainAbility",
+ "window": {
+ "designWidth": 720,
+ "autoDesignWidth": false
+ }
+ },
+ {
+ "pages": [
+ "pages/index/index",
+ "pages/second/second"
+ ],
+ "name": ".MainAbility2",
+ "window": {
+ "designWidth": 720,
+ "autoDesignWidth": false
+ }
+ }
+ ],"reqPermissions": [
+ {"name":"ohos.permission.MANAGE_LOCAL_ACCOUNTS"},
+ {"name":"ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS_EXTENSION"},
+ {"name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"},
+ {"name":"ohos.permission.MANAGE_MISSIONS"}
+ ]
+ }
}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/fa/fa_missionmanager_test/entry2/src/main/js/test2/List2.test.js b/aafwk/aafwk_standard/fa/fa_missionmanager_test/entry2/src/main/js/test2/List2.test.js
index 7a11fa78ca3316643b2364dbbf702c76138d2fc6..b9d04af2ff107fc49e779d40439facc09256cead 100644
--- a/aafwk/aafwk_standard/fa/fa_missionmanager_test/entry2/src/main/js/test2/List2.test.js
+++ b/aafwk/aafwk_standard/fa/fa_missionmanager_test/entry2/src/main/js/test2/List2.test.js
@@ -1,16 +1,16 @@
-/*
- * 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.
- */
-
+/*
+ * Copyright (c) 2022 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
require('./entry2.test.js')
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/fa/fa_missionmanager_test/entry2/src/main/js/test2/entry2.test.js b/aafwk/aafwk_standard/fa/fa_missionmanager_test/entry2/src/main/js/test2/entry2.test.js
index 3a0d7b092bba0e5996557b9a5f16ba51bff793b9..51bc3cb2e3e7f145115c44bdb8d3d5e2254a548c 100644
--- a/aafwk/aafwk_standard/fa/fa_missionmanager_test/entry2/src/main/js/test2/entry2.test.js
+++ b/aafwk/aafwk_standard/fa/fa_missionmanager_test/entry2/src/main/js/test2/entry2.test.js
@@ -1,16 +1,16 @@
-/*
- * 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, expect, it} from 'deccjsunit/index'
+/*
+ * 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, expect, it} from 'deccjsunit/index'
import commonEvent from '@ohos.commonevent'
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/fa/fa_missionmanager_test/entry2/src/main/resources/base/element/string.json b/aafwk/aafwk_standard/fa/fa_missionmanager_test/entry2/src/main/resources/base/element/string.json
index fc530e3a0f57cbd6b012b12942aa2f44f99baa9f..99c2ada7a6f6c3fd550544183f556e5fe51eb759 100644
--- a/aafwk/aafwk_standard/fa/fa_missionmanager_test/entry2/src/main/resources/base/element/string.json
+++ b/aafwk/aafwk_standard/fa/fa_missionmanager_test/entry2/src/main/resources/base/element/string.json
@@ -1,20 +1,20 @@
-{
- "string": [
- {
- "name": "entry2_MainAbility",
- "value": "entry2_MainAbility"
- },
- {
- "name": "description_mainability",
- "value": "JS_Empty Ability"
- },
- {
- "name": "description_mainability2",
- "value": "JS_Empty Ability"
- },
- {
- "name": "entry2_MainAbility2",
- "value": "entry2_MainAbility2"
- }
- ]
+{
+ "string": [
+ {
+ "name": "entry2_MainAbility",
+ "value": "entry2_MainAbility"
+ },
+ {
+ "name": "description_mainability",
+ "value": "JS_Empty Ability"
+ },
+ {
+ "name": "description_mainability2",
+ "value": "JS_Empty Ability"
+ },
+ {
+ "name": "entry2_MainAbility2",
+ "value": "entry2_MainAbility2"
+ }
+ ]
}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/fa/fa_movemissiontofront_test/BUILD.gn b/aafwk/aafwk_standard/fa/fa_movemissiontofront_test/BUILD.gn
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_movemissiontofront_test/Test.json b/aafwk/aafwk_standard/fa/fa_movemissiontofront_test/Test.json
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_movemissiontofront_test/entry/.gitignore b/aafwk/aafwk_standard/fa/fa_movemissiontofront_test/entry/.gitignore
index 7d5b7a94f4dcf381f03ff21f28f8a2494b58023f..f77260b1509284d42a7f8a2449ad1e8f4b489a3a 100644
--- a/aafwk/aafwk_standard/fa/fa_movemissiontofront_test/entry/.gitignore
+++ b/aafwk/aafwk_standard/fa/fa_movemissiontofront_test/entry/.gitignore
@@ -1,2 +1,2 @@
-/build
-/node_modules
+/build
+/node_modules
diff --git a/aafwk/aafwk_standard/fa/fa_movemissiontofront_test/entry/build.gradle b/aafwk/aafwk_standard/fa/fa_movemissiontofront_test/entry/build.gradle
index cef7b37de8f320938458ca42edde1462669836d2..c40c1f08c819a404fc2312634d97bee84d939ba3 100644
--- a/aafwk/aafwk_standard/fa/fa_movemissiontofront_test/entry/build.gradle
+++ b/aafwk/aafwk_standard/fa/fa_movemissiontofront_test/entry/build.gradle
@@ -1,21 +1,21 @@
-apply plugin: 'com.huawei.ohos.hap'
-//For instructions on signature configuration, see https://developer.harmonyos.com/cn/docs/documentation/doc-guides/ide_debug_device-0000001053822404#section1112183053510
-ohos {
- compileSdkVersion 8
- defaultConfig {
- compatibleSdkVersion 7
- }
- buildTypes {
- release {
- proguardOpt {
- proguardEnabled false
- rulesFiles 'proguard-rules.pro'
- }
- }
- }
-}
-
-dependencies {
- implementation fileTree(dir: 'libs', include: ['*.jar', '*.har'])
- testImplementation 'junit:junit:4.13.1'
-}
+apply plugin: 'com.huawei.ohos.hap'
+//For instructions on signature configuration, see https://developer.harmonyos.com/cn/docs/documentation/doc-guides/ide_debug_device-0000001053822404#section1112183053510
+ohos {
+ compileSdkVersion 8
+ defaultConfig {
+ compatibleSdkVersion 7
+ }
+ buildTypes {
+ release {
+ proguardOpt {
+ proguardEnabled false
+ rulesFiles 'proguard-rules.pro'
+ }
+ }
+ }
+}
+
+dependencies {
+ implementation fileTree(dir: 'libs', include: ['*.jar', '*.har'])
+ testImplementation 'junit:junit:4.13.1'
+}
diff --git a/aafwk/aafwk_standard/fa/fa_movemissiontofront_test/entry/package.json b/aafwk/aafwk_standard/fa/fa_movemissiontofront_test/entry/package.json
index 0967ef424bce6791893e9a57bb952f80fd536e93..69a88e3b65423624fe7ea8b0f8beefcc62cc3d5f 100644
--- a/aafwk/aafwk_standard/fa/fa_movemissiontofront_test/entry/package.json
+++ b/aafwk/aafwk_standard/fa/fa_movemissiontofront_test/entry/package.json
@@ -1 +1 @@
-{}
+{}
diff --git a/aafwk/aafwk_standard/fa/fa_movemissiontofront_test/entry/src/main/js/test/AbilityDisableTest.js b/aafwk/aafwk_standard/fa/fa_movemissiontofront_test/entry/src/main/js/test/AbilityDisableTest.js
index 0d97430ee0be1237ec8e3e256a878e5118f67d2e..ec47b0bb67085f354a17e713d24d169d02ce0382 100644
--- a/aafwk/aafwk_standard/fa/fa_movemissiontofront_test/entry/src/main/js/test/AbilityDisableTest.js
+++ b/aafwk/aafwk_standard/fa/fa_movemissiontofront_test/entry/src/main/js/test/AbilityDisableTest.js
@@ -1,408 +1,408 @@
-
-/*
- * 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.
- */
-// @ts-nocheck
-import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index"
-import missionManager from '@ohos.application.missionManager';
-import featureAbility from '@ohos.ability.featureAbility';
-import bundleManager from '@ohos.bundle';
-import appManager from "@ohos.application.appManager"
-import commonEvent from '@ohos.commonEvent';
-import {onDestroys} from "../MainAbility2/app.js"
-import abilityManager from '@ohos.application.abilityManager'
-import ConfigurationConstant from "@ohos.application.ConfigurationConstant";
-
-function startAility(){
- setTimeout(()=>{
- featureAbility.startAbility({ want: {
- bundleName: "com.example.abilitydisable",
- abilityName: "com.example.abilitydisable.MainAbility2"
- } }, (error, data) => {
- console.log('SUB_AA_OpenHarmony_Clear_0400 - startMainAbility2: '
- + JSON.stringify(error) + ", " + JSON.stringify(data))
- });
- },100)
- setTimeout(()=>{
- featureAbility.startAbility({ want: {
- bundleName: "com.example.abilitydisable",
- abilityName: "com.example.abilitydisable.MainAbility3"
- } }, (error, data) => {
- console.log('SUB_AA_OpenHarmony_Clear_0400 - startMainAbility3: '
- + JSON.stringify(error) + ", " + JSON.stringify(data));
- });
- },400)
-}
-function lockMissions(titles,missionId,times){
- setTimeout(()=>{
- console.log(titles+" lockMission missionIds[1]+++++123456::::"+missionId + typeof missionId)
- for(var i=0;i{
- console.log(titles+'lockMission1 errCode:' + JSON.stringify(err) + " data: " + JSON.stringify(data));
- });
- };
- },times);
-}
-function clearAllMissions(){
- missionManager.clearAllMissions((err,data)=>{
- console.log('clearAllMissions errCode: ' +
- JSON.stringify(err) + " data: " + JSON.stringify(data));
- })
-}
-
-function fns(){
- setTimeout(()=>{
- featureAbility.startAbility({ want: {
- bundleName: "com.example.abilitydisable",
- abilityName: "com.example.abilitydisable.MainAbility2"
- } }, (error, data) => {
- console.log('SUB_AA_OpenHarmony_Clear_0100 - startMainAbility2: '
- + JSON.stringify(error) + ", " + JSON.stringify(data))
- expect(err.code == 0).assertTrue();
- });
- },100)
- setTimeout(()=>{
- featureAbility.startAbility({ want: {
- bundleName: "com.example.abilitydisable",
- abilityName: "com.example.abilitydisable.MainAbility4"
- } }, (error, data) => {
- console.log('SUB_AA_OpenHarmony_Clear_0100 - startMainAbility4: '
- + JSON.stringify(error) + ", " + JSON.stringify(data))
- expect(err.code == 0).assertTrue();
- });
- },300)
- setTimeout(()=>{
- featureAbility.startAbility({ want: {
- bundleName: "com.example.abilitydisable",
- abilityName: "com.example.abilitydisable.MainAbility3"
- } }, (error, data) => {
- console.log('SUB_AA_OpenHarmony_Clear_0100 - startMainAbility3: '
- + JSON.stringify(error) + ", " + JSON.stringify(data))
- expect(err.code == 0).assertTrue();
- });
- },500)
- setTimeout(()=>{
- missionManager.getMissionInfos("", 20, (err, data) => {
- console.log('SUB_AA_OpenHarmony_Clear_0100 getMissionInfos errCode : '
- + JSON.stringify(err) + " data: " + JSON.stringify(data));
- for (var i = 0;i < data.length; i++) {
- console.log("bundleName:"+data[i].want["abilityName"])
- if(data[i].want["abilityName"] == "com.example.abilitydisable.MainAbility3"
- || data[i].want["abilityName"] == "com.example.abilitydisable.MainAbility4"
- ||data[i].want["abilityName"] == "com.example.abilitydisable.MainAbility"
- ||data[i].want["abilityName"] == "com.example.abilitydisable.MainAbility2"){
- console.log("data[i]['lockedState']::::"+data[i]['lockedState']);
- console.log("data[i].missionId" + data[i].missionId);
- console.log("SUB_AA_OpenHarmony_Clear_0100, missionId:" + data[i].missionId);
- missionIds.push(data[i].missionId);
- }
- }
- console.log('SUB_AA_OpenHarmony_Clear_0100 missionId:'+ missionIds +
- typeof missionIds + ":::::"+missionIds[1] + typeof missionIds[1]);
- })
- console.log("SUB_AA_OpenHarmony_Clear_0100" + JSON.stringify(missionIds));
- },800)
- setTimeout(()=>{
- missionManager.lockMission(parseInt(missionIds[1]),(err,data)=>{
- console.log('SUB_AA_OpenHarmony_Clear_0100 lockMission1 missionIds[1] : ' +
- JSON.stringify(missionIds[1]), + parseInt(missionIds[1]));
- console.log('SUB_AA_OpenHarmony_Clear_0100 lockMission1 errCode : ' +
- JSON.stringify(err) + " data: " + JSON.stringify(data));
- })
- },1200)
- setTimeout(()=>{
- missionManager.lockMission(parseInt(missionIds[2]),(err,data)=>{
- console.log('SUB_AA_OpenHarmony_Clear_0100 lockMission2 errCode : ' +
- JSON.stringify(err) + " data: " + JSON.stringify(data));
- })
- },1500)
- setTimeout(()=>{
- missionManager.getMissionInfos("", 20, (err, data) => {
- console.log("SUB_AA_OpenHarmony_Clear_0100, twosgetMissionInfos:" +
- JSON.stringify(data));
- for (var i = 0;i < data.length; i++) {
- console.log("data[i].missionId:missionIds[2] news missionIds[1]" +
- data[i].missionId + missionIds[2] + missionIds[1])
- if(data[i].missionId == missionIds[1] || data[i].missionId == missionIds[2]){
- console.log("data[i]['lockedState']222:::::::"+data[i]['lockedState']);
- expect(data[i]['lockedState'] == true).assertTrue();
- }
- }
- })
- console.log("SUB_AA_OpenHarmony_Clear_0100" + JSON.stringify(missionIds));
- },3500)
- setTimeout(()=>{
- missionManager.getMissionInfos("", 20, (err, data) => {
- console.log('SUB_AA_OpenHarmony_Clear_0100 getMissionInfos errCode : '
- + JSON.stringify(err) + " data: " + JSON.stringify(data));
-// var terminateSelf =
- for (var i = 0;i < data.length; i++) {
- console.log("bundleName:"+data[i].want["abilityName"])
- if(data[i].want["abilityName"] == "com.example.abilitydisable.MainAbility3"
- || data[i].want["abilityName"] == "com.example.abilitydisable.MainAbility4"
- ||data[i].want["abilityName"] == "com.example.abilitydisable.MainAbility"
- ||data[i].want["abilityName"] == "com.example.abilitydisable.MainAbility2"){
- console.log("data[i]['lockedState']::::"+data[i]['lockedState']);
- expect(data[i].lockedState == false).assertTrue();
- }
- }
- console.log('SUB_AA_OpenHarmony_Clear_0100 missionId:'+ missionIds +
- typeof missionIds + ":::::"+missionIds[1] + typeof missionIds[1]);
- })
- console.log("SUB_AA_OpenHarmony_Clear_0100" + JSON.stringify(missionIds));
- },4000)
- setTimeout(()=>{
- missionManager.moveMissionToFront(parseInt(missionIds[2]),(err,data)=>{
- console.log('SUB_AA_OpenHarmony_Clear_0100 moveMissionToFront errCode : ' +
- JSON.stringify(err) + " data: " + JSON.stringify(data));
- })
- },4500)
- setTimeout(()=>{
- missionManager.clearAllMissions((err,data)=>{
- console.log('SUB_AA_OpenHarmony_Clear_0100 clearAllMissions errCode: ' +
- JSON.stringify(err) + " data: " + JSON.stringify(data));
-
- })
- },5000)
- setTimeout(()=>{
- missionManager.getMissionInfos("", 20, (err, data) => {
- console.log('SUB_AA_OpenHarmony_Clear_0100 getMissionInfos errCode : ' +
- JSON.stringify(err) + " data: " + JSON.stringify(data));
- for (var i = 0;i < data.length; i++) {
- console.log("bundleName:"+data[i].want["abilityName"])
- if(data[i].want["abilityName"] == "com.example.abilitydisable.MainAbility3" ||
- data[i].want["abilityName"] == "com.example.abilitydisable.MainAbility4" ||
- data[i].want["abilityName"] == "com.example.abilitydisable.MainAbility"||
- data[i].want["abilityName"] == "com.example.abilitydisable.MainAbility2"){
- console.log("data[i]['lockedState']end::::"+data[i]['lockedState']);
- expect(data[i]['lockedState'] == true).assertTrue();
- }
- }
- console.log('SUB_AA_OpenHarmony_Clear_0100 missionId:'+
- missionIds + typeof missionIds + ":::::"+missionIds[1] + typeof missionIds[1]);
- })
- console.log("SUB_AA_OpenHarmony_Clear_0100" +
- JSON.stringify(missionIds));
- },8000)
- expect(lists.indexOf(JSON.stringify("singletonEntryAbulity2_onShow"))!=-1).assertTrue();
-
-}
-describe('AbilityDisableTests', function () {
- let mainAbility1ListS = new Array()
- let lists = new Array()
- function subscriberCallBackMainAbility2Destory(err,data){
- console.log("Subscribe2 CallBack data:" + JSON.stringify(data));
- lists.push(data["event"]);
- console.log("subscriberCallBackMainAbility2Destory lists:"+lists);
- };
- function subscriberCallBack_mainAbility1_Destory(err,data){
- console.log("Subscribe3 CallBack data:" + JSON.stringify(data));
- mainAbility1ListS.push(data["event"])
- console.log("subscriberCallBack_mainAbility3_Destory mainAbility1ListS:"+mainAbility1ListS);
- }
- console.log("AbilityDisableTests --- start");
- var ability2LifeEvents = {
- events:["ApplicationMainAbility2_onDestroy",
- "singletonEntryAbulity2_onHide",
- "singletonEntryAbulity2_onActive",
- "singletonEntryAbulity2_onInactive",
- "singletonEntryAbility2_onDestroy",
- "singletonEntryAbulity2_onShow",
- "ApplicationMainAbility2_onCreate",]
- };
- var ability1LifeEvents = {
- events:["singletonEntryAbulity3_onHide",
- "singletonEntryAbulity3_onActive",
- "singletonEntryAbulity3_onInactive",
- "singletonEntryAbility3_onDestroy",
- "singletonEntryAbulity3_onShow",
- "ApplicationMainAbility3_onCreate",
- "ApplicationMainAbility3_onDestroy",
- ]
- };
-
- /*
- * @tc.number SUB_AA_OpenHarmony_MoveMissionToFront_2900
- * @tc.name Verify the full-screen switching application
- * @tc.desc Function test
- * @tc.level 0
- */
- it('SUB_AA_OpenHarmony_MoveMissionToFront_2900', 0, async function (done) {
-
- var Subscriber2 = [];
- var Subscriber1 = [];
- var mainAbility1missinds = []
- console.log("SUB_AA_OpenHarmony_MoveMissionToFront_2900 --- start")
- commonEvent.createSubscriber(ability2LifeEvents).then(async (data)=>{
- console.log("Create Subscriber2=======>:"+JSON.stringify(data));
- Subscriber2 = data;
- console.log("data2 is:" + JSON.stringify(Subscriber2));
- await commonEvent.subscribe(Subscriber2,subscriberCallBackMainAbility2Destory)
- });
- commonEvent.createSubscriber(ability1LifeEvents).then(async (data)=>{
- console.log("Create Subscriber1=======>:"+JSON.stringify(data));
- Subscriber1 = data;
- console.log("data2 is:" + JSON.stringify(Subscriber1));
- await commonEvent.subscribe(Subscriber1,subscriberCallBack_mainAbility1_Destory)
- });
- setTimeout(()=>{
- featureAbility.startAbility({ want: {
- bundleName: "com.example.abilitydisable",
- abilityName: "com.example.abilitydisable.MainAbility2"
- } }, (error, data) => {
- console.log('SUB_AA_OpenHarmony_MoveMissionToFront_2900 - startMainAbility2: '
- + JSON.stringify(error) + ", " + JSON.stringify(data));
- });
- },500)
- setTimeout(()=>{
- featureAbility.startAbility({ want: {
- bundleName: "com.example.abilitydisable",
- abilityName: "com.example.abilitydisable.MainAbility3"
- } }, (error, data) => {
- console.log('SUB_AA_OpenHarmony_MoveMissionToFront_2900 - startMainAbility3: '
- + JSON.stringify(error) + ", " + JSON.stringify(data));
- });
- },1000);
- setTimeout(()=>{
- console.log("1111subscriberCallBackMainAbility2Destory lists:"+lists);
- expect(lists.indexOf(JSON.stringify("singletonEntryAbulity2_onShow"))!=-1).assertTrue();
- expect(lists.indexOf(JSON.stringify("ApplicationMainAbility2_onCreate"))!=-1).assertTrue();
- },2500)
- setTimeout(()=>{
- missionManager.getMissionInfos("", 100, (err, data) => {
- console.log('SUB_AA_OpenHarmony_MoveMissionToFront_2900 getMissionInfos errCode: '+
- JSON.stringify(err) + " data: " + JSON.stringify(data));
- for (var i = 0;i < data.length; i++) {
- if(data[i].want["abilityName"] == "com.example.abilitydisable.MainAbility2"){
- mainAbility1missinds.push(data[i]["missionId"])
- }
-
- }
- console.log("mainAbility1missinds:"+mainAbility1missinds);
- });
- },3000)
- setTimeout(()=>{
- console.log('SUB_AA_OpenHarmony_MoveMissionToFront_2900 moveMissionToFront dataCode:++++++');
- missionManager.moveMissionToFront(parseInt(mainAbility1missinds[0]),{
- parameters:{ "windowMode":1 }}).then((data)=>{
- console.log('SUB_AA_OpenHarmony_MoveMissionToFront_2900 moveMissionToFront dataCode:'+ " data:"
- + JSON.stringify(data));
- expect().assertFail();
- }).catch((err)=>{
- console.log('SUB_AA_OpenHarmony_MoveMissionToFront_2900 moveMissionToFront errCode:'+ " err:"
- + JSON.stringify(err));
- });
- },3888);
- setTimeout(()=>{
- console.log("1111subscriberCallBack_mainAbility1_Destory lists:"+ mainAbility1ListS);
- expect(mainAbility1ListS.indexOf(JSON.stringify("singletonEntrymainAb" +
- "ility1ListSAbulity1_onInactive"))!=-1).assertTrue();
- expect(mainAbility1ListS.indexOf(JSON.stringify("singletonEntryA" +
- "bulity1_onHide"))!=-1).assertTrue();
- },3999);
- done()
- });
-
- /*
- * @tc.number SUB_AA_OpenHarmony_MoveMissionToFront_3000
- * @tc.name Verify the left split screen switching application
- * @tc.desc Function test
- * @tc.level 0
- */
- it('SUB_AA_OpenHarmony_MoveMissionToFront_3000', 0, async function (done) {
- var Subscriber2 = "";
- var Subscriber1 = "";
- var mainAbility1missinds = []
- console.log("SUB_AA_OpenHarmony_MoveMissionToFront_3000 --- start")
- commonEvent.createSubscriber(ability2LifeEvents).then(async (data)=>{
- console.log("Create Subscriber2=======>:"+JSON.stringify(data));
- Subscriber2 = data;
- console.log("data2 is:" + JSON.stringify(Subscriber2));
- await commonEvent.subscribe(Subscriber2,subscriberCallBackMainAbility2Destory)
- });
- commonEvent.createSubscriber(ability1LifeEvents).then(async (data)=>{
- console.log("Create Subscriber1=======>:"+JSON.stringify(data));
- Subscriber1 = data;
- console.log("data2 is:" + JSON.stringify(Subscriber1));
- await commonEvent.subscribe(Subscriber1,subscriberCallBack_mainAbility1_Destory)
- });
-
- setTimeout(()=>{
- featureAbility.startAbility({ want: {
- bundleName: "com.example.abilitydisable",
- abilityName: "com.example.abilitydisable.MainAbility2"
- } }, (error, data) => {
- console.log('SUB_AA_OpenHarmony_MoveMissionToFront_3000 - startMainAbility2: '
- + JSON.stringify(error) + ", " + JSON.stringify(data));
- });
- },500);
- setTimeout(()=>{
- featureAbility.startAbility({ want: {
- bundleName: "com.example.abilitydisable",
- abilityName: "com.example.abilitydisable.MainAbility3"
- } }, (error, data) => {
- console.log('SUB_AA_OpenHarmony_MoveMissionToFront_3000 - startMainAbility3: '
- + JSON.stringify(error) + ", " + JSON.stringify(data));
- });
- },1000);
- setTimeout(()=>{
- console.log("1111subscriberCallBack_mainAbility2_lists:
- singletonEntryAbulity2_onShow:"+lists);
- console.log("+++++++++++++++++"+lists.indexOf("singletonEntryAbulity2_onShow")
- +"+++++++"+lists.indexOf("ApplicationMainAbility2_onCreate")+lists)
- expect(lists.indexOf(JSON.stringify("singletonEntryAbulity2_onShow"))!=-1).assertTrue();
- expect(lists.indexOf(JSON.stringify("ApplicationMainAbility2_onCreate"))!=-1).assertTrue();
- },2500);
- setTimeout(()=>{
- missionManager.getMissionInfos("", 100, (err, data) => {
- console.log('SUB_AA_OpenHarmony_MoveMissionToFront_3000
- getMissionInfos errCode: '+
- JSON.stringify(err) + " data: " + JSON.stringify(data));
- for (var i = 0;i < data.length; i++) {
- console.log("bundleName222222:"+data[i].want["abilityName"]+
- "data[i]['lockedState']::::"+data[i]['lockedState']);
- if(data[i].want["abilityName"] == "com.example.abilitydisable.MainAbility3"){
- console.log('data[i]["missionId"]'+data[i]["missionId"] + "::::"+
- data[i].want["abilityName"]);
- mainAbility1missinds.push(data[i]["missionId"])
- }
- }
- console.log("mainAbility1missinds:"+mainAbility1missinds);
- });
- },3000);
- setTimeout(()=>{
- console.log('SUB_AA_OpenHarmony_MoveMissionToFront_3000
- moveMissionToFront dataCode:++++++');
- missionManager.moveMissionToFront(parseInt(mainAbility1missinds[0]),{
- parameters:{ "windowMode":100 }}).then((data)=>{
- console.log('SUB_AA_OpenHarmony_MoveMissionToFront_3000
- moveMissionToFront dataCode:'+
- " data:" + JSON.stringify(data));
- }).catch((err)=>{
- console.log('SUB_AA_OpenHarmony_MoveMissionToFront_3000
- moveMissionToFront errCode:'+
- " err:" + JSON.stringify(err));
- });
- },3888);
- setTimeout(()=>{
- console.log("1111subscriberCallBack_mainAbility1_Destory lists:"+ mainAbility1ListS);
- console.log("+++++++++++++++++"+mainAbility1ListS.indexOf("mainAbility1ListS_onShow")
- +"+++++++"+mainAbility1ListS.indexOf("ApplicationMainAbility2_onCreate")
- +mainAbility1ListS)
- expect(mainAbility1ListS.indexOf(JSON.stringify("singletonEntryAbulity1_onInactive"))==-1).assertTrue();
- expect(mainAbility1ListS.indexOf(JSON.stringify("singletonEntryAbulity1_onHide"))==-1).assertTrue();
- },3999);
- done();
- });
-})
+
+/*
+ * 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.
+ */
+// @ts-nocheck
+import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index"
+import missionManager from '@ohos.application.missionManager';
+import featureAbility from '@ohos.ability.featureAbility';
+import bundleManager from '@ohos.bundle';
+import appManager from "@ohos.application.appManager"
+import commonEvent from '@ohos.commonEvent';
+import {onDestroys} from "../MainAbility2/app.js"
+import abilityManager from '@ohos.application.abilityManager'
+import ConfigurationConstant from "@ohos.application.ConfigurationConstant";
+
+function startAility(){
+ setTimeout(()=>{
+ featureAbility.startAbility({ want: {
+ bundleName: "com.example.abilitydisable",
+ abilityName: "com.example.abilitydisable.MainAbility2"
+ } }, (error, data) => {
+ console.log('SUB_AA_OpenHarmony_Clear_0400 - startMainAbility2: '
+ + JSON.stringify(error) + ", " + JSON.stringify(data))
+ });
+ },100)
+ setTimeout(()=>{
+ featureAbility.startAbility({ want: {
+ bundleName: "com.example.abilitydisable",
+ abilityName: "com.example.abilitydisable.MainAbility3"
+ } }, (error, data) => {
+ console.log('SUB_AA_OpenHarmony_Clear_0400 - startMainAbility3: '
+ + JSON.stringify(error) + ", " + JSON.stringify(data));
+ });
+ },400)
+}
+function lockMissions(titles,missionId,times){
+ setTimeout(()=>{
+ console.log(titles+" lockMission missionIds[1]+++++123456::::"+missionId + typeof missionId)
+ for(var i=0;i{
+ console.log(titles+'lockMission1 errCode:' + JSON.stringify(err) + " data: " + JSON.stringify(data));
+ });
+ };
+ },times);
+}
+function clearAllMissions(){
+ missionManager.clearAllMissions((err,data)=>{
+ console.log('clearAllMissions errCode: ' +
+ JSON.stringify(err) + " data: " + JSON.stringify(data));
+ })
+}
+
+function fns(){
+ setTimeout(()=>{
+ featureAbility.startAbility({ want: {
+ bundleName: "com.example.abilitydisable",
+ abilityName: "com.example.abilitydisable.MainAbility2"
+ } }, (error, data) => {
+ console.log('SUB_AA_OpenHarmony_Clear_0100 - startMainAbility2: '
+ + JSON.stringify(error) + ", " + JSON.stringify(data))
+ expect(err.code == 0).assertTrue();
+ });
+ },100)
+ setTimeout(()=>{
+ featureAbility.startAbility({ want: {
+ bundleName: "com.example.abilitydisable",
+ abilityName: "com.example.abilitydisable.MainAbility4"
+ } }, (error, data) => {
+ console.log('SUB_AA_OpenHarmony_Clear_0100 - startMainAbility4: '
+ + JSON.stringify(error) + ", " + JSON.stringify(data))
+ expect(err.code == 0).assertTrue();
+ });
+ },300)
+ setTimeout(()=>{
+ featureAbility.startAbility({ want: {
+ bundleName: "com.example.abilitydisable",
+ abilityName: "com.example.abilitydisable.MainAbility3"
+ } }, (error, data) => {
+ console.log('SUB_AA_OpenHarmony_Clear_0100 - startMainAbility3: '
+ + JSON.stringify(error) + ", " + JSON.stringify(data))
+ expect(err.code == 0).assertTrue();
+ });
+ },500)
+ setTimeout(()=>{
+ missionManager.getMissionInfos("", 20, (err, data) => {
+ console.log('SUB_AA_OpenHarmony_Clear_0100 getMissionInfos errCode : '
+ + JSON.stringify(err) + " data: " + JSON.stringify(data));
+ for (var i = 0;i < data.length; i++) {
+ console.log("bundleName:"+data[i].want["abilityName"])
+ if(data[i].want["abilityName"] == "com.example.abilitydisable.MainAbility3"
+ || data[i].want["abilityName"] == "com.example.abilitydisable.MainAbility4"
+ ||data[i].want["abilityName"] == "com.example.abilitydisable.MainAbility"
+ ||data[i].want["abilityName"] == "com.example.abilitydisable.MainAbility2"){
+ console.log("data[i]['lockedState']::::"+data[i]['lockedState']);
+ console.log("data[i].missionId" + data[i].missionId);
+ console.log("SUB_AA_OpenHarmony_Clear_0100, missionId:" + data[i].missionId);
+ missionIds.push(data[i].missionId);
+ }
+ }
+ console.log('SUB_AA_OpenHarmony_Clear_0100 missionId:'+ missionIds +
+ typeof missionIds + ":::::"+missionIds[1] + typeof missionIds[1]);
+ })
+ console.log("SUB_AA_OpenHarmony_Clear_0100" + JSON.stringify(missionIds));
+ },800)
+ setTimeout(()=>{
+ missionManager.lockMission(parseInt(missionIds[1]),(err,data)=>{
+ console.log('SUB_AA_OpenHarmony_Clear_0100 lockMission1 missionIds[1] : ' +
+ JSON.stringify(missionIds[1]), + parseInt(missionIds[1]));
+ console.log('SUB_AA_OpenHarmony_Clear_0100 lockMission1 errCode : ' +
+ JSON.stringify(err) + " data: " + JSON.stringify(data));
+ })
+ },1200)
+ setTimeout(()=>{
+ missionManager.lockMission(parseInt(missionIds[2]),(err,data)=>{
+ console.log('SUB_AA_OpenHarmony_Clear_0100 lockMission2 errCode : ' +
+ JSON.stringify(err) + " data: " + JSON.stringify(data));
+ })
+ },1500)
+ setTimeout(()=>{
+ missionManager.getMissionInfos("", 20, (err, data) => {
+ console.log("SUB_AA_OpenHarmony_Clear_0100, twosgetMissionInfos:" +
+ JSON.stringify(data));
+ for (var i = 0;i < data.length; i++) {
+ console.log("data[i].missionId:missionIds[2] news missionIds[1]" +
+ data[i].missionId + missionIds[2] + missionIds[1])
+ if(data[i].missionId == missionIds[1] || data[i].missionId == missionIds[2]){
+ console.log("data[i]['lockedState']222:::::::"+data[i]['lockedState']);
+ expect(data[i]['lockedState'] == true).assertTrue();
+ }
+ }
+ })
+ console.log("SUB_AA_OpenHarmony_Clear_0100" + JSON.stringify(missionIds));
+ },3500)
+ setTimeout(()=>{
+ missionManager.getMissionInfos("", 20, (err, data) => {
+ console.log('SUB_AA_OpenHarmony_Clear_0100 getMissionInfos errCode : '
+ + JSON.stringify(err) + " data: " + JSON.stringify(data));
+// var terminateSelf =
+ for (var i = 0;i < data.length; i++) {
+ console.log("bundleName:"+data[i].want["abilityName"])
+ if(data[i].want["abilityName"] == "com.example.abilitydisable.MainAbility3"
+ || data[i].want["abilityName"] == "com.example.abilitydisable.MainAbility4"
+ ||data[i].want["abilityName"] == "com.example.abilitydisable.MainAbility"
+ ||data[i].want["abilityName"] == "com.example.abilitydisable.MainAbility2"){
+ console.log("data[i]['lockedState']::::"+data[i]['lockedState']);
+ expect(data[i].lockedState == false).assertTrue();
+ }
+ }
+ console.log('SUB_AA_OpenHarmony_Clear_0100 missionId:'+ missionIds +
+ typeof missionIds + ":::::"+missionIds[1] + typeof missionIds[1]);
+ })
+ console.log("SUB_AA_OpenHarmony_Clear_0100" + JSON.stringify(missionIds));
+ },4000)
+ setTimeout(()=>{
+ missionManager.moveMissionToFront(parseInt(missionIds[2]),(err,data)=>{
+ console.log('SUB_AA_OpenHarmony_Clear_0100 moveMissionToFront errCode : ' +
+ JSON.stringify(err) + " data: " + JSON.stringify(data));
+ })
+ },4500)
+ setTimeout(()=>{
+ missionManager.clearAllMissions((err,data)=>{
+ console.log('SUB_AA_OpenHarmony_Clear_0100 clearAllMissions errCode: ' +
+ JSON.stringify(err) + " data: " + JSON.stringify(data));
+
+ })
+ },5000)
+ setTimeout(()=>{
+ missionManager.getMissionInfos("", 20, (err, data) => {
+ console.log('SUB_AA_OpenHarmony_Clear_0100 getMissionInfos errCode : ' +
+ JSON.stringify(err) + " data: " + JSON.stringify(data));
+ for (var i = 0;i < data.length; i++) {
+ console.log("bundleName:"+data[i].want["abilityName"])
+ if(data[i].want["abilityName"] == "com.example.abilitydisable.MainAbility3" ||
+ data[i].want["abilityName"] == "com.example.abilitydisable.MainAbility4" ||
+ data[i].want["abilityName"] == "com.example.abilitydisable.MainAbility"||
+ data[i].want["abilityName"] == "com.example.abilitydisable.MainAbility2"){
+ console.log("data[i]['lockedState']end::::"+data[i]['lockedState']);
+ expect(data[i]['lockedState'] == true).assertTrue();
+ }
+ }
+ console.log('SUB_AA_OpenHarmony_Clear_0100 missionId:'+
+ missionIds + typeof missionIds + ":::::"+missionIds[1] + typeof missionIds[1]);
+ })
+ console.log("SUB_AA_OpenHarmony_Clear_0100" +
+ JSON.stringify(missionIds));
+ },8000)
+ expect(lists.indexOf(JSON.stringify("singletonEntryAbulity2_onShow"))!=-1).assertTrue();
+
+}
+describe('AbilityDisableTests', function () {
+ let mainAbility1ListS = new Array()
+ let lists = new Array()
+ function subscriberCallBackMainAbility2Destory(err,data){
+ console.log("Subscribe2 CallBack data:" + JSON.stringify(data));
+ lists.push(data["event"]);
+ console.log("subscriberCallBackMainAbility2Destory lists:"+lists);
+ };
+ function subscriberCallBack_mainAbility1_Destory(err,data){
+ console.log("Subscribe3 CallBack data:" + JSON.stringify(data));
+ mainAbility1ListS.push(data["event"])
+ console.log("subscriberCallBack_mainAbility3_Destory mainAbility1ListS:"+mainAbility1ListS);
+ }
+ console.log("AbilityDisableTests --- start");
+ var ability2LifeEvents = {
+ events:["ApplicationMainAbility2_onDestroy",
+ "singletonEntryAbulity2_onHide",
+ "singletonEntryAbulity2_onActive",
+ "singletonEntryAbulity2_onInactive",
+ "singletonEntryAbility2_onDestroy",
+ "singletonEntryAbulity2_onShow",
+ "ApplicationMainAbility2_onCreate",]
+ };
+ var ability1LifeEvents = {
+ events:["singletonEntryAbulity3_onHide",
+ "singletonEntryAbulity3_onActive",
+ "singletonEntryAbulity3_onInactive",
+ "singletonEntryAbility3_onDestroy",
+ "singletonEntryAbulity3_onShow",
+ "ApplicationMainAbility3_onCreate",
+ "ApplicationMainAbility3_onDestroy",
+ ]
+ };
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_MoveMissionToFront_2900
+ * @tc.name Verify the full-screen switching application
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_MoveMissionToFront_2900', 0, async function (done) {
+
+ var Subscriber2 = [];
+ var Subscriber1 = [];
+ var mainAbility1missinds = []
+ console.log("SUB_AA_OpenHarmony_MoveMissionToFront_2900 --- start")
+ commonEvent.createSubscriber(ability2LifeEvents).then(async (data)=>{
+ console.log("Create Subscriber2=======>:"+JSON.stringify(data));
+ Subscriber2 = data;
+ console.log("data2 is:" + JSON.stringify(Subscriber2));
+ await commonEvent.subscribe(Subscriber2,subscriberCallBackMainAbility2Destory)
+ });
+ commonEvent.createSubscriber(ability1LifeEvents).then(async (data)=>{
+ console.log("Create Subscriber1=======>:"+JSON.stringify(data));
+ Subscriber1 = data;
+ console.log("data2 is:" + JSON.stringify(Subscriber1));
+ await commonEvent.subscribe(Subscriber1,subscriberCallBack_mainAbility1_Destory)
+ });
+ setTimeout(()=>{
+ featureAbility.startAbility({ want: {
+ bundleName: "com.example.abilitydisable",
+ abilityName: "com.example.abilitydisable.MainAbility2"
+ } }, (error, data) => {
+ console.log('SUB_AA_OpenHarmony_MoveMissionToFront_2900 - startMainAbility2: '
+ + JSON.stringify(error) + ", " + JSON.stringify(data));
+ });
+ },500)
+ setTimeout(()=>{
+ featureAbility.startAbility({ want: {
+ bundleName: "com.example.abilitydisable",
+ abilityName: "com.example.abilitydisable.MainAbility3"
+ } }, (error, data) => {
+ console.log('SUB_AA_OpenHarmony_MoveMissionToFront_2900 - startMainAbility3: '
+ + JSON.stringify(error) + ", " + JSON.stringify(data));
+ });
+ },1000);
+ setTimeout(()=>{
+ console.log("1111subscriberCallBackMainAbility2Destory lists:"+lists);
+ expect(lists.indexOf(JSON.stringify("singletonEntryAbulity2_onShow"))!=-1).assertTrue();
+ expect(lists.indexOf(JSON.stringify("ApplicationMainAbility2_onCreate"))!=-1).assertTrue();
+ },2500)
+ setTimeout(()=>{
+ missionManager.getMissionInfos("", 100, (err, data) => {
+ console.log('SUB_AA_OpenHarmony_MoveMissionToFront_2900 getMissionInfos errCode: '+
+ JSON.stringify(err) + " data: " + JSON.stringify(data));
+ for (var i = 0;i < data.length; i++) {
+ if(data[i].want["abilityName"] == "com.example.abilitydisable.MainAbility2"){
+ mainAbility1missinds.push(data[i]["missionId"])
+ }
+
+ }
+ console.log("mainAbility1missinds:"+mainAbility1missinds);
+ });
+ },3000)
+ setTimeout(()=>{
+ console.log('SUB_AA_OpenHarmony_MoveMissionToFront_2900 moveMissionToFront dataCode:++++++');
+ missionManager.moveMissionToFront(parseInt(mainAbility1missinds[0]),{
+ parameters:{ "windowMode":1 }}).then((data)=>{
+ console.log('SUB_AA_OpenHarmony_MoveMissionToFront_2900 moveMissionToFront dataCode:'+ " data:"
+ + JSON.stringify(data));
+ expect().assertFail();
+ }).catch((err)=>{
+ console.log('SUB_AA_OpenHarmony_MoveMissionToFront_2900 moveMissionToFront errCode:'+ " err:"
+ + JSON.stringify(err));
+ });
+ },3888);
+ setTimeout(()=>{
+ console.log("1111subscriberCallBack_mainAbility1_Destory lists:"+ mainAbility1ListS);
+ expect(mainAbility1ListS.indexOf(JSON.stringify("singletonEntrymainAb" +
+ "ility1ListSAbulity1_onInactive"))!=-1).assertTrue();
+ expect(mainAbility1ListS.indexOf(JSON.stringify("singletonEntryA" +
+ "bulity1_onHide"))!=-1).assertTrue();
+ },3999);
+ done()
+ });
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_MoveMissionToFront_3000
+ * @tc.name Verify the left split screen switching application
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_MoveMissionToFront_3000', 0, async function (done) {
+ var Subscriber2 = "";
+ var Subscriber1 = "";
+ var mainAbility1missinds = []
+ console.log("SUB_AA_OpenHarmony_MoveMissionToFront_3000 --- start")
+ commonEvent.createSubscriber(ability2LifeEvents).then(async (data)=>{
+ console.log("Create Subscriber2=======>:"+JSON.stringify(data));
+ Subscriber2 = data;
+ console.log("data2 is:" + JSON.stringify(Subscriber2));
+ await commonEvent.subscribe(Subscriber2,subscriberCallBackMainAbility2Destory)
+ });
+ commonEvent.createSubscriber(ability1LifeEvents).then(async (data)=>{
+ console.log("Create Subscriber1=======>:"+JSON.stringify(data));
+ Subscriber1 = data;
+ console.log("data2 is:" + JSON.stringify(Subscriber1));
+ await commonEvent.subscribe(Subscriber1,subscriberCallBack_mainAbility1_Destory)
+ });
+
+ setTimeout(()=>{
+ featureAbility.startAbility({ want: {
+ bundleName: "com.example.abilitydisable",
+ abilityName: "com.example.abilitydisable.MainAbility2"
+ } }, (error, data) => {
+ console.log('SUB_AA_OpenHarmony_MoveMissionToFront_3000 - startMainAbility2: '
+ + JSON.stringify(error) + ", " + JSON.stringify(data));
+ });
+ },500);
+ setTimeout(()=>{
+ featureAbility.startAbility({ want: {
+ bundleName: "com.example.abilitydisable",
+ abilityName: "com.example.abilitydisable.MainAbility3"
+ } }, (error, data) => {
+ console.log('SUB_AA_OpenHarmony_MoveMissionToFront_3000 - startMainAbility3: '
+ + JSON.stringify(error) + ", " + JSON.stringify(data));
+ });
+ },1000);
+ setTimeout(()=>{
+ console.log("1111subscriberCallBack_mainAbility2_lists:
+ singletonEntryAbulity2_onShow:"+lists);
+ console.log("+++++++++++++++++"+lists.indexOf("singletonEntryAbulity2_onShow")
+ +"+++++++"+lists.indexOf("ApplicationMainAbility2_onCreate")+lists)
+ expect(lists.indexOf(JSON.stringify("singletonEntryAbulity2_onShow"))!=-1).assertTrue();
+ expect(lists.indexOf(JSON.stringify("ApplicationMainAbility2_onCreate"))!=-1).assertTrue();
+ },2500);
+ setTimeout(()=>{
+ missionManager.getMissionInfos("", 100, (err, data) => {
+ console.log('SUB_AA_OpenHarmony_MoveMissionToFront_3000
+ getMissionInfos errCode: '+
+ JSON.stringify(err) + " data: " + JSON.stringify(data));
+ for (var i = 0;i < data.length; i++) {
+ console.log("bundleName222222:"+data[i].want["abilityName"]+
+ "data[i]['lockedState']::::"+data[i]['lockedState']);
+ if(data[i].want["abilityName"] == "com.example.abilitydisable.MainAbility3"){
+ console.log('data[i]["missionId"]'+data[i]["missionId"] + "::::"+
+ data[i].want["abilityName"]);
+ mainAbility1missinds.push(data[i]["missionId"])
+ }
+ }
+ console.log("mainAbility1missinds:"+mainAbility1missinds);
+ });
+ },3000);
+ setTimeout(()=>{
+ console.log('SUB_AA_OpenHarmony_MoveMissionToFront_3000
+ moveMissionToFront dataCode:++++++');
+ missionManager.moveMissionToFront(parseInt(mainAbility1missinds[0]),{
+ parameters:{ "windowMode":100 }}).then((data)=>{
+ console.log('SUB_AA_OpenHarmony_MoveMissionToFront_3000
+ moveMissionToFront dataCode:'+
+ " data:" + JSON.stringify(data));
+ }).catch((err)=>{
+ console.log('SUB_AA_OpenHarmony_MoveMissionToFront_3000
+ moveMissionToFront errCode:'+
+ " err:" + JSON.stringify(err));
+ });
+ },3888);
+ setTimeout(()=>{
+ console.log("1111subscriberCallBack_mainAbility1_Destory lists:"+ mainAbility1ListS);
+ console.log("+++++++++++++++++"+mainAbility1ListS.indexOf("mainAbility1ListS_onShow")
+ +"+++++++"+mainAbility1ListS.indexOf("ApplicationMainAbility2_onCreate")
+ +mainAbility1ListS)
+ expect(mainAbility1ListS.indexOf(JSON.stringify("singletonEntryAbulity1_onInactive"))==-1).assertTrue();
+ expect(mainAbility1ListS.indexOf(JSON.stringify("singletonEntryAbulity1_onHide"))==-1).assertTrue();
+ },3999);
+ done();
+ });
+})
diff --git a/aafwk/aafwk_standard/fa/fa_movemissiontofront_test/entry/src/main/js/test/List.test.js b/aafwk/aafwk_standard/fa/fa_movemissiontofront_test/entry/src/main/js/test/List.test.js
index d12ff02b85beb1eae1f5960a0254d25ec4c60c85..2a20073318a8774f47c27170e1bb49c564a5fe5b 100644
--- a/aafwk/aafwk_standard/fa/fa_movemissiontofront_test/entry/src/main/js/test/List.test.js
+++ b/aafwk/aafwk_standard/fa/fa_movemissiontofront_test/entry/src/main/js/test/List.test.js
@@ -1,15 +1,15 @@
-/*
- * 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.
- */
-require('./AbilityDisableTest.js');
+/*
+ * 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.
+ */
+require('./AbilityDisableTest.js');
diff --git a/aafwk/aafwk_standard/fa/fa_movemissiontofront_test/entry/src/main/resources/base/element/string.json b/aafwk/aafwk_standard/fa/fa_movemissiontofront_test/entry/src/main/resources/base/element/string.json
index 1d2808e5cc8d694e37f10acd62ce27334db762e6..2e8b3cf8ad2f92e47882e62285122d098547a872 100644
--- a/aafwk/aafwk_standard/fa/fa_movemissiontofront_test/entry/src/main/resources/base/element/string.json
+++ b/aafwk/aafwk_standard/fa/fa_movemissiontofront_test/entry/src/main/resources/base/element/string.json
@@ -1,40 +1,40 @@
-{
- "string": [
- {
- "name": "entry_MainAbility",
- "value": "entry_MainAbility"
- },
- {
- "name": "description_mainability",
- "value": "JS_Empty Ability"
- },
- {
- "name": "description_mainability2",
- "value": "JS_Empty Ability"
- },
- {
- "name": "entry_MainAbility2",
- "value": "entry_MainAbility2"
- },
- {
- "name": "description_mainability3",
- "value": "JS_Empty Ability"
- },
- {
- "name": "entry_MainAbility3",
- "value": "entry_MainAbility3"
- },
- {
- "name": "description_mainability4",
- "value": "JS_Empty Ability"
- },
- {
- "name": "entry_MainAbility4",
- "value": "entry_MainAbility4"
- },
- {
- "name": "description_serviceability",
- "value": "hap sample empty service"
- }
- ]
+{
+ "string": [
+ {
+ "name": "entry_MainAbility",
+ "value": "entry_MainAbility"
+ },
+ {
+ "name": "description_mainability",
+ "value": "JS_Empty Ability"
+ },
+ {
+ "name": "description_mainability2",
+ "value": "JS_Empty Ability"
+ },
+ {
+ "name": "entry_MainAbility2",
+ "value": "entry_MainAbility2"
+ },
+ {
+ "name": "description_mainability3",
+ "value": "JS_Empty Ability"
+ },
+ {
+ "name": "entry_MainAbility3",
+ "value": "entry_MainAbility3"
+ },
+ {
+ "name": "description_mainability4",
+ "value": "JS_Empty Ability"
+ },
+ {
+ "name": "entry_MainAbility4",
+ "value": "entry_MainAbility4"
+ },
+ {
+ "name": "description_serviceability",
+ "value": "hap sample empty service"
+ }
+ ]
}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/fa/fa_movemissiontofront_test/signature/openharmony_sx.p7b b/aafwk/aafwk_standard/fa/fa_movemissiontofront_test/signature/openharmony_sx.p7b
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_state_test/BUILD.gn b/aafwk/aafwk_standard/fa/fa_state_test/BUILD.gn
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_state_test/Test.json b/aafwk/aafwk_standard/fa/fa_state_test/Test.json
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_state_test/entry/src/main/config.json b/aafwk/aafwk_standard/fa/fa_state_test/entry/src/main/config.json
index 5d6048801874a2bdfeec5a9df86c2eefc60216b6..01e55a717ab87f6a16079e80d16b3f1287e527c3 100644
--- a/aafwk/aafwk_standard/fa/fa_state_test/entry/src/main/config.json
+++ b/aafwk/aafwk_standard/fa/fa_state_test/entry/src/main/config.json
@@ -1,90 +1,90 @@
-{
- "app": {
- "bundleName": "com.example.statelistener",
- "vendor": "example",
- "version": {
- "code": 1000000,
- "name": "1.0.0"
- }
- },
- "deviceConfig": {},
- "module": {
- "package": "com.example.statelistener",
- "name": ".MyApplication",
- "mainAbility": ".MainAbility",
- "srcPath": "",
- "deviceType": [
- "phone"
- ],
- "distro": {
- "deliveryWithInstall": true,
- "moduleName": "entry",
- "moduleType": "entry",
- "installationFree": false
- },
- "abilities": [
- {
- "skills": [
- {
- "entities": [
- "entity.system.home"
- ],
- "actions": [
- "action.system.home"
- ]
- }
- ],
- "orientation": "unspecified",
- "visible": true,
- "srcPath": "MainAbility",
- "name": ".MainAbility",
- "srcLanguage": "js",
- "icon": "$media:icon",
- "description": "$string:description_mainability",
- "formsEnabled": false,
- "label": "$string:entry_MainAbility",
- "type": "page",
- "launchType": "standard"
- }
- ],
- "js": [
- {
- "pages": [
- "pages/index/index",
- "pages/second/second"
- ],
- "name": ".MainAbility",
- "window": {
- "designWidth": 720,
- "autoDesignWidth": false
- }
- }
- ],
- "reqPermissions": [
- {
- "name": "ohos.permission.GET_BUNDLE_INFO",
- "reason": "need use ohos.permission.INSTALL_BUNDLE"
- },
- {
- "name": "ohos.permission.RUNNING_STATE_OBSERVER",
- "reason": "need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"
- },
- {
- "name": "ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS",
- "reason": "need use ohos.perILEGED"
- },
- {
- "name": "ohos.permission.CLEAN_BACKGROUND_PROCESSES",
- "reason": "need use ohos._PRIVILEGED"
- },
- {
- "name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED",
- "reason": "need use ohos._PRIVILEGED"
- },
- {
- "name": "ohos.permission.GET_RUNNING_INFO",
- "reason": "need use ohos.permi"
- }
- ]
- }
+{
+ "app": {
+ "bundleName": "com.example.statelistener",
+ "vendor": "example",
+ "version": {
+ "code": 1000000,
+ "name": "1.0.0"
+ }
+ },
+ "deviceConfig": {},
+ "module": {
+ "package": "com.example.statelistener",
+ "name": ".MyApplication",
+ "mainAbility": ".MainAbility",
+ "srcPath": "",
+ "deviceType": [
+ "phone"
+ ],
+ "distro": {
+ "deliveryWithInstall": true,
+ "moduleName": "entry",
+ "moduleType": "entry",
+ "installationFree": false
+ },
+ "abilities": [
+ {
+ "skills": [
+ {
+ "entities": [
+ "entity.system.home"
+ ],
+ "actions": [
+ "action.system.home"
+ ]
+ }
+ ],
+ "orientation": "unspecified",
+ "visible": true,
+ "srcPath": "MainAbility",
+ "name": ".MainAbility",
+ "srcLanguage": "js",
+ "icon": "$media:icon",
+ "description": "$string:description_mainability",
+ "formsEnabled": false,
+ "label": "$string:entry_MainAbility",
+ "type": "page",
+ "launchType": "standard"
+ }
+ ],
+ "js": [
+ {
+ "pages": [
+ "pages/index/index",
+ "pages/second/second"
+ ],
+ "name": ".MainAbility",
+ "window": {
+ "designWidth": 720,
+ "autoDesignWidth": false
+ }
+ }
+ ],
+ "reqPermissions": [
+ {
+ "name": "ohos.permission.GET_BUNDLE_INFO",
+ "reason": "need use ohos.permission.INSTALL_BUNDLE"
+ },
+ {
+ "name": "ohos.permission.RUNNING_STATE_OBSERVER",
+ "reason": "need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"
+ },
+ {
+ "name": "ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS",
+ "reason": "need use ohos.perILEGED"
+ },
+ {
+ "name": "ohos.permission.CLEAN_BACKGROUND_PROCESSES",
+ "reason": "need use ohos._PRIVILEGED"
+ },
+ {
+ "name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED",
+ "reason": "need use ohos._PRIVILEGED"
+ },
+ {
+ "name": "ohos.permission.GET_RUNNING_INFO",
+ "reason": "need use ohos.permi"
+ }
+ ]
+ }
}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/fa/fa_state_test/entry/src/main/js/test/List.test.js b/aafwk/aafwk_standard/fa/fa_state_test/entry/src/main/js/test/List.test.js
index c97152de1ca08f72cafe1033934b6e054f43c5db..21f6f7f66ba2a6239f7685d3e085773e27521099 100644
--- a/aafwk/aafwk_standard/fa/fa_state_test/entry/src/main/js/test/List.test.js
+++ b/aafwk/aafwk_standard/fa/fa_state_test/entry/src/main/js/test/List.test.js
@@ -1,15 +1,15 @@
-/*
- * 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.
- */
+/*
+ * 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.
+ */
require('./startFULL.test.js');
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/fa/fa_state_test/entry/src/main/js/test/startFULL.test.js b/aafwk/aafwk_standard/fa/fa_state_test/entry/src/main/js/test/startFULL.test.js
index 53c9e092d0e38b5c1b9bd19667a604c8b6bba97a..8bec45d22aef91a1bb45d65901bd3a731943fa05 100644
--- a/aafwk/aafwk_standard/fa/fa_state_test/entry/src/main/js/test/startFULL.test.js
+++ b/aafwk/aafwk_standard/fa/fa_state_test/entry/src/main/js/test/startFULL.test.js
@@ -1,81 +1,81 @@
-/*
- * 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 appManager from '@ohos.application.appManager';
-import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index"
-import featureAbility from '@ohos.ability.featureAbility';
-import abilityfeatureAbility from '@ohos.ability.featureAbility';
-var appbefore
-var appafter
-describe("appManagerTest", function () {
- console.log("---appManagerTest-- starting---");
- function sleep(time) {
- return new Promise((resolve) => setTimeout(resolve, time))
- }
-
- /**
- * @tc.number: SUB_AA_OpenHarmony_StateListener_0300
- * @tc.name: Find all foreground application validations
- * @tc.desc: Function test
- * @tc.level 0
- */
- it("SUB_AA_OpenHarmony_StateListener_0300", 0, async function (done) {
- await appManager.getForegroundApplications().then((data) => {
- console.log("---appM- starting---");
- for (var i = 0; i < data.length; i++) {
- if (data[i].bundleName == "com.example.statelistener") {
- appbefore = data[i]
- }
- }
- checkAppBefore(appbefore)
- }).catch(()=>{
- expect().assertFail()
- })
- var want = {
- "bundleName": "com.example.fzgc",
- "abilityName": "com.example.fzgc.MainAbility"
- }
- await featureAbility.startAbility({ want }).then().catch();
- await sleep(1000)
- await appManager.getForegroundApplications().then((data) => {
- for (var i = 0; i < data.length; i++) {
- if (data[i].bundleName == "com.example.fzgc") {
- appafter = data[i]
- }
- }
- checkAppAfter(appafter)
- }).catch(()=>{
- expect().assertFail()
- })
- await sleep(2000)
- done();
- })
-
- function checkAppAfter(app) {
- expect(app.state == 2).assertTrue();
- expect(app.uid > 0).assertTrue();
- expect(app.bundleName).assertEqual('com.example.fzgc');
- }
- function checkAppBefore(app) {
- expect(app.state == 2).assertTrue();
- expect(app.uid > 0).assertTrue();
- expect(app.bundleName).assertEqual('com.example.statelistener');
- }
-})
-
-
-
-
-
-
+/*
+ * 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 appManager from '@ohos.application.appManager';
+import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index"
+import featureAbility from '@ohos.ability.featureAbility';
+import abilityfeatureAbility from '@ohos.ability.featureAbility';
+var appbefore
+var appafter
+describe("appManagerTest", function () {
+ console.log("---appManagerTest-- starting---");
+ function sleep(time) {
+ return new Promise((resolve) => setTimeout(resolve, time))
+ }
+
+ /**
+ * @tc.number: SUB_AA_OpenHarmony_StateListener_0300
+ * @tc.name: Find all foreground application validations
+ * @tc.desc: Function test
+ * @tc.level 0
+ */
+ it("SUB_AA_OpenHarmony_StateListener_0300", 0, async function (done) {
+ await appManager.getForegroundApplications().then((data) => {
+ console.log("---appM- starting---");
+ for (var i = 0; i < data.length; i++) {
+ if (data[i].bundleName == "com.example.statelistener") {
+ appbefore = data[i]
+ }
+ }
+ checkAppBefore(appbefore)
+ }).catch(()=>{
+ expect().assertFail()
+ })
+ var want = {
+ "bundleName": "com.example.fzgc",
+ "abilityName": "com.example.fzgc.MainAbility"
+ }
+ await featureAbility.startAbility({ want }).then().catch();
+ await sleep(1000)
+ await appManager.getForegroundApplications().then((data) => {
+ for (var i = 0; i < data.length; i++) {
+ if (data[i].bundleName == "com.example.fzgc") {
+ appafter = data[i]
+ }
+ }
+ checkAppAfter(appafter)
+ }).catch(()=>{
+ expect().assertFail()
+ })
+ await sleep(2000)
+ done();
+ })
+
+ function checkAppAfter(app) {
+ expect(app.state == 2).assertTrue();
+ expect(app.uid > 0).assertTrue();
+ expect(app.bundleName).assertEqual('com.example.fzgc');
+ }
+ function checkAppBefore(app) {
+ expect(app.state == 2).assertTrue();
+ expect(app.uid > 0).assertTrue();
+ expect(app.bundleName).assertEqual('com.example.statelistener');
+ }
+})
+
+
+
+
+
+
diff --git a/aafwk/aafwk_standard/fa/fa_state_test/entry/src/main/resources/base/element/string.json b/aafwk/aafwk_standard/fa/fa_state_test/entry/src/main/resources/base/element/string.json
index 610d89afcb84069982cf1fd49782a75e2d0ef089..d1321867f15bbb87342c4263a8579a7c1b6f68c6 100644
--- a/aafwk/aafwk_standard/fa/fa_state_test/entry/src/main/resources/base/element/string.json
+++ b/aafwk/aafwk_standard/fa/fa_state_test/entry/src/main/resources/base/element/string.json
@@ -1,12 +1,12 @@
-{
- "string": [
- {
- "name": "entry_MainAbility",
- "value": "entry_MainAbility"
- },
- {
- "name": "description_mainability",
- "value": "JS_Empty Ability"
- }
- ]
+{
+ "string": [
+ {
+ "name": "entry_MainAbility",
+ "value": "entry_MainAbility"
+ },
+ {
+ "name": "description_mainability",
+ "value": "JS_Empty Ability"
+ }
+ ]
}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/fa/fa_state_test/signature/openharmony_sx.p7b b/aafwk/aafwk_standard/fa/fa_state_test/signature/openharmony_sx.p7b
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_statelistener_test/BUILD.gn b/aafwk/aafwk_standard/fa/fa_statelistener_test/BUILD.gn
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_statelistener_test/Test.json b/aafwk/aafwk_standard/fa/fa_statelistener_test/Test.json
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/config.json b/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/config.json
old mode 100644
new mode 100755
index 3d6d3e6e07e67d84f944dc8eb0a1005e8d01de82..f357e08369537704ca0b7d7b007ddbde42151dd7
--- a/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/config.json
+++ b/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/config.json
@@ -1,87 +1,87 @@
-{
- "app": {
- "bundleName": "com.example.fenxdy",
- "vendor": "example",
- "version": {
- "code": 1000000,
- "name": "1.0.0"
- }
- },
- "deviceConfig": {},
- "module": {
- "package": "com.example.fenxdy",
- "name": ".MyApplication",
- "mainAbility": ".MainAbility",
- "srcPath": "",
- "deviceType": [
- "phone"
- ],
- "distro": {
- "deliveryWithInstall": true,
- "moduleName": "entry",
- "moduleType": "entry",
- "installationFree": false
- },
- "abilities": [
- {
- "skills": [
- {
- "entities": [
- "entity.system.home"
- ],
- "actions": [
- "action.system.home"
- ]
- }
- ],
- "orientation": "unspecified",
- "visible": true,
- "srcPath": "MainAbility",
- "name": ".MainAbility",
- "srcLanguage": "js",
- "icon": "$media:icon",
- "description": "$string:description_mainability",
- "formsEnabled": false,
- "label": "$string:entry_MainAbility",
- "type": "page",
- "launchType": "standard"
- },
- {
- "orientation": "unspecified",
- "srcPath": "MainAbility2",
- "name": ".MainAbility2",
- "srcLanguage": "js",
- "icon": "$media:icon",
- "description": "$string:description_mainability2",
- "formsEnabled": false,
- "label": "$string:entry_MainAbility2",
- "type": "page",
- "launchType": "standard"
- }
- ],
- "js": [
- {
- "pages": [
- "pages/index/index",
- "pages/second/second"
- ],
- "name": ".MainAbility",
- "window": {
- "designWidth": 720,
- "autoDesignWidth": false
- }
- },
- {
- "pages": [
- "pages/index/index",
- "pages/second/second"
- ],
- "name": ".MainAbility2",
- "window": {
- "designWidth": 720,
- "autoDesignWidth": false
- }
- }
- ]
- }
+{
+ "app": {
+ "bundleName": "com.example.fenxdy",
+ "vendor": "example",
+ "version": {
+ "code": 1000000,
+ "name": "1.0.0"
+ }
+ },
+ "deviceConfig": {},
+ "module": {
+ "package": "com.example.fenxdy",
+ "name": ".MyApplication",
+ "mainAbility": ".MainAbility",
+ "srcPath": "",
+ "deviceType": [
+ "phone"
+ ],
+ "distro": {
+ "deliveryWithInstall": true,
+ "moduleName": "entry",
+ "moduleType": "entry",
+ "installationFree": false
+ },
+ "abilities": [
+ {
+ "skills": [
+ {
+ "entities": [
+ "entity.system.home"
+ ],
+ "actions": [
+ "action.system.home"
+ ]
+ }
+ ],
+ "orientation": "unspecified",
+ "visible": true,
+ "srcPath": "MainAbility",
+ "name": ".MainAbility",
+ "srcLanguage": "js",
+ "icon": "$media:icon",
+ "description": "$string:description_mainability",
+ "formsEnabled": false,
+ "label": "$string:entry_MainAbility",
+ "type": "page",
+ "launchType": "standard"
+ },
+ {
+ "orientation": "unspecified",
+ "srcPath": "MainAbility2",
+ "name": ".MainAbility2",
+ "srcLanguage": "js",
+ "icon": "$media:icon",
+ "description": "$string:description_mainability2",
+ "formsEnabled": false,
+ "label": "$string:entry_MainAbility2",
+ "type": "page",
+ "launchType": "standard"
+ }
+ ],
+ "js": [
+ {
+ "pages": [
+ "pages/index/index",
+ "pages/second/second"
+ ],
+ "name": ".MainAbility",
+ "window": {
+ "designWidth": 720,
+ "autoDesignWidth": false
+ }
+ },
+ {
+ "pages": [
+ "pages/index/index",
+ "pages/second/second"
+ ],
+ "name": ".MainAbility2",
+ "window": {
+ "designWidth": 720,
+ "autoDesignWidth": false
+ }
+ }
+ ]
+ }
}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility/app.js b/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility/app.js
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility/i18n/en-US.json b/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility/i18n/en-US.json
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility/i18n/zh-CN.json b/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility/i18n/zh-CN.json
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility/pages/index/index.css b/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility/pages/index/index.css
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility/pages/index/index.hml b/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility/pages/index/index.hml
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility/pages/index/index.js b/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility/pages/index/index.js
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility/pages/second/second.css b/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility/pages/second/second.css
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility/pages/second/second.hml b/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility/pages/second/second.hml
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility/pages/second/second.js b/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility/pages/second/second.js
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility2/app.js b/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility2/app.js
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility2/i18n/en-US.json b/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility2/i18n/en-US.json
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility2/i18n/zh-CN.json b/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility2/i18n/zh-CN.json
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility2/pages/index/index.css b/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility2/pages/index/index.css
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility2/pages/index/index.hml b/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility2/pages/index/index.hml
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility2/pages/index/index.js b/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility2/pages/index/index.js
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility2/pages/second/second.css b/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility2/pages/second/second.css
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility2/pages/second/second.hml b/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility2/pages/second/second.hml
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility2/pages/second/second.js b/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/MainAbility2/pages/second/second.js
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/test/List.test.js b/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/test/List.test.js
old mode 100644
new mode 100755
index 221d743dda13c03d6d7433defc9f8ebab3a9dccd..fd96c69b6d305cdfa142993acef7ecf395f666a7
--- a/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/test/List.test.js
+++ b/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/test/List.test.js
@@ -1,18 +1,18 @@
-
-/*
- * 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.
- */
-
-
+
+/*
+ * 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.
+ */
+
+
require('./startFULL.test.js');
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/test/startFULL.test.js b/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/test/startFULL.test.js
old mode 100644
new mode 100755
index 1040d8c2a5d14d6d098d8cb9777ac91df06f31f6..dc2b04339d54699895a58e35d75f5ad154b1d870
--- a/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/test/startFULL.test.js
+++ b/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/js/test/startFULL.test.js
@@ -1,71 +1,71 @@
-/*
- * 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.
- */
-// @ts-nocheck
-import appManager from '@ohos.application.appManager';
-import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index"
-
-var subscriberInfoMainAbility2 = {
- events: ["SUB_AA_OpenHarmony_StateListener_0300_CommonEvent"],
-};
-
-
-describe("appManagerTest", function () {
- console.log("----appManagerTest is starting------");
-
- /**
- * @tc.number: SUB_AA_OpenHarmony_StateListener_0200
- * @tc.name: Re-call deregister listener interface validation
- * @tc.desc: Function test
- * @tc.level 0
- */
- it("SUB_AA_OpenHarmony_StateListener_0200", 0, async function (done) {
- console.log("------------start SUB_AA_OpenHarmony_StateListener_0200-------------");
- var registerId = appManager.registerApplicationStateObserver({
- onForegroundApplicationChanged: (data) => {
- console.log("SUB_onForegroundApplicationChanged")
- },
- onAbilityStateChanged: (data) => {
- console.log("SUB_onAbilityStateChanged")
- },
- onProcessCreated: (data) => {
- console.log("SUB_onProcessCreated")
- },
- onProcessDied: (data) => {
- console.log("SUB_onProcessDied")
- }
- })
- console.log('SUB_AA_OpenHarmony_StateListener_0200 registerId : ' + JSON.stringify(registerId));
- console.log('SUB_AA_OpenHarmony_StateListener_0200 registerId : ' + typeof registerId);
- expect(typeof(registerId) == "number").assertTrue();
-
- await appManager.unregisterApplicationStateObserver(registerId, async(err, data) => {
- console.log("SUB_AA_OpenHarmony_StateListener_0200 err1:"
- + JSON.stringify(err) + ",data: " + JSON.stringify(data));
- })
- await appManager.unregisterApplicationStateObserver(registerId, async(err, data) => {
- console.log("SUB_AA_OpenHarmony_StateListener_0200 err2:"
- + JSON.stringify(err) + ",data: " + JSON.stringify(data));
- expect(err.code == 1).assertTrue();
- done();
- })
-
- })
-
-
-})
-
-
-
-
+/*
+ * 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.
+ */
+// @ts-nocheck
+import appManager from '@ohos.application.appManager';
+import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index"
+
+var subscriberInfoMainAbility2 = {
+ events: ["SUB_AA_OpenHarmony_StateListener_0300_CommonEvent"],
+};
+
+
+describe("appManagerTest", function () {
+ console.log("----appManagerTest is starting------");
+
+ /**
+ * @tc.number: SUB_AA_OpenHarmony_StateListener_0200
+ * @tc.name: Re-call deregister listener interface validation
+ * @tc.desc: Function test
+ * @tc.level 0
+ */
+ it("SUB_AA_OpenHarmony_StateListener_0200", 0, async function (done) {
+ console.log("------------start SUB_AA_OpenHarmony_StateListener_0200-------------");
+ var registerId = appManager.registerApplicationStateObserver({
+ onForegroundApplicationChanged: (data) => {
+ console.log("SUB_onForegroundApplicationChanged")
+ },
+ onAbilityStateChanged: (data) => {
+ console.log("SUB_onAbilityStateChanged")
+ },
+ onProcessCreated: (data) => {
+ console.log("SUB_onProcessCreated")
+ },
+ onProcessDied: (data) => {
+ console.log("SUB_onProcessDied")
+ }
+ })
+ console.log('SUB_AA_OpenHarmony_StateListener_0200 registerId : ' + JSON.stringify(registerId));
+ console.log('SUB_AA_OpenHarmony_StateListener_0200 registerId : ' + typeof registerId);
+ expect(typeof(registerId) == "number").assertTrue();
+
+ await appManager.unregisterApplicationStateObserver(registerId, async(err, data) => {
+ console.log("SUB_AA_OpenHarmony_StateListener_0200 err1:"
+ + JSON.stringify(err) + ",data: " + JSON.stringify(data));
+ })
+ await appManager.unregisterApplicationStateObserver(registerId, async(err, data) => {
+ console.log("SUB_AA_OpenHarmony_StateListener_0200 err2:"
+ + JSON.stringify(err) + ",data: " + JSON.stringify(data));
+ expect(err.code == 1).assertTrue();
+ done();
+ })
+
+ })
+
+
+})
+
+
+
+
diff --git a/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/resources/base/element/string.json b/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/resources/base/element/string.json
old mode 100644
new mode 100755
index 425cf6173c67c2ba92f95274b86903e6a494222b..92f5ff8a48403b37a65f5b6f6e5fe285f277d21e
--- a/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/resources/base/element/string.json
+++ b/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/resources/base/element/string.json
@@ -1,20 +1,20 @@
-{
- "string": [
- {
- "name": "entry_MainAbility",
- "value": "entry_MainAbility"
- },
- {
- "name": "description_mainability",
- "value": "JS_Empty Ability"
- },
- {
- "name": "description_mainability2",
- "value": "JS_Empty Ability"
- },
- {
- "name": "entry_MainAbility2",
- "value": "entry_MainAbility2"
- }
- ]
+{
+ "string": [
+ {
+ "name": "entry_MainAbility",
+ "value": "entry_MainAbility"
+ },
+ {
+ "name": "description_mainability",
+ "value": "JS_Empty Ability"
+ },
+ {
+ "name": "description_mainability2",
+ "value": "JS_Empty Ability"
+ },
+ {
+ "name": "entry_MainAbility2",
+ "value": "entry_MainAbility2"
+ }
+ ]
}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/resources/base/media/icon.png b/aafwk/aafwk_standard/fa/fa_statelistener_test/entry/src/main/resources/base/media/icon.png
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_statelistener_test/signature/openharmony_sx.p7b b/aafwk/aafwk_standard/fa/fa_statelistener_test/signature/openharmony_sx.p7b
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_sumstate_test/BUILD.gn b/aafwk/aafwk_standard/fa/fa_sumstate_test/BUILD.gn
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_sumstate_test/Test.json b/aafwk/aafwk_standard/fa/fa_sumstate_test/Test.json
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_sumstate_test/entry/src/main/config.json b/aafwk/aafwk_standard/fa/fa_sumstate_test/entry/src/main/config.json
index a59289dd4ea63daf4a721cc3a4ed8ef88899f03f..27aa861eac20a3249b060ecf39c8b90a22a184b4 100644
--- a/aafwk/aafwk_standard/fa/fa_sumstate_test/entry/src/main/config.json
+++ b/aafwk/aafwk_standard/fa/fa_sumstate_test/entry/src/main/config.json
@@ -1,113 +1,113 @@
-{
- "app": {
- "bundleName": "com.example.sum_statelistener",
- "vendor": "example",
- "version": {
- "code": 1000000,
- "name": "1.0.0"
- }
- },
- "deviceConfig": {},
- "module": {
- "package": "com.example.sum_statelistener",
- "name": ".MyApplication",
- "mainAbility": ".MainAbility",
- "srcPath": "",
- "deviceType": [
- "phone"
- ],
- "distro": {
- "deliveryWithInstall": true,
- "moduleName": "entry",
- "moduleType": "entry",
- "installationFree": false
- },
- "abilities": [
- {
- "skills": [
- {
- "entities": [
- "entity.system.home"
- ],
- "actions": [
- "action.system.home"
- ]
- }
- ],
- "orientation": "unspecified",
- "visible": true,
- "srcPath": "MainAbility",
- "name": ".MainAbility",
- "srcLanguage": "js",
- "icon": "$media:icon",
- "description": "$string:description_mainability",
- "formsEnabled": false,
- "label": "$string:entry_MainAbility",
- "type": "page",
- "launchType": "standard"
- },
- {
- "orientation": "unspecified",
- "srcPath": "MainAbility2",
- "name": ".MainAbility2",
- "srcLanguage": "js",
- "icon": "$media:icon",
- "description": "$string:description_mainability2",
- "formsEnabled": false,
- "label": "$string:entry_MainAbility2",
- "type": "page",
- "launchType": "standard"
- }
- ],
- "js": [
- {
- "pages": [
- "pages/index/index",
- "pages/second/second"
- ],
- "name": ".MainAbility",
- "window": {
- "designWidth": 720,
- "autoDesignWidth": false
- }
- },
- {
- "pages": [
- "pages/index/index",
- "pages/second/second"
- ],
- "name": ".MainAbility2",
- "window": {
- "designWidth": 720,
- "autoDesignWidth": false
- }
- }
- ],
- "reqPermissions": [
- {
- "name": "ohos.permission.GET_BUNDLE_INFO",
- "reason": "need use ohos.permission.INSTALL_BUNDLE"
- },
- {
- "name": "ohos.permission.RUNNING_STATE_OBSERVER",
- "reason": "need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"
- },
- {
- "name": "ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS",
- "reason": "need use ohos.perILEGED"
- },
- {
- "name": "ohos.permission.CLEAN_BACKGROUND_PROCESSES",
- "reason": "need use ohos._PRIVILEGED"
- },
- {
- "name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED",
- "reason": "need use ohos._PRIVILEGED"
- },
- {
- "name": "ohos.permission.GET_RUNNING_INFO",
- "reason": "need use ohos.permi"
- }
- ]
- }
+{
+ "app": {
+ "bundleName": "com.example.sum_statelistener",
+ "vendor": "example",
+ "version": {
+ "code": 1000000,
+ "name": "1.0.0"
+ }
+ },
+ "deviceConfig": {},
+ "module": {
+ "package": "com.example.sum_statelistener",
+ "name": ".MyApplication",
+ "mainAbility": ".MainAbility",
+ "srcPath": "",
+ "deviceType": [
+ "phone"
+ ],
+ "distro": {
+ "deliveryWithInstall": true,
+ "moduleName": "entry",
+ "moduleType": "entry",
+ "installationFree": false
+ },
+ "abilities": [
+ {
+ "skills": [
+ {
+ "entities": [
+ "entity.system.home"
+ ],
+ "actions": [
+ "action.system.home"
+ ]
+ }
+ ],
+ "orientation": "unspecified",
+ "visible": true,
+ "srcPath": "MainAbility",
+ "name": ".MainAbility",
+ "srcLanguage": "js",
+ "icon": "$media:icon",
+ "description": "$string:description_mainability",
+ "formsEnabled": false,
+ "label": "$string:entry_MainAbility",
+ "type": "page",
+ "launchType": "standard"
+ },
+ {
+ "orientation": "unspecified",
+ "srcPath": "MainAbility2",
+ "name": ".MainAbility2",
+ "srcLanguage": "js",
+ "icon": "$media:icon",
+ "description": "$string:description_mainability2",
+ "formsEnabled": false,
+ "label": "$string:entry_MainAbility2",
+ "type": "page",
+ "launchType": "standard"
+ }
+ ],
+ "js": [
+ {
+ "pages": [
+ "pages/index/index",
+ "pages/second/second"
+ ],
+ "name": ".MainAbility",
+ "window": {
+ "designWidth": 720,
+ "autoDesignWidth": false
+ }
+ },
+ {
+ "pages": [
+ "pages/index/index",
+ "pages/second/second"
+ ],
+ "name": ".MainAbility2",
+ "window": {
+ "designWidth": 720,
+ "autoDesignWidth": false
+ }
+ }
+ ],
+ "reqPermissions": [
+ {
+ "name": "ohos.permission.GET_BUNDLE_INFO",
+ "reason": "need use ohos.permission.INSTALL_BUNDLE"
+ },
+ {
+ "name": "ohos.permission.RUNNING_STATE_OBSERVER",
+ "reason": "need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"
+ },
+ {
+ "name": "ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS",
+ "reason": "need use ohos.perILEGED"
+ },
+ {
+ "name": "ohos.permission.CLEAN_BACKGROUND_PROCESSES",
+ "reason": "need use ohos._PRIVILEGED"
+ },
+ {
+ "name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED",
+ "reason": "need use ohos._PRIVILEGED"
+ },
+ {
+ "name": "ohos.permission.GET_RUNNING_INFO",
+ "reason": "need use ohos.permi"
+ }
+ ]
+ }
}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/fa/fa_sumstate_test/entry/src/main/js/test/List.test.js b/aafwk/aafwk_standard/fa/fa_sumstate_test/entry/src/main/js/test/List.test.js
index c97152de1ca08f72cafe1033934b6e054f43c5db..21f6f7f66ba2a6239f7685d3e085773e27521099 100644
--- a/aafwk/aafwk_standard/fa/fa_sumstate_test/entry/src/main/js/test/List.test.js
+++ b/aafwk/aafwk_standard/fa/fa_sumstate_test/entry/src/main/js/test/List.test.js
@@ -1,15 +1,15 @@
-/*
- * 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.
- */
+/*
+ * 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.
+ */
require('./startFULL.test.js');
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/fa/fa_sumstate_test/entry/src/main/js/test/startFULL.test.js b/aafwk/aafwk_standard/fa/fa_sumstate_test/entry/src/main/js/test/startFULL.test.js
index 4e2717e0b1cb7dac962169bc99b3093c8e87bca8..e527a8a682dd853cf0d754cb24b586264084bf36 100644
--- a/aafwk/aafwk_standard/fa/fa_sumstate_test/entry/src/main/js/test/startFULL.test.js
+++ b/aafwk/aafwk_standard/fa/fa_sumstate_test/entry/src/main/js/test/startFULL.test.js
@@ -1,201 +1,201 @@
-/*
- * 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 appManager from '@ohos.application.appManager';
-import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index"
-import featureAbility from '@ohos.ability.featureAbility';
-import abilityfeatureAbility from '@ohos.ability.featureAbility';
-
-var assistData
-var arr1 = []
-var AbilityStateChanged1 = []
-var ForegroundApplication1 = []
-var testData
-var appbefore
-var appafter
-describe("appManagerTest", function () {
- console.log("---appManagerTest-- starting---");
-
- /**
- * @tc.number: SUB_AA_OpenHarmony_StateListener_3200
- * @tc.name: Verify the onProcessDied callback
- * @tc.desc: Function test
- * @tc.level 0
- */
- it("SUB_AA_OpenHarmony_StateListener_3200", 0, async function (done) {
- console.log("---start SUB_AA_OpenHarmony_StateListener_3200-----");
- await sleep(1000)
- console.log("---start SUB_AA_OpenHarmony_StateListener_3200-----");
- var rest = appManager.registerApplicationStateObserver({
- onForegroundApplicationChanged: (aapData) => {
- console.log("SUB_onForegroundApplicationChanged" + JSON.stringify(aapData))
- ForegroundApplication1.push(aapData);
- console.log('ForegroundApplication :' + JSON.stringify(ForegroundApplication1))
- },
- onAbilityStateChanged: (StateData) => {
- console.log("==onAbilityStateChanged1==>" + JSON.stringify(StateData))
- AbilityStateChanged1.push(StateData)
- console.log('AbilityStateChanged1:' + JSON.stringify(AbilityStateChanged1))
- },
- onProcessCreated: (CreateData) => {
- console.log("SUB_onProcessCreated" + JSON.stringify(CreateData))
- arr1.push('onProcessCreated', CreateData)
- console.log('arr2:' + JSON.stringify(arr1))
- },
- onProcessDied: (ProcessData) => {
- console.log("SUB_onProcessDied" + JSON.stringify(ProcessData))
- arr1.push('onProcessDied', ProcessData)
- console.log("SUB_onProcessDied" + JSON.stringify(arr1))
- console.log('arr3:' + JSON.stringify(arr1))
- }
- })
- await sleep(400);
- var want = {
- "bundleName": "com.example.fzstatelistener",
- "abilityName": "com.example.fzstatelistener.MainAbility"
- }
- await featureAbility.startAbility({ want }).then().catch();
- await sleep(1000);
- console.log('AbilityStateChanged1===>' + JSON.stringify(AbilityStateChanged1))
- console.log('ForegroundApplication1===>' + JSON.stringify(ForegroundApplication1))
- checkArr(arr1, AbilityStateChanged1, ForegroundApplication1)
- done();
- })
-
- function checkArr(arr, AbilityStateChanged, ForegroundApplication) {
- console.log('==app1==:' + AbilityStateChanged.length)
- if (arr == [] || AbilityStateChanged == [] || ForegroundApplication == []) {
- expect().assertFail()
- }
- console.log('==check process==>strat' + JSON.stringify(arr))
- let process = getProcessData(arr, 'onProcessCreated')
- console.log(' processlist :' + JSON.stringify(process))
- for (let i = 0;i < process.length; i++) {
- console.log('==check process==> process[i] :' + JSON.stringify(process[i]))
- if (process[i].bundleName == 'com.example.fzstatelistener') {
- assistData = process[i]
- console.log('==assistData==>' + JSON.stringify(assistData))
- }
- }
-
- checkProcessData(assistData)
- console.log('==app==:' + AbilityStateChanged.length)
- for (let i = 0;i < AbilityStateChanged.length; i++) {
- console.log('==appState==> :' + JSON.stringify(AbilityStateChanged[i]))
- if (AbilityStateChanged[i].bundleName == 'com.example.fzstatelistener') {
- assistData = AbilityStateChanged[i]
- console.log('==check assistData==> :' + JSON.stringify(assistData))
- }
- else if (AbilityStateChanged[i].bundleName == 'com.example.sum_statelistener') {
- testData = AbilityStateChanged[i]
- console.log('==check testData==> :' + JSON.stringify(testData))
-
- }
- }
- if (testData == undefined || assistData == undefined) {
- console.log('testData||assistData is null')
- expect().assertFail()
- }
- checkAbilityStateData(assistData)
- checkAbilityStateData2(testData)
- console.log('==app==:' + ForegroundApplication.length)
- for (let i = 0;i < ForegroundApplication.length; i++) {
- console.log('==abilityState==>' + JSON.stringify(ForegroundApplication[i]))
- if (ForegroundApplication[i].bundleName == 'com.example.fzstatelistener') {
- assistData = ForegroundApplication[i]
- console.log('==check assistData2==> :' + JSON.stringify(assistData))
-
- }
- else if (ForegroundApplication[i].bundleName == 'com.example.sum_statelistener') {
- testData = ForegroundApplication[i]
- console.log('==check testData2==> :' + JSON.stringify(testData))
- }
- }
- if (testData == undefined || assistData == undefined) {
- console.log('testData||assistData is null')
- expect().assertFail()
- }
- checkAppStateData(assistData)
- checkAppStateData2(testData)
- }
-
- function checkAbilityStateData2(list) {
- console.log('==checkAbilityStateData2==>' + JSON.stringify(list))
- expect('com.example.sum_statelistener').assertEqual(list.bundleName)
- expect('com.example.sum_statelistener.MainAbility').assertEqual(list.abilityName)
- expect(list.pid > 0).assertTrue()
- expect(list.uid > 0).assertTrue()
- expect(3).assertEqual(list.state)
- }
-
- function checkAbilityStateData(list) {
- console.log('==checkAbilityStateData==>' + JSON.stringify(list))
- expect('com.example.fzstatelistener').assertEqual(list.bundleName)
- expect('com.example.fzstatelistener.MainAbility').assertEqual(list.abilityName)
- expect(list.pid > 0).assertTrue()
- expect(list.uid > 0).assertTrue()
- expect(2).assertEqual(list.state)
- }
-
- function checkAppStateData2(list) {
- console.log('==checkAppStateData2==>' + JSON.stringify(list))
- expect('com.example.sum_statelistener').assertEqual(list.bundleName)
- expect(list.uid > 0).assertTrue()
- expect(3).assertEqual(list.state)
- }
-
- function checkAppStateData(list) {
- console.log('==checkAppStateData==>' + JSON.stringify(list))
- expect('com.example.fzstatelistener').assertEqual(list.bundleName)
- expect(list.uid > 0).assertTrue()
- expect(2).assertEqual(list.state)
- }
-
- function checkProcessData(list) {
- console.log('==dhhFdh==>' + JSON.stringify(list))
- expect('com.example.fzstatelistener').assertEqual(list.bundleName)
- console.log('==list.bundleName==>' + JSON.stringify(list.bundleName))
- expect(list.pid > 0).assertTrue()
- console.log('==list.pid==>' + JSON.stringify(list.pid))
- expect(list.uid > 0).assertTrue()
- console.log('==list.uid==>' + JSON.stringify(list.uid))
- }
-
- function getProcessData(reslist, key) {
- console.log('getProcessData---start' + JSON.stringify(reslist))
- var listofkey = [];
- for (let i = 0;i < reslist.length; i++) {
- console.log('==getProcessData==> reslist[i] : ' + JSON.stringify(reslist[i]))
- var callback = reslist[i]
- console.log('==callback==> : ' + JSON.stringify(callback))
- if (callback == key) {
- listofkey.push(reslist[i+1])
- console.log('==reslist[i+1]==> : ' + JSON.stringify(reslist[i+1]))
- }
- }
- console.log('getProcessData' + JSON.stringify(listofkey))
- return listofkey
- }
-
- function sleep(time) {
- return new Promise((resolve) => setTimeout(resolve, time))
- }
-
-})
-
-
-
-
-
-
+/*
+ * 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 appManager from '@ohos.application.appManager';
+import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index"
+import featureAbility from '@ohos.ability.featureAbility';
+import abilityfeatureAbility from '@ohos.ability.featureAbility';
+
+var assistData
+var arr1 = []
+var AbilityStateChanged1 = []
+var ForegroundApplication1 = []
+var testData
+var appbefore
+var appafter
+describe("appManagerTest", function () {
+ console.log("---appManagerTest-- starting---");
+
+ /**
+ * @tc.number: SUB_AA_OpenHarmony_StateListener_3200
+ * @tc.name: Verify the onProcessDied callback
+ * @tc.desc: Function test
+ * @tc.level 0
+ */
+ it("SUB_AA_OpenHarmony_StateListener_3200", 0, async function (done) {
+ console.log("---start SUB_AA_OpenHarmony_StateListener_3200-----");
+ await sleep(1000)
+ console.log("---start SUB_AA_OpenHarmony_StateListener_3200-----");
+ var rest = appManager.registerApplicationStateObserver({
+ onForegroundApplicationChanged: (aapData) => {
+ console.log("SUB_onForegroundApplicationChanged" + JSON.stringify(aapData))
+ ForegroundApplication1.push(aapData);
+ console.log('ForegroundApplication :' + JSON.stringify(ForegroundApplication1))
+ },
+ onAbilityStateChanged: (StateData) => {
+ console.log("==onAbilityStateChanged1==>" + JSON.stringify(StateData))
+ AbilityStateChanged1.push(StateData)
+ console.log('AbilityStateChanged1:' + JSON.stringify(AbilityStateChanged1))
+ },
+ onProcessCreated: (CreateData) => {
+ console.log("SUB_onProcessCreated" + JSON.stringify(CreateData))
+ arr1.push('onProcessCreated', CreateData)
+ console.log('arr2:' + JSON.stringify(arr1))
+ },
+ onProcessDied: (ProcessData) => {
+ console.log("SUB_onProcessDied" + JSON.stringify(ProcessData))
+ arr1.push('onProcessDied', ProcessData)
+ console.log("SUB_onProcessDied" + JSON.stringify(arr1))
+ console.log('arr3:' + JSON.stringify(arr1))
+ }
+ })
+ await sleep(400);
+ var want = {
+ "bundleName": "com.example.fzstatelistener",
+ "abilityName": "com.example.fzstatelistener.MainAbility"
+ }
+ await featureAbility.startAbility({ want }).then().catch();
+ await sleep(1000);
+ console.log('AbilityStateChanged1===>' + JSON.stringify(AbilityStateChanged1))
+ console.log('ForegroundApplication1===>' + JSON.stringify(ForegroundApplication1))
+ checkArr(arr1, AbilityStateChanged1, ForegroundApplication1)
+ done();
+ })
+
+ function checkArr(arr, AbilityStateChanged, ForegroundApplication) {
+ console.log('==app1==:' + AbilityStateChanged.length)
+ if (arr == [] || AbilityStateChanged == [] || ForegroundApplication == []) {
+ expect().assertFail()
+ }
+ console.log('==check process==>strat' + JSON.stringify(arr))
+ let process = getProcessData(arr, 'onProcessCreated')
+ console.log(' processlist :' + JSON.stringify(process))
+ for (let i = 0;i < process.length; i++) {
+ console.log('==check process==> process[i] :' + JSON.stringify(process[i]))
+ if (process[i].bundleName == 'com.example.fzstatelistener') {
+ assistData = process[i]
+ console.log('==assistData==>' + JSON.stringify(assistData))
+ }
+ }
+
+ checkProcessData(assistData)
+ console.log('==app==:' + AbilityStateChanged.length)
+ for (let i = 0;i < AbilityStateChanged.length; i++) {
+ console.log('==appState==> :' + JSON.stringify(AbilityStateChanged[i]))
+ if (AbilityStateChanged[i].bundleName == 'com.example.fzstatelistener') {
+ assistData = AbilityStateChanged[i]
+ console.log('==check assistData==> :' + JSON.stringify(assistData))
+ }
+ else if (AbilityStateChanged[i].bundleName == 'com.example.sum_statelistener') {
+ testData = AbilityStateChanged[i]
+ console.log('==check testData==> :' + JSON.stringify(testData))
+
+ }
+ }
+ if (testData == undefined || assistData == undefined) {
+ console.log('testData||assistData is null')
+ expect().assertFail()
+ }
+ checkAbilityStateData(assistData)
+ checkAbilityStateData2(testData)
+ console.log('==app==:' + ForegroundApplication.length)
+ for (let i = 0;i < ForegroundApplication.length; i++) {
+ console.log('==abilityState==>' + JSON.stringify(ForegroundApplication[i]))
+ if (ForegroundApplication[i].bundleName == 'com.example.fzstatelistener') {
+ assistData = ForegroundApplication[i]
+ console.log('==check assistData2==> :' + JSON.stringify(assistData))
+
+ }
+ else if (ForegroundApplication[i].bundleName == 'com.example.sum_statelistener') {
+ testData = ForegroundApplication[i]
+ console.log('==check testData2==> :' + JSON.stringify(testData))
+ }
+ }
+ if (testData == undefined || assistData == undefined) {
+ console.log('testData||assistData is null')
+ expect().assertFail()
+ }
+ checkAppStateData(assistData)
+ checkAppStateData2(testData)
+ }
+
+ function checkAbilityStateData2(list) {
+ console.log('==checkAbilityStateData2==>' + JSON.stringify(list))
+ expect('com.example.sum_statelistener').assertEqual(list.bundleName)
+ expect('com.example.sum_statelistener.MainAbility').assertEqual(list.abilityName)
+ expect(list.pid > 0).assertTrue()
+ expect(list.uid > 0).assertTrue()
+ expect(3).assertEqual(list.state)
+ }
+
+ function checkAbilityStateData(list) {
+ console.log('==checkAbilityStateData==>' + JSON.stringify(list))
+ expect('com.example.fzstatelistener').assertEqual(list.bundleName)
+ expect('com.example.fzstatelistener.MainAbility').assertEqual(list.abilityName)
+ expect(list.pid > 0).assertTrue()
+ expect(list.uid > 0).assertTrue()
+ expect(2).assertEqual(list.state)
+ }
+
+ function checkAppStateData2(list) {
+ console.log('==checkAppStateData2==>' + JSON.stringify(list))
+ expect('com.example.sum_statelistener').assertEqual(list.bundleName)
+ expect(list.uid > 0).assertTrue()
+ expect(3).assertEqual(list.state)
+ }
+
+ function checkAppStateData(list) {
+ console.log('==checkAppStateData==>' + JSON.stringify(list))
+ expect('com.example.fzstatelistener').assertEqual(list.bundleName)
+ expect(list.uid > 0).assertTrue()
+ expect(2).assertEqual(list.state)
+ }
+
+ function checkProcessData(list) {
+ console.log('==dhhFdh==>' + JSON.stringify(list))
+ expect('com.example.fzstatelistener').assertEqual(list.bundleName)
+ console.log('==list.bundleName==>' + JSON.stringify(list.bundleName))
+ expect(list.pid > 0).assertTrue()
+ console.log('==list.pid==>' + JSON.stringify(list.pid))
+ expect(list.uid > 0).assertTrue()
+ console.log('==list.uid==>' + JSON.stringify(list.uid))
+ }
+
+ function getProcessData(reslist, key) {
+ console.log('getProcessData---start' + JSON.stringify(reslist))
+ var listofkey = [];
+ for (let i = 0;i < reslist.length; i++) {
+ console.log('==getProcessData==> reslist[i] : ' + JSON.stringify(reslist[i]))
+ var callback = reslist[i]
+ console.log('==callback==> : ' + JSON.stringify(callback))
+ if (callback == key) {
+ listofkey.push(reslist[i+1])
+ console.log('==reslist[i+1]==> : ' + JSON.stringify(reslist[i+1]))
+ }
+ }
+ console.log('getProcessData' + JSON.stringify(listofkey))
+ return listofkey
+ }
+
+ function sleep(time) {
+ return new Promise((resolve) => setTimeout(resolve, time))
+ }
+
+})
+
+
+
+
+
+
diff --git a/aafwk/aafwk_standard/fa/fa_sumstate_test/entry/src/main/resources/base/element/string.json b/aafwk/aafwk_standard/fa/fa_sumstate_test/entry/src/main/resources/base/element/string.json
index 425cf6173c67c2ba92f95274b86903e6a494222b..92f5ff8a48403b37a65f5b6f6e5fe285f277d21e 100644
--- a/aafwk/aafwk_standard/fa/fa_sumstate_test/entry/src/main/resources/base/element/string.json
+++ b/aafwk/aafwk_standard/fa/fa_sumstate_test/entry/src/main/resources/base/element/string.json
@@ -1,20 +1,20 @@
-{
- "string": [
- {
- "name": "entry_MainAbility",
- "value": "entry_MainAbility"
- },
- {
- "name": "description_mainability",
- "value": "JS_Empty Ability"
- },
- {
- "name": "description_mainability2",
- "value": "JS_Empty Ability"
- },
- {
- "name": "entry_MainAbility2",
- "value": "entry_MainAbility2"
- }
- ]
+{
+ "string": [
+ {
+ "name": "entry_MainAbility",
+ "value": "entry_MainAbility"
+ },
+ {
+ "name": "description_mainability",
+ "value": "JS_Empty Ability"
+ },
+ {
+ "name": "description_mainability2",
+ "value": "JS_Empty Ability"
+ },
+ {
+ "name": "entry_MainAbility2",
+ "value": "entry_MainAbility2"
+ }
+ ]
}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/fa/fa_sumstate_test/signature/openharmony_sx.p7b b/aafwk/aafwk_standard/fa/fa_sumstate_test/signature/openharmony_sx.p7b
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_taskmanager_test/entry/.gitignore b/aafwk/aafwk_standard/fa/fa_taskmanager_test/entry/.gitignore
index 7d5b7a94f4dcf381f03ff21f28f8a2494b58023f..f77260b1509284d42a7f8a2449ad1e8f4b489a3a 100644
--- a/aafwk/aafwk_standard/fa/fa_taskmanager_test/entry/.gitignore
+++ b/aafwk/aafwk_standard/fa/fa_taskmanager_test/entry/.gitignore
@@ -1,2 +1,2 @@
-/build
-/node_modules
+/build
+/node_modules
diff --git a/aafwk/aafwk_standard/fa/fa_taskmanager_test/entry/build.gradle b/aafwk/aafwk_standard/fa/fa_taskmanager_test/entry/build.gradle
index cef7b37de8f320938458ca42edde1462669836d2..c40c1f08c819a404fc2312634d97bee84d939ba3 100644
--- a/aafwk/aafwk_standard/fa/fa_taskmanager_test/entry/build.gradle
+++ b/aafwk/aafwk_standard/fa/fa_taskmanager_test/entry/build.gradle
@@ -1,21 +1,21 @@
-apply plugin: 'com.huawei.ohos.hap'
-//For instructions on signature configuration, see https://developer.harmonyos.com/cn/docs/documentation/doc-guides/ide_debug_device-0000001053822404#section1112183053510
-ohos {
- compileSdkVersion 8
- defaultConfig {
- compatibleSdkVersion 7
- }
- buildTypes {
- release {
- proguardOpt {
- proguardEnabled false
- rulesFiles 'proguard-rules.pro'
- }
- }
- }
-}
-
-dependencies {
- implementation fileTree(dir: 'libs', include: ['*.jar', '*.har'])
- testImplementation 'junit:junit:4.13.1'
-}
+apply plugin: 'com.huawei.ohos.hap'
+//For instructions on signature configuration, see https://developer.harmonyos.com/cn/docs/documentation/doc-guides/ide_debug_device-0000001053822404#section1112183053510
+ohos {
+ compileSdkVersion 8
+ defaultConfig {
+ compatibleSdkVersion 7
+ }
+ buildTypes {
+ release {
+ proguardOpt {
+ proguardEnabled false
+ rulesFiles 'proguard-rules.pro'
+ }
+ }
+ }
+}
+
+dependencies {
+ implementation fileTree(dir: 'libs', include: ['*.jar', '*.har'])
+ testImplementation 'junit:junit:4.13.1'
+}
diff --git a/aafwk/aafwk_standard/fa/fa_taskmanager_test/entry/package.json b/aafwk/aafwk_standard/fa/fa_taskmanager_test/entry/package.json
index 0967ef424bce6791893e9a57bb952f80fd536e93..69a88e3b65423624fe7ea8b0f8beefcc62cc3d5f 100644
--- a/aafwk/aafwk_standard/fa/fa_taskmanager_test/entry/package.json
+++ b/aafwk/aafwk_standard/fa/fa_taskmanager_test/entry/package.json
@@ -1 +1 @@
-{}
+{}
diff --git a/aafwk/aafwk_standard/fa/fa_taskmanager_test/entry/src/main/js/test/List.test.js b/aafwk/aafwk_standard/fa/fa_taskmanager_test/entry/src/main/js/test/List.test.js
index 88bb2cf21115b40f3c624e74002fe9fed8e769de..e51be7f6092397261e87eabbd389c540f965544f 100644
--- a/aafwk/aafwk_standard/fa/fa_taskmanager_test/entry/src/main/js/test/List.test.js
+++ b/aafwk/aafwk_standard/fa/fa_taskmanager_test/entry/src/main/js/test/List.test.js
@@ -1,16 +1,16 @@
-/*
- * 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.
- */
-
+/*
+ * Copyright (c) 2022 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
require('./MissionManagerTest.js');
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/fa/fa_taskmanager_test/entry/src/main/js/test/MissionManagerTest.js b/aafwk/aafwk_standard/fa/fa_taskmanager_test/entry/src/main/js/test/MissionManagerTest.js
index 84e31aca3d100937de86aa0312a333fba6339f9d..f94555b530b62e86144085688c88c0c82ca9928f 100644
--- a/aafwk/aafwk_standard/fa/fa_taskmanager_test/entry/src/main/js/test/MissionManagerTest.js
+++ b/aafwk/aafwk_standard/fa/fa_taskmanager_test/entry/src/main/js/test/MissionManagerTest.js
@@ -1,427 +1,427 @@
-// @ts-nocheck
-/*
- * 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 missionManager from '@ohos.application.missionManager';
-//import ability_featureAbility from '@ohos.ability.featureAbility';
-
-describe('ShiAbilityDisableTest', function () {
- var result
- console.log("ShiAbilityDisableTest --- start");
-
- /*
- * @tc.number SUB_AA_OpenHarmony_MissionManager_4000
- * @tc.name The interface parameter local id and is 1
- * @tc.desc Function test
- * @tc.level 0
- */
- it('SUB_AA_OpenHarmony_MissionManager_4000',0, async function (done){
- missionManager.getMissionInfos("", 1, (err, data) => {
- console.log('SUB_AA_OpenHarmony_MissionManager_4000 AsyncCallback errCode : '
- + JSON.stringify(err) + " data: " + JSON.stringify(data));
- expect(err.code == 0).assertTrue();
- done();
- })
- })
-
- /*
- * @tc.number SUB_AA_OpenHarmony_MissionManager_4100
- * @tc.name Interface parameter does not exist and 1
- * @tc.desc Function test
- * @tc.level 0
- */
- it('SUB_AA_OpenHarmony_MissionManager_4100', 0, async function (done) {
- missionManager.getMissionInfos("aaaaaa", 1, (err, data) => {
- console.log('SUB_AA_OpenHarmony_MissionManager_4100 AsyncCallback errCode : '
- + JSON.stringify(err) + " data: " + JSON.stringify(data));
- expect(err.code != 0).assertTrue();
- done();
- })
- })
-
- /*
- * @tc.number SUB_AA_OpenHarmony_MissionManager_4200
- * @tc.name Interface parameter null and 1
- * @tc.desc Function test
- * @tc.level 0
- */
- it('SUB_AA_OpenHarmony_MissionManager_4200', 0, async function (done) {
- missionManager.getMissionInfos('', 1, (err, data) => {
- console.log('SUB_AA_OpenHarmony_MissionManager_4200 AsyncCallback errCode : '
- + JSON.stringify(err) + " data: " + JSON.stringify(data));
- expect(err.code == 0).assertTrue();
- done();
- })
- })
-
- /*
- * @tc.number SUB_AA_OpenHarmony_MissionManager_4300
- * @tc.name Interface parameter null and 10
- * @tc.desc Function test
- * @tc.level 0
- */
- it('SUB_AA_OpenHarmony_MissionManager_4300', 0, async function (done) {
- missionManager.getMissionInfos('', 10, (err, data) => {
- console.log('SUB_AA_OpenHarmony_MissionManager_4300 AsyncCallback errCode : '
- + JSON.stringify(err) + " data: " + JSON.stringify(data));
- expect(err.code == 0).assertTrue();
- done();
- })
- })
-
- /*
- * @tc.number SUB_AA_OpenHarmony_MissionManager_4400
- * @tc.name Interface parameter null and 1000
- * @tc.desc Function test
- * @tc.level 0
- */
- it('SUB_AA_OpenHarmony_MissionManager_4400', 0, async function (done){
- missionManager.getMissionInfos('', 1000, (err, data) => {
- console.log('SUB_AA_OpenHarmony_MissionManager_4400 AsyncCallback errCode : '
- + JSON.stringify(err) + " data: " + JSON.stringify(data));
- expect(err.code == 0).assertTrue();
- done();
- })
- })
-
- /*
- * @tc.number SUB_AA_OpenHarmony_MissionManager_4500
- * @tc.name Interface parameter null and null
- * @tc.desc Function test
- * @tc.level 0
- */
- it('SUB_AA_OpenHarmony_MissionManager_4500', 0, async function (done){
- missionManager.getMissionInfos("", "", (err, data) => {
- console.log('SUB_AA_OpenHarmony_MissionManager_4500 AsyncCallback errCode : '
- + JSON.stringify(err) + " data: " + JSON.stringify(data));
- expect(err.code != 0).assertTrue();
- done();
- })
- })
-
- /*
- * @tc.number SUB_AA_OpenHarmony_MissionManager_4600
- * @tc.name Interface parameter null and string 1
- * @tc.desc Function test
- * @tc.level 0
- */
- it('SUB_AA_OpenHarmony_MissionManager_4600', 0, async function (done){
- missionManager.getMissionInfos("", "1", (err, data) => {
- console.log('SUB_AA_OpenHarmony_MissionManager_4600 AsyncCallback errCode : '
- + JSON.stringify(err) + " data: " + JSON.stringify(data));
- expect(err.code != 0).assertTrue();
- done();
- })
- })
-
- /*
- * @tc.number SUB_AA_OpenHarmony_MissionManager_4700
- * @tc.name Interface parameter null and floating point number
- * @tc.desc Function test
- * @tc.level 0
- */
- it('SUB_AA_OpenHarmony_MissionManager_4700', 0, async function (done){
- missionManager.getMissionInfos('', 2.0, (err, data) => {
- console.log('SUB_AA_OpenHarmony_MissionManager_4700 AsyncCallback errCode : '
- + JSON.stringify(err) + " data: " + JSON.stringify(data));
- expect(err.code == 0).assertTrue();
- done();
- })
- })
-
- /*
- * @tc.number SUB_AA_OpenHarmony_MissionManager_4800
- * @tc.name Interface parameter null and null
- * @tc.desc Function test
- * @tc.level 0
- */
- it('SUB_AA_OpenHarmony_MissionManager_4800', 0, async function (done){
- missionManager.getMissionInfos("", "", (err, data) => {
- console.log('SUB_AA_OpenHarmony_MissionManager_4800 AsyncCallback errCode : '
- + JSON.stringify(err) + " data: " + JSON.stringify(data));
- done();
- })
- })
-
- /*
- * @tc.number SUB_AA_OpenHarmony_MissionManager_4900
- * @tc.name Interface parameter does not exist and null
- * @tc.desc Function test
- * @tc.level 0
- */
- it('SUB_AA_OpenHarmony_MissionManager_4900', 0, async function (done){
- missionManager.getMissionInfos("bbbb", "", (err, data) => {
- console.log('SUB_AA_OpenHarmony_MissionManager_4900 AsyncCallback errCode : '
- + JSON.stringify(err) + " data: " + JSON.stringify(data));
- expect(err.code != 0).assertTrue();
- done();
- })
- })
-
- /*
- * @tc.number SUB_AA_OpenHarmony_MissionManager_5000
- * @tc.name Interface parameter does not exist and 1
- * @tc.desc Function test
- * @tc.level 0
- */
- it('SUB_AA_OpenHarmony_MissionManager_5000', 0, async function (done){
- missionManager.getMissionInfos("", 1, (err, data) => {
- console.log('SUB_AA_OpenHarmony_MissionManager_5000 AsyncCallback errCode : '
- + JSON.stringify(err) + " data: " + JSON.stringify(data));
- expect(err.code != 0).assertTrue();
- done();
- })
- })
-
- /*
- * @tc.number SUB_AA_OpenHarmony_MissionManager_5100
- * @tc.name Interface parameter null and null
- * @tc.desc Function test
- * @tc.level 0
- */
- it('SUB_AA_OpenHarmony_MissionManager_5100', 0, async function (done){
- missionManager.getMissionInfos("", "", (err, data) => {
- console.log('SUB_AA_OpenHarmony_MissionManager_5100 AsyncCallback errCode : '
- + JSON.stringify(err) + " data: " + JSON.stringify(data));
- done();
- })
- })
-
- /*
- * @tc.number SUB_AA_OpenHarmony_MissionManager_5200
- * @tc.name Interface parameter null and id
- * @tc.desc Function test
- * @tc.level 0
- */
- it('SUB_AA_OpenHarmony_MissionManager_5200', 0, async function (done){
- var id = 65024;
- missionManager.getMissionInfos("", id, (err, data) => {
- console.log('SUB_AA_OpenHarmony_MissionManager_5200 AsyncCallback errCode : '
- + JSON.stringify(err) + " data: " + JSON.stringify(data));
- expect(err.code != 0).assertTrue();
- done();
- })
- })
-
- /*
- * @tc.number SUB_AA_OpenHarmony_MissionManager_5300
- * @tc.name Interface parameter null and null
- * @tc.desc Function test
- * @tc.level 0
- */
- it('SUB_AA_OpenHarmony_MissionManager_5300', 0, async function (done) {
- missionManager.getMissionInfo('', '', (err, data) => {
- console.log('SUB_AA_OpenHarmony_MissionManager_5300 AsyncCallback errCode ##: '
- + JSON.stringify(err) + " data: " + JSON.stringify(data));
- expect(err.code != 0).assertTrue();
- done();
- })
- })
-
- /*
- * @tc.number SUB_AA_OpenHarmony_MissionManager_5400
- * @tc.name Interface parameter null and string
- * @tc.desc Function test
- * @tc.level 0
- */
- it('SUB_AA_OpenHarmony_MissionManager_5400', 0, async function (done) {
- missionManager.getMissionInfo('', "aa", (err, data) => {
- console.log('SUB_AA_OpenHarmony_MissionManager_5400 AsyncCallback errCode ##: '
- + JSON.stringify(err) + " data: " + JSON.stringify(data));
- expect(err.code != 0).assertTrue();
- done();
- })
- })
-
- /*
- * @tc.number SUB_AA_OpenHarmony_MissionManager_5500
- * @tc.name Interface parameter null and float
- * @tc.desc Function test
- * @tc.level 0
- */
- it('SUB_AA_OpenHarmony_MissionManager_5500', 0, async function (done){
- missionManager.getMissionInfos("", 2.0, (err, data) => {
- console.log('SUB_AA_OpenHarmony_MissionManager_5500 AsyncCallback errCode : '
- + JSON.stringify(err) + " data: " + JSON.stringify(data));
- done();
- })
- })
-
- /*
- * @tc.number SUB_AA_OpenHarmony_MissionManager_5600
- * @tc.name Interface parameter undefined
- * @tc.desc Function test
- * @tc.level 0
- */
- it('SUB_AA_OpenHarmony_MissionManager_5600', 0, async function (done) {
- let object = undefined
- var result = missionManager.registerMissionListener(object);
- console.log('SUB_AA_OpenHarmony_MissionManager_5600 result ###' + JSON.stringify(result));
- expect(result != undefined).assertTrue();
- done();
- })
-
- /*
- * @tc.number SUB_AA_OpenHarmony_MissionManager_5700
- * @tc.name Interface parameter Empty object
- * @tc.desc Function test
- * @tc.level 0
- */
- it('SUB_AA_OpenHarmony_MissionManager_5700', 0, async function (done) {
- let object = {}
- var result = missionManager.registerMissionListener(object);
- console.log('SUB_AA_OpenHarmony_MissionManager_5700 result ### ' + JSON.stringify(object));
- console.log('SUB_AA_OpenHarmony_MissionManager_5700 result ### ' + JSON.stringify(result));
- expect(result != undefined).assertTrue();
- done();
- })
-
- /*
- * @tc.number SUB_AA_OpenHarmony_MissionManager_5800
- * @tc.name Multiple registration listening
- * @tc.desc Function test
- * @tc.level 0
- */
- it('SUB_AA_OpenHarmony_MissionManager_5800', 0, async function (done){
- for(let i = 0; i< 5; i++){
- result = missionManager.registerMissionListener({
- onMissionCreated:function onMissionCreated(number){
- console.log("SUB_onForegroundApplicationChanged")
- },
- onMissionDestroyed:function onMissionDestroyed(number){
- console.log("SUB_onAbilityStateChanged")
- },
- onMissionSnapshotChanged:function onMissionSnapshotChanged(number){
- console.log("SUB_onProcessCreated")
- },
- onMissionMovedToFront:function onMissionMovedToFront(number){
- console.log("SUB_onProcessDied")
- },
- });
- console.log('SUB_AA_OpenHarmony_MissionManager_5800 result ### ' + JSON.stringify(result));
- expect(result != undefined).assertTrue();
- done();
- }
- })
-
- /*
- * @tc.number SUB_AA_OpenHarmony_MissionManager_5900
- * @tc.name Interface parameter non-existent
- * @tc.desc Function test
- * @tc.level 0
- */
- it('SUB_AA_OpenHarmony_MissionManager_5900', 0, async function (done) {
- console.log("---------start SUB_AA_OpenHarmony_MissionManager_5900------------")
- var id = 44642;
- missionManager.unregisterMissionListener(id, (err, data) => {
- console.log('SUB_AA_OpenHarmony_MissionManager_5900 AsyncCallback errCode : '
- + JSON.stringify(err) + " data: " + JSON.stringify(data));
- expect(err.code == 0).assertTrue();
- done();
- })
- console.log("---------start SUB_AA_OpenHarmony_MissionManager_5900------------")
- })
-
- /*
- * @tc.number SUB_AA_OpenHarmony_MissionManager_6000
- * @tc.name Interface parameter Registered ID
- * @tc.desc Function test
- * @tc.level 0
- */
- it('SUB_AA_OpenHarmony_MissionManager_6000', 0, async function (done){
- missionManager.unregisterMissionListener(result, (err, data) => {
- console.log('SUB_AA_OpenHarmony_MissionManager_6000 AsyncCallback errCode : '
- + JSON.stringify(err) + " data: " + JSON.stringify(data));
- expect(err.code == 0).assertTrue();
- done();
- })
- })
-
- /*
- * @tc.number SUB_AA_OpenHarmony_MissionManager_6100
- * @tc.name Interface parameter Unregistered ID
- * @tc.desc Function test
- * @tc.level 0
- */
- it('SUB_AA_OpenHarmony_MissionManager_6100', 0, async function (done){
- missionManager.unregisterMissionListener(result, (err, data) => {
- console.log('SUB_AA_OpenHarmony_MissionManager_6100 AsyncCallback errCode : '
- + JSON.stringify(err) + " data: " + JSON.stringify(data));
- expect(err.code == 0).assertTrue();
- done();
- })
- })
-
- /*
- * @tc.number SUB_AA_OpenHarmony_MissionManager_6200
- * @tc.name Interface parameter undefined
- * @tc.desc Function test
- * @tc.level 0
- */
- it('SUB_AA_OpenHarmony_MissionManager_6200', 0, async function (done){
- let listenerId = undefined
- missionManager.unregisterMissionListener(listenerId, (err, data) => {
- console.log('SUB_AA_OpenHarmony_MissionManager_6200 AsyncCallback errCode : '
- + JSON.stringify(err) + " data: " + JSON.stringify(data));
- expect(err.code != 0).assertTrue();
- done();
- })
- })
-
- /*
- * @tc.number SUB_AA_OpenHarmony_MissionManager_6300
- * @tc.name Interface parameter null
- * @tc.desc Function test
- * @tc.level 0
- */
- it('SUB_AA_OpenHarmony_MissionManager_6300', 0, async function (done) {
- missionManager.unregisterMissionListener(null, (err, data) => {
- console.log('SUB_AA_OpenHarmony_MissionManager_6300 AsyncCallback errCode : '
- + JSON.stringify(err) + " data: " + JSON.stringify(data));
- expect(err.code != 0).assertTrue();
- done();
- })
- })
-
- /*
- * @tc.number SUB_AA_OpenHarmony_MissionManager_6400
- * @tc.name Interface parameter string
- * @tc.desc Function test
- * @tc.level 0
- */
- it('SUB_AA_OpenHarmony_MissionManager_6400', 0, async function (done){
- missionManager.unregisterMissionListener('cc', (err, data) => {
- console.log('SUB_AA_OpenHarmony_MissionManager_6400 AsyncCallback errCode : '
- + JSON.stringify(err) + " data: " + JSON.stringify(data));
- expect(err.code != 0).assertTrue();
- done();
- })
- })
-
- /*
- * @tc.number SUB_AA_OpenHarmony_MissionManager_6500
- * @tc.name Interface parameter float
- * @tc.desc Function test
- * @tc.level 0
- */
- it('SUB_AA_OpenHarmony_MissionManager_6500', 0, async function (done){
- missionManager.unregisterMissionListener(2.0, (err, data) => {
- console.log('SUB_AA_OpenHarmony_MissionManager_6500 AsyncCallback errCode123123 : '
- + JSON.stringify(err) + " data: " + JSON.stringify(data));
- expect(err.code == 0).assertTrue();
- done();
- })
- })
+// @ts-nocheck
+/*
+ * 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 missionManager from '@ohos.application.missionManager';
+//import ability_featureAbility from '@ohos.ability.featureAbility';
+
+describe('ShiAbilityDisableTest', function () {
+ var result
+ console.log("ShiAbilityDisableTest --- start");
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_MissionManager_4000
+ * @tc.name The interface parameter local id and is 1
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_MissionManager_4000',0, async function (done){
+ missionManager.getMissionInfos("", 1, (err, data) => {
+ console.log('SUB_AA_OpenHarmony_MissionManager_4000 AsyncCallback errCode : '
+ + JSON.stringify(err) + " data: " + JSON.stringify(data));
+ expect(err.code == 0).assertTrue();
+ done();
+ })
+ })
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_MissionManager_4100
+ * @tc.name Interface parameter does not exist and 1
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_MissionManager_4100', 0, async function (done) {
+ missionManager.getMissionInfos("aaaaaa", 1, (err, data) => {
+ console.log('SUB_AA_OpenHarmony_MissionManager_4100 AsyncCallback errCode : '
+ + JSON.stringify(err) + " data: " + JSON.stringify(data));
+ expect(err.code != 0).assertTrue();
+ done();
+ })
+ })
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_MissionManager_4200
+ * @tc.name Interface parameter null and 1
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_MissionManager_4200', 0, async function (done) {
+ missionManager.getMissionInfos('', 1, (err, data) => {
+ console.log('SUB_AA_OpenHarmony_MissionManager_4200 AsyncCallback errCode : '
+ + JSON.stringify(err) + " data: " + JSON.stringify(data));
+ expect(err.code == 0).assertTrue();
+ done();
+ })
+ })
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_MissionManager_4300
+ * @tc.name Interface parameter null and 10
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_MissionManager_4300', 0, async function (done) {
+ missionManager.getMissionInfos('', 10, (err, data) => {
+ console.log('SUB_AA_OpenHarmony_MissionManager_4300 AsyncCallback errCode : '
+ + JSON.stringify(err) + " data: " + JSON.stringify(data));
+ expect(err.code == 0).assertTrue();
+ done();
+ })
+ })
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_MissionManager_4400
+ * @tc.name Interface parameter null and 1000
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_MissionManager_4400', 0, async function (done){
+ missionManager.getMissionInfos('', 1000, (err, data) => {
+ console.log('SUB_AA_OpenHarmony_MissionManager_4400 AsyncCallback errCode : '
+ + JSON.stringify(err) + " data: " + JSON.stringify(data));
+ expect(err.code == 0).assertTrue();
+ done();
+ })
+ })
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_MissionManager_4500
+ * @tc.name Interface parameter null and null
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_MissionManager_4500', 0, async function (done){
+ missionManager.getMissionInfos("", "", (err, data) => {
+ console.log('SUB_AA_OpenHarmony_MissionManager_4500 AsyncCallback errCode : '
+ + JSON.stringify(err) + " data: " + JSON.stringify(data));
+ expect(err.code != 0).assertTrue();
+ done();
+ })
+ })
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_MissionManager_4600
+ * @tc.name Interface parameter null and string 1
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_MissionManager_4600', 0, async function (done){
+ missionManager.getMissionInfos("", "1", (err, data) => {
+ console.log('SUB_AA_OpenHarmony_MissionManager_4600 AsyncCallback errCode : '
+ + JSON.stringify(err) + " data: " + JSON.stringify(data));
+ expect(err.code != 0).assertTrue();
+ done();
+ })
+ })
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_MissionManager_4700
+ * @tc.name Interface parameter null and floating point number
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_MissionManager_4700', 0, async function (done){
+ missionManager.getMissionInfos('', 2.0, (err, data) => {
+ console.log('SUB_AA_OpenHarmony_MissionManager_4700 AsyncCallback errCode : '
+ + JSON.stringify(err) + " data: " + JSON.stringify(data));
+ expect(err.code == 0).assertTrue();
+ done();
+ })
+ })
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_MissionManager_4800
+ * @tc.name Interface parameter null and null
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_MissionManager_4800', 0, async function (done){
+ missionManager.getMissionInfos("", "", (err, data) => {
+ console.log('SUB_AA_OpenHarmony_MissionManager_4800 AsyncCallback errCode : '
+ + JSON.stringify(err) + " data: " + JSON.stringify(data));
+ done();
+ })
+ })
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_MissionManager_4900
+ * @tc.name Interface parameter does not exist and null
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_MissionManager_4900', 0, async function (done){
+ missionManager.getMissionInfos("bbbb", "", (err, data) => {
+ console.log('SUB_AA_OpenHarmony_MissionManager_4900 AsyncCallback errCode : '
+ + JSON.stringify(err) + " data: " + JSON.stringify(data));
+ expect(err.code != 0).assertTrue();
+ done();
+ })
+ })
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_MissionManager_5000
+ * @tc.name Interface parameter does not exist and 1
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_MissionManager_5000', 0, async function (done){
+ missionManager.getMissionInfos("", 1, (err, data) => {
+ console.log('SUB_AA_OpenHarmony_MissionManager_5000 AsyncCallback errCode : '
+ + JSON.stringify(err) + " data: " + JSON.stringify(data));
+ expect(err.code != 0).assertTrue();
+ done();
+ })
+ })
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_MissionManager_5100
+ * @tc.name Interface parameter null and null
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_MissionManager_5100', 0, async function (done){
+ missionManager.getMissionInfos("", "", (err, data) => {
+ console.log('SUB_AA_OpenHarmony_MissionManager_5100 AsyncCallback errCode : '
+ + JSON.stringify(err) + " data: " + JSON.stringify(data));
+ done();
+ })
+ })
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_MissionManager_5200
+ * @tc.name Interface parameter null and id
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_MissionManager_5200', 0, async function (done){
+ var id = 65024;
+ missionManager.getMissionInfos("", id, (err, data) => {
+ console.log('SUB_AA_OpenHarmony_MissionManager_5200 AsyncCallback errCode : '
+ + JSON.stringify(err) + " data: " + JSON.stringify(data));
+ expect(err.code != 0).assertTrue();
+ done();
+ })
+ })
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_MissionManager_5300
+ * @tc.name Interface parameter null and null
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_MissionManager_5300', 0, async function (done) {
+ missionManager.getMissionInfo('', '', (err, data) => {
+ console.log('SUB_AA_OpenHarmony_MissionManager_5300 AsyncCallback errCode ##: '
+ + JSON.stringify(err) + " data: " + JSON.stringify(data));
+ expect(err.code != 0).assertTrue();
+ done();
+ })
+ })
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_MissionManager_5400
+ * @tc.name Interface parameter null and string
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_MissionManager_5400', 0, async function (done) {
+ missionManager.getMissionInfo('', "aa", (err, data) => {
+ console.log('SUB_AA_OpenHarmony_MissionManager_5400 AsyncCallback errCode ##: '
+ + JSON.stringify(err) + " data: " + JSON.stringify(data));
+ expect(err.code != 0).assertTrue();
+ done();
+ })
+ })
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_MissionManager_5500
+ * @tc.name Interface parameter null and float
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_MissionManager_5500', 0, async function (done){
+ missionManager.getMissionInfos("", 2.0, (err, data) => {
+ console.log('SUB_AA_OpenHarmony_MissionManager_5500 AsyncCallback errCode : '
+ + JSON.stringify(err) + " data: " + JSON.stringify(data));
+ done();
+ })
+ })
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_MissionManager_5600
+ * @tc.name Interface parameter undefined
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_MissionManager_5600', 0, async function (done) {
+ let object = undefined
+ var result = missionManager.registerMissionListener(object);
+ console.log('SUB_AA_OpenHarmony_MissionManager_5600 result ###' + JSON.stringify(result));
+ expect(result != undefined).assertTrue();
+ done();
+ })
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_MissionManager_5700
+ * @tc.name Interface parameter Empty object
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_MissionManager_5700', 0, async function (done) {
+ let object = {}
+ var result = missionManager.registerMissionListener(object);
+ console.log('SUB_AA_OpenHarmony_MissionManager_5700 result ### ' + JSON.stringify(object));
+ console.log('SUB_AA_OpenHarmony_MissionManager_5700 result ### ' + JSON.stringify(result));
+ expect(result != undefined).assertTrue();
+ done();
+ })
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_MissionManager_5800
+ * @tc.name Multiple registration listening
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_MissionManager_5800', 0, async function (done){
+ for(let i = 0; i< 5; i++){
+ result = missionManager.registerMissionListener({
+ onMissionCreated:function onMissionCreated(number){
+ console.log("SUB_onForegroundApplicationChanged")
+ },
+ onMissionDestroyed:function onMissionDestroyed(number){
+ console.log("SUB_onAbilityStateChanged")
+ },
+ onMissionSnapshotChanged:function onMissionSnapshotChanged(number){
+ console.log("SUB_onProcessCreated")
+ },
+ onMissionMovedToFront:function onMissionMovedToFront(number){
+ console.log("SUB_onProcessDied")
+ },
+ });
+ console.log('SUB_AA_OpenHarmony_MissionManager_5800 result ### ' + JSON.stringify(result));
+ expect(result != undefined).assertTrue();
+ done();
+ }
+ })
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_MissionManager_5900
+ * @tc.name Interface parameter non-existent
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_MissionManager_5900', 0, async function (done) {
+ console.log("---------start SUB_AA_OpenHarmony_MissionManager_5900------------")
+ var id = 44642;
+ missionManager.unregisterMissionListener(id, (err, data) => {
+ console.log('SUB_AA_OpenHarmony_MissionManager_5900 AsyncCallback errCode : '
+ + JSON.stringify(err) + " data: " + JSON.stringify(data));
+ expect(err.code == 0).assertTrue();
+ done();
+ })
+ console.log("---------start SUB_AA_OpenHarmony_MissionManager_5900------------")
+ })
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_MissionManager_6000
+ * @tc.name Interface parameter Registered ID
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_MissionManager_6000', 0, async function (done){
+ missionManager.unregisterMissionListener(result, (err, data) => {
+ console.log('SUB_AA_OpenHarmony_MissionManager_6000 AsyncCallback errCode : '
+ + JSON.stringify(err) + " data: " + JSON.stringify(data));
+ expect(err.code == 0).assertTrue();
+ done();
+ })
+ })
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_MissionManager_6100
+ * @tc.name Interface parameter Unregistered ID
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_MissionManager_6100', 0, async function (done){
+ missionManager.unregisterMissionListener(result, (err, data) => {
+ console.log('SUB_AA_OpenHarmony_MissionManager_6100 AsyncCallback errCode : '
+ + JSON.stringify(err) + " data: " + JSON.stringify(data));
+ expect(err.code == 0).assertTrue();
+ done();
+ })
+ })
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_MissionManager_6200
+ * @tc.name Interface parameter undefined
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_MissionManager_6200', 0, async function (done){
+ let listenerId = undefined
+ missionManager.unregisterMissionListener(listenerId, (err, data) => {
+ console.log('SUB_AA_OpenHarmony_MissionManager_6200 AsyncCallback errCode : '
+ + JSON.stringify(err) + " data: " + JSON.stringify(data));
+ expect(err.code != 0).assertTrue();
+ done();
+ })
+ })
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_MissionManager_6300
+ * @tc.name Interface parameter null
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_MissionManager_6300', 0, async function (done) {
+ missionManager.unregisterMissionListener(null, (err, data) => {
+ console.log('SUB_AA_OpenHarmony_MissionManager_6300 AsyncCallback errCode : '
+ + JSON.stringify(err) + " data: " + JSON.stringify(data));
+ expect(err.code != 0).assertTrue();
+ done();
+ })
+ })
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_MissionManager_6400
+ * @tc.name Interface parameter string
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_MissionManager_6400', 0, async function (done){
+ missionManager.unregisterMissionListener('cc', (err, data) => {
+ console.log('SUB_AA_OpenHarmony_MissionManager_6400 AsyncCallback errCode : '
+ + JSON.stringify(err) + " data: " + JSON.stringify(data));
+ expect(err.code != 0).assertTrue();
+ done();
+ })
+ })
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_MissionManager_6500
+ * @tc.name Interface parameter float
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_MissionManager_6500', 0, async function (done){
+ missionManager.unregisterMissionListener(2.0, (err, data) => {
+ console.log('SUB_AA_OpenHarmony_MissionManager_6500 AsyncCallback errCode123123 : '
+ + JSON.stringify(err) + " data: " + JSON.stringify(data));
+ expect(err.code == 0).assertTrue();
+ done();
+ })
+ })
})
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/fa/fa_taskmanager_test/entry/src/main/resources/base/element/string.json b/aafwk/aafwk_standard/fa/fa_taskmanager_test/entry/src/main/resources/base/element/string.json
index 7603e007f331127abbcf51ca1e3c29315ea030f9..d5f23d474196105fed5066b5163326fc606cf6b2 100644
--- a/aafwk/aafwk_standard/fa/fa_taskmanager_test/entry/src/main/resources/base/element/string.json
+++ b/aafwk/aafwk_standard/fa/fa_taskmanager_test/entry/src/main/resources/base/element/string.json
@@ -1,44 +1,44 @@
-{
- "string": [
- {
- "name": "entry_MainAbility",
- "value": "entry_MainAbility"
- },
- {
- "name": "description_mainability",
- "value": "JS_Empty Ability"
- },
- {
- "name": "description_mainability2",
- "value": "JS_Empty Ability"
- },
- {
- "name": "entry_MainAbility2",
- "value": "entry_MainAbility2"
- },
- {
- "name": "description_mainability3",
- "value": "JS_Empty Ability"
- },
- {
- "name": "entry_MainAbility3",
- "value": "entry_MainAbility3"
- },
- {
- "name": "description_mainability4",
- "value": "JS_Empty Ability"
- },
- {
- "name": "entry_MainAbility4",
- "value": "entry_MainAbility4"
- },
- {
- "name": "description_mainability5",
- "value": "JS_Empty Ability"
- },
- {
- "name": "entry_MainAbility5",
- "value": "entry_MainAbility5"
- }
- ]
+{
+ "string": [
+ {
+ "name": "entry_MainAbility",
+ "value": "entry_MainAbility"
+ },
+ {
+ "name": "description_mainability",
+ "value": "JS_Empty Ability"
+ },
+ {
+ "name": "description_mainability2",
+ "value": "JS_Empty Ability"
+ },
+ {
+ "name": "entry_MainAbility2",
+ "value": "entry_MainAbility2"
+ },
+ {
+ "name": "description_mainability3",
+ "value": "JS_Empty Ability"
+ },
+ {
+ "name": "entry_MainAbility3",
+ "value": "entry_MainAbility3"
+ },
+ {
+ "name": "description_mainability4",
+ "value": "JS_Empty Ability"
+ },
+ {
+ "name": "entry_MainAbility4",
+ "value": "entry_MainAbility4"
+ },
+ {
+ "name": "description_mainability5",
+ "value": "JS_Empty Ability"
+ },
+ {
+ "name": "entry_MainAbility5",
+ "value": "entry_MainAbility5"
+ }
+ ]
}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/fa/fa_taskswiting_test/BUILD.gn b/aafwk/aafwk_standard/fa/fa_taskswiting_test/BUILD.gn
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_taskswiting_test/Test.json b/aafwk/aafwk_standard/fa/fa_taskswiting_test/Test.json
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/fa/fa_taskswiting_test/entry/src/main/js/test/List.test.js b/aafwk/aafwk_standard/fa/fa_taskswiting_test/entry/src/main/js/test/List.test.js
index 5bc7d34edc2d399bad4e2f4b0ff933ce4990868f..95f7b53fac6d5689aacfb86d390a9c4a0831dcd7 100644
--- a/aafwk/aafwk_standard/fa/fa_taskswiting_test/entry/src/main/js/test/List.test.js
+++ b/aafwk/aafwk_standard/fa/fa_taskswiting_test/entry/src/main/js/test/List.test.js
@@ -1,16 +1,16 @@
-/*
- * 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.
- */
-
+/*
+ * 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.
+ */
+
require('./taskSwitchJsunit.test.js')
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/fa/fa_taskswiting_test/entry/src/main/js/test/taskSwitchJsunit.test.js b/aafwk/aafwk_standard/fa/fa_taskswiting_test/entry/src/main/js/test/taskSwitchJsunit.test.js
index ea84d2ef6625e3c1f54c0c07c5a6cd880308a503..c60d35c1775062467626ed726135c0a469abce04 100644
--- a/aafwk/aafwk_standard/fa/fa_taskswiting_test/entry/src/main/js/test/taskSwitchJsunit.test.js
+++ b/aafwk/aafwk_standard/fa/fa_taskswiting_test/entry/src/main/js/test/taskSwitchJsunit.test.js
@@ -1,338 +1,338 @@
-// @ts-nocheck
-/*
- * 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, expect, it} from 'deccjsunit/index'
-import missionManager from '@ohos.application.missionManager'
-import featureAbility from '@ohos.ability.featureability'
-
-describe("taskSwitchTest", function() {
- console.log("------------------ taskSwitchTest is starting ------------------");
-
- var TAG = "";
-
- /*
- * @tc.number SUB_AA_OpenHarmony_MoveMissionToFront_0100
- * @tc.name Switching the mission in the launcherlist to the foreground is not supported
- * @tc.desc Function test
- * @tc.level 0
- */
- it('SUB_AA_OpenHarmony_MoveMissionToFront_0100', 0, async function (done) {
- console.log("------------start SUB_AA_OpenHarmony_MoveMissionToFront_0100-------------");
- var missionId = 1;
- try {
- missionManager.moveMissionToFront(missionId, (error, data) => {
- console.log("SUB_AA_OpenHarmony_MoveMissionToFront_0100 error: " +
- JSON.stringify(error) + ", data: " + JSON.stringify(data));
- expect(error.code == 2097181).assertTrue();
- done();
- })
- } catch(error) {
- console.log("SUB_AA_OpenHarmony_MoveMissionToFront_0100: error " + error);
- }
- console.log("------------end SUB_AA_OpenHarmony_MoveMissionToFront_0100-------------");
- });
-
- /*
- * @tc.number SUB_AA_OpenHarmony_MoveMissionToFront_2400
- * @tc.name The input parameter missionid of movemissiontorfront is undefined
- * @tc.desc Function test
- * @tc.level 0
- */
- it('SUB_AA_OpenHarmony_MoveMissionToFront_2400', 0, async function (done) {
- console.log("------------start SUB_AA_OpenHarmony_MoveMissionToFront_2400-------------");
- var missionId = undefined;
- try {
- missionManager.moveMissionToFront(missionId, (error, data) => {
- console.log("SUB_AA_OpenHarmony_MoveMissionToFront_2400 error: " +
- JSON.stringify(error) + ", data: " + JSON.stringify(data));
- expect(error.code == -1).assertTrue();
- done();
- })
- } catch(error) {
- console.log("SUB_AA_OpenHarmony_MoveMissionToFront_2400: error " + error);
- }
- console.log("------------end SUB_AA_OpenHarmony_MoveMissionToFront_2400-------------");
- });
-
- /*
- * @tc.number SUB_AA_OpenHarmony_MoveMissionToFront_2500
- * @tc.name The input parameter missionid of movemissiontorfront is an ID that does not exist
- * @tc.desc Function test
- * @tc.level 0
- */
- it('SUB_AA_OpenHarmony_MoveMissionToFront_2500', 0, async function (done) {
- console.log("------------start SUB_AA_OpenHarmony_MoveMissionToFront_2500-------------");
- var missionId = -1;
- try {
- missionManager.moveMissionToFront(missionId, (error, data) => {
- console.log("SUB_AA_OpenHarmony_MoveMissionToFront_2500 error: " +
- JSON.stringify(error) + ", data: " + JSON.stringify(data));
- expect(error.code == 2097181).assertTrue();
- done();
- })
- } catch(error) {
- console.log("SUB_AA_OpenHarmony_MoveMissionToFront_2500: error " + error);
- }
- console.log("------------end SUB_AA_OpenHarmony_MoveMissionToFront_2500-------------");
- });
-
- /*
- * @tc.number SUB_AA_OpenHarmony_MoveMissionToFront_2600
- * @tc.name The input parameter missionid of movemissiontorfront is a number of type string
- * @tc.desc Function test
- * @tc.level 0
- */
- it('SUB_AA_OpenHarmony_MoveMissionToFront_2600', 0, async function (done) {
- console.log("------------start SUB_AA_OpenHarmony_MoveMissionToFront_2600-------------");
- var missionId = "2";
- try {
- missionManager.moveMissionToFront(missionId, (error, data) => {
- console.log("SUB_AA_OpenHarmony_MoveMissionToFront_2600 error: " +
- JSON.stringify(error) + ", data: " + JSON.stringify(data));
- expect(error.code == -1).assertTrue();
- done();
- })
- } catch(error) {
- console.log("SUB_AA_OpenHarmony_MoveMissionToFront_2600: error " + error);
- }
- console.log("------------end SUB_AA_OpenHarmony_MoveMissionToFront_2600-------------");
- });
-
- /*
- * @tc.number SUB_AA_OpenHarmony_MoveMissionToFront_2700
- * @tc.name The input parameter missionid of movemissiontorfront is a non numeric string
- * @tc.desc Function test
- * @tc.level 0
- */
- it('SUB_AA_OpenHarmony_MoveMissionToFront_2700', 0, async function (done) {
- console.log("------------start SUB_AA_OpenHarmony_MoveMissionToFront_2700-------------");
- var missionId = "aa";
- try {
- missionManager.moveMissionToFront(missionId, (error, data) => {
- console.log("SUB_AA_OpenHarmony_MoveMissionToFront_2700 error: " +
- JSON.stringify(error) + ", data: " + JSON.stringify(data));
- expect(error.code == -1).assertTrue();
- done();
- })
- } catch(error) {
- console.log("SUB_AA_OpenHarmony_MoveMissionToFront_2700: error " + error);
- }
- console.log("------------end SUB_AA_OpenHarmony_MoveMissionToFront_2700-------------");
- });
-
- /*
- * @tc.number SUB_AA_OpenHarmony_MoveMissionToFront_1900
- * @tc.name Switching the mission in the launcherlist to the foreground is not supported
- * @tc.desc Function test
- * @tc.level 0
- */
- it('SUB_AA_OpenHarmony_MoveMissionToFront_1900', 0, async function (done) {
- console.log("------------start SUB_AA_OpenHarmony_MoveMissionToFront_1900-------------");
- TAG = "SUB_AA_OpenHarmony_MoveMissionToFront_1900"
- var abilityMissionList = []
- var missionid = "";
- var result = missionManager.registerMissionListener({
- onMissionCreated: (missionid) => {
- console.log(TAG + "onMissionCreated callback")
- },
- onMissionDestroyed: (missionid) => {
- console.log(TAG + "onMissionDestroyed callback")
- }
- })
-
- setTimeout(function(){
- featureAbility.startAbility({
- want: {
- bundleName: "com.example.taskswitching",
- abilityName: "com.example.taskswitching.MainAbility2"
- }
- }, (error, data) => {
- console.log(TAG + " startAbility success, error: "
- + JSON.stringify(error) + ", data: " + JSON.stringify(data));
- });
- }, 2000)
-
- setTimeout(function(){
- missionManager.getMissionInfos("", 20, (error, data) => {
- console.log(TAG + "Emtry MainAbility getMissionInfos success, error: "
- + JSON.stringify(error) + ", data: " + JSON.stringify(data));
- for(var i = 0; i {
- console.log(TAG + "Emtry MainAbility clearAllMissions success, error: "
- + JSON.stringify(error) + ", data: " + JSON.stringify(data));
- })
- },3000)
-
- setTimeout(function(){
- console.log(TAG + "result is : " + result)
- expect(result != "").assertTrue();
- done()
- }, 4000);
- console.log("------------end SUB_AA_OpenHarmony_MoveMissionToFront_1900-------------");
- });
-
- /*
- * @tc.number SUB_AA_OpenHarmony_MoveMissionToFront_2000
- * @tc.name Switching the mission in the launcherlist to the foreground is not supported
- * @tc.desc Function test
- * @tc.level 0
- */
- it('SUB_AA_OpenHarmony_MoveMissionToFront_2000', 0, async function (done) {
- console.log("------------start SUB_AA_OpenHarmony_MoveMissionToFront_2000-------------");
- TAG = "SUB_AA_OpenHarmony_MoveMissionToFront_2000"
- var missionid = "";
-
- var result = missionManager.registerMissionListener({
- onMissionSnapshotChanged: (missionid) => {
- console.log(TAG + "onMissionSnaptShotChanged callback")
- }
- })
-
- setTimeout(function() {
- featureAbility.startAbility({
- want: {
- bundleName: "com.example.taskswitching",
- abilityName: "com.example.taskswitching.MainAbility2"
- }
- }, (error, data) => {
- console.log(TAG + " startAbility success, error: "
- + JSON.stringify(error) + ", data: " + JSON.stringify(data));
- });
- }, 3000)
-
- setTimeout(function() {
- console.log(TAG + "result is : " + result)
- expect(result != "").assertTrue();
- done()
- }, 4000)
- console.log("------------end SUB_AA_OpenHarmony_MoveMissionToFront_2000-------------");
- });
-
- /*
- * @tc.number SUB_AA_OpenHarmony_MoveMissionToFront_2100
- * @tc.name Switching the mission in the launcherlist to the foreground is not supported
- * @tc.desc Function test
- * @tc.level 0
- */
- it('SUB_AA_OpenHarmony_MoveMissionToFront_2100', 0, async function (done) {
- console.log("------------start SUB_AA_OpenHarmony_MoveMissionToFront_2100-------------");
- TAG = "SUB_AA_OpenHarmony_MoveMissionToFront_2100"
- var abilityMissionList =[];
- var missionid = "";
-
- var result = missionManager.registerMissionListener({
- onMissionMovedToFront: (missionid) => {
- console.log(TAG + "onMissionMovedToFront callback")
- }
- })
-
- setTimeout(function() {
- featureAbility.startAbility({
- want: {
- bundleName: "com.example.taskswitching",
- abilityName: "com.example.taskswitching.MainAbility2"
- }
- }, (error, data) => {
- console.log(TAG + " startAbility success, error: "
- + JSON.stringify(error) + ", data: " + JSON.stringify(data));
- });
- }, 2000)
-
-
- setTimeout(function(){
- missionManager.getMissionInfos("", 20, (error, data) => {
- console.log(TAG + "Emtry MainAbility getMissionInfos success, error: "
- + JSON.stringify(error) + ", data: " + JSON.stringify(data));
- for(var i = 0; i {
- console.log(TAG + "MainAbility moveMissionToFront success, error: "
- + JSON.stringify(error) + ", data: " + JSON.stringify(data));
- });
- }, 4000)
-
- setTimeout(function() {
- console.log(TAG + "result is : " + result)
- expect(result != "").assertTrue();
- done()
- }, 4500)
- console.log("------------end SUB_AA_OpenHarmony_MoveMissionToFront_2100-------------");
- });
-
-
- /*
- * @tc.number SUB_AA_OpenHarmony_MoveMissionToFront_2900
- * @tc.name Switching the mission in the launcherlist to the foreground is not supported
- * @tc.desc Function test
- * @tc.level 0
- */
- it('SUB_AA_OpenHarmony_MoveMissionToFront_2900', 0, async function (done) {
- console.log("------------start SUB_AA_OpenHarmony_MoveMissionToFront_2900-------------");
- TAG = "SUB_AA_OpenHarmony_MoveMissionToFront_2900"
- var abilityMissionList = [];
- setTimeout(function(){
- featureAbility.startAbility({
- want: {
- bundleName : "com.example.taskswitching",
- abilityName : "com.example.taskswitching.MainAbility2"
- }
- }, (error, data) => {
- console.log(TAG + " startAbility success, error: "
- + JSON.stringify(error) + ", data: " + JSON.stringify(data));
- });
- }, 1000);
-
- setTimeout(function(){
- missionManager.getMissionInfos("", 20, (error, data) => {
- console.log(TAG + "Emtry MainAbility2 getMissionInfos success, error: "
- + JSON.stringify(error) + ", data: " + JSON.stringify(data));
-
- for(var i = 0; i {
- console.log(TAG + "getMissionSnapShot success, err: "
- + JSON.stringify(err) + ", data: " + JSON.stringify(data))
- expect(JSON.stringify(data.ability.bundleName) == "com.example.taskswitching")
- done()
- })
- }, 4000)
- console.log("------------end SUB_AA_OpenHarmony_MoveMissionToFront_2900-------------");
- });
-
- console.log("------------------ taskSwitchTest is end ------------------");
-})
+// @ts-nocheck
+/*
+ * 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, expect, it} from 'deccjsunit/index'
+import missionManager from '@ohos.application.missionManager'
+import featureAbility from '@ohos.ability.featureability'
+
+describe("taskSwitchTest", function() {
+ console.log("------------------ taskSwitchTest is starting ------------------");
+
+ var TAG = "";
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_MoveMissionToFront_0100
+ * @tc.name Switching the mission in the launcherlist to the foreground is not supported
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_MoveMissionToFront_0100', 0, async function (done) {
+ console.log("------------start SUB_AA_OpenHarmony_MoveMissionToFront_0100-------------");
+ var missionId = 1;
+ try {
+ missionManager.moveMissionToFront(missionId, (error, data) => {
+ console.log("SUB_AA_OpenHarmony_MoveMissionToFront_0100 error: " +
+ JSON.stringify(error) + ", data: " + JSON.stringify(data));
+ expect(error.code == 2097181).assertTrue();
+ done();
+ })
+ } catch(error) {
+ console.log("SUB_AA_OpenHarmony_MoveMissionToFront_0100: error " + error);
+ }
+ console.log("------------end SUB_AA_OpenHarmony_MoveMissionToFront_0100-------------");
+ });
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_MoveMissionToFront_2400
+ * @tc.name The input parameter missionid of movemissiontorfront is undefined
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_MoveMissionToFront_2400', 0, async function (done) {
+ console.log("------------start SUB_AA_OpenHarmony_MoveMissionToFront_2400-------------");
+ var missionId = undefined;
+ try {
+ missionManager.moveMissionToFront(missionId, (error, data) => {
+ console.log("SUB_AA_OpenHarmony_MoveMissionToFront_2400 error: " +
+ JSON.stringify(error) + ", data: " + JSON.stringify(data));
+ expect(error.code == -1).assertTrue();
+ done();
+ })
+ } catch(error) {
+ console.log("SUB_AA_OpenHarmony_MoveMissionToFront_2400: error " + error);
+ }
+ console.log("------------end SUB_AA_OpenHarmony_MoveMissionToFront_2400-------------");
+ });
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_MoveMissionToFront_2500
+ * @tc.name The input parameter missionid of movemissiontorfront is an ID that does not exist
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_MoveMissionToFront_2500', 0, async function (done) {
+ console.log("------------start SUB_AA_OpenHarmony_MoveMissionToFront_2500-------------");
+ var missionId = -1;
+ try {
+ missionManager.moveMissionToFront(missionId, (error, data) => {
+ console.log("SUB_AA_OpenHarmony_MoveMissionToFront_2500 error: " +
+ JSON.stringify(error) + ", data: " + JSON.stringify(data));
+ expect(error.code == 2097181).assertTrue();
+ done();
+ })
+ } catch(error) {
+ console.log("SUB_AA_OpenHarmony_MoveMissionToFront_2500: error " + error);
+ }
+ console.log("------------end SUB_AA_OpenHarmony_MoveMissionToFront_2500-------------");
+ });
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_MoveMissionToFront_2600
+ * @tc.name The input parameter missionid of movemissiontorfront is a number of type string
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_MoveMissionToFront_2600', 0, async function (done) {
+ console.log("------------start SUB_AA_OpenHarmony_MoveMissionToFront_2600-------------");
+ var missionId = "2";
+ try {
+ missionManager.moveMissionToFront(missionId, (error, data) => {
+ console.log("SUB_AA_OpenHarmony_MoveMissionToFront_2600 error: " +
+ JSON.stringify(error) + ", data: " + JSON.stringify(data));
+ expect(error.code == -1).assertTrue();
+ done();
+ })
+ } catch(error) {
+ console.log("SUB_AA_OpenHarmony_MoveMissionToFront_2600: error " + error);
+ }
+ console.log("------------end SUB_AA_OpenHarmony_MoveMissionToFront_2600-------------");
+ });
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_MoveMissionToFront_2700
+ * @tc.name The input parameter missionid of movemissiontorfront is a non numeric string
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_MoveMissionToFront_2700', 0, async function (done) {
+ console.log("------------start SUB_AA_OpenHarmony_MoveMissionToFront_2700-------------");
+ var missionId = "aa";
+ try {
+ missionManager.moveMissionToFront(missionId, (error, data) => {
+ console.log("SUB_AA_OpenHarmony_MoveMissionToFront_2700 error: " +
+ JSON.stringify(error) + ", data: " + JSON.stringify(data));
+ expect(error.code == -1).assertTrue();
+ done();
+ })
+ } catch(error) {
+ console.log("SUB_AA_OpenHarmony_MoveMissionToFront_2700: error " + error);
+ }
+ console.log("------------end SUB_AA_OpenHarmony_MoveMissionToFront_2700-------------");
+ });
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_MoveMissionToFront_1900
+ * @tc.name Switching the mission in the launcherlist to the foreground is not supported
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_MoveMissionToFront_1900', 0, async function (done) {
+ console.log("------------start SUB_AA_OpenHarmony_MoveMissionToFront_1900-------------");
+ TAG = "SUB_AA_OpenHarmony_MoveMissionToFront_1900"
+ var abilityMissionList = []
+ var missionid = "";
+ var result = missionManager.registerMissionListener({
+ onMissionCreated: (missionid) => {
+ console.log(TAG + "onMissionCreated callback")
+ },
+ onMissionDestroyed: (missionid) => {
+ console.log(TAG + "onMissionDestroyed callback")
+ }
+ })
+
+ setTimeout(function(){
+ featureAbility.startAbility({
+ want: {
+ bundleName: "com.example.taskswitching",
+ abilityName: "com.example.taskswitching.MainAbility2"
+ }
+ }, (error, data) => {
+ console.log(TAG + " startAbility success, error: "
+ + JSON.stringify(error) + ", data: " + JSON.stringify(data));
+ });
+ }, 2000)
+
+ setTimeout(function(){
+ missionManager.getMissionInfos("", 20, (error, data) => {
+ console.log(TAG + "Emtry MainAbility getMissionInfos success, error: "
+ + JSON.stringify(error) + ", data: " + JSON.stringify(data));
+ for(var i = 0; i {
+ console.log(TAG + "Emtry MainAbility clearAllMissions success, error: "
+ + JSON.stringify(error) + ", data: " + JSON.stringify(data));
+ })
+ },3000)
+
+ setTimeout(function(){
+ console.log(TAG + "result is : " + result)
+ expect(result != "").assertTrue();
+ done()
+ }, 4000);
+ console.log("------------end SUB_AA_OpenHarmony_MoveMissionToFront_1900-------------");
+ });
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_MoveMissionToFront_2000
+ * @tc.name Switching the mission in the launcherlist to the foreground is not supported
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_MoveMissionToFront_2000', 0, async function (done) {
+ console.log("------------start SUB_AA_OpenHarmony_MoveMissionToFront_2000-------------");
+ TAG = "SUB_AA_OpenHarmony_MoveMissionToFront_2000"
+ var missionid = "";
+
+ var result = missionManager.registerMissionListener({
+ onMissionSnapshotChanged: (missionid) => {
+ console.log(TAG + "onMissionSnaptShotChanged callback")
+ }
+ })
+
+ setTimeout(function() {
+ featureAbility.startAbility({
+ want: {
+ bundleName: "com.example.taskswitching",
+ abilityName: "com.example.taskswitching.MainAbility2"
+ }
+ }, (error, data) => {
+ console.log(TAG + " startAbility success, error: "
+ + JSON.stringify(error) + ", data: " + JSON.stringify(data));
+ });
+ }, 3000)
+
+ setTimeout(function() {
+ console.log(TAG + "result is : " + result)
+ expect(result != "").assertTrue();
+ done()
+ }, 4000)
+ console.log("------------end SUB_AA_OpenHarmony_MoveMissionToFront_2000-------------");
+ });
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_MoveMissionToFront_2100
+ * @tc.name Switching the mission in the launcherlist to the foreground is not supported
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_MoveMissionToFront_2100', 0, async function (done) {
+ console.log("------------start SUB_AA_OpenHarmony_MoveMissionToFront_2100-------------");
+ TAG = "SUB_AA_OpenHarmony_MoveMissionToFront_2100"
+ var abilityMissionList =[];
+ var missionid = "";
+
+ var result = missionManager.registerMissionListener({
+ onMissionMovedToFront: (missionid) => {
+ console.log(TAG + "onMissionMovedToFront callback")
+ }
+ })
+
+ setTimeout(function() {
+ featureAbility.startAbility({
+ want: {
+ bundleName: "com.example.taskswitching",
+ abilityName: "com.example.taskswitching.MainAbility2"
+ }
+ }, (error, data) => {
+ console.log(TAG + " startAbility success, error: "
+ + JSON.stringify(error) + ", data: " + JSON.stringify(data));
+ });
+ }, 2000)
+
+
+ setTimeout(function(){
+ missionManager.getMissionInfos("", 20, (error, data) => {
+ console.log(TAG + "Emtry MainAbility getMissionInfos success, error: "
+ + JSON.stringify(error) + ", data: " + JSON.stringify(data));
+ for(var i = 0; i {
+ console.log(TAG + "MainAbility moveMissionToFront success, error: "
+ + JSON.stringify(error) + ", data: " + JSON.stringify(data));
+ });
+ }, 4000)
+
+ setTimeout(function() {
+ console.log(TAG + "result is : " + result)
+ expect(result != "").assertTrue();
+ done()
+ }, 4500)
+ console.log("------------end SUB_AA_OpenHarmony_MoveMissionToFront_2100-------------");
+ });
+
+
+ /*
+ * @tc.number SUB_AA_OpenHarmony_MoveMissionToFront_2900
+ * @tc.name Switching the mission in the launcherlist to the foreground is not supported
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it('SUB_AA_OpenHarmony_MoveMissionToFront_2900', 0, async function (done) {
+ console.log("------------start SUB_AA_OpenHarmony_MoveMissionToFront_2900-------------");
+ TAG = "SUB_AA_OpenHarmony_MoveMissionToFront_2900"
+ var abilityMissionList = [];
+ setTimeout(function(){
+ featureAbility.startAbility({
+ want: {
+ bundleName : "com.example.taskswitching",
+ abilityName : "com.example.taskswitching.MainAbility2"
+ }
+ }, (error, data) => {
+ console.log(TAG + " startAbility success, error: "
+ + JSON.stringify(error) + ", data: " + JSON.stringify(data));
+ });
+ }, 1000);
+
+ setTimeout(function(){
+ missionManager.getMissionInfos("", 20, (error, data) => {
+ console.log(TAG + "Emtry MainAbility2 getMissionInfos success, error: "
+ + JSON.stringify(error) + ", data: " + JSON.stringify(data));
+
+ for(var i = 0; i {
+ console.log(TAG + "getMissionSnapShot success, err: "
+ + JSON.stringify(err) + ", data: " + JSON.stringify(data))
+ expect(JSON.stringify(data.ability.bundleName) == "com.example.taskswitching")
+ done()
+ })
+ }, 4000)
+ console.log("------------end SUB_AA_OpenHarmony_MoveMissionToFront_2900-------------");
+ });
+
+ console.log("------------------ taskSwitchTest is end ------------------");
+})
diff --git a/aafwk/aafwk_standard/fa/fa_taskswiting_test/entry/src/main/resources/base/element/string.json b/aafwk/aafwk_standard/fa/fa_taskswiting_test/entry/src/main/resources/base/element/string.json
index 10799b592ad2d98c1aa61071271138fb116a6b96..11ff0c42bfde4360c664ba6bdc1160b85a62e2da 100644
--- a/aafwk/aafwk_standard/fa/fa_taskswiting_test/entry/src/main/resources/base/element/string.json
+++ b/aafwk/aafwk_standard/fa/fa_taskswiting_test/entry/src/main/resources/base/element/string.json
@@ -1,36 +1,36 @@
-{
- "string": [
- {
- "name": "entry_MainAbility",
- "value": "entry_MainAbility"
- },
- {
- "name": "description_mainability",
- "value": "JS_Empty Ability"
- },
- {
- "name": "description_mainability2",
- "value": "JS_Empty Ability"
- },
- {
- "name": "entry_MainAbility2",
- "value": "entry_MainAbility2"
- },
- {
- "name": "description_mainability3",
- "value": "JS_Empty Ability"
- },
- {
- "name": "entry_MainAbility3",
- "value": "entry_MainAbility3"
- },
- {
- "name": "description_mainability4",
- "value": "JS_Empty Ability"
- },
- {
- "name": "entry_MainAbility4",
- "value": "entry_MainAbility4"
- }
- ]
+{
+ "string": [
+ {
+ "name": "entry_MainAbility",
+ "value": "entry_MainAbility"
+ },
+ {
+ "name": "description_mainability",
+ "value": "JS_Empty Ability"
+ },
+ {
+ "name": "description_mainability2",
+ "value": "JS_Empty Ability"
+ },
+ {
+ "name": "entry_MainAbility2",
+ "value": "entry_MainAbility2"
+ },
+ {
+ "name": "description_mainability3",
+ "value": "JS_Empty Ability"
+ },
+ {
+ "name": "entry_MainAbility3",
+ "value": "entry_MainAbility3"
+ },
+ {
+ "name": "description_mainability4",
+ "value": "JS_Empty Ability"
+ },
+ {
+ "name": "entry_MainAbility4",
+ "value": "entry_MainAbility4"
+ }
+ ]
}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/fa/fa_taskswiting_test/signature/openharmony_sx.p7b b/aafwk/aafwk_standard/fa/fa_taskswiting_test/signature/openharmony_sx.p7b
old mode 100644
new mode 100755
diff --git a/aafwk/aafwk_standard/stage/BUILD.gn b/aafwk/aafwk_standard/stage/BUILD.gn
index b6f0b4519e4f797ae5e075d5ccf31c21c9463024..74a30a86d06ebb15d3fd6bcd1b8c6ff4fd4e5cf6 100644
--- a/aafwk/aafwk_standard/stage/BUILD.gn
+++ b/aafwk/aafwk_standard/stage/BUILD.gn
@@ -16,6 +16,9 @@ import("//test/xts/tools/build/suite.gni")
group("stage") {
testonly = true
if (is_standard_system) {
- deps = [ "actsamscontexttest:ActsAmsContextTest" ]
+ deps = [
+ "actsamscontexttest:ActsAmsContextTest",
+ "stageenvchangetest:StageEnvchangeTest",
+ ]
}
}
diff --git a/aafwk/aafwk_standard/stage/stageenvchangetest/BUILD.gn b/aafwk/aafwk_standard/stage/stageenvchangetest/BUILD.gn
new file mode 100644
index 0000000000000000000000000000000000000000..65e2c903157908c380d5216ab5cdbadc8ac05278
--- /dev/null
+++ b/aafwk/aafwk_standard/stage/stageenvchangetest/BUILD.gn
@@ -0,0 +1,32 @@
+# 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("StageEnvchangeTest") {
+ hap_profile = "entry/src/main/config.json"
+ deps = [
+ ":stageenvchangetest_js_assets",
+ ":stageenvchangetest_resources",
+ ]
+ ets2abc = true
+ certificate_profile = "./signature/openharmony_sx.p7b"
+ hap_name = "StageEnvchangeTest"
+}
+ohos_js_assets("stageenvchangetest_js_assets") {
+ source_dir = "entry/src/main/ets/MainAbility"
+}
+ohos_resources("stageenvchangetest_resources") {
+ sources = [ "entry/src/main/resources" ]
+ hap_profile = "entry/src/main/config.json"
+}
diff --git a/aafwk/aafwk_standard/stage/stageenvchangetest/Test.json b/aafwk/aafwk_standard/stage/stageenvchangetest/Test.json
new file mode 100644
index 0000000000000000000000000000000000000000..0bf3a5ae4111f6c41269c0411a3a45b301cc214c
--- /dev/null
+++ b/aafwk/aafwk_standard/stage/stageenvchangetest/Test.json
@@ -0,0 +1,18 @@
+{
+ "description": "Configuration for Ability Tests",
+ "driver": {
+ "type": "JSUnitTest",
+ "test-timeout": "600000",
+ "package": "com.example.etsmyapplication",
+ "shell-timeout": "60000"
+ },
+ "kits": [
+ {
+ "test-file-name": [
+ "StageAbilityTest.hap"
+ ],
+ "type": "AppInstallKit",
+ "cleanup-apps": true
+ }
+ ]
+}
diff --git a/aafwk/aafwk_standard/stage/stageenvchangetest/entry/src/main/config.json b/aafwk/aafwk_standard/stage/stageenvchangetest/entry/src/main/config.json
new file mode 100644
index 0000000000000000000000000000000000000000..70d294b76f6f1023cc908735179f714cf22c8820
--- /dev/null
+++ b/aafwk/aafwk_standard/stage/stageenvchangetest/entry/src/main/config.json
@@ -0,0 +1,97 @@
+{
+ "app": {
+ "bundleName": "com.example.missionmanager",
+ "vendor": "example",
+ "version": {
+ "code": 1000000,
+ "name": "1.0.0"
+ }
+ },
+ "deviceConfig": {},
+ "module": {
+ "package": "com.example.missionmanager",
+ "name": ".MyApplication",
+ "mainAbility": ".MainAbility",
+ "srcPath": "",
+ "deviceType": [
+ "phone"
+ ],
+ "distro": {
+ "deliveryWithInstall": true,
+ "moduleName": "entry",
+ "moduleType": "entry",
+ "installationFree": false
+ },
+ "abilities": [
+ {
+ "skills": [
+ {
+ "entities": [
+ "entity.system.home"
+ ],
+ "actions": [
+ "action.system.home"
+ ]
+ }
+ ],
+ "orientation": "unspecified",
+ "visible": true,
+ "srcPath": "MainAbility",
+ "name": ".MainAbility",
+ "srcLanguage": "ets",
+ "icon": "$media:icon",
+ "description": "$string:description_mainability",
+ "formsEnabled": false,
+ "label": "$string:entry_MainAbility",
+ "type": "page",
+ "launchType": "standard"
+ }
+ ],
+ "js": [
+ {
+ "mode": {
+ "syntax": "ets",
+ "type": "pageAbility"
+ },
+ "pages": [
+ "pages/index",
+ "pages/second"
+ ],
+ "name": ".MainAbility",
+ "window": {
+ "designWidth": 720,
+ "autoDesignWidth": false
+ }
+ }
+ ],
+ "reqPermissions": [
+ {
+ "name": "ohos.permission.GET_BUNDLE_INFO",
+ "reason": "need use ohos.permission.INSTALL_BUNDLE"
+ },
+ {
+ "name": "ohos.permission.MANAGE_MISSIONS"
+ },
+ {
+ "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"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility2/pages/second/second.js b/aafwk/aafwk_standard/stage/stageenvchangetest/entry/src/main/ets/AbilityStage.ts
similarity index 67%
rename from aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility2/pages/second/second.js
rename to aafwk/aafwk_standard/stage/stageenvchangetest/entry/src/main/ets/AbilityStage.ts
index 55c229adf9b349ff9a374f8d91be5b5b31d7c6aa..838e5620b5ee3acdf978759143ce65ded0c102c8 100644
--- a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility2/pages/second/second.js
+++ b/aafwk/aafwk_standard/stage/stageenvchangetest/entry/src/main/ets/AbilityStage.ts
@@ -1,26 +1,23 @@
-/*
- * 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 router from '@system.router'
-
-export default {
- data: {
- title: 'World'
- },
- onclick: function () {
- router.replace({
- uri: "pages/index/index"
- })
- }
-}
+/*
+ * 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 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/stage/stageenvchangetest/entry/src/main/ets/MainAbility/MainAbility.ts b/aafwk/aafwk_standard/stage/stageenvchangetest/entry/src/main/ets/MainAbility/MainAbility.ts
new file mode 100644
index 0000000000000000000000000000000000000000..9aa883e02038b26bbb45ddc6304e27194da220e9
--- /dev/null
+++ b/aafwk/aafwk_standard/stage/stageenvchangetest/entry/src/main/ets/MainAbility/MainAbility.ts
@@ -0,0 +1,49 @@
+/*
+ * 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 Ability from '@ohos.application.Ability'
+
+export default class MainAbility extends Ability {
+
+ onCreate(want, launchParam) {
+ // Ability is creating, initialize resources for this ability
+ console.log("MainAbility onCreate")
+ globalThis.abilityWant = want;
+ globalThis.abilityContext = this.context
+ }
+ 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")
+ windowStage.setUIContent(this.context, "pages/index", null)
+ }
+
+ onWindowStageDestroy() {
+ // Main window is destroyed, release UI related resources
+ console.log("MainAbility onWindowStageDestroy")
+ }
+
+ onForeground() {
+ // Ability has brought to foreground
+ console.log("MainAbility onForeground")
+ }
+
+ onBackground() {
+ // Ability has back to background
+ console.log("MainAbility onBackground")
+ }
+};
diff --git a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility3/pages/second/second.js b/aafwk/aafwk_standard/stage/stageenvchangetest/entry/src/main/ets/MainAbility/app.ets
similarity index 76%
rename from aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility3/pages/second/second.js
rename to aafwk/aafwk_standard/stage/stageenvchangetest/entry/src/main/ets/MainAbility/app.ets
index 55c229adf9b349ff9a374f8d91be5b5b31d7c6aa..cfb9635413551f8ad3434468b138550cbad174d6 100644
--- a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility3/pages/second/second.js
+++ b/aafwk/aafwk_standard/stage/stageenvchangetest/entry/src/main/ets/MainAbility/app.ets
@@ -12,15 +12,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-import router from '@system.router'
-
export default {
- data: {
- title: 'World'
- },
- onclick: function () {
- router.replace({
- uri: "pages/index/index"
- })
- }
-}
+ onCreate() {
+ console.info('Application onCreate')
+ },
+ onDestroy() {
+ console.info('Application onDestroy')
+ },
+}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/stage/stageenvchangetest/entry/src/main/ets/MainAbility/pages/index.ets b/aafwk/aafwk_standard/stage/stageenvchangetest/entry/src/main/ets/MainAbility/pages/index.ets
new file mode 100644
index 0000000000000000000000000000000000000000..3710d45bf9575f1f529b6feaf4cbee9fa3c21bcb
--- /dev/null
+++ b/aafwk/aafwk_standard/stage/stageenvchangetest/entry/src/main/ets/MainAbility/pages/index.ets
@@ -0,0 +1,63 @@
+/*
+ * 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 from "../../test/List.test.ets"
+
+@Entry
+@Component
+struct Index {
+ aboutToAppear() {
+ console.log("start run testcase!!!!1");
+ 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.log('parameters---->' + JSON.stringify(globalThis.abilityWant.parameters));
+
+// configService.setConfig(globalThis.abilityWant.parameters);
+
+ testsuite(globalThis.abilityContext);
+
+ core.execute();
+ }
+ build() {
+ Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) {
+ Text('Hello World 111')
+ .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/stage/stageenvchangetest/entry/src/main/ets/MainAbility/pages/second.ets b/aafwk/aafwk_standard/stage/stageenvchangetest/entry/src/main/ets/MainAbility/pages/second.ets
new file mode 100644
index 0000000000000000000000000000000000000000..93e67fa5f1ec3b4b087d37f046e36f6c0da60b8c
--- /dev/null
+++ b/aafwk/aafwk_standard/stage/stageenvchangetest/entry/src/main/ets/MainAbility/pages/second.ets
@@ -0,0 +1,43 @@
+/*
+ * 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 router from '@system.router';
+
+@Entry
+@Component
+struct Second {
+ private content: string = "Second Page"
+
+ build() {
+ Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) {
+ Text(`${this.content}`)
+ .fontSize(50)
+ .fontWeight(FontWeight.Bold)
+ Button() {
+ Text('back to index')
+ .fontSize(20)
+ .fontWeight(FontWeight.Bold)
+ }.type(ButtonType.Capsule)
+ .margin({
+ top: 20
+ })
+ .backgroundColor('#0D9FFB')
+ .onClick(() => {
+ router.back()
+ })
+ }
+ .width('100%')
+ .height('100%')
+ }
+}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility4/pages/second/second.js b/aafwk/aafwk_standard/stage/stageenvchangetest/entry/src/main/ets/test/List.test.ets
similarity index 66%
rename from aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility4/pages/second/second.js
rename to aafwk/aafwk_standard/stage/stageenvchangetest/entry/src/main/ets/test/List.test.ets
index 55c229adf9b349ff9a374f8d91be5b5b31d7c6aa..998a93af5388fb381f325e80b11f1b9e815026fe 100644
--- a/aafwk/aafwk_standard/fa/fa_configurationconstant_test/entry/src/main/js/MainAbility4/pages/second/second.js
+++ b/aafwk/aafwk_standard/stage/stageenvchangetest/entry/src/main/ets/test/List.test.ets
@@ -1,26 +1,22 @@
-/*
- * 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 router from '@system.router'
-
-export default {
- data: {
- title: 'World'
- },
- onclick: function () {
- router.replace({
- uri: "pages/index/index"
- })
- }
-}
+/*
+ * 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 permisrsions and
+ * limitations under the License.
+ */
+import missionManagerTest from './MissionManager_test.ets'
+
+
+export default function testsuite(context) {
+
+ missionManagerTest(context)
+
+}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/stage/stageenvchangetest/entry/src/main/ets/test/MissionManager_test.ets b/aafwk/aafwk_standard/stage/stageenvchangetest/entry/src/main/ets/test/MissionManager_test.ets
new file mode 100644
index 0000000000000000000000000000000000000000..343ed89efaa8dc138f148e124947bced981c47c9
--- /dev/null
+++ b/aafwk/aafwk_standard/stage/stageenvchangetest/entry/src/main/ets/test/MissionManager_test.ets
@@ -0,0 +1,155 @@
+/*
+ * 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, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index"
+import missionManager from "@ohos.application.missionManager"
+import AbilityConstant from '@ohos.application.AbilityConstant'
+
+
+export default function missionManagerTest(abilityContext) {
+ describe('missionManagerTest', function () {
+ /*
+ * @tc.number SUB_AA_OpenHarmony_AbilityStart_6200
+ * @tc.name Verify the enumeration values abilityContext.config.language
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it("SUB_AA_OpenHarmony_EnvChange_0100", 0, async function (done) {
+ console.info("------------------logMessage SUB_AA_OpenHarmony_EnvChange_0100-------------------");
+ console.info("SUB_AA_OpenHarmony_EnvChange_0100 abilityContext.config.language:" + abilityContext.config.language);
+ expect(abilityContext.config.language=="zh-Hans").assertTrue();
+ done();
+ });
+ /*
+ * @tc.number SUB_AA_OpenHarmony_AbilityStart_6200
+ * @tc.name Call direction to get the direction
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it("SUB_AA_OpenHarmony_EnvChange_0200", 0, async function (done) {
+ console.info("------------------logMessage SUB_AA_OpenHarmony_EnvChange_0200-------------------");
+ console.info("SUB_AA_OpenHarmony_EnvChange_0200 abilityContext.config.direction:" + abilityContext.config.direction);
+ expect(abilityContext.config.direction==0).assertTrue();
+ done();
+ });
+ /*
+ * @tc.number SUB_AA_OpenHarmony_AbilityStart_6200
+ * @tc.name Call direction to get the screenDensity
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it("SUB_AA_OpenHarmony_EnvChange_0300", 0, async function (done) {
+ console.info("------------------logMessage SUB_AA_OpenHarmony_EnvChange_0300-------------------");
+ console.info("SUB_AA_OpenHarmony_EnvChange_0300 abilityContext.config.screenDensity:" + abilityContext.config.screenDensity);
+ expect(abilityContext.config.screenDensity==160).assertTrue();
+ done();
+ });
+ /*
+ * @tc.number SUB_AA_OpenHarmony_EnvChange_0400
+ * @tc.name Call direction to get the displayId
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it("SUB_AA_OpenHarmony_EnvChange_0400", 0, async function (done) {
+ console.info("------------------logMessage SUB_AA_OpenHarmony_EnvChange_0400-------------------");
+ console.info("SUB_AA_OpenHarmony_EnvChange_0400 abilityContext.config.displayId:" + abilityContext.config.displayId);
+ expect(abilityContext.config.displayId==0).assertTrue();
+ done();
+ });
+ /*
+ * @tc.number SUB_AA_OpenHarmony_AbilityStart_6200
+ * @tc.name Verify the enumeration values LaunchReason. CONTINUATION
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it("SUB_AA_OpenHarmony_AbilityStart_6200", 0, async function (done) {
+ console.info("------------------logMessage SUB_AA_OpenHarmony_AbilityStart_6300-------------------");
+ console.info("SUB_AA_OpenHarmony_AbilityStart_6200 LaunchReason.CONTINUATION: " + AbilityConstant.LaunchReason.CONTINUATION);
+ expect(AbilityConstant.LaunchReason.CONTINUATION==3).assertTrue();
+ done();
+ });
+ /*
+ * @tc.number SUB_AA_OpenHarmony_AbilityStart_6300
+ * @tc.name Verify the enumeration value launchreason.start UNKNOWN
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it("SUB_AA_OpenHarmony_AbilityStart_6300", 0, async function (done) {
+ console.info("------------------logMessage SUB_AA_OpenHarmony_AbilityStart_6300-------------------");
+ console.info("SUB_AA_OpenHarmony_AbilityStart_6300 LaunchReason.UNKNOWN: " + AbilityConstant.LaunchReason.UNKNOWN);
+ expect(AbilityConstant.LaunchReason.UNKNOWN==0).assertTrue();
+ done();
+ });
+ /*
+ * @tc.number SUB_AA_OpenHarmony_AbilityStart_6400
+ * @tc.name Verify the enumeration value launchreason.START_ABILITY
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it("SUB_AA_OpenHarmony_AbilityStart_6400", 0, async function (done) {
+ console.info("------------------logMessage SUB_AA_OpenHarmony_AbilityStart_6400-------------------");
+ console.info("SUB_AA_OpenHarmony_AbilityStart_6400 LaunchReason.START_ABILITY: " + AbilityConstant.LaunchReason.START_ABILITY);
+ expect(AbilityConstant.LaunchReason.START_ABILITY==1).assertTrue();
+ done();
+ });
+ /*
+ * @tc.number SUB_AA_OpenHarmony_AbilityStart_6500
+ * @tc.name Verify the enumeration values LaunchReason. CALL
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it("SUB_AA_OpenHarmony_AbilityStart_6500", 0, async function (done) {
+ console.info("------------------logMessage SUB_AA_OpenHarmony_AbilityStart_6500-------------------");
+ console.info("SUB_AA_OpenHarmony_AbilityStart_6500 LaunchReason.CALL: " + AbilityConstant.LaunchReason.CALL);
+ expect(AbilityConstant.LaunchReason.CALL==2).assertTrue();
+ done();
+ });
+ /*
+ * @tc.number SUB_AA_OpenHarmony_AbilityStart_6600
+ * @tc.name Verify the enumeration values LastExitReason.UNKNOWN
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it("SUB_AA_OpenHarmony_AbilityStart_6600", 0, async function (done) {
+ console.info("------------------logMessage SUB_AA_OpenHarmony_AbilityStart_6600-------------------");
+ console.info("SUB_AA_OpenHarmony_AbilityStart_6600 LastExitReason.UNKNOWN: " + AbilityConstant.LastExitReason.UNKNOWN);
+ expect(AbilityConstant.LastExitReason.UNKNOWN==0).assertTrue();
+ done();
+ });
+ /*
+ * @tc.number SUB_AA_OpenHarmony_AbilityStart_6700
+ * @tc.name Verify the enumeration values LastExitReason.ABILITY_NOT_RESPONDING
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it("SUB_AA_OpenHarmony_AbilityStart_6700", 0, async function (done) {
+ console.info("------------------logMessage SUB_AA_OpenHarmony_AbilityStart_6700-------------------");
+ console.info("SUB_AA_OpenHarmony_AbilityStart_6700 LastExitReason.ABILITY_NOT_RESPONDING: " + AbilityConstant.LastExitReason.ABILITY_NOT_RESPONDING);
+ expect(AbilityConstant.LastExitReason.ABILITY_NOT_RESPONDING==1).assertTrue();
+ done();
+ });
+ /*
+ * @tc.number SUB_AA_OpenHarmony_AbilityStart_6700
+ * @tc.name Verify the enumeration values LastExitReason.NORMAL
+ * @tc.desc Function test
+ * @tc.level 0
+ */
+ it("SUB_AA_OpenHarmony_AbilityStart_6800", 0, async function (done) {
+ console.info("------------------logMessage SUB_AA_OpenHarmony_AbilityStart_6800-------------------");
+ console.info("SUB_AA_OpenHarmony_AbilityStart_6800 LastExitReason.NORMAL: " + AbilityConstant.LastExitReason.NORMAL);
+ expect(AbilityConstant.LastExitReason.NORMAL==2).assertTrue();
+ done();
+ });
+ })
+}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/stage/stageenvchangetest/entry/src/main/resources/base/element/string.json b/aafwk/aafwk_standard/stage/stageenvchangetest/entry/src/main/resources/base/element/string.json
new file mode 100644
index 0000000000000000000000000000000000000000..8df972c7bf35296326de60f58e1cb79e4c827ccd
--- /dev/null
+++ b/aafwk/aafwk_standard/stage/stageenvchangetest/entry/src/main/resources/base/element/string.json
@@ -0,0 +1,12 @@
+{
+ "string": [
+ {
+ "name": "entry_MainAbility",
+ "value": "entry_MainAbility"
+ },
+ {
+ "name": "description_mainability",
+ "value": "eTS_Empty Ability"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/aafwk/aafwk_standard/stage/stageenvchangetest/entry/src/main/resources/base/media/icon.png b/aafwk/aafwk_standard/stage/stageenvchangetest/entry/src/main/resources/base/media/icon.png
new file mode 100644
index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c
Binary files /dev/null and b/aafwk/aafwk_standard/stage/stageenvchangetest/entry/src/main/resources/base/media/icon.png differ
diff --git a/aafwk/aafwk_standard/stage/stageenvchangetest/signature/openharmony_sx.p7b b/aafwk/aafwk_standard/stage/stageenvchangetest/signature/openharmony_sx.p7b
new file mode 100644
index 0000000000000000000000000000000000000000..9be1e98fa4c0c28ca997ed660112fa16b194f0f5
Binary files /dev/null and b/aafwk/aafwk_standard/stage/stageenvchangetest/signature/openharmony_sx.p7b differ