Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
f8495884
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
f8495884
编写于
4月 28, 2023
作者:
C
chengxingzhen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
xts-失败用例增加延时
Signed-off-by:
N
chengxingzhen
<
chengxingzhen@huawei.com
>
上级
70d678cf
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
121 addition
and
121 deletion
+121
-121
ability/ability_runtime/stage/actslifecyclesinglehaptest/entry/src/main/ets/test/LifeCycleTest.ets
...lesinglehaptest/entry/src/main/ets/test/LifeCycleTest.ets
+121
-121
未找到文件。
ability/ability_runtime/stage/actslifecyclesinglehaptest/entry/src/main/ets/test/LifeCycleTest.ets
浏览文件 @
f8495884
...
...
@@ -27,7 +27,7 @@ export default function lifecycleTest() {
if ("Singlehap_LifeCycleTest_0200" === TAG || "Singlehap_LifeCycleTest_0300" === TAG
|| "Singlehap_LifeCycleTest_0500" === TAG || "Singlehap_LifeCycleTest_0600" === TAG
|| "Singlehap_LifeCycleTest_0800" === TAG || "Singlehap_LifeCycleTest_0900" === TAG) {
var
para = {
let
para = {
resultCode: 2,
want: {
"abilityName": "MainAbility1",
...
...
@@ -42,7 +42,7 @@ export default function lifecycleTest() {
console.log("LifeCycleTest terminateSelfwithresult error: " + JSON.stringify(error));
});
} else if ("Singlehap_LifeCycleTest_2000" === TAG) {
var
para1 = {
let
para1 = {
resultCode: 2,
want: {
"abilityName": "MainAbility12",
...
...
@@ -60,9 +60,9 @@ export default function lifecycleTest() {
done();
});
var
TAG = "";
var listKeyTemp = ""
var
tempCallbackId;
let
TAG = "";
let listKeyTemp;
let
tempCallbackId;
function sleep(time) {
return new Promise((resolve) => setTimeout(resolve, time))
...
...
@@ -77,8 +77,8 @@ export default function lifecycleTest() {
it("Singlehap_LifeCycleTest_0100", 0, async function (done) {
console.log("------------Singlehap_LifeCycleTest_0100 START-------------");
TAG = "Singlehap_LifeCycleTest_0100";
var
code;
var
str = {
let
code;
let
str = {
"bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility2",
}
...
...
@@ -93,9 +93,9 @@ export default function lifecycleTest() {
console.log(TAG + " registerAbilityLifecycleCallback callbackid : " + JSON.stringify(globalThis.callbackid));
tempCallbackId = globalThis.callbackid;
console.log(TAG + " registerAbilityLifecycleCallback tempCallbackId : " + JSON.stringify(tempCallbackId));
var
strtemp = "";
var
listtemp = [];
for (
var
i = 0; i < globalThis.list.length; i++) {
let
strtemp = "";
let
listtemp = [];
for (
let
i = 0; i < globalThis.list.length; i++) {
strtemp = globalThis.list[i].substring(0, 12);
if (strtemp === "MainAbility2") {
listtemp.push(globalThis.list[i]);
...
...
@@ -132,8 +132,8 @@ export default function lifecycleTest() {
it("Singlehap_LifeCycleTest_0200", 0, async function (done) {
console.log("------------Singlehap_LifeCycleTest_0200 START-------------");
TAG = "Singlehap_LifeCycleTest_0200";
var
code;
var
str = {
let
code;
let
str = {
"bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility1",
}
...
...
@@ -144,7 +144,7 @@ export default function lifecycleTest() {
console.error(TAG + ' start failed. Cause: ' + JSON.stringify(error));
})
setTimeout(function () {
var
str1 = {
let
str1 = {
"bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility2",
}
...
...
@@ -158,10 +158,10 @@ export default function lifecycleTest() {
setTimeout(function () {
console.log(TAG + " registerAbilityLifecycleCallback listKey : " + JSON.stringify(globalThis.list1));
console.log(TAG + " registerAbilityLifecycleCallback callbackid : " + JSON.stringify(globalThis.callbackid1));
var
strtemp = "";
var
listtemp = [];
var
listtemp1 = [];
for (
var
i = 0; i < globalThis.list1.length; i++) {
let
strtemp = "";
let
listtemp = [];
let
listtemp1 = [];
for (
let
i = 0; i < globalThis.list1.length; i++) {
strtemp = globalThis.list1[i].substring(0, 12);
if (strtemp === "MainAbility1") {
listtemp.push(globalThis.list1[i]);
...
...
@@ -206,8 +206,8 @@ export default function lifecycleTest() {
it("Singlehap_LifeCycleTest_0300", 0, async function (done) {
console.log("------------Singlehap_LifeCycleTest_0300 START-------------");
TAG = "Singlehap_LifeCycleTest_0300";
var
code;
var
str = {
let
code;
let
str = {
"bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility1",
}
...
...
@@ -218,7 +218,7 @@ export default function lifecycleTest() {
console.error(TAG + ' start failed. Cause: ' + JSON.stringify(error));
})
setTimeout(function () {
var
str1 = {
let
str1 = {
"bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility2",
}
...
...
@@ -232,10 +232,10 @@ export default function lifecycleTest() {
setTimeout(function () {
console.log(TAG + " registerAbilityLifecycleCallback listKey : " + JSON.stringify(globalThis.list1));
console.log(TAG + " registerAbilityLifecycleCallback callbackid : " + JSON.stringify(globalThis.callbackid1));
var
strtemp = "";
var
listtemp = [];
var
listtemp1 = [];
for (
var
i = 0; i < globalThis.list1.length; i++) {
let
strtemp = "";
let
listtemp = [];
let
listtemp1 = [];
for (
let
i = 0; i < globalThis.list1.length; i++) {
strtemp = globalThis.list1[i].substring(0, 12);
if (strtemp === "MainAbility1") {
listtemp.push(globalThis.list1[i]);
...
...
@@ -291,8 +291,8 @@ export default function lifecycleTest() {
it("Singlehap_LifeCycleTest_0400", 0, async function (done) {
console.log("------------Singlehap_LifeCycleTest_0400 START-------------");
TAG = "Singlehap_LifeCycleTest_0400";
var
code;
var
str = {
let
code;
let
str = {
"bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility3",
}
...
...
@@ -303,7 +303,7 @@ export default function lifecycleTest() {
console.error(TAG + ' start3 failed. Cause: ' + JSON.stringify(error));
})
setTimeout(function () {
var
str1 = {
let
str1 = {
"bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility2",
}
...
...
@@ -317,10 +317,10 @@ export default function lifecycleTest() {
setTimeout(function () {
console.log(TAG + " registerAbilityLifecycleCallback listKey : " + JSON.stringify(globalThis.list3));
console.log(TAG + " registerAbilityLifecycleCallback callbackid : " + JSON.stringify(globalThis.callbackid3));
var
strtemp = "";
var
listtemp = [];
var
listtemp1 = [];
for (
var
i = 0; i < globalThis.list3.length; i++) {
let
strtemp = "";
let
listtemp = [];
let
listtemp1 = [];
for (
let
i = 0; i < globalThis.list3.length; i++) {
strtemp = globalThis.list3[i].substring(0, 12);
if (strtemp === "MainAbility3") {
listtemp.push(globalThis.list3[i]);
...
...
@@ -332,7 +332,7 @@ export default function lifecycleTest() {
console.log(TAG + " listtemp1 is :" + JSON.stringify(listtemp1));
let exlist = listtemp;
let exlist1 = listtemp1;
var
para = {
let
para = {
resultCode: 1,
want: {
"abilityName": "MainAbility3",
...
...
@@ -381,7 +381,7 @@ export default function lifecycleTest() {
it("Singlehap_LifeCycleTest_0500", 0, async function (done) {
console.log("------------Singlehap_LifeCycleTest_0500 START-------------");
TAG = "Singlehap_LifeCycleTest_0500";
var
str = {
let
str = {
"bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility1",
}
...
...
@@ -392,7 +392,7 @@ export default function lifecycleTest() {
console.error(TAG + ' start1 failed. Cause: ' + JSON.stringify(error));
})
setTimeout(function () {
var
str1 = {
let
str1 = {
"bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility3",
}
...
...
@@ -413,7 +413,7 @@ export default function lifecycleTest() {
.catch((error) => {
console.error(TAG + ' unregisterAbilityLifecycleCallback3 failed. Cause: ' + JSON.stringify(error));
});
var
str2 = {
let
str2 = {
"bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility4",
}
...
...
@@ -458,7 +458,7 @@ export default function lifecycleTest() {
it("Singlehap_LifeCycleTest_0600", 0, async function (done) {
console.log("------------Singlehap_LifeCycleTest_0600 START-------------");
TAG = "Singlehap_LifeCycleTest_0600";
var
str = {
let
str = {
"bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility1",
}
...
...
@@ -469,7 +469,7 @@ export default function lifecycleTest() {
console.error(TAG + ' start1 failed. Cause: ' + JSON.stringify(error));
})
setTimeout(function () {
var
str1 = {
let
str1 = {
"bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility5",
}
...
...
@@ -481,7 +481,7 @@ export default function lifecycleTest() {
})
}, 500);
setTimeout(function () {
var
str2 = {
let
str2 = {
"bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility2",
}
...
...
@@ -495,10 +495,10 @@ export default function lifecycleTest() {
setTimeout(function () {
console.log(TAG + " listKey1 : " + JSON.stringify(globalThis.list1));
console.log(TAG + " callbackid1 : " + JSON.stringify(globalThis.callbackid1));
var
strtemp = "";
var
listtemp = [];
var
listtemp2 = [];
for (
var
i = 0; i < globalThis.list1.length; i++) {
let
strtemp = "";
let
listtemp = [];
let
listtemp2 = [];
for (
let
i = 0; i < globalThis.list1.length; i++) {
strtemp = globalThis.list1[i].substring(0, 12);
if (strtemp == "MainAbility2") {
listtemp.push(globalThis.list1[i]);
...
...
@@ -542,13 +542,13 @@ export default function lifecycleTest() {
it("Singlehap_LifeCycleTest_0700", 0, async function (done) {
console.log("------------Singlehap_LifeCycleTest_0700 START-------------");
TAG = "Singlehap_LifeCycleTest_0700";
var
code1;
var
code2;
var
code3;
var
id1;
var
id2;
var
id3;
var
listKey8 = [];
let
code1;
let
code2;
let
code3;
let
id1;
let
id2;
let
id3;
let
listKey8 = [];
let AbilityLifecycleCallback = {
onAbilityCreate(ability) {
console.log(TAG + " onAbilityCreate ability:" + JSON.stringify(ability));
...
...
@@ -663,7 +663,7 @@ export default function lifecycleTest() {
it("Singlehap_LifeCycleTest_0800", 0, async function (done) {
console.log("------------Singlehap_LifeCycleTest_0800 START-------------");
TAG = "Singlehap_LifeCycleTest_0800";
var
str = {
let
str = {
"bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility1",
}
...
...
@@ -674,7 +674,7 @@ export default function lifecycleTest() {
console.error(TAG + ' start failed. Cause: ' + JSON.stringify(error));
})
setTimeout(function () {
var
str1 = {
let
str1 = {
"bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility2",
}
...
...
@@ -686,7 +686,7 @@ export default function lifecycleTest() {
})
}, 1500);
setTimeout(function () {
var
str1 = {
let
str1 = {
"bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility2",
}
...
...
@@ -699,7 +699,7 @@ export default function lifecycleTest() {
}, 3000);
setTimeout(function () {
var
str1 = {
let
str1 = {
"bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility2",
}
...
...
@@ -714,10 +714,10 @@ export default function lifecycleTest() {
setTimeout(function () {
console.log(TAG + " registerAbilityLifecycleCallback listKey : " + JSON.stringify(globalThis.list1));
console.log(TAG + " registerAbilityLifecycleCallback callbackid : " + JSON.stringify(globalThis.callbackid1));
var
strtemp = "";
var
listtemp = [];
var
listtemp1 = [];
for (
var
i = 0; i < globalThis.list1.length; i++) {
let
strtemp = "";
let
listtemp = [];
let
listtemp1 = [];
for (
let
i = 0; i < globalThis.list1.length; i++) {
strtemp = globalThis.list1[i].substring(0, 12);
if (strtemp === "MainAbility1") {
listtemp.push(globalThis.list1[i]);
...
...
@@ -770,7 +770,7 @@ export default function lifecycleTest() {
it("Singlehap_LifeCycleTest_0900", 0, async function (done) {
console.log("------------Singlehap_LifeCycleTest_0900 START-------------");
TAG = "Singlehap_LifeCycleTest_0900";
var
str = {
let
str = {
"bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility1",
}
...
...
@@ -781,7 +781,7 @@ export default function lifecycleTest() {
console.error(TAG + ' start failed. Cause: ' + JSON.stringify(error));
})
setTimeout(function () {
var
str1 = {
let
str1 = {
"bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility2",
}
...
...
@@ -793,7 +793,7 @@ export default function lifecycleTest() {
})
}, 500);
setTimeout(function () {
var
str1 = {
let
str1 = {
"bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility2",
}
...
...
@@ -807,10 +807,10 @@ export default function lifecycleTest() {
setTimeout(function () {
console.log(TAG + " registerAbilityLifecycleCallback listKey : " + JSON.stringify(globalThis.list1));
console.log(TAG + " registerAbilityLifecycleCallback callbackid : " + JSON.stringify(globalThis.callbackid1));
var
strtemp = "";
var
listtemp = [];
var
listtemp1 = [];
for (
var
i = 0; i < globalThis.list1.length; i++) {
let
strtemp = "";
let
listtemp = [];
let
listtemp1 = [];
for (
let
i = 0; i < globalThis.list1.length; i++) {
strtemp = globalThis.list1[i].substring(0, 12);
if (strtemp === "MainAbility1") {
listtemp.push(globalThis.list1[i]);
...
...
@@ -859,9 +859,9 @@ export default function lifecycleTest() {
it("Singlehap_LifeCycleTest_1000", 0, async function (done) {
console.log("------------Singlehap_LifeCycleTest_1000 START-------------");
TAG = "Singlehap_LifeCycleTest_1000";
var
id1;
var
id2;
var
str = {
let
id1;
let
id2;
let
str = {
"bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility6",
}
...
...
@@ -876,7 +876,7 @@ export default function lifecycleTest() {
console.log(TAG + " firstCallback callbackid : " + JSON.stringify(globalThis.callbackid6));
id1 = globalThis.callbackid6;
console.log(TAG + " firstCallback id : " + JSON.stringify(id1));
var
str1 = {
let
str1 = {
"bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility2",
}
...
...
@@ -912,9 +912,9 @@ export default function lifecycleTest() {
it("Singlehap_LifeCycleTest_1100", 0, async function (done) {
console.log("------------Singlehap_LifeCycleTest_1100 START-------------");
TAG = "Singlehap_LifeCycleTest_1100";
var
id1;
var
id2;
var
str = {
let
id1;
let
id2;
let
str = {
"bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility7",
}
...
...
@@ -929,7 +929,7 @@ export default function lifecycleTest() {
console.log(TAG + " firstCallback callbackid : " + JSON.stringify(globalThis.callbackid7));
id1 = globalThis.callbackid7;
console.log(TAG + " firstCallback id : " + JSON.stringify(id1));
var
str = {
let
str = {
"bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility7",
}
...
...
@@ -951,7 +951,7 @@ export default function lifecycleTest() {
console.log(TAG + ": unregisterAbilityLifecycleCallback success, err: " + JSON.stringify(error) +
",data: " + JSON.stringify(data));
});
var
para = {
let
para = {
resultCode: 1,
want: {
"abilityName": "MainAbility1",
...
...
@@ -976,9 +976,9 @@ export default function lifecycleTest() {
it("Singlehap_LifeCycleTest_1200", 0, async function (done) {
console.log("------------Singlehap_LifeCycleTest_1200 START-------------");
TAG = "Singlehap_LifeCycleTest_1200";
var
id1;
var
id2;
var
str = {
let
id1;
let
id2;
let
str = {
"bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility8",
}
...
...
@@ -993,7 +993,7 @@ export default function lifecycleTest() {
console.log(TAG + " firstCallback callbackid : " + JSON.stringify(globalThis.callbackid8));
id1 = globalThis.callbackid8;
console.log(TAG + " firstCallback id : " + JSON.stringify(id1));
var
str = {
let
str = {
"bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility8",
}
...
...
@@ -1015,7 +1015,7 @@ export default function lifecycleTest() {
console.log(TAG + ": unregisterAbilityLifecycleCallback success, err: " + JSON.stringify(error) +
",data: " + JSON.stringify(data));
});
var
para = {
let
para = {
resultCode: 1,
want: {
"abilityName": "MainAbility8",
...
...
@@ -1065,7 +1065,7 @@ export default function lifecycleTest() {
setTimeout(() => {
console.log(TAG + ": second Hap1MainAbility1 startAbility success, err: " + JSON.stringify(error) +
",data: " + JSON.stringify(data));
for (
var
i = 0; i < globalThis.mainAbility9ListKey.length; i++) {
for (
let
i = 0; i < globalThis.mainAbility9ListKey.length; i++) {
if (globalThis.mainAbility9ListKey[i].substring(0, 16) == "Hap1MainAbility1") {
listKeyTemp.push(globalThis.mainAbility9ListKey[i]);
}
...
...
@@ -1122,7 +1122,7 @@ export default function lifecycleTest() {
setTimeout(() => {
console.log(TAG + ": second Hap1MainAbility2 startAbility success, err: " + JSON.stringify(error) +
",data: " + JSON.stringify(data));
for (
var
i = 0;i < globalThis.mainAbility9ListKey.length; i++) {
for (
let
i = 0;i < globalThis.mainAbility9ListKey.length; i++) {
if (globalThis.mainAbility9ListKey[i].substring(0, 16) == "Hap1MainAbility2") {
listKeyTemp.push(globalThis.mainAbility9ListKey[i]);
}
...
...
@@ -1160,9 +1160,9 @@ export default function lifecycleTest() {
it("Singlehap_LifeCycleTest_1500", 0, async function (done) {
console.log("------------Singlehap_LifeCycleTest_1500 START-------------");
TAG = "Singlehap_LifeCycleTest_1500";
var
id1;
var
id2;
var
str = {
let
id1;
let
id2;
let
str = {
"bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility11",
}
...
...
@@ -1173,7 +1173,7 @@ export default function lifecycleTest() {
console.error(TAG + ' start failed. Cause: ' + JSON.stringify(error));
})
setTimeout(function () {
var
str1 = {
let
str1 = {
"bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility2",
}
...
...
@@ -1189,7 +1189,7 @@ export default function lifecycleTest() {
console.log(TAG + " firstCallback callbackid : " + JSON.stringify(globalThis.callbackid11));
id1 = globalThis.callbackid11;
console.log(TAG + " firstCallback id : " + JSON.stringify(id1));
var
str = {
let
str = {
"bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility11",
}
...
...
@@ -1200,7 +1200,7 @@ export default function lifecycleTest() {
console.error(TAG + ' start failed. Cause: ' + JSON.stringify(error));
})
setTimeout(function () {
var
str1 = {
let
str1 = {
"bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility2",
}
...
...
@@ -1217,9 +1217,9 @@ export default function lifecycleTest() {
console.log(TAG + " secondCallback callbackid : " + JSON.stringify(globalThis.callbackid11));
id2 = globalThis.callbackid11;
console.log(TAG + " secondCallback id : " + JSON.stringify(id2));
var
strtemp = "";
var
listtemp = [];
for (
var
i = 0; i < globalThis.list11.length; i++) {
let
strtemp = "";
let
listtemp = [];
for (
let
i = 0; i < globalThis.list11.length; i++) {
strtemp = globalThis.list11[i].substring(0, 12);
if (strtemp == "MainAbility2") {
listtemp.push(globalThis.list11[i]);
...
...
@@ -1244,9 +1244,9 @@ export default function lifecycleTest() {
}, 6000);
});
var
callbackid_NA = 100
var
callbackid_errorNum = -1
var
callbackid_errorType = "test"
let
callbackid_NA = 100
let
callbackid_errorNum = -1
let
callbackid_errorType = "test"
/*
* @tc.number Singlehap_LifeCycleTest_1600
* @tc.name input Nonexistent callbackid for unregisterAbilityLifecycleCallback parameter
...
...
@@ -1340,9 +1340,9 @@ export default function lifecycleTest() {
it("Singlehap_LifeCycleTest_2000", 0, async function (done) {
console.log("------------Singlehap_LifeCycleTest_2000 START-------------");
TAG = "Singlehap_LifeCycleTest_2000";
var
id1;
var
id2;
var
str = {
let
id1;
let
id2;
let
str = {
"bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility12",
}
...
...
@@ -1353,7 +1353,7 @@ export default function lifecycleTest() {
console.error(TAG + ' start failed. Cause: ' + JSON.stringify(error));
})
setTimeout(function () {
var
str1 = {
let
str1 = {
"bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility2",
}
...
...
@@ -1369,7 +1369,7 @@ export default function lifecycleTest() {
console.log(TAG + " firstCallback callbackid : " + JSON.stringify(globalThis.callbackid12));
id1 = globalThis.callbackid12;
console.log(TAG + " firstCallback id : " + JSON.stringify(id1));
var
para = {
let
para = {
resultCode: 2000,
want: {
"abilityName": "MainAbility12",
...
...
@@ -1385,7 +1385,7 @@ export default function lifecycleTest() {
});
}, 2500);
setTimeout(function () {
var
str = {
let
str = {
"bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility12",
}
...
...
@@ -1396,7 +1396,7 @@ export default function lifecycleTest() {
console.error(TAG + ' start failed. Cause: ' + JSON.stringify(error));
})
setTimeout(function () {
var
str1 = {
let
str1 = {
"bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility2",
}
...
...
@@ -1413,9 +1413,9 @@ export default function lifecycleTest() {
console.log(TAG + " secondCallback callbackid : " + JSON.stringify(globalThis.callbackid12));
id2 = globalThis.callbackid12;
console.log(TAG + " secondCallback id : " + JSON.stringify(id2));
var
strtemp = "";
var
listtemp = [];
for (
var
i = 0; i < globalThis.list12.length; i++) {
let
strtemp = "";
let
listtemp = [];
for (
let
i = 0; i < globalThis.list12.length; i++) {
strtemp = globalThis.list12[i].substring(0, 12);
if (strtemp == "MainAbility2") {
listtemp.push(globalThis.list12[i]);
...
...
@@ -1450,11 +1450,11 @@ export default function lifecycleTest() {
it("Singlehap_LifeCycleTest_2100", 0, async function (done) {
console.log("------------Singlehap_LifeCycleTest_2100 START-------------");
TAG = "Singlehap_LifeCycleTest_2100";
var
id1;
var
id2;
var
id3;
var
id4;
var
str = {
let
id1;
let
id2;
let
id3;
let
id4;
let
str = {
"bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility1",
}
...
...
@@ -1465,7 +1465,7 @@ export default function lifecycleTest() {
console.error(TAG + ' start failed. Cause: ' + JSON.stringify(error));
})
setTimeout(function () {
var
str1 = {
let
str1 = {
"bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility12",
}
...
...
@@ -1476,7 +1476,7 @@ export default function lifecycleTest() {
console.error(TAG + ' start failed. Cause: ' + JSON.stringify(error));
})
setTimeout(function () {
var
str2 = {
let
str2 = {
"bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility2",
}
...
...
@@ -1497,7 +1497,7 @@ export default function lifecycleTest() {
console.log(TAG + " firstCallback id1 : " + JSON.stringify(id1));
id2 = globalThis.callbackid12;
console.log(TAG + " firstCallback id12 : " + JSON.stringify(id2));
var
para = {
let
para = {
resultCode: 2100,
want: {
"abilityName": "MainAbility12",
...
...
@@ -1512,7 +1512,7 @@ export default function lifecycleTest() {
console.log(TAG + " terminateSelfwithresult error: " + JSON.stringify(error));
});
setTimeout(function () {
var
para = {
let
para = {
resultCode: 2100,
want: {
"abilityName": "MainAbility1",
...
...
@@ -1529,7 +1529,7 @@ export default function lifecycleTest() {
}, 500);
}, 3000);
setTimeout(function () {
var
str = {
let
str = {
"bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility1",
}
...
...
@@ -1540,7 +1540,7 @@ export default function lifecycleTest() {
console.error(TAG + ' start failed. Cause: ' + JSON.stringify(error));
})
setTimeout(function () {
var
str1 = {
let
str1 = {
"bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility12",
}
...
...
@@ -1551,7 +1551,7 @@ export default function lifecycleTest() {
console.error(TAG + ' start failed. Cause: ' + JSON.stringify(error));
})
setTimeout(function () {
var
str2 = {
let
str2 = {
"bundleName": "com.example.lifecycle_xts",
"abilityName": "MainAbility2",
}
...
...
@@ -1577,10 +1577,10 @@ export default function lifecycleTest() {
console.log(TAG + " secondCallback id1 : " + JSON.stringify(id3));
id4 = globalThis.callbackid12;
console.log(TAG + " secondCallback id12 : " + JSON.stringify(id4));
var
strtemp = "";
var
listtemp = [];
var
listtemp12 = [];
for (
var
i = 0; i < templist1.length; i++) {
let
strtemp = "";
let
listtemp = [];
let
listtemp12 = [];
for (
let
i = 0; i < templist1.length; i++) {
strtemp = templist1[i].substring(0, 13);
if (strtemp === "MainAbility2 ") {
listtemp.push(templist1[i]);
...
...
@@ -1591,9 +1591,9 @@ export default function lifecycleTest() {
console.log(TAG + " listtemp is :" + JSON.stringify(listtemp));
console.log(TAG + " listtemp12 is :" + JSON.stringify(listtemp12));
setTimeout(function () {
var
strtemp1 = "";
var
listtemp1 = [];
for (
var
j = 0; j < templist2.length; j++) {
let
strtemp1 = "";
let
listtemp1 = [];
for (
let
j = 0; j < templist2.length; j++) {
strtemp1 = templist2[j].substring(0, 12);
if (strtemp1 === "MainAbility2") {
listtemp1.push(templist2[j]);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录