Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
9ff621c1
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看板
未验证
提交
9ff621c1
编写于
6月 16, 2023
作者:
O
openharmony_ci
提交者:
Gitee
6月 16, 2023
浏览文件
操作
浏览文件
下载
差异文件
!8971 媒体CameraXTS监听整改
Merge pull request !8971 from 张永宽/master
上级
a0ed04a3
4cbde173
变更
3
展开全部
隐藏空白更改
内联
并排
Showing
3 changed file
with
151 addition
and
140 deletion
+151
-140
multimedia/camera/camera_js_standard/entry/src/main/ets/test/CameraEnumTest.test.ets
..._standard/entry/src/main/ets/test/CameraEnumTest.test.ets
+1
-1
multimedia/camera/camera_js_standard/entry/src/main/ets/test/CameraErrorCodeUsecaseTest.test.ets
...try/src/main/ets/test/CameraErrorCodeUsecaseTest.test.ets
+107
-107
multimedia/camera/camera_js_standard/entry/src/main/ets/test/CameraJSUnitOutput.test.ets
...ndard/entry/src/main/ets/test/CameraJSUnitOutput.test.ets
+43
-32
未找到文件。
multimedia/camera/camera_js_standard/entry/src/main/ets/test/CameraEnumTest.test.ets
浏览文件 @
9ff621c1
...
...
@@ -315,7 +315,7 @@ export default function cameraEnumTest() {
expect(camera.CameraErrorCode.DEVICE_SETTING_LOCKED == 7400106).assertTrue();
console.info(TAG + "--------------DEVICE_SETTING_LOCKED--------------");
expect(camera.CameraErrorCode.CONFLICT_CAMERA == 7400107).assertTrue();
//
console.info(TAG + "--------------CONFLICT_CAMERA--------------");
console.info(TAG + "--------------CONFLICT_CAMERA--------------");
expect(camera.CameraErrorCode.DEVICE_DISABLED == 7400108).assertTrue();
console.info(TAG + "--------------DEVICE_DISABLED--------------");
expect(camera.CameraErrorCode.DEVICE_PREEMPTED == 7400109).assertTrue();
...
...
multimedia/camera/camera_js_standard/entry/src/main/ets/test/CameraErrorCodeUsecaseTest.test.ets
浏览文件 @
9ff621c1
此差异已折叠。
点击以展开。
multimedia/camera/camera_js_standard/entry/src/main/ets/test/CameraJSUnitOutput.test.ets
浏览文件 @
9ff621c1
...
...
@@ -412,7 +412,7 @@ export default function cameraJSUnitOutput() {
* @tc.type : Function
* @tc.level : Level 1
*/
it
(
'SUB_MULTIMEDIA_CAMERA_CREATE_METADATA_OUTPUT_0100'
,
1
,
async
function
(
done
)
{
it
(
'SUB_MULTIMEDIA_CAMERA_CREATE_METADATA_OUTPUT_0100'
,
1
,
async
function
(
done
)
{
console
.
info
(
TAG
+
" --------------SUB_MULTIMEDIA_CAMERA_CREATE_METADATA_OUTPUT_CALLBACK_0100--------------"
);
if
(
isEmpty
(
cameraManager
))
{
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_CREATE_METADATA_OUTPUT_CALLBACK_0100 cameraManager == null || undefined"
)
...
...
@@ -574,7 +574,7 @@ export default function cameraJSUnitOutput() {
* @tc.type : Function
* @tc.level : Level 1
*/
it
(
'SUB_MULTIMEDIA_CAMERA_CAPTURE_SESSION_ADD_METADATA_OUTPUT_0100'
,
1
,
async
function
(
done
)
{
it
(
'SUB_MULTIMEDIA_CAMERA_CAPTURE_SESSION_ADD_METADATA_OUTPUT_0100'
,
1
,
async
function
(
done
)
{
console
.
info
(
TAG
+
" --------------SUB_MULTIMEDIA_CAMERA_CAPTURE_SESSION_ADD_METADATA_OUTPUT_CALLBACK_0100--------------"
);
if
(
isEmpty
(
captureSession
))
{
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_CAPTURE_SESSION_ADD_METADATA_OUTPUT_CALLBACK_0100 captureSession == null || undefined"
)
...
...
@@ -629,7 +629,7 @@ export default function cameraJSUnitOutput() {
* @tc.type : Function
* @tc.level : Level 1
*/
it
(
'SUB_MULTIMEDIA_CAMERA_ON_AVAILABLE_METADATA_OUTPUT_CALLBACK_0100'
,
1
,
async
function
(
done
)
{
it
(
'SUB_MULTIMEDIA_CAMERA_ON_AVAILABLE_METADATA_OUTPUT_CALLBACK_0100'
,
1
,
async
function
(
done
)
{
console
.
info
(
TAG
+
" --------------SUB_MULTIMEDIA_CAMERA_ON_AVAILABLE_METADATA_OUTPUT_CALLBACK_0100--------------"
);
if
(
isEmpty
(
metadataOutput
))
{
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_ON_AVAILABLE_METADATA_OUTPUT_CALLBACK_0100 metadataOutput == null || undefined"
)
...
...
@@ -693,7 +693,7 @@ export default function cameraJSUnitOutput() {
* @tc.type : Function
* @tc.level : Level 1
*/
it
(
'SUB_MULTIMEDIA_CAMERA_CAPTURE_SESSION_START_CALLBACK_0100'
,
1
,
async
function
(
done
)
{
it
(
'SUB_MULTIMEDIA_CAMERA_CAPTURE_SESSION_START_CALLBACK_0100'
,
1
,
async
function
(
done
)
{
console
.
info
(
TAG
+
" --------------SUB_MULTIMEDIA_CAMERA_CAPTURE_SESSION_START_CALLBACK_0100--------------"
);
if
(
isEmpty
(
captureSession
))
{
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_CAPTURE_SESSION_START_CALLBACK_0100 captureSession == null || undefined"
)
...
...
@@ -725,7 +725,7 @@ export default function cameraJSUnitOutput() {
* @tc.type : Function
* @tc.level : Level 1
*/
it
(
'SUB_MULTIMEDIA_CAMERA_START_METADATA_OUTPUT_CALLBACK_0100'
,
1
,
async
function
(
done
)
{
it
(
'SUB_MULTIMEDIA_CAMERA_START_METADATA_OUTPUT_CALLBACK_0100'
,
1
,
async
function
(
done
)
{
console
.
info
(
TAG
+
" --------------SUB_MULTIMEDIA_CAMERA_START_METADATA_OUTPUT_CALLBACK_0100--------------"
);
if
(
isEmpty
(
metadataOutput
))
{
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_START_METADATA_OUTPUT_CALLBACK_0100 metadataOutput == null || undefined"
)
...
...
@@ -753,7 +753,7 @@ export default function cameraJSUnitOutput() {
* @tc.type : Function
* @tc.level : Level 1
*/
it
(
'SUB_MULTIMEDIA_CAMERA_GET_METADATA_TYPE_PROMISE_0100'
,
1
,
async
function
(
done
)
{
it
(
'SUB_MULTIMEDIA_CAMERA_GET_METADATA_TYPE_PROMISE_0100'
,
1
,
async
function
(
done
)
{
console
.
info
(
TAG
+
" --------------SUB_MULTIMEDIA_CAMERA_GET_METADATA_TYPE_PROMISE_0100--------------"
);
if
(
isEmpty
(
mMetadataObjectArray
))
{
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_GET_METADATA_TYPE_PROMISE_0100 mMetadataObjectArray == null || undefined"
)
...
...
@@ -774,7 +774,7 @@ export default function cameraJSUnitOutput() {
* @tc.type : Function
* @tc.level : Level 1
*/
it
(
'SUB_MULTIMEDIA_CAMERA_GET_METADATA_TIMESTAMP_PROMISE_0100'
,
1
,
async
function
(
done
)
{
it
(
'SUB_MULTIMEDIA_CAMERA_GET_METADATA_TIMESTAMP_PROMISE_0100'
,
1
,
async
function
(
done
)
{
console
.
info
(
TAG
+
" --------------SUB_MULTIMEDIA_CAMERA_GET_METADATA_TIMESTAMP_PROMISE_0100--------------"
);
if
(
isEmpty
(
mMetadataObjectArray
))
{
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_GET_METADATA_TIMESTAMP_PROMISE_0100 mMetadataObjectArray == null || undefined"
)
...
...
@@ -795,7 +795,7 @@ export default function cameraJSUnitOutput() {
* @tc.type : Function
* @tc.level : Level 1
*/
it
(
'SUB_MULTIMEDIA_CAMERA_GET_METADATA_BOUNDING_BOX_PROMISE_0100'
,
1
,
async
function
(
done
)
{
it
(
'SUB_MULTIMEDIA_CAMERA_GET_METADATA_BOUNDING_BOX_PROMISE_0100'
,
1
,
async
function
(
done
)
{
console
.
info
(
TAG
+
" --------------SUB_MULTIMEDIA_CAMERA_GET_METADATA_BOUNDING_BOX_PROMISE_0100--------------"
);
if
(
isEmpty
(
mMetadataObjectArray
))
{
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_GET_METADATA_BOUNDING_BOX_PROMISE_0100 mMetadataObjectArray == null || undefined"
)
...
...
@@ -821,7 +821,7 @@ export default function cameraJSUnitOutput() {
* @tc.type : Function
* @tc.level : Level 1
*/
it
(
'SUB_MULTIMEDIA_CAMERA_STOP_METADATA_OUTPUT_CALLBACK_0100'
,
1
,
async
function
(
done
)
{
it
(
'SUB_MULTIMEDIA_CAMERA_STOP_METADATA_OUTPUT_CALLBACK_0100'
,
1
,
async
function
(
done
)
{
console
.
info
(
TAG
+
" --------------SUB_MULTIMEDIA_CAMERA_STOP_METADATA_OUTPUT_CALLBACK_0100--------------"
);
if
(
isEmpty
(
metadataOutput
))
{
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_STOP_METADATA_OUTPUT_CALLBACK_0100 metadataOutput == null || undefined"
)
...
...
@@ -1069,7 +1069,7 @@ export default function cameraJSUnitOutput() {
* @tc.type : Function
* @tc.level : Level 1
*/
it
(
'SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_IS_MIRROR_SUPPORTED_PROMISE_0100'
,
1
,
async
function
(
done
)
{
it
(
'SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_IS_MIRROR_SUPPORTED_PROMISE_0100'
,
1
,
async
function
(
done
)
{
console
.
info
(
TAG
+
" --------------SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_IS_MIRROR_SUPPORTED_PROMISE_0100--------------"
);
if
(
isEmpty
(
photoOutput
))
{
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_IS_MIRROR_SUPPORTED_PROMISE_0100 photoOutput == null || undefined"
)
...
...
@@ -1102,8 +1102,8 @@ export default function cameraJSUnitOutput() {
await
photoOutput
.
capture
()
.
then
(()
=>
{
console
.
info
(
'SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CAPTURE_DEFAULT_PROMISE_0100 success'
);
})
.
catch
((
err
)
=>
{
console
.
info
(
'SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CAPTURE_DEFAULT_PROMISE_0100 failed :'
+
err
);
expect
()
.
assertFail
();
console
.
info
(
'SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CAPTURE_DEFAULT_PROMISE_0100 failed :'
+
err
);
expect
()
.
assertFail
();
});
}
await
sleep
(
1000
);
...
...
@@ -1152,7 +1152,7 @@ export default function cameraJSUnitOutput() {
* @tc.type : Function
* @tc.level : Level 1
*/
it
(
'SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CAPTURE_SETTING_PROMISE_0100'
,
1
,
async
function
(
done
)
{
it
(
'SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CAPTURE_SETTING_PROMISE_0100'
,
1
,
async
function
(
done
)
{
console
.
info
(
TAG
+
" --------------SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CAPTURE_SETTING_PROMISE_0100--------------"
);
if
(
isEmpty
(
photoOutput
))
{
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CAPTURE_SETTING_PROMISE_0100 photoOutput == null || undefined"
)
...
...
@@ -1168,15 +1168,15 @@ export default function cameraJSUnitOutput() {
await
photoOutput
.
capture
(
captureSetting
)
.
then
((
result
)
=>
{
console
.
info
(
'SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CAPTURE_SETTING_PROMISE_0100 success :'
+
result
);
})
.
catch
((
err
)
=>
{
console
.
info
(
'SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CAPTURE_SETTING_PROMISE_0100 failed :'
+
err
);
console
.
info
(
'SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CAPTURE_SETTING_PROMISE_0100 failed :'
+
err
);
});
}
await
sleep
(
1000
);
done
();
})
/**
* @tc.number : SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CAPTURE_SETTING_CALLBACK_0100
...
...
@@ -1226,12 +1226,20 @@ 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
(
data
)
=>
{
count
++
;
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CALLBACK_ON_CAPTURE_START_0100 success"
);
await
sleep
(
1000
);
done
();
photoOutput
.
on
(
'captureStart'
,
async
(
err
,
data
)
=>
{
if
(
!
err
)
{
expect
(
true
)
.
assertTrue
();
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CALLBACK_ON_CAPTURE_START_0100 success"
);
// count++;
// console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CALLBACK_ON_CAPTURE_START_0100 success");
// await sleep(1000);
// done();
}
else
{
expect
()
.
assertFail
();
console
.
info
(
TAG
+
"Error in SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CALLBACK_ON_CAPTURE_START_0100 FAILED: "
+
err
.
message
);
}
})
await
sleep
(
1000
);
photoOutput
.
capture
();
// expect(count == 1).assertTrue();
}
...
...
@@ -1297,13 +1305,16 @@ 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
(
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
();
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
();
...
...
@@ -1332,11 +1343,11 @@ export default function cameraJSUnitOutput() {
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CALLBACK_ON_ERROR_0100 to operate"
);
photoOutput
.
on
(
'error'
,
async
(
err
,
data
)
=>
{
if
(
!
err
)
{
expect
(
true
)
.
assertTrue
();
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CALLBACK_ON_ERROR_0100 success"
);
expect
(
true
)
.
assertTrue
();
}
else
{
expect
()
.
assertFail
();
console
.
info
(
TAG
+
"Error in SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CALLBACK_ON_ERROR_0100 FAILED: "
+
err
.
message
);
expect
()
.
assertFail
();
}
await
sleep
(
1000
);
done
();
...
...
@@ -1439,7 +1450,7 @@ export default function cameraJSUnitOutput() {
* @tc.type : Function
* @tc.level : Level 1
*/
it
(
'SUB_MULTIMEDIA_CAMERA_START_METADATA_OUTPUT_PROMISE_0100'
,
1
,
async
function
(
done
)
{
it
(
'SUB_MULTIMEDIA_CAMERA_START_METADATA_OUTPUT_PROMISE_0100'
,
1
,
async
function
(
done
)
{
console
.
info
(
TAG
+
" --------------SUB_MULTIMEDIA_CAMERA_START_METADATA_OUTPUT_PROMISE_0100--------------"
);
if
(
isEmpty
(
metadataOutput
))
{
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_START_METADATA_OUTPUT_PROMISE_0100 metadataOutput == null || undefined"
)
...
...
@@ -1464,7 +1475,7 @@ export default function cameraJSUnitOutput() {
* @tc.type : Function
* @tc.level : Level 1
*/
it
(
'SUB_MULTIMEDIA_CAMERA_STOP_METADATA_OUTPUT_PROMISE_0100'
,
1
,
async
function
(
done
)
{
it
(
'SUB_MULTIMEDIA_CAMERA_STOP_METADATA_OUTPUT_PROMISE_0100'
,
1
,
async
function
(
done
)
{
console
.
info
(
TAG
+
" --------------SUB_MULTIMEDIA_CAMERA_STOP_METADATA_OUTPUT_PROMISE_0100--------------"
);
if
(
isEmpty
(
metadataOutput
))
{
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_STOP_METADATA_OUTPUT_PROMISE_0100 metadataOutput == null || undefined"
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录