Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
fb696571
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看板
未验证
提交
fb696571
编写于
8月 30, 2022
作者:
O
openharmony_ci
提交者:
Gitee
8月 30, 2022
浏览文件
操作
浏览文件
下载
差异文件
!5312 fix Singlehap_LifeCycleTest_0600 testcase failed
Merge pull request !5312 from laoyitong/master
上级
81693e90
25ea9246
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
21 addition
and
14 deletion
+21
-14
ability/ability_runtime/stage/actslifecyclesinglehaptest/entry/src/main/ets/test/LifeCycleTest.ets
...lesinglehaptest/entry/src/main/ets/test/LifeCycleTest.ets
+21
-14
未找到文件。
ability/ability_runtime/stage/actslifecyclesinglehaptest/entry/src/main/ets/test/LifeCycleTest.ets
浏览文件 @
fb696571
...
...
@@ -483,26 +483,33 @@ export default function lifecycleTest() {
console.log(TAG + " callbackid1 : " + JSON.stringify(globalThis.callbackid1));
var strtemp = "";
var listtemp = [];
var listtemp2 = [];
for (var i = 0; i < globalThis.list1.length; i++) {
strtemp = globalThis.list1[i].substring(0, 12);
if (strtemp == "MainAbility
5" || strtemp == "MainAbility
2") {
if (strtemp == "MainAbility2") {
listtemp.push(globalThis.list1[i]);
} else if (strtemp == "MainAbility5") {
listtemp2.push(globalThis.list1[i]);
}
}
console.log(TAG + " listtemp is :" + JSON.stringify(listtemp));
console.log(TAG + " listtemp2 is :" + JSON.stringify(listtemp2));
let exlist = listtemp;
expect(exlist[0]).assertEqual("MainAbility5 onAbilityCreate");
expect(exlist[1]).assertEqual("MainAbility5 onWindowStageCreate");
expect(exlist[2]).assertEqual("MainAbility5 onAbilityForeground");
expect(exlist[3]).assertEqual("MainAbility5 onAbilityBackground");
expect(exlist[4]).assertEqual("MainAbility5 onWindowStageDestroy");
expect(exlist[5]).assertEqual("MainAbility5 onAbilityDestroy");
expect(exlist[6]).assertEqual("MainAbility2 onAbilityCreate");
expect(exlist[7]).assertEqual("MainAbility2 onWindowStageCreate");
expect(exlist[8]).assertEqual("MainAbility2 onAbilityForeground");
expect(exlist[9]).assertEqual("MainAbility2 onAbilityBackground");
expect(exlist[10]).assertEqual("MainAbility2 onWindowStageDestroy");
expect(exlist[11]).assertEqual("MainAbility2 onAbilityDestroy");
let exlist2 = listtemp2;
expect(exlist[0]).assertEqual("MainAbility2 onAbilityCreate");
expect(exlist[1]).assertEqual("MainAbility2 onWindowStageCreate");
expect(exlist[2]).assertEqual("MainAbility2 onAbilityForeground");
expect(exlist[3]).assertEqual("MainAbility2 onAbilityBackground");
expect(exlist[4]).assertEqual("MainAbility2 onWindowStageDestroy");
expect(exlist[5]).assertEqual("MainAbility2 onAbilityDestroy");
expect(exlist2[0]).assertEqual("MainAbility5 onAbilityCreate");
expect(exlist2[1]).assertEqual("MainAbility5 onWindowStageCreate");
expect(exlist2[2]).assertEqual("MainAbility5 onAbilityForeground");
expect(exlist2[3]).assertEqual("MainAbility5 onAbilityBackground");
expect(exlist2[4]).assertEqual("MainAbility5 onWindowStageDestroy");
expect(exlist2[5]).assertEqual("MainAbility5 onAbilityDestroy");
globalThis.applicationContext1
.unregisterAbilityLifecycleCallback(globalThis.callbackid1, (error, data) => {
console.log(TAG + ": unregisterAbilityLifecycleCallback success, err: " + JSON.stringify(error) +
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录