Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
6ef59106
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,发现更多精彩内容 >>
提交
6ef59106
编写于
10月 12, 2022
作者:
Y
yygxr
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix camera session and manager test case error
Signed-off-by:
N
yygxr
<
wuhao30@huawei.com
>
上级
9c22a462
变更
8
展开全部
隐藏空白更改
内联
并排
Showing
8 changed file
with
209 addition
and
399 deletion
+209
-399
multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraJSUnitOutput.test.ets
...src/main/ets/MainAbility/test/CameraJSUnitOutput.test.ets
+2
-2
multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraManagerTest.test.ets
.../src/main/ets/MainAbility/test/CameraManagerTest.test.ets
+197
-289
multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraSessionBaseTest.test.ets
.../main/ets/MainAbility/test/CameraSessionBaseTest.test.ets
+0
-98
multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraSessionExposureTest.test.ets
...n/ets/MainAbility/test/CameraSessionExposureTest.test.ets
+2
-2
multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraSessionFlashTest.test.ets
...main/ets/MainAbility/test/CameraSessionFlashTest.test.ets
+2
-2
multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraSessionFocusTest.test.ets
...main/ets/MainAbility/test/CameraSessionFocusTest.test.ets
+2
-2
multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraSessionVideoStabilizationTest.test.ets
...Ability/test/CameraSessionVideoStabilizationTest.test.ets
+2
-2
multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraSessionZoomRatioTest.test.ets
.../ets/MainAbility/test/CameraSessionZoomRatioTest.test.ets
+2
-2
未找到文件。
multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraJSUnitOutput.test.ets
100644 → 100755
浏览文件 @
6ef59106
...
@@ -43,7 +43,7 @@ let videoConfig = {
...
@@ -43,7 +43,7 @@ let videoConfig = {
audioSourceType
:
1
,
audioSourceType
:
1
,
videoSourceType
:
0
,
videoSourceType
:
0
,
profile
:
videoProfile
,
profile
:
videoProfile
,
url
:
'file:///data/media/
01
.mp4'
,
url
:
'file:///data/media/
CameraOutput
.mp4'
,
orientationHint
:
0
,
orientationHint
:
0
,
location
:
{
latitude
:
30
,
longitude
:
130
},
location
:
{
latitude
:
30
,
longitude
:
130
},
maxSize
:
100
,
maxSize
:
100
,
...
@@ -115,7 +115,7 @@ export default function cameraJSUnitOutput(surfaceId: any) {
...
@@ -115,7 +115,7 @@ export default function cameraJSUnitOutput(surfaceId: any) {
async
function
getvideosurface
()
{
async
function
getvideosurface
()
{
await
getFd
(
'
02
.mp4'
);
await
getFd
(
'
CameraOutput
.mp4'
);
videoConfig
.
url
=
fdPath
;
videoConfig
.
url
=
fdPath
;
media
.
createVideoRecorder
((
err
,
recorder
)
=>
{
media
.
createVideoRecorder
((
err
,
recorder
)
=>
{
console
.
info
(
TAG
+
'createVideoRecorder called'
)
console
.
info
(
TAG
+
'createVideoRecorder called'
)
...
...
multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraManagerTest.test.ets
100644 → 100755
浏览文件 @
6ef59106
此差异已折叠。
点击以展开。
multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraSessionBaseTest.test.ets
浏览文件 @
6ef59106
...
@@ -873,104 +873,6 @@ export default function cameraSessionTest(surfaceId: any) {
...
@@ -873,104 +873,6 @@ export default function cameraSessionTest(surfaceId: any) {
}
}
})
})
/**
* @tc.number : SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_CALLBACK_0100
* @tc.name : Check capture session start/stop with callback or not
* @tc.desc : Check capture session start/stop with callback or not
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_CALLBACK_0100'
,
0
,
async
function
(
done
)
{
console
.
info
(
"--------------SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_CALLBACK_0100--------------"
);
if
(
isEmpty
(
mCameraInputArray
))
{
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_CALLBACK_0100 FAILED with NoCamera"
);
expect
()
.
assertFail
();
done
();
}
else
{
for
(
let
i
=
0
;
i
<
mCameraInputArray
.
length
;
i
++
)
{
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_CALLBACK_0100 start for camera["
+
i
+
"]"
);
await
startCameraSession
(
i
);
mCameraSession
.
start
(
async
(
err
)
=>
{
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_CALLBACK_0100 start callback"
);
if
(
!
err
)
{
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_CALLBACK_0100 start PASSED"
);
}
else
{
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_CALLBACK_0100 start FAILED : "
+
err
.
message
);
expect
()
.
assertFail
();
}
})
await
sleep
(
2000
);
mCameraSession
.
stop
(
async
(
err
)
=>
{
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_CALLBACK_0100 stop callback"
);
if
(
!
err
)
{
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_CALLBACK_0100 stop PASSED"
);
}
else
{
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_CALLBACK_0100 stop FAILED : "
+
err
.
message
);
expect
()
.
assertFail
();
}
})
await
sleep
(
500
);
await
beginCameraSessionConfig
();
await
stopCameraSession
(
i
);
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_CALLBACK_0100 end for camera["
+
i
+
"]"
);
}
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_CALLBACK_0100 ends here"
);
done
();
}
})
/**
* @tc.number : SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_PROMISE_0100
* @tc.name : Check capture session start/stop output with promise or not
* @tc.desc : Check capture session start/stop output with promise or not
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_PROMISE_0100'
,
0
,
async
function
(
done
)
{
console
.
info
(
"--------------SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_PROMISE_0100--------------"
);
if
(
isEmpty
(
mCameraInputArray
))
{
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_PROMISE_0100 FAILED with NoCamera"
);
expect
()
.
assertFail
();
done
();
}
else
{
for
(
let
i
=
0
;
i
<
mCameraInputArray
.
length
;
i
++
)
{
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_PROMISE_0100 start for camera["
+
i
+
"]"
);
await
startCameraSession
(
i
);
await
mCameraSession
.
start
();
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_PROMISE_0100 start PASSED"
);
await
sleep
(
2000
);
await
mCameraSession
.
stop
();
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_PROMISE_0100 stop PASSED"
);
await
sleep
(
500
);
await
beginCameraSessionConfig
();
await
stopCameraSession
(
i
);
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_PROMISE_0100 end for camera["
+
i
+
"]"
);
}
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_PROMISE_0100 ends here"
);
done
();
}
})
/**
/**
* @tc.number : SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_INPUT_CALLBACK_0100
* @tc.number : SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_INPUT_CALLBACK_0100
* @tc.name : Check capture session add/remove input with callback or not
* @tc.name : Check capture session add/remove input with callback or not
...
...
multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraSessionExposureTest.test.ets
浏览文件 @
6ef59106
...
@@ -594,7 +594,7 @@ export default function cameraSessionExposureTest(surfaceId: any) {
...
@@ -594,7 +594,7 @@ export default function cameraSessionExposureTest(surfaceId: any) {
sleep
(
100
);
sleep
(
100
);
await
applyPermission
();
await
applyPermission
();
await
getPhotoReceiverSurface
();
await
getPhotoReceiverSurface
();
//
await getVideoReceiveSurface();
await
getVideoReceiveSurface
();
await
getCameraManagerInstance
();
await
getCameraManagerInstance
();
await
getCameraSupportDevicesArray
();
await
getCameraSupportDevicesArray
();
await
createCameraSessionInstance
();
await
createCameraSessionInstance
();
...
@@ -618,7 +618,7 @@ export default function cameraSessionExposureTest(surfaceId: any) {
...
@@ -618,7 +618,7 @@ export default function cameraSessionExposureTest(surfaceId: any) {
afterAll
(
function
()
{
afterAll
(
function
()
{
releaseInputs
();
releaseInputs
();
releaseOutputs
();
releaseOutputs
();
//
releaseVideoReceiveSurface();
releaseVideoReceiveSurface
();
releaseCameraSessionInstance
();
releaseCameraSessionInstance
();
sleep
(
100
);
sleep
(
100
);
console
.
info
(
'afterAll case'
);
console
.
info
(
'afterAll case'
);
...
...
multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraSessionFlashTest.test.ets
浏览文件 @
6ef59106
...
@@ -545,7 +545,7 @@ export default function cameraSessionFlashTest(surfaceId: any) {
...
@@ -545,7 +545,7 @@ export default function cameraSessionFlashTest(surfaceId: any) {
sleep
(
100
);
sleep
(
100
);
await
applyPermission
();
await
applyPermission
();
await
getPhotoReceiverSurface
();
await
getPhotoReceiverSurface
();
//
await getVideoReceiveSurface();
await
getVideoReceiveSurface
();
await
mgetCameraManagerInstance
();
await
mgetCameraManagerInstance
();
await
getCameraSupportDevicesArray
();
await
getCameraSupportDevicesArray
();
await
createCameraSessionInstance
();
await
createCameraSessionInstance
();
...
@@ -569,7 +569,7 @@ export default function cameraSessionFlashTest(surfaceId: any) {
...
@@ -569,7 +569,7 @@ export default function cameraSessionFlashTest(surfaceId: any) {
afterAll
(
function
()
{
afterAll
(
function
()
{
releaseInputs
();
releaseInputs
();
releaseOutputs
();
releaseOutputs
();
//
releaseVideoReceiveSurface();
releaseVideoReceiveSurface
();
releaseCameraSessionInstance
();
releaseCameraSessionInstance
();
sleep
(
100
);
sleep
(
100
);
console
.
info
(
'afterAll case'
);
console
.
info
(
'afterAll case'
);
...
...
multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraSessionFocusTest.test.ets
浏览文件 @
6ef59106
...
@@ -590,7 +590,7 @@ export default function cameraSessionFocusTest(surfaceId: any) {
...
@@ -590,7 +590,7 @@ export default function cameraSessionFocusTest(surfaceId: any) {
sleep
(
100
);
sleep
(
100
);
await
applyPermission
();
await
applyPermission
();
await
getPhotoReceiverSurface
();
await
getPhotoReceiverSurface
();
//
await getVideoReceiveSurface();
await
getVideoReceiveSurface
();
await
getCameraManagerInstance
();
await
getCameraManagerInstance
();
await
getCameraSupportDevicesArray
();
await
getCameraSupportDevicesArray
();
await
createCameraSessionInstance
();
await
createCameraSessionInstance
();
...
@@ -614,7 +614,7 @@ export default function cameraSessionFocusTest(surfaceId: any) {
...
@@ -614,7 +614,7 @@ export default function cameraSessionFocusTest(surfaceId: any) {
afterAll
(
function
()
{
afterAll
(
function
()
{
releaseInputs
();
releaseInputs
();
releaseOutputs
();
releaseOutputs
();
//
releaseVideoReceiveSurface();
releaseVideoReceiveSurface
();
releaseCameraSessionInstance
();
releaseCameraSessionInstance
();
sleep
(
100
);
sleep
(
100
);
console
.
info
(
'afterAll case'
);
console
.
info
(
'afterAll case'
);
...
...
multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraSessionVideoStabilizationTest.test.ets
浏览文件 @
6ef59106
...
@@ -543,7 +543,7 @@ export default function cameraSessionVideoStabilizationTest(surfaceId: any) {
...
@@ -543,7 +543,7 @@ export default function cameraSessionVideoStabilizationTest(surfaceId: any) {
sleep
(
100
);
sleep
(
100
);
await
applyPermission
();
await
applyPermission
();
await
getPhotoReceiverSurface
();
await
getPhotoReceiverSurface
();
//
await getVideoReceiveSurface();
await
getVideoReceiveSurface
();
await
getCameraManagerInstance
();
await
getCameraManagerInstance
();
await
getCameraSupportDevicesArray
();
await
getCameraSupportDevicesArray
();
await
createCameraSessionInstance
();
await
createCameraSessionInstance
();
...
@@ -567,7 +567,7 @@ export default function cameraSessionVideoStabilizationTest(surfaceId: any) {
...
@@ -567,7 +567,7 @@ export default function cameraSessionVideoStabilizationTest(surfaceId: any) {
afterAll
(
function
()
{
afterAll
(
function
()
{
releaseInputs
();
releaseInputs
();
releaseOutputs
();
releaseOutputs
();
//
releaseVideoReceiveSurface();
releaseVideoReceiveSurface
();
releaseCameraSessionInstance
();
releaseCameraSessionInstance
();
sleep
(
100
);
sleep
(
100
);
console
.
info
(
'afterAll case'
);
console
.
info
(
'afterAll case'
);
...
...
multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraSessionZoomRatioTest.test.ets
浏览文件 @
6ef59106
...
@@ -548,7 +548,7 @@ export default function cameraSessionZoomRatioTest(surfaceId: any) {
...
@@ -548,7 +548,7 @@ export default function cameraSessionZoomRatioTest(surfaceId: any) {
await
applyPermission
();
await
applyPermission
();
await
getPhotoReceiverSurface
();
await
getPhotoReceiverSurface
();
//
await getVideoReceiveSurface();
await
getVideoReceiveSurface
();
await
getCameraManagerInstance
();
await
getCameraManagerInstance
();
await
getCameraSupportDevicesArray
();
await
getCameraSupportDevicesArray
();
await
createCameraSessionInstance
();
await
createCameraSessionInstance
();
...
@@ -572,7 +572,7 @@ export default function cameraSessionZoomRatioTest(surfaceId: any) {
...
@@ -572,7 +572,7 @@ export default function cameraSessionZoomRatioTest(surfaceId: any) {
afterAll
(
function
()
{
afterAll
(
function
()
{
releaseInputs
();
releaseInputs
();
releaseOutputs
();
releaseOutputs
();
//
releaseVideoReceiveSurface();
releaseVideoReceiveSurface
();
releaseCameraSessionInstance
();
releaseCameraSessionInstance
();
sleep
(
100
);
sleep
(
100
);
console
.
info
(
'afterAll case'
);
console
.
info
(
'afterAll case'
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录