Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
e238285f
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看板
提交
e238285f
编写于
11月 11, 2022
作者:
S
songchunpeng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
modify output xts
Signed-off-by:
N
songchunpeng
<
songchunpeng@huawei.com
>
上级
6527866f
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
33 addition
and
12 deletion
+33
-12
multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraJSUnitOutput.test.ets
...src/main/ets/MainAbility/test/CameraJSUnitOutput.test.ets
+33
-12
未找到文件。
multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraJSUnitOutput.test.ets
浏览文件 @
e238285f
...
...
@@ -387,9 +387,9 @@ export default function cameraJSUnitOutput(surfaceId: any) {
}
cameraInput
.
open
(
async
(
err
)
=>
{
if
(
!
err
)
{
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_CREATE_CAMERA_OUTPUT_PROMISE_0100 open callback"
);
expect
(
true
)
.
assertTrue
(
);
}
else
{
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_CREATE_CAMERA_OUTPUT_PROMISE_0100 FAILED: "
+
err
.
message
);
expect
()
.
assertFail
(
);
}
await
sleep
(
1000
);
done
();
...
...
@@ -881,7 +881,7 @@ export default function cameraJSUnitOutput(surfaceId: any) {
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_CAPTURE_SESSION_START_CALLBACK_0100 captureSession == null || undefined"
)
expect
()
.
assertFail
();
}
else
{
captureSession
.
start
(
async
(
err
,
data
)
=>
{
captureSession
.
start
(
async
(
err
)
=>
{
if
(
!
err
)
{
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_CAPTURE_SESSION_START_CALLBACK_0100 success"
);
expect
(
true
)
.
assertTrue
();
...
...
@@ -1204,7 +1204,7 @@ export default function cameraJSUnitOutput(surfaceId: any) {
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_START_PREVIEW_OUTPUT_CALLBACK_0100 previewOutput == null || undefined"
)
expect
()
.
assertFail
();
}
else
{
previewOutput
.
start
(
async
(
err
,
data
)
=>
{
previewOutput
.
start
(
async
(
err
)
=>
{
if
(
!
err
)
{
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_START_PREVIEW_OUTPUT_CALLBACK_0100 success"
);
expect
(
true
)
.
assertTrue
();
...
...
@@ -1236,7 +1236,7 @@ export default function cameraJSUnitOutput(surfaceId: any) {
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_STOP_PREVIEW_OUTPUT_CALLBACK_0100 previewOutput == null || undefined"
)
expect
()
.
assertFail
();
}
else
{
previewOutput
.
stop
(
async
(
err
,
data
)
=>
{
previewOutput
.
stop
(
async
(
err
)
=>
{
if
(
!
err
)
{
expect
(
true
)
.
assertTrue
();
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_STOP_PREVIEW_OUTPUT_CALLBACK_0100 success"
);
...
...
@@ -1269,10 +1269,11 @@ export default function cameraJSUnitOutput(surfaceId: any) {
expect
()
.
assertFail
();
}
else
{
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_PREVIEW_OUTPUT_CALLBACK_ON_FRAME_START_0100 to operate"
);
let
count
=
0
;
previewOutput
.
on
(
'frameStart'
,
async
(
err
,
data
)
=>
{
if
(
!
err
)
{
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_PREVIEW_OUTPUT_CALLBACK_ON_FRAME_START_0100 success"
);
expect
(
true
)
.
assertTrue
()
;
count
++
;
}
else
{
console
.
info
(
TAG
+
"Error in SUB_MULTIMEDIA_CAMERA_PREVIEW_OUTPUT_CALLBACK_ON_FRAME_START_0100 FAILED: "
+
err
.
message
);
expect
()
.
assertFail
();
...
...
@@ -1280,6 +1281,11 @@ export default function cameraJSUnitOutput(surfaceId: any) {
await
sleep
(
1000
);
done
();
})
await
sleep
(
1000
);
done
();
previewOutput
.
start
();
previewOutput
.
stop
();
// expect(count == 1).assertTrue();
}
await
sleep
(
1000
);
done
();
...
...
@@ -1302,9 +1308,10 @@ export default function cameraJSUnitOutput(surfaceId: any) {
expect
()
.
assertFail
();
}
else
{
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_PREVIEW_OUTPUT_CALLBACK_ON_FRAME_END_0100 to operate"
);
let
count
=
0
;
previewOutput
.
on
(
'frameEnd'
,
async
(
err
,
data
)
=>
{
if
(
!
err
)
{
expect
(
true
)
.
assertTrue
();
count
++
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_PREVIEW_OUTPUT_CALLBACK_ON_FRAME_END_0100 success"
);
}
else
{
expect
()
.
assertFail
();
...
...
@@ -1313,6 +1320,8 @@ export default function cameraJSUnitOutput(surfaceId: any) {
await
sleep
(
1000
);
done
();
})
previewOutput
.
stop
();
// expect(count == 1).assertTrue();
}
await
sleep
(
1000
);
done
();
...
...
@@ -1336,7 +1345,6 @@ export default function cameraJSUnitOutput(surfaceId: any) {
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_PREVIEW_OUTPUT_CALLBACK_ON_ERROR_0100 to operate"
);
previewOutput
.
on
(
'error'
,
async
(
err
,
data
)
=>
{
if
(
!
err
)
{
expect
(
true
)
.
assertTrue
();
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_PREVIEW_OUTPUT_CALLBACK_ON_ERROR_0100 success"
);
}
else
{
expect
()
.
assertFail
();
...
...
@@ -1559,9 +1567,10 @@ export default function cameraJSUnitOutput(surfaceId: any) {
expect
()
.
assertFail
();
}
else
{
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CALLBACK_ON_CAPTURE_START_0100 to operate"
);
let
count
=
0
;
photoOutput
.
on
(
'captureStart'
,
async
(
err
,
data
)
=>
{
if
(
!
err
)
{
expect
(
true
)
.
assertTrue
()
;
count
++
;
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CALLBACK_ON_CAPTURE_START_0100 success"
);
}
else
{
expect
()
.
assertFail
();
...
...
@@ -1570,6 +1579,8 @@ export default function cameraJSUnitOutput(surfaceId: any) {
await
sleep
(
1000
);
done
();
})
photoOutput
.
capture
();
// expect(count == 1).assertTrue();
}
await
sleep
(
1000
);
done
();
...
...
@@ -1592,9 +1603,10 @@ export default function cameraJSUnitOutput(surfaceId: any) {
expect
()
.
assertFail
();
}
else
{
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CALLBACK_ON_FRAME_SHUTTER_0100 to operate"
);
let
count
=
0
;
photoOutput
.
on
(
'frameShutter'
,
async
(
err
,
data
)
=>
{
if
(
!
err
)
{
expect
(
true
)
.
assertTrue
()
;
count
++
;
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CALLBACK_ON_FRAME_SHUTTER_0100 success"
);
console
.
info
(
TAG
+
"SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CALLBACK_ON_FRAME_SHUTTER_0100, captureId = "
+
data
.
captureId
);
console
.
info
(
TAG
+
"SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CALLBACK_ON_FRAME_SHUTTER_0100, timestamp = "
+
data
.
timestamp
);
...
...
@@ -1605,6 +1617,10 @@ export default function cameraJSUnitOutput(surfaceId: any) {
await
sleep
(
1000
);
done
();
})
await
sleep
(
1000
);
done
();
photoOutput
.
capture
();
// expect(count == 1).assertTrue();
}
await
sleep
(
1000
);
done
();
...
...
@@ -1627,9 +1643,10 @@ export default function cameraJSUnitOutput(surfaceId: any) {
expect
()
.
assertFail
();
}
else
{
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CALLBACK_ON_CAPTURE_END_0100 to operate"
);
let
count
=
0
;
photoOutput
.
on
(
'captureEnd'
,
async
(
err
,
data
)
=>
{
if
(
!
err
)
{
expect
(
true
)
.
assertTrue
()
;
count
++
;
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CALLBACK_ON_CAPTURE_END_0100 success"
);
console
.
info
(
TAG
+
"SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CALLBACK_ON_CAPTURE_END_0100, captureId = "
+
data
.
captureId
);
console
.
info
(
TAG
+
"SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CALLBACK_ON_CAPTURE_END_0100, frameCount = "
+
data
.
frameCount
);
...
...
@@ -1640,6 +1657,10 @@ export default function cameraJSUnitOutput(surfaceId: any) {
await
sleep
(
1000
);
done
();
})
await
sleep
(
1000
);
done
();
photoOutput
.
capture
();
// expect(count == 1).assertTrue();
}
await
sleep
(
1000
);
done
();
...
...
@@ -1695,7 +1716,7 @@ export default function cameraJSUnitOutput(surfaceId: any) {
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_RELEASE_CALLBACK_0100 photoOutput == null || undefined"
)
expect
()
.
assertFail
();
}
else
{
photoOutput
.
release
(
async
(
err
,
data
)
=>
{
photoOutput
.
release
(
async
(
err
)
=>
{
if
(
!
err
)
{
expect
(
true
)
.
assertTrue
();
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_RELEASE_CALLBACK_0100 success"
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录