Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
3738e156
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看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
3738e156
编写于
3月 19, 2022
作者:
O
openharmony_ci
提交者:
Gitee
3月 19, 2022
浏览文件
操作
浏览文件
下载
差异文件
!2650 【窗口子系统】修改窗口截屏用例耗时 和 修改接口错误码
Merge pull request !2650 from liziqiang/master
上级
2e936e64
afc3ee46
变更
5
展开全部
隐藏空白更改
内联
并排
Showing
5 changed file
with
478 addition
and
34 deletion
+478
-34
graphic/windowstandard/src/main/js/default/pages/index/index.js
...c/windowstandard/src/main/js/default/pages/index/index.js
+3
-0
graphic/windowstandard/src/main/js/default/test/List.test.js
graphic/windowstandard/src/main/js/default/test/List.test.js
+1
-1
graphic/windowstandard/src/main/js/default/test/screenshot.test.js
...indowstandard/src/main/js/default/test/screenshot.test.js
+443
-0
graphic/windowstandard/src/main/js/default/test/window.api.part2.js
...ndowstandard/src/main/js/default/test/window.api.part2.js
+29
-31
graphic/windowstandard/src/main/js/default/test/window.promise.js
...windowstandard/src/main/js/default/test/window.promise.js
+2
-2
未找到文件。
graphic/windowstandard/src/main/js/default/pages/index/index.js
浏览文件 @
3738e156
...
...
@@ -24,5 +24,8 @@ export default {
},
onInit
()
{
this
.
title
=
this
.
$t
(
'
strings.world
'
);
const
configService
=
core
.
getDefaultService
(
'
config
'
);
this
.
timeout
=
15000
;
configService
.
setConfig
(
this
);
}
}
graphic/windowstandard/src/main/js/default/test/List.test.js
浏览文件 @
3738e156
...
...
@@ -17,5 +17,5 @@ require('./window.api.part2.js')
require
(
'
./window.test.js
'
)
require
(
'
./window.parameter.js
'
)
require
(
'
./window.promise.js
'
)
require
(
'
./
display.screenshot.api
.js
'
)
require
(
'
./
screenshot.test
.js
'
)
graphic/windowstandard/src/main/js/default/test/
display.screenshot.api
.js
→
graphic/windowstandard/src/main/js/default/test/
screenshot.test
.js
浏览文件 @
3738e156
此差异已折叠。
点击以展开。
graphic/windowstandard/src/main/js/default/test/window.api.part2.js
浏览文件 @
3738e156
...
...
@@ -29,49 +29,48 @@ describe('window_api_test', function() {
* @tc.name Test faModelOnOffTest1.
* @tc.desc To verify the function of enabling and disabling the monitoring function for tone change on the system bar..
*/
it
(
'
faModelOnOffTest1
'
,
0
,
async
function
(
done
)
{
it
(
'
faModelOnOffTest1
'
,
0
,
async
function
(
done
)
{
console
.
log
(
'
jsunittest faModelOnOffTest1 begin
'
);
var
listenerStatus
;
//1表示开启 其他为关闭
var
listenerStatus
;
var
callback
=
(
data
)
=>
{
console
.
log
(
'
jsunittest faModelOnOffTest1 create callback
'
+
JSON
.
stringify
(
data
));
listenerStatus
=
1
;
console
.
log
(
'
jsunittest faModelOnOffTest1 listenerStatus 1:
'
+
listenerStatus
);
}
window
.
on
(
'
systemBarTintChange
'
,
callback
);
setTimeout
(()
=>
{
window
.
getTopWindow
((
err
,
data
)
=>
{
window
.
getTopWindow
((
err
,
data
)
=>
{
if
(
err
.
code
!=
0
)
{
console
.
log
(
'
jsunittest faModelOnOffTest1 getTopWindow callback fail
'
+
JSON
.
stringify
(
err
.
code
));
expect
().
assertFail
();
done
();
}
expect
(
data
!=
null
).
assertTrue
();
data
.
setLayoutFullScreen
(
true
,
(
err
)
=>
{
if
(
err
.
code
!=
0
)
{
console
.
log
(
'
jsunittest faModelOnOffTest1
getTopWindow
callback fail
'
+
JSON
.
stringify
(
err
.
code
));
console
.
log
(
'
jsunittest faModelOnOffTest1
setLayoutFullScreen
callback fail
'
+
JSON
.
stringify
(
err
.
code
));
expect
().
assertFail
();
done
();
}
expect
(
data
!=
null
).
assertTrue
();
data
.
setLayoutFullScreen
(
true
,
(
err
)
=>
{
if
(
err
.
code
!=
0
)
{
console
.
log
(
'
jsunittest faModelOnOffTest1 setLayoutFullScreen callback fail
'
+
JSON
.
stringify
(
err
.
code
));
expect
().
assertFail
();
done
();
}
else
{
}
else
{
setTimeout
(()
=>
{
expect
(
listenerStatus
==
1
).
assertTrue
();
window
.
off
(
'
systemBarTintChange
'
);
listenerStatus
=
0
;
}
data
.
setLayoutFullScreen
(
false
,
(
err
)
=>
{
console
.
log
(
'
jsunittest faModelOnOffTest1 listenerStatus 2:
'
+
listenerStatus
);
if
(
err
.
code
!=
0
||
listenerStatus
==
1
)
{
console
.
log
(
'
jsunittest faModelOnOffTest1 setLayoutFullScreen callback fail
'
+
JSON
.
stringify
(
err
.
code
));
expect
().
assertFail
();
done
();
}
else
{
console
.
log
(
'
jsunittest faModelOnOffTest1 listenerStatus 3:
'
+
listenerStatus
);
console
.
log
(
'
jsunittest faModelOnOffTest1 off callback success
'
);
done
();
}
})
})
data
.
setLayoutFullScreen
(
false
,
(
err
)
=>
{
console
.
log
(
'
jsunittest faModelOnOffTest1 listenerStatus 2:
'
+
listenerStatus
);
if
(
err
.
code
!=
0
||
listenerStatus
==
1
)
{
console
.
log
(
'
jsunittest faModelOnOffTest1 setLayoutFullScreen callback fail
'
+
JSON
.
stringify
(
err
.
code
));
expect
().
assertFail
();
done
();
}
else
{
console
.
log
(
'
jsunittest faModelOnOffTest1 listenerStatus 3:
'
+
listenerStatus
);
console
.
log
(
'
jsunittest faModelOnOffTest1 off callback success
'
);
done
();
}
})
},
2000
);
}
})
}
,
1000
);
}
)
})
/**
...
...
@@ -101,7 +100,6 @@ describe('window_api_test', function() {
if
(
err
.
code
!=
0
)
{
console
.
log
(
'
jsunittest faModelOnOffTest2 setLayoutFullScreen callback fail
'
+
JSON
.
stringify
(
err
.
code
));
expect
().
assertFail
();
done
();
}
else
{
setTimeout
((
async
function
()
{
console
.
log
(
'
jsunittest faModelOnOffTest2 listenerStatus 111:
'
+
listenerStatus
);
...
...
@@ -759,7 +757,7 @@ describe('window_api_test', function() {
console
.
log
(
'
jsunittest faModelSetColorSpaceTest4 setColorSpace callback begin
'
+
JSON
.
stringify
(
err
));
if
(
err
.
code
!=
0
)
{
console
.
log
(
'
jsunittest faModelSetColorSpaceTest4 setColorSpace callback fail
'
+
JSON
.
stringify
(
err
.
code
));
expect
(
err
.
code
).
assertEqual
(
1
2
0
);
expect
(
err
.
code
).
assertEqual
(
1
3
0
);
done
();
}
else
{
expect
().
assertFail
();
...
...
graphic/windowstandard/src/main/js/default/test/window.promise.js
浏览文件 @
3738e156
...
...
@@ -84,7 +84,7 @@ describe('window_test', function() {
done
();
}).
catch
((
err
)
=>
{
console
.
log
(
'
jsunittest faModelSetColorSpaceTest2 wnd.setColorSpace failed, err :
'
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
).
assertEqual
(
1
2
0
);
expect
(
err
.
code
).
assertEqual
(
1
3
0
);
done
();
})
}).
catch
((
err
)
=>
{
...
...
@@ -462,7 +462,7 @@ describe('window_test', function() {
done
();
})
})
},
1
000
)
},
3
000
)
}).
catch
((
err
)
=>
{
console
.
log
(
'
jsunittest faModelMinimizeAllTest1 minimizeAll failed, err :
'
+
JSON
.
stringify
(
err
));
expect
().
assertFail
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录