Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
0373f2f4
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看板
提交
0373f2f4
编写于
11月 02, 2022
作者:
L
lwx1121892
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
new enum
Signed-off-by:
N
lwx1121892
<
liuxueqi3@huawei.com
>
上级
d3314664
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
22 addition
and
1 deletion
+22
-1
multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraInputTest.test.ets
...rd/src/main/ets/MainAbility/test/CameraInputTest.test.ets
+1
-1
multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraJSUnitOutput.test.ets
...src/main/ets/MainAbility/test/CameraJSUnitOutput.test.ets
+21
-0
未找到文件。
multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraInputTest.test.ets
浏览文件 @
0373f2f4
...
...
@@ -621,7 +621,7 @@ export default function CameraInputTest(surfaceId) {
})
.
catch
((
err
)
=>
{
successFlag
=
false
;
console
.
info
(
TAG
+
functionTag
+
"open FAILED: "
+
err
.
message
);
});
;
});
await
sleep
(
400
);
await
cameraInput
.
close
()
.
then
(
async
()
=>
{
console
.
info
(
TAG
+
functionTag
+
"PASSED close with CameraID :"
+
camerasArray
[
i
]
.
cameraId
);
...
...
multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraJSUnitOutput.test.ets
浏览文件 @
0373f2f4
...
...
@@ -22,7 +22,16 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from
const
TAG
=
"CameraUnitTest: "
;
let
captureLocation
=
{
latitude
:
0
,
longitude
:
0
,
altitude
:
0
,
}
let
captureSetting
=
{
quality
:
cameraObj
.
QualityLevel
.
QUALITY_LEVEL_LOW
,
rotation
:
cameraObj
.
ImageRotation
.
ROTATION_0
,
location
:
captureLocation
,
mirror
:
false
}
// 创建视频录制的参数
...
...
@@ -1092,6 +1101,7 @@ export default function cameraJSUnitOutput(surfaceId: any) {
expect
()
.
assertFail
();
});
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_GET_METADATA_BOUNDING_BOX_PROMISE_0100 success, boundingBox : "
+
boundingBox
.
width
+
"x"
+
boundingBox
.
height
);
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_GET_METADATA_BOUNDING_BOX_PROMISE_0100 success, boundingBox : "
+
boundingBox
.
topLeftX
+
"x"
+
boundingBox
.
topLeftY
);
}
await
sleep
(
1000
);
done
();
...
...
@@ -1478,6 +1488,13 @@ export default function cameraJSUnitOutput(surfaceId: any) {
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CAPTURE_SETTING_PROMISE_0100 photoOutput == null || undefined"
)
expect
()
.
assertFail
();
}
else
{
console
.
info
(
'SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CAPTURE_SETTING_PROMISE_0100 captureSetting.quality = '
+
captureSetting
.
quality
);
console
.
info
(
'SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CAPTURE_SETTING_PROMISE_0100 captureSetting.rotation = '
+
captureSetting
.
rotation
);
console
.
info
(
'SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CAPTURE_SETTING_PROMISE_0100 captureSetting.location.latitude = '
+
captureSetting
.
location
.
latitude
);
console
.
info
(
'SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CAPTURE_SETTING_PROMISE_0100 captureSetting.location.longitude = '
+
captureSetting
.
location
.
longitude
);
console
.
info
(
'SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CAPTURE_SETTING_PROMISE_0100 captureSetting.location.altitude = '
+
captureSetting
.
location
.
altitude
);
console
.
info
(
'SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CAPTURE_SETTING_PROMISE_0100 captureSetting.mirror = '
+
captureSetting
.
mirror
);
await
photoOutput
.
capture
(
captureSetting
)
.
then
((
result
)
=>
{
console
.
info
(
'SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CAPTURE_SETTING_PROMISE_0100 success :'
+
result
);
})
.
catch
((
err
)
=>
{
...
...
@@ -1575,6 +1592,8 @@ export default function cameraJSUnitOutput(surfaceId: any) {
if
(
!
err
)
{
expect
(
true
)
.
assertTrue
();
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
);
}
else
{
expect
()
.
assertFail
();
console
.
info
(
TAG
+
"Error in SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CALLBACK_ON_FRAME_SHUTTER_0100 FAILED: "
+
err
.
message
);
...
...
@@ -1608,6 +1627,8 @@ export default function cameraJSUnitOutput(surfaceId: any) {
if
(
!
err
)
{
expect
(
true
)
.
assertTrue
();
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
);
}
else
{
expect
()
.
assertFail
();
console
.
info
(
TAG
+
"Error in SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CALLBACK_ON_CAPTURE_END_0100 FAILED: "
+
err
.
message
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录