Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
d2662917
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看板
未验证
提交
d2662917
编写于
11月 16, 2022
作者:
O
openharmony_ci
提交者:
Gitee
11月 16, 2022
浏览文件
操作
浏览文件
下载
差异文件
!6513 【窗口子系统】优化windowCallback_test#setSystemBarPropertiesTest5用例
Merge pull request !6513 from 华华小仙女/master
上级
8d0569bb
d5f5fde0
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
26 addition
and
5 deletion
+26
-5
graphic/windowStage/entry/src/main/ets/test/windowCallback.test.ets
...ndowStage/entry/src/main/ets/test/windowCallback.test.ets
+26
-5
未找到文件。
graphic/windowStage/entry/src/main/ets/test/windowCallback.test.ets
浏览文件 @
d2662917
...
...
@@ -695,6 +695,7 @@ export default function windowCallbackTest(context, windowStage, abilityStorage)
}
let arrLength = systemBarData.regionTint.length;
for (let i = 0; i < arrLength; i++) {
console.log(msgStr + 'for arrLenght compareCount: ' + compareCount + ' ,i:'+i);
let tempData = systemBarData.regionTint[i];
if (tempData.type === ohosWindow.WindowType.TYPE_STATUS_BAR) {
console.log(msgStr + 'systemBarTintChange compare start! arrLength= ' + arrLength);
...
...
@@ -711,6 +712,19 @@ export default function windowCallbackTest(context, windowStage, abilityStorage)
} else {
console.log(msgStr + 'SCC tempData.contentColor:' + JSON.stringify(tempData.contentColor));
}
let ca = cloneColorArr;
let flag = ca.NCC.length || ca.NBC.length || ca.SBC.length || ca.SCC.length
if (compareCount === 18 && !flag) {
console.log(msgStr + 'if compareCount: ' + compareCount + ' ,true flag:' + flag);
try {
expect(true).assertTrue();
} catch (error) {
console.info(`ohosWindow.on catch error: ${JSON.stringify(error)}`)
}
done();
} else {
console.log(msgStr + 'compareCount: ' + compareCount + ' ,flag:' + flag);
}
console.log(msgStr + 'compareCount: ' + compareCount + ' ,length: ' + JSON.stringify(cloneColorArr.SCC.length) + ' ,cloneColorArr.SBC:' + JSON.stringify(cloneColorArr.SBC));
console.log(msgStr + 'compareCount: ' + compareCount + ' ,length: ' + JSON.stringify(cloneColorArr.SCC.length) + ' ,cloneColorArr.SCC' + JSON.stringify(cloneColorArr.SCC));
} else if (tempData.type === ohosWindow.WindowType.TYPE_NAVIGATION_BAR) {
...
...
@@ -731,7 +745,7 @@ export default function windowCallbackTest(context, windowStage, abilityStorage)
let ca = cloneColorArr;
let flag = ca.NCC.length || ca.NBC.length || ca.SBC.length || ca.SCC.length
if (compareCount === 18 && !flag) {
console.log(msgStr + 'compareCount: ' + compareCount + ' ,true flag:' + flag);
console.log(msgStr + '
else
compareCount: ' + compareCount + ' ,true flag:' + flag);
try {
expect(true).assertTrue();
} catch (error) {
...
...
@@ -793,6 +807,7 @@ export default function windowCallbackTest(context, windowStage, abilityStorage)
listenerFlag = listenerStatus.pending;
let loopCount = commonNUMBERColorArr.length
for (let i = 0; i < loopCount; i++) {
console.log(msgStr+'tempWnd.setSystemBarEnable i:'+i);
let tempColor = commonNUMBERColorArr[i];
let systemBarProperties = {
statusBarColor: tempColor,
...
...
@@ -811,7 +826,6 @@ export default function windowCallbackTest(context, windowStage, abilityStorage)
} catch (error) {
console.info(`tempWnd.setSystemBarProperties catch error: ${JSON.stringify(error)}`)
}
done();
}
})
}
...
...
@@ -1188,7 +1202,9 @@ export default function windowCallbackTest(context, windowStage, abilityStorage)
}
let loopCount1 = systemWindowTypeArr;
console.log(msgStr + 'ohosWindow.windowType' + JSON.stringify(loopCount1))
for (let i = 0; i < loopCount1.length; i++) {
getData(0, loopCount1.length)
function getData(i, length) {
let tempType = ohosWindow.WindowType[loopCount1[i]];
console.log(msgStr + 'tempWnd.setWindowType ' + tempType + ' start');
tempTypeArr.push(tempType);
...
...
@@ -1211,7 +1227,6 @@ export default function windowCallbackTest(context, windowStage, abilityStorage)
console.log(msgStr + 'tempWnd.getProperties dataProper: ' + JSON.stringify(dataProper));
console.log(msgStr + 'tempWnd.getProperties !!dataProper: ' + !!dataProper);
try {
expect(!!dataProper).assertTrue();
} catch (error) {
console.info(`tempWnd.getProperties catch error: ${JSON.stringify(error)}`)
...
...
@@ -1223,8 +1238,14 @@ export default function windowCallbackTest(context, windowStage, abilityStorage)
console.log(msgStr + 'tempWnd.getProperties true tempTypeArr.length: ' + tempTypeArr.length);
console.log(msgStr + 'tempWnd.getProperties true loopCount1.length: ' + loopCount1.length);
console.log(msgStr + 'tempWnd.getProperties true tempTypeArr.length + 1: ' + Number(tempTypeArr.length + 1));
console.log(msgStr + 'tempWnd.getProperties true (loopCount1.length - i): ' + (loopCount1.length - i));
console.log(msgStr + 'tempWnd.getProperties true (tempTypeArr.length + 1): ' + (tempTypeArr.length + 1));
try {
expect((loopCount1.length - i) == (tempTypeArr.length + 1)).assertTrue();
expect(tempTypeArr.length === 0).assertTrue();
if (++i < length) {
getData(i, length)
console.log(msgStr + 'jixuzhixing i: ' + i);
}
} catch (error) {
console.info(`tempWnd.getProperties catch error: ${JSON.stringify(error)}`)
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录