Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
ea1b537b
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看板
提交
ea1b537b
编写于
1月 13, 2023
作者:
M
mali
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'monthly_20221018' of
https://gitee.com/s_c_p/xts_acts
into monthly_20221018
Signed-off-by:
N
mali
<
mali81@huawei.com
>
上级
3cb6bd3e
91ac62a3
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
33 addition
and
156 deletion
+33
-156
multimedia/camera/camera_js_standard/Test.json
multimedia/camera/camera_js_standard/Test.json
+1
-1
multimedia/camera/camera_js_standard/entry/src/main/ets/test/CameraJSUnitOutput.test.ets
...ndard/entry/src/main/ets/test/CameraJSUnitOutput.test.ets
+10
-20
multimedia/camera/camera_js_standard/entry/src/main/ets/test/CameraSessionBaseTest.test.ets
...rd/entry/src/main/ets/test/CameraSessionBaseTest.test.ets
+12
-125
multimedia/camera/camera_js_standard/entry/src/main/ets/test/CameraSessionExposureTest.test.ets
...ntry/src/main/ets/test/CameraSessionExposureTest.test.ets
+6
-6
multimedia/camera/camera_js_standard/entry/src/main/ets/test/CameraSessionFocusTest.test.ets
...d/entry/src/main/ets/test/CameraSessionFocusTest.test.ets
+4
-4
未找到文件。
multimedia/camera/camera_js_standard/Test.json
浏览文件 @
ea1b537b
...
...
@@ -5,7 +5,7 @@
"test-timeout"
:
"3000000"
,
"bundle-name"
:
"com.open.harmony.multimedia.cameratest"
,
"package-name"
:
"com.open.harmony.multimedia.cameratest"
,
"shell-timeout"
:
"60000"
,
"shell-timeout"
:
"60000
0
"
,
"testcase-timeout"
:
100000
},
"kits"
:
[
...
...
multimedia/camera/camera_js_standard/entry/src/main/ets/test/CameraJSUnitOutput.test.ets
浏览文件 @
ea1b537b
...
...
@@ -1221,14 +1221,9 @@ export default function cameraJSUnitOutput() {
}
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
)
{
count
++
;
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CALLBACK_ON_CAPTURE_START_0100 success"
);
}
else
{
expect
()
.
assertFail
();
console
.
info
(
TAG
+
"Error in SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CALLBACK_ON_CAPTURE_START_0100 FAILED: "
+
err
.
message
);
}
photoOutput
.
on
(
'captureStart'
,
async
(
data
)
=>
{
count
++
;
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CALLBACK_ON_CAPTURE_START_0100 success"
);
await
sleep
(
1000
);
done
();
})
...
...
@@ -1297,18 +1292,13 @@ export default function cameraJSUnitOutput() {
}
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
)
{
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
);
}
else
{
expect
()
.
assertFail
();
console
.
info
(
TAG
+
"Error in SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CALLBACK_ON_CAPTURE_END_0100 FAILED: "
+
err
.
message
);
}
await
sleep
(
1000
);
done
();
photoOutput
.
on
(
'captureEnd'
,
async
(
data
)
=>
{
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
);
await
sleep
(
1000
);
done
();
})
await
sleep
(
1000
);
done
();
...
...
multimedia/camera/camera_js_standard/entry/src/main/ets/test/CameraSessionBaseTest.test.ets
浏览文件 @
ea1b537b
...
...
@@ -616,157 +616,44 @@ export default function cameraSessionTest() {
done
();
}
})
/**
* @tc.number : SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_
RELEASE_
PROMISE_0100
* @tc.number : SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_PROMISE_0100
* @tc.name : Check capture session start/stop/release output with promise or not
* @tc.desc : Check capture session start/stop/release output with promise or not
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_
RELEASE_
PROMISE_0100'
,
0
,
async
function
(
done
)
{
console
.
info
(
"--------------SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_
RELEASE_
PROMISE_0100--------------"
);
it
(
'SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_PROMISE_0100'
,
0
,
async
function
(
done
)
{
console
.
info
(
"--------------SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_PROMISE_0100--------------"
);
if
(
mCameraNum
==
0
)
{
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_
RELEASE_
PROMISE_0100 FAILED with NoCamera"
);
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_PROMISE_0100 FAILED with NoCamera"
);
expect
()
.
assertFail
();
done
();
}
else
{
for
(
let
i
=
0
;
i
<
mCameraNum
;
i
++
)
{
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_
RELEASE_
PROMISE_0100 start for camera["
+
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_
RELEASE_
PROMISE_0100 start PASSED"
);
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_RELEASE_PROMISE_0100 stop PASSED"
);
await
sleep
(
500
);
await
mCameraSession
.
release
();
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_RELEASE_PROMISE_0100 release PASSED"
);
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_PROMISE_0100 stop PASSED"
);
await
sleep
(
500
);
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_RELEASE_PROMISE_0100 end for camera["
+
i
+
"]"
);
await
stopCameraSession
();
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_
RELEASE_
PROMISE_0100 ends here"
);
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_PROMISE_0100 ends here"
);
done
();
}
})
// /**
// * @tc.number : SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_OUTPUT_PROMISE_0101
// * @tc.name : Check capture session can add/remove output with promise or not for photo
// * @tc.desc : Check capture session can add/remove output with promise or not for photo
// * @tc.size : MEDIUM
// * @tc.type : Function
// * @tc.level : Level 2
// */
// it('SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_OUTPUT_PROMISE_0101', 2, async function (done) {
// console.info("--------------SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_OUTPUT_PROMISE_0101--------------");
// if (mCameraNum == 0) {
// console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_OUTPUT_PROMISE_0101 FAILED with NoCamera");
// expect().assertFail();
// done();
// }
// else {
// await createInput(0);
// createOutput(0);
// if (!isEmpty(mPhotoOutput)) {
// if (!isEmpty(mPreviewOutput)) {
// console.info(TAG + "Start to addOutput mPreviewOutput");
// await mCameraSession.addOutput(mPreviewOutput);
// }
// mCameraSession.addOutput(mPhotoOutput);
// console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_OUTPUT_PROMISE_0101 add PASSED");
// mCameraSession.addInput(mCameraInput);
// await mCameraSession.commitConfig();
// mCameraSession.beginConfig();
// if (!isEmpty(mPreviewOutput)) {
// console.info(TAG + "Start to removeOutput mPreviewOutput");
// mCameraSession.removeOutput(mPreviewOutput);
// }
// mCameraSession.removeOutput(mPhotoOutput);
// console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_OUTPUT_PROMISE_0101 remove PASSED");
// mCameraSession.removeInput(mCameraInput);
// } else {
// console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_OUTPUT_PROMISE_0101 FAILED");
// expect().assertFail();
// }
// await releaseInput();
// await releaseOutput();
// console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_OUTPUT_PROMISE_0101 ends here");
// done();
// }
// })
// /**
// * @tc.number : SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_OUTPUT_PROMISE_0102
// * @tc.name : Check capture session can add/remove output with promise or not for video
// * @tc.desc : Check capture session can add/remove output with promise or not for video
// * @tc.size : MEDIUM
// * @tc.type : Function
// * @tc.level : Level 2
// */
// it('SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_OUTPUT_PROMISE_0102', 2, async function (done) {
// console.info("--------------SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_OUTPUT_PROMISE_0102--------------");
// if (mCameraNum == 0) {
// console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_OUTPUT_PROMISE_0102 FAILED with NoCamera");
// expect().assertFail();
// done();
// }
// else {
// await createInput(0);
// createOutput(0);
// if (!isEmpty(mVideoOutput)) {
// if (!isEmpty(mPreviewOutput)) {
// console.info(TAG + "Start to addOutput mPreviewOutput");
// mCameraSession.addOutput(mPreviewOutput);
// }
// mCameraSession.addOutput(mVideoOutput);
// console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_OUTPUT_PROMISE_0102 PASSED");
// mCameraSession.addInput(mCameraInput);
// await mCameraSession.commitConfig();
// mCameraSession.beginConfig();
// if (!isEmpty(mPreviewOutput)) {
// console.info(TAG + "Start to removeOutput mPreviewOutput");
// mCameraSession.removeOutput(mPreviewOutput);
// }
// mCameraSession.removeOutput(mVideoOutput);
// console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_OUTPUT_PROMISE_0102 remove PASSED");
// mCameraSession.removeInput(mCameraInput);
// } else {
// console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_OUTPUT_PROMISE_0102 FAILED");
// }
// await releaseInput();
// await releaseOutput();
// console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_OUTPUT_PROMISE_0102 ends here");
// done();
// }
// })
})
/**
* @tc.number : SUB_MULTIMEDIA_CAMERA_SESSION_RELEASE_PROMISE_0100
...
...
multimedia/camera/camera_js_standard/entry/src/main/ets/test/CameraSessionExposureTest.test.ets
浏览文件 @
ea1b537b
...
...
@@ -74,12 +74,12 @@ let mVideoConfig = {
maxDuration
:
500
}
let
mPicWidthMax
=
8192
;
let
mPicHeightMax
=
8192
;
let
mPicWidthMax
=
1
;
let
mPicHeightMax
=
1
;
let
mMETERINGPoint
=
{
x
:
mPicWidthMax
/
2
,
y
:
mPicHeightMax
/
2
,
x
:
mPicWidthMax
/
2
.0
,
y
:
mPicHeightMax
/
2
.0
,
}
let
mMETERINGPointLT
=
{
...
...
@@ -898,9 +898,9 @@ export default function cameraSessionExposureTest() {
}
else
{
for
(
let
i
=
0
;
i
<
mCameraNum
;
i
++
)
{
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_METERING_POINT_PROMISE_0101 start for camera["
+
i
+
"]"
);
await
startCameraSession
(
i
);
mCameraSession
.
setMeteringPoint
(
mMETERINGPointLT
);
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_METERING_POINT_PROMISE_0101 finish"
);
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_METERING_POINT_PROMISE_0101 PASSED with METERINGPoint is: "
+
mMETERINGPointLT
.
x
+
", "
+
mMETERINGPointLT
.
y
);
...
...
multimedia/camera/camera_js_standard/entry/src/main/ets/test/CameraSessionFocusTest.test.ets
浏览文件 @
ea1b537b
...
...
@@ -71,12 +71,12 @@ let mVideoConfig = {
maxDuration
:
500
}
let
mPicWidthMax
=
8192
;
let
mPicHeightMax
=
8192
;
let
mPicWidthMax
=
1
;
let
mPicHeightMax
=
1
;
let
mFocusPoint
=
{
x
:
mPicWidthMax
/
2
,
y
:
mPicHeightMax
/
2
,
x
:
mPicWidthMax
/
2
.0
,
y
:
mPicHeightMax
/
2
.0
,
}
let
mFocusPointLT
=
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录