提交 e602072e 编写于 作者: Z zhoujun62

Solve XTS Singlehap_LifeCycleTest_2100 fail problem

Signed-off-by: Nzhoujun62 <zhoujun62@huawei.com>
上级 e2507d8f
...@@ -83,7 +83,7 @@ export default function lifecycleTest() { ...@@ -83,7 +83,7 @@ export default function lifecycleTest() {
"bundleName": "com.example.lifecycle_xts", "bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility2", "abilityName": "MainAbility2",
} }
globalThis.globalThis.abilityContext.startAbility(str) globalThis.abilityContext.startAbility(str)
.then((data) => { .then((data) => {
console.info(TAG + ' start successful. Data: ' + data); console.info(TAG + ' start successful. Data: ' + data);
}).catch((error) => { }).catch((error) => {
...@@ -138,7 +138,7 @@ export default function lifecycleTest() { ...@@ -138,7 +138,7 @@ export default function lifecycleTest() {
"bundleName": "com.example.lifecycle_xts", "bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility1", "abilityName": "MainAbility1",
} }
globalThis.globalThis.abilityContext.startAbility(str) globalThis.abilityContext.startAbility(str)
.then((data) => { .then((data) => {
console.info(TAG + ' start successful. Data: ' + data); console.info(TAG + ' start successful. Data: ' + data);
}).catch((error) => { }).catch((error) => {
...@@ -149,7 +149,7 @@ export default function lifecycleTest() { ...@@ -149,7 +149,7 @@ export default function lifecycleTest() {
"bundleName": "com.example.lifecycle_xts", "bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility2", "abilityName": "MainAbility2",
} }
globalThis.globalThis.abilityContext.startAbility(str1) globalThis.abilityContext.startAbility(str1)
.then((data) => { .then((data) => {
console.info(TAG + ' start successful. Data: ' + data); console.info(TAG + ' start successful. Data: ' + data);
}).catch((error) => { }).catch((error) => {
...@@ -212,7 +212,7 @@ export default function lifecycleTest() { ...@@ -212,7 +212,7 @@ export default function lifecycleTest() {
"bundleName": "com.example.lifecycle_xts", "bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility1", "abilityName": "MainAbility1",
} }
globalThis.globalThis.abilityContext.startAbility(str) globalThis.abilityContext.startAbility(str)
.then((data) => { .then((data) => {
console.info(TAG + ' start successful. Data: ' + data); console.info(TAG + ' start successful. Data: ' + data);
}).catch((error) => { }).catch((error) => {
...@@ -223,7 +223,7 @@ export default function lifecycleTest() { ...@@ -223,7 +223,7 @@ export default function lifecycleTest() {
"bundleName": "com.example.lifecycle_xts", "bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility2", "abilityName": "MainAbility2",
} }
globalThis.globalThis.abilityContext.startAbility(str1) globalThis.abilityContext.startAbility(str1)
.then((data) => { .then((data) => {
console.info(TAG + ' start successful. Data: ' + data); console.info(TAG + ' start successful. Data: ' + data);
}).catch((error) => { }).catch((error) => {
...@@ -297,7 +297,7 @@ export default function lifecycleTest() { ...@@ -297,7 +297,7 @@ export default function lifecycleTest() {
"bundleName": "com.example.lifecycle_xts", "bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility3", "abilityName": "MainAbility3",
} }
globalThis.globalThis.abilityContext.startAbility(str) globalThis.abilityContext.startAbility(str)
.then((data) => { .then((data) => {
console.info(TAG + ' start3 successful. Data: ' + data); console.info(TAG + ' start3 successful. Data: ' + data);
}).catch((error) => { }).catch((error) => {
...@@ -308,7 +308,7 @@ export default function lifecycleTest() { ...@@ -308,7 +308,7 @@ export default function lifecycleTest() {
"bundleName": "com.example.lifecycle_xts", "bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility2", "abilityName": "MainAbility2",
} }
globalThis.globalThis.abilityContext.startAbility(str1) globalThis.abilityContext.startAbility(str1)
.then((data) => { .then((data) => {
console.info(TAG + ' start2 successful. Data: ' + data); console.info(TAG + ' start2 successful. Data: ' + data);
}).catch((error) => { }).catch((error) => {
...@@ -386,7 +386,7 @@ export default function lifecycleTest() { ...@@ -386,7 +386,7 @@ export default function lifecycleTest() {
"bundleName": "com.example.lifecycle_xts", "bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility1", "abilityName": "MainAbility1",
} }
globalThis.globalThis.abilityContext.startAbility(str) globalThis.abilityContext.startAbility(str)
.then((data) => { .then((data) => {
console.info(TAG + ' start1 successful. Data: ' + data); console.info(TAG + ' start1 successful. Data: ' + data);
}).catch((error) => { }).catch((error) => {
...@@ -397,7 +397,7 @@ export default function lifecycleTest() { ...@@ -397,7 +397,7 @@ export default function lifecycleTest() {
"bundleName": "com.example.lifecycle_xts", "bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility3", "abilityName": "MainAbility3",
} }
globalThis.globalThis.abilityContext.startAbility(str1) globalThis.abilityContext.startAbility(str1)
.then((data) => { .then((data) => {
console.info(TAG + ' start3 successful. Data: ' + data); console.info(TAG + ' start3 successful. Data: ' + data);
}).catch((error) => { }).catch((error) => {
...@@ -418,7 +418,7 @@ export default function lifecycleTest() { ...@@ -418,7 +418,7 @@ export default function lifecycleTest() {
"bundleName": "com.example.lifecycle_xts", "bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility4", "abilityName": "MainAbility4",
} }
globalThis.globalThis.abilityContext.startAbility(str2) globalThis.abilityContext.startAbility(str2)
.then((data) => { .then((data) => {
console.info(TAG + ' start4 successful. Data: ' + data); console.info(TAG + ' start4 successful. Data: ' + data);
}).catch((error) => { }).catch((error) => {
...@@ -463,7 +463,7 @@ export default function lifecycleTest() { ...@@ -463,7 +463,7 @@ export default function lifecycleTest() {
"bundleName": "com.example.lifecycle_xts", "bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility1", "abilityName": "MainAbility1",
} }
globalThis.globalThis.abilityContext.startAbility(str) globalThis.abilityContext.startAbility(str)
.then((data) => { .then((data) => {
console.info(TAG + ' start1 successful. Data: ' + data); console.info(TAG + ' start1 successful. Data: ' + data);
}).catch((error) => { }).catch((error) => {
...@@ -474,7 +474,7 @@ export default function lifecycleTest() { ...@@ -474,7 +474,7 @@ export default function lifecycleTest() {
"bundleName": "com.example.lifecycle_xts", "bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility5", "abilityName": "MainAbility5",
} }
globalThis.globalThis.abilityContext.startAbility(str1) globalThis.abilityContext.startAbility(str1)
.then((data) => { .then((data) => {
console.info(TAG + ' start5 successful. Data: ' + data); console.info(TAG + ' start5 successful. Data: ' + data);
}).catch((error) => { }).catch((error) => {
...@@ -486,7 +486,7 @@ export default function lifecycleTest() { ...@@ -486,7 +486,7 @@ export default function lifecycleTest() {
"bundleName": "com.example.lifecycle_xts", "bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility2", "abilityName": "MainAbility2",
} }
globalThis.globalThis.abilityContext.startAbility(str2) globalThis.abilityContext.startAbility(str2)
.then((data) => { .then((data) => {
console.info(TAG + ' start2 successful. Data: ' + data); console.info(TAG + ' start2 successful. Data: ' + data);
}).catch((error) => { }).catch((error) => {
...@@ -619,7 +619,7 @@ export default function lifecycleTest() { ...@@ -619,7 +619,7 @@ export default function lifecycleTest() {
listKey8.push(abilityname + " onAbilityContinue"); listKey8.push(abilityname + " onAbilityContinue");
} }
} }
let applicationContext = globalThis.globalThis.abilityContext.getApplicationContext(); let applicationContext = globalThis.abilityContext.getApplicationContext();
id1 = applicationContext.registerAbilityLifecycleCallback(AbilityLifecycleCallback); id1 = applicationContext.registerAbilityLifecycleCallback(AbilityLifecycleCallback);
console.log(TAG + " registerAbilityLifecycleCallback1 number: " + JSON.stringify(id1)); console.log(TAG + " registerAbilityLifecycleCallback1 number: " + JSON.stringify(id1));
applicationContext.unregisterAbilityLifecycleCallback(id1, (error, data) => { applicationContext.unregisterAbilityLifecycleCallback(id1, (error, data) => {
...@@ -668,7 +668,7 @@ export default function lifecycleTest() { ...@@ -668,7 +668,7 @@ export default function lifecycleTest() {
"bundleName": "com.example.lifecycle_xts", "bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility1", "abilityName": "MainAbility1",
} }
globalThis.globalThis.abilityContext.startAbility(str) globalThis.abilityContext.startAbility(str)
.then((data) => { .then((data) => {
console.info(TAG + ' start successful. Data: ' + data); console.info(TAG + ' start successful. Data: ' + data);
}).catch((error) => { }).catch((error) => {
...@@ -679,7 +679,7 @@ export default function lifecycleTest() { ...@@ -679,7 +679,7 @@ export default function lifecycleTest() {
"bundleName": "com.example.lifecycle_xts", "bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility2", "abilityName": "MainAbility2",
} }
globalThis.globalThis.abilityContext.startAbility(str1) globalThis.abilityContext.startAbility(str1)
.then((data) => { .then((data) => {
console.info(TAG + ' start successful. Data: ' + data); console.info(TAG + ' start successful. Data: ' + data);
}).catch((error) => { }).catch((error) => {
...@@ -691,7 +691,7 @@ export default function lifecycleTest() { ...@@ -691,7 +691,7 @@ export default function lifecycleTest() {
"bundleName": "com.example.lifecycle_xts", "bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility2", "abilityName": "MainAbility2",
} }
globalThis.globalThis.abilityContext.startAbility(str1) globalThis.abilityContext.startAbility(str1)
.then((data) => { .then((data) => {
console.info(TAG + ' start successful. Data: ' + data); console.info(TAG + ' start successful. Data: ' + data);
}).catch((error) => { }).catch((error) => {
...@@ -704,7 +704,7 @@ export default function lifecycleTest() { ...@@ -704,7 +704,7 @@ export default function lifecycleTest() {
"bundleName": "com.example.lifecycle_xts", "bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility2", "abilityName": "MainAbility2",
} }
globalThis.globalThis.abilityContext.startAbility(str1) globalThis.abilityContext.startAbility(str1)
.then((data) => { .then((data) => {
console.info(TAG + ' start successful. Data: ' + data); console.info(TAG + ' start successful. Data: ' + data);
}).catch((error) => { }).catch((error) => {
...@@ -775,7 +775,7 @@ export default function lifecycleTest() { ...@@ -775,7 +775,7 @@ export default function lifecycleTest() {
"bundleName": "com.example.lifecycle_xts", "bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility1", "abilityName": "MainAbility1",
} }
globalThis.globalThis.abilityContext.startAbility(str) globalThis.abilityContext.startAbility(str)
.then((data) => { .then((data) => {
console.info(TAG + ' start successful. Data: ' + data); console.info(TAG + ' start successful. Data: ' + data);
}).catch((error) => { }).catch((error) => {
...@@ -786,7 +786,7 @@ export default function lifecycleTest() { ...@@ -786,7 +786,7 @@ export default function lifecycleTest() {
"bundleName": "com.example.lifecycle_xts", "bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility2", "abilityName": "MainAbility2",
} }
globalThis.globalThis.abilityContext.startAbility(str1) globalThis.abilityContext.startAbility(str1)
.then((data) => { .then((data) => {
console.info(TAG + ' start successful. Data: ' + data); console.info(TAG + ' start successful. Data: ' + data);
}).catch((error) => { }).catch((error) => {
...@@ -798,7 +798,7 @@ export default function lifecycleTest() { ...@@ -798,7 +798,7 @@ export default function lifecycleTest() {
"bundleName": "com.example.lifecycle_xts", "bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility2", "abilityName": "MainAbility2",
} }
globalThis.globalThis.abilityContext.startAbility(str1) globalThis.abilityContext.startAbility(str1)
.then((data) => { .then((data) => {
console.info(TAG + ' start successful. Data: ' + data); console.info(TAG + ' start successful. Data: ' + data);
}).catch((error) => { }).catch((error) => {
...@@ -866,7 +866,7 @@ export default function lifecycleTest() { ...@@ -866,7 +866,7 @@ export default function lifecycleTest() {
"bundleName": "com.example.lifecycle_xts", "bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility6", "abilityName": "MainAbility6",
} }
globalThis.globalThis.abilityContext.startAbility(str) globalThis.abilityContext.startAbility(str)
.then((data) => { .then((data) => {
console.info(TAG + ' start successful. Data: ' + data); console.info(TAG + ' start successful. Data: ' + data);
}).catch((error) => { }).catch((error) => {
...@@ -881,7 +881,7 @@ export default function lifecycleTest() { ...@@ -881,7 +881,7 @@ export default function lifecycleTest() {
"bundleName": "com.example.lifecycle_xts", "bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility2", "abilityName": "MainAbility2",
} }
globalThis.globalThis.abilityContext.startAbility(str1) globalThis.abilityContext.startAbility(str1)
.then((data) => { .then((data) => {
console.info(TAG + ' start successful. Data: ' + data); console.info(TAG + ' start successful. Data: ' + data);
}).catch((error) => { }).catch((error) => {
...@@ -919,7 +919,7 @@ export default function lifecycleTest() { ...@@ -919,7 +919,7 @@ export default function lifecycleTest() {
"bundleName": "com.example.lifecycle_xts", "bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility7", "abilityName": "MainAbility7",
} }
globalThis.globalThis.abilityContext.startAbility(str) globalThis.abilityContext.startAbility(str)
.then((data) => { .then((data) => {
console.info(TAG + ' start successful. Data: ' + data); console.info(TAG + ' start successful. Data: ' + data);
}).catch((error) => { }).catch((error) => {
...@@ -934,7 +934,7 @@ export default function lifecycleTest() { ...@@ -934,7 +934,7 @@ export default function lifecycleTest() {
"bundleName": "com.example.lifecycle_xts", "bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility7", "abilityName": "MainAbility7",
} }
globalThis.globalThis.abilityContext.startAbility(str) globalThis.abilityContext.startAbility(str)
.then((data) => { .then((data) => {
console.info(TAG + ' start successful. Data: ' + data); console.info(TAG + ' start successful. Data: ' + data);
}).catch((error) => { }).catch((error) => {
...@@ -983,7 +983,7 @@ export default function lifecycleTest() { ...@@ -983,7 +983,7 @@ export default function lifecycleTest() {
"bundleName": "com.example.lifecycle_xts", "bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility8", "abilityName": "MainAbility8",
} }
globalThis.globalThis.abilityContext.startAbility(str) globalThis.abilityContext.startAbility(str)
.then((data) => { .then((data) => {
console.info(TAG + ' start successful. Data: ' + data); console.info(TAG + ' start successful. Data: ' + data);
}).catch((error) => { }).catch((error) => {
...@@ -998,7 +998,7 @@ export default function lifecycleTest() { ...@@ -998,7 +998,7 @@ export default function lifecycleTest() {
"bundleName": "com.example.lifecycle_xts", "bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility8", "abilityName": "MainAbility8",
} }
globalThis.globalThis.abilityContext.startAbility(str) globalThis.abilityContext.startAbility(str)
.then((data) => { .then((data) => {
console.info(TAG + ' start successful. Data: ' + data); console.info(TAG + ' start successful. Data: ' + data);
}).catch((error) => { }).catch((error) => {
...@@ -1167,7 +1167,7 @@ export default function lifecycleTest() { ...@@ -1167,7 +1167,7 @@ export default function lifecycleTest() {
"bundleName": "com.example.lifecycle_xts", "bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility11", "abilityName": "MainAbility11",
} }
globalThis.globalThis.abilityContext.startAbility(str) globalThis.abilityContext.startAbility(str)
.then((data) => { .then((data) => {
console.info(TAG + ' start successful. Data: ' + data); console.info(TAG + ' start successful. Data: ' + data);
}).catch((error) => { }).catch((error) => {
...@@ -1178,7 +1178,7 @@ export default function lifecycleTest() { ...@@ -1178,7 +1178,7 @@ export default function lifecycleTest() {
"bundleName": "com.example.lifecycle_xts", "bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility2", "abilityName": "MainAbility2",
} }
globalThis.globalThis.abilityContext.startAbility(str1) globalThis.abilityContext.startAbility(str1)
.then((data) => { .then((data) => {
console.info(TAG + ' start successful. Data: ' + data); console.info(TAG + ' start successful. Data: ' + data);
}).catch((error) => { }).catch((error) => {
...@@ -1194,7 +1194,7 @@ export default function lifecycleTest() { ...@@ -1194,7 +1194,7 @@ export default function lifecycleTest() {
"bundleName": "com.example.lifecycle_xts", "bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility11", "abilityName": "MainAbility11",
} }
globalThis.globalThis.abilityContext.startAbility(str) globalThis.abilityContext.startAbility(str)
.then((data) => { .then((data) => {
console.info(TAG + ' start successful. Data: ' + data); console.info(TAG + ' start successful. Data: ' + data);
}).catch((error) => { }).catch((error) => {
...@@ -1205,7 +1205,7 @@ export default function lifecycleTest() { ...@@ -1205,7 +1205,7 @@ export default function lifecycleTest() {
"bundleName": "com.example.lifecycle_xts", "bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility2", "abilityName": "MainAbility2",
} }
globalThis.globalThis.abilityContext.startAbility(str1) globalThis.abilityContext.startAbility(str1)
.then((data) => { .then((data) => {
console.info(TAG + ' start successful. Data: ' + data); console.info(TAG + ' start successful. Data: ' + data);
}).catch((error) => { }).catch((error) => {
...@@ -1347,7 +1347,7 @@ export default function lifecycleTest() { ...@@ -1347,7 +1347,7 @@ export default function lifecycleTest() {
"bundleName": "com.example.lifecycle_xts", "bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility12", "abilityName": "MainAbility12",
} }
globalThis.globalThis.abilityContext.startAbility(str) globalThis.abilityContext.startAbility(str)
.then((data) => { .then((data) => {
console.info(TAG + ' start successful. Data: ' + data); console.info(TAG + ' start successful. Data: ' + data);
}).catch((error) => { }).catch((error) => {
...@@ -1358,7 +1358,7 @@ export default function lifecycleTest() { ...@@ -1358,7 +1358,7 @@ export default function lifecycleTest() {
"bundleName": "com.example.lifecycle_xts", "bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility2", "abilityName": "MainAbility2",
} }
globalThis.globalThis.abilityContext.startAbility(str1) globalThis.abilityContext.startAbility(str1)
.then((data) => { .then((data) => {
console.info(TAG + ' start successful. Data: ' + data); console.info(TAG + ' start successful. Data: ' + data);
}).catch((error) => { }).catch((error) => {
...@@ -1390,7 +1390,7 @@ export default function lifecycleTest() { ...@@ -1390,7 +1390,7 @@ export default function lifecycleTest() {
"bundleName": "com.example.lifecycle_xts", "bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility12", "abilityName": "MainAbility12",
} }
globalThis.globalThis.abilityContext.startAbility(str) globalThis.abilityContext.startAbility(str)
.then((data) => { .then((data) => {
console.info(TAG + ' start successful. Data: ' + data); console.info(TAG + ' start successful. Data: ' + data);
}).catch((error) => { }).catch((error) => {
...@@ -1401,7 +1401,7 @@ export default function lifecycleTest() { ...@@ -1401,7 +1401,7 @@ export default function lifecycleTest() {
"bundleName": "com.example.lifecycle_xts", "bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility2", "abilityName": "MainAbility2",
} }
globalThis.globalThis.abilityContext.startAbility(str1) globalThis.abilityContext.startAbility(str1)
.then((data) => { .then((data) => {
console.info(TAG + ' start successful. Data: ' + data); console.info(TAG + ' start successful. Data: ' + data);
}).catch((error) => { }).catch((error) => {
...@@ -1459,7 +1459,7 @@ export default function lifecycleTest() { ...@@ -1459,7 +1459,7 @@ export default function lifecycleTest() {
"bundleName": "com.example.lifecycle_xts", "bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility1", "abilityName": "MainAbility1",
} }
globalThis.globalThis.abilityContext.startAbility(str) globalThis.abilityContext.startAbility(str)
.then((data) => { .then((data) => {
console.info(TAG + ' start successful. Data: ' + data); console.info(TAG + ' start successful. Data: ' + data);
}).catch((error) => { }).catch((error) => {
...@@ -1470,7 +1470,7 @@ export default function lifecycleTest() { ...@@ -1470,7 +1470,7 @@ export default function lifecycleTest() {
"bundleName": "com.example.lifecycle_xts", "bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility12", "abilityName": "MainAbility12",
} }
globalThis.globalThis.abilityContext.startAbility(str1) globalThis.abilityContext.startAbility(str1)
.then((data) => { .then((data) => {
console.info(TAG + ' start successful. Data: ' + data); console.info(TAG + ' start successful. Data: ' + data);
}).catch((error) => { }).catch((error) => {
...@@ -1481,7 +1481,7 @@ export default function lifecycleTest() { ...@@ -1481,7 +1481,7 @@ export default function lifecycleTest() {
"bundleName": "com.example.lifecycle_xts", "bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility2", "abilityName": "MainAbility2",
} }
globalThis.globalThis.abilityContext.startAbility(str2) globalThis.abilityContext.startAbility(str2)
.then((data) => { .then((data) => {
console.info(TAG + ' start successful. Data: ' + data); console.info(TAG + ' start successful. Data: ' + data);
}).catch((error) => { }).catch((error) => {
...@@ -1534,7 +1534,7 @@ export default function lifecycleTest() { ...@@ -1534,7 +1534,7 @@ export default function lifecycleTest() {
"bundleName": "com.example.lifecycle_xts", "bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility1", "abilityName": "MainAbility1",
} }
globalThis.globalThis.abilityContext.startAbility(str) globalThis.abilityContext.startAbility(str)
.then((data) => { .then((data) => {
console.info(TAG + ' start successful. Data: ' + data); console.info(TAG + ' start successful. Data: ' + data);
}).catch((error) => { }).catch((error) => {
...@@ -1545,7 +1545,7 @@ export default function lifecycleTest() { ...@@ -1545,7 +1545,7 @@ export default function lifecycleTest() {
"bundleName": "com.example.lifecycle_xts", "bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility12", "abilityName": "MainAbility12",
} }
globalThis.globalThis.abilityContext.startAbility(str1) globalThis.abilityContext.startAbility(str1)
.then((data) => { .then((data) => {
console.info(TAG + ' start successful. Data: ' + data); console.info(TAG + ' start successful. Data: ' + data);
}).catch((error) => { }).catch((error) => {
...@@ -1556,7 +1556,7 @@ export default function lifecycleTest() { ...@@ -1556,7 +1556,7 @@ export default function lifecycleTest() {
"bundleName": "com.example.lifecycle_xts", "bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility2", "abilityName": "MainAbility2",
} }
globalThis.globalThis.abilityContext.startAbility(str2) globalThis.abilityContext.startAbility(str2)
.then((data) => { .then((data) => {
console.info(TAG + ' start successful. Data: ' + data); console.info(TAG + ' start successful. Data: ' + data);
}).catch((error) => { }).catch((error) => {
...@@ -1609,12 +1609,12 @@ export default function lifecycleTest() { ...@@ -1609,12 +1609,12 @@ export default function lifecycleTest() {
expect(exlist[2]).assertEqual("MainAbility2 onAbilityForeground"); expect(exlist[2]).assertEqual("MainAbility2 onAbilityForeground");
expect(exlist[3]).assertEqual("MainAbility2 onAbilityBackground"); expect(exlist[3]).assertEqual("MainAbility2 onAbilityBackground");
expect(exlist[4]).assertEqual("MainAbility2 onWindowStageDestroy"); expect(exlist[4]).assertEqual("MainAbility2 onWindowStageDestroy");
expect(exlist12[0]).assertEqual("MainAbility2 onAbilityDestroy"); expect(exlist[5]).assertEqual("MainAbility2 onAbilityDestroy");
expect(exlist12[1]).assertEqual("MainAbility12 onAbilityCreate"); expect(exlist12[0]).assertEqual("MainAbility12 onAbilityCreate");
expect(exlist12[2]).assertEqual("MainAbility12 onWindowStageCreate"); expect(exlist12[1]).assertEqual("MainAbility12 onWindowStageCreate");
expect(exlist12[3]).assertEqual("MainAbility12 onAbilityForeground"); expect(exlist12[2]).assertEqual("MainAbility12 onAbilityForeground");
expect(exlist12[4]).assertEqual("MainAbility12 onAbilityBackground"); expect(exlist12[3]).assertEqual("MainAbility12 onAbilityBackground");
expect(exlist12[5]).assertEqual("MainAbility12 onAbilityForeground"); expect(exlist12[4]).assertEqual("MainAbility12 onAbilityForeground");
expect(exlist1[0]).assertEqual("MainAbility2 onAbilityCreate"); expect(exlist1[0]).assertEqual("MainAbility2 onAbilityCreate");
expect(exlist1[1]).assertEqual("MainAbility2 onWindowStageCreate"); expect(exlist1[1]).assertEqual("MainAbility2 onWindowStageCreate");
expect(exlist1[2]).assertEqual("MainAbility2 onAbilityForeground"); expect(exlist1[2]).assertEqual("MainAbility2 onAbilityForeground");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册