Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
412a67bc
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,发现更多精彩内容 >>
未验证
提交
412a67bc
编写于
7月 07, 2022
作者:
O
openharmony_ci
提交者:
Gitee
7月 07, 2022
浏览文件
操作
浏览文件
下载
差异文件
!4169 3.2.5.1 camera xts-acts check in
Merge pull request !4169 from veereshkadasani/3.2.5.1
上级
78ff0d0e
12b05b99
变更
7
展开全部
显示空白变更内容
内联
并排
Showing
7 changed file
with
1267 addition
and
313 deletion
+1267
-313
multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/Camera.test.ets
...js_standard/src/main/ets/MainAbility/test/Camera.test.ets
+8
-8
multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraJSUnitCameraFormat.test.ets
...in/ets/MainAbility/test/CameraJSUnitCameraFormat.test.ets
+0
-4
multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraJSUnitEnum.test.ets
...d/src/main/ets/MainAbility/test/CameraJSUnitEnum.test.ets
+24
-1
multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraJSUnitPhotoAsync.test.ets
...main/ets/MainAbility/test/CameraJSUnitPhotoAsync.test.ets
+0
-87
multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraJSUnitPhotoPromise.test.ets
...in/ets/MainAbility/test/CameraJSUnitPhotoPromise.test.ets
+4
-94
multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraJSUnitVideoAsync.test.ets
...main/ets/MainAbility/test/CameraJSUnitVideoAsync.test.ets
+650
-34
multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraJSUnitVideoPromise.test.ets
...in/ets/MainAbility/test/CameraJSUnitVideoPromise.test.ets
+581
-85
未找到文件。
multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/Camera.test.ets
浏览文件 @
412a67bc
...
...
@@ -15,10 +15,10 @@
import cameraJSUnitEnum from './CameraJSUnitEnum.test.ets'
import cameraJSUnitCameraFormat from './CameraJSUnitCameraFormat.test.ets'
//
import cameraJSUnitPhotoAsync from './CameraJSUnitPhotoAsync.test.ets'
//
import cameraJSUnitPhotoPromise from './CameraJSUnitPhotoPromise.test.ets'
//
import cameraJSUnitVideoAsync from './CameraJSUnitVideoAsync.test.ets'
//
import cameraJSUnitVideoPromise from './CameraJSUnitVideoPromise.test.ets'
import cameraJSUnitPhotoAsync from './CameraJSUnitPhotoAsync.test.ets'
import cameraJSUnitPhotoPromise from './CameraJSUnitPhotoPromise.test.ets'
import cameraJSUnitVideoAsync from './CameraJSUnitVideoAsync.test.ets'
import cameraJSUnitVideoPromise from './CameraJSUnitVideoPromise.test.ets'
let TAG = 'CameraModuleTest: '
...
...
@@ -28,8 +28,8 @@ export default function cameraKit(surfaceId: any) {
cameraJSUnitEnum(surfaceId)
cameraJSUnitCameraFormat(surfaceId)
//
cameraJSUnitPhotoAsync(surfaceId)
//
cameraJSUnitPhotoPromise(surfaceId)
//
cameraJSUnitVideoAsync(surfaceId)
//
cameraJSUnitVideoPromise(surfaceId)
cameraJSUnitPhotoAsync(surfaceId)
cameraJSUnitPhotoPromise(surfaceId)
cameraJSUnitVideoAsync(surfaceId)
cameraJSUnitVideoPromise(surfaceId)
}
\ No newline at end of file
multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraJSUnitCameraFormat.test.ets
浏览文件 @
412a67bc
...
...
@@ -286,7 +286,6 @@ export default function cameraJSUnitCameraFormat(surfaceId: any) {
console
.
info
(
TAG
+
"Entering CREATE_CAMERA_INPUT_TC_005 FAILED: "
+
err
.
message
);
}
console
.
info
(
TAG
+
"Entering CREATE_CAMERA_INPUT_TC_005 ends here"
);
camera0Input
.
release
();
await
sleep
(
1000
);
done
();
})
...
...
@@ -689,7 +688,6 @@ export default function cameraJSUnitCameraFormat(surfaceId: any) {
*/
it
(
'CREATE_CAMERA_INPUT_POS_BACK_TYPE_UNSPECIFIED_TC_021'
,
0
,
async
function
(
done
)
{
console
.
info
(
"--------------CREATE_CAMERA_INPUT_POS_BACK_TYPE_UNSPECIFIED_TC_021--------------"
);
camera0InputPromise
.
release
();
cameraManager
.
createCameraInput
(
cameraObj
.
CameraPosition
.
CAMERA_POSITION_BACK
,
cameraObj
.
CameraType
.
CAMERA_TYPE_UNSPECIFIED
,
async
(
err
,
data
)
=>
{
if
(
!
err
)
{
console
.
info
(
TAG
+
"Entering CREATE_CAMERA_INPUT_POS_BACK_TYPE_UNSPECIFIED_TC_021 success"
);
...
...
@@ -704,7 +702,6 @@ export default function cameraJSUnitCameraFormat(surfaceId: any) {
expect
()
.
assertFail
();
}
console
.
info
(
TAG
+
"Entering CREATE_CAMERA_INPUT_POS_BACK_TYPE_UNSPECIFIED_TC_021 ends here"
);
camera0InputPosBack
.
release
();
await
sleep
(
1000
);
done
();
})
...
...
@@ -1007,7 +1004,6 @@ export default function cameraJSUnitCameraFormat(surfaceId: any) {
expect
()
.
assertFail
();
}
console
.
info
(
TAG
+
"Entering CREATE_CAMERA_INPUT_POS_FRONT_TYPE_UNSPECIFIED_TC_031 ends here"
);
camera0InputPosFront
.
release
();
await
sleep
(
1000
);
done
();
})
...
...
multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraJSUnitEnum.test.ets
浏览文件 @
412a67bc
...
...
@@ -226,7 +226,6 @@ export default function cameraJSUnitEnum(surfaceId: any) {
console
.
info
(
TAG
+
"Entering CREATE_CAMERA_INPUT_TC_003 FAILED: "
+
err
.
message
);
}
console
.
info
(
TAG
+
"Entering CREATE_CAMERA_INPUT_TC_003 ends here"
);
camera0Input
.
release
();
await
sleep
(
1000
);
done
();
})
...
...
@@ -481,5 +480,29 @@ export default function cameraJSUnitEnum(surfaceId: any) {
await
sleep
(
1000
);
done
();
})
/**
* @tc.number : VIDEOSTABILIZATION_ENUM
* @tc.name : VIDEOSTABILIZATION ENAME
* @tc.desc : VIDEOSTABILIZATION ENAME
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'VideoStabilization'
,
0
,
async
function
(
done
)
{
console
.
info
(
TAG
+
"--------------VideoStabilization ------------"
)
console
.
info
(
TAG
+
"VideoStabilization OFF : "
+
cameraObj
.
VideoStabilizationMode
.
OFF
);
expect
(
cameraObj
.
VideoStabilizationMode
.
OFF
)
.
assertEqual
(
0
);
console
.
info
(
TAG
+
"VideoStabilization LOW : "
+
cameraObj
.
VideoStabilizationMode
.
LOW
);
expect
(
cameraObj
.
VideoStabilizationMode
.
LOW
)
.
assertEqual
(
1
);
console
.
info
(
TAG
+
"VideoStabilization MIDDLE : "
+
cameraObj
.
VideoStabilizationMode
.
MIDDLE
);
expect
(
cameraObj
.
VideoStabilizationMode
.
MIDDLE
)
.
assertEqual
(
2
);
console
.
info
(
TAG
+
"VideoStabilization HIGH : "
+
cameraObj
.
VideoStabilizationMode
.
HIGH
);
expect
(
cameraObj
.
VideoStabilizationMode
.
HIGH
)
.
assertEqual
(
3
);
console
.
info
(
TAG
+
"VideoStabilization AUTO : "
+
cameraObj
.
VideoStabilizationMode
.
AUTO
);
expect
(
cameraObj
.
VideoStabilizationMode
.
AUTO
)
.
assertEqual
(
4
);
await
sleep
(
1000
);
done
();
})
})
}
\ No newline at end of file
multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraJSUnitPhotoAsync.test.ets
浏览文件 @
412a67bc
...
...
@@ -456,35 +456,6 @@ export default function cameraJSUnitPhotoAsync(surfaceId: any) {
done
();
})
/**
* @tc.number : isMirrorSupported_PHOTO_OUTPUT
* @tc.name : isMirrorSupported
* @tc.desc : isMirrorSupported
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'isMirrorSupported_PHOTO_OUTPUT'
,
0
,
async
function
(
done
)
{
if
(
photoOutputAsync
==
null
||
photoOutputAsync
==
undefined
)
{
console
.
info
(
TAG
+
"photoOutput == null || undefined"
);
}
else
{
console
.
info
(
TAG
+
"Entering isMirrorSupported_PHOTO_OUTPUT to operate"
);
photoOutputAsync
.
isMirrorSupported
(
async
(
err
,
data
)
=>
{
if
(
!
err
)
{
console
.
info
(
TAG
+
"Entering isMirrorSupported_PHOTO_OUTPUT is success"
);
console
.
info
(
TAG
+
"isMirrorSupported : "
+
data
);
expect
(
true
)
.
assertTrue
();
}
else
{
expect
()
.
assertFail
();
}
await
sleep
(
1000
);
done
();
})
await
sleep
(
1000
);
done
();
}
})
/**
* @tc.number : PHOTO_OUTPUT_CALLBACK_ON_ERROR
* @tc.name : Photo output callback on error api
...
...
@@ -868,64 +839,6 @@ export default function cameraJSUnitPhotoAsync(surfaceId: any) {
}
})
/**
* @tc.number : setMirror_1
* @tc.name : setMirror 1
* @tc.desc : setMirror 1
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'setMirror_1'
,
0
,
async
function
(
done
)
{
if
(
photoOutputAsync
==
null
||
photoOutputAsync
==
undefined
)
{
console
.
info
(
TAG
+
"photoOutput == null || undefined"
);
}
else
{
console
.
info
(
TAG
+
"Entering setMirror_1 to operate"
);
photoOutputAsync
.
setMirror
(
1
,
async
(
err
,
data
)
=>
{
if
(
!
err
)
{
console
.
info
(
TAG
+
"Entering setMirror_1 is success:"
);
console
.
info
(
TAG
+
"setMirror is : "
+
'1'
);
expect
(
true
)
.
assertTrue
();
}
else
{
expect
()
.
assertFail
();
}
await
sleep
(
1000
);
done
();
})
await
sleep
(
1000
);
done
();
}
})
/**
* @tc.number : setMirror_0
* @tc.name : setMirror 0
* @tc.desc : setMirror 0
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'setMirror_0'
,
0
,
async
function
(
done
)
{
if
(
photoOutputAsync
==
null
||
photoOutputAsync
==
undefined
)
{
console
.
info
(
TAG
+
"photoOutput == null || undefined"
);
}
else
{
console
.
info
(
TAG
+
"Entering setMirror_0 to operate"
);
photoOutputAsync
.
setMirror
(
0
,
async
(
err
,
data
)
=>
{
if
(
!
err
)
{
console
.
info
(
TAG
+
"Entering setMirror_0 is success:"
);
console
.
info
(
TAG
+
"setMirror is : "
+
'0'
);
expect
(
true
)
.
assertTrue
();
}
else
{
expect
()
.
assertFail
();
}
await
sleep
(
1000
);
done
();
})
await
sleep
(
1000
);
done
();
}
})
/*CaptureSession APIs*/
/**
* @tc.number : BEGIN_CONFIG_SUCCESS
...
...
multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraJSUnitPhotoPromise.test.ets
浏览文件 @
412a67bc
...
...
@@ -419,36 +419,6 @@ export default function cameraJSUnitPhotoPromise(surfaceId: any) {
done
();
})
/**
* @tc.number : isMirrorSupported_PHOTO_OUTPUT
* @tc.name : isMirrorSupported
* @tc.desc : isMirrorSupported
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'isMirrorSupported_PHOTO_OUTPUT'
,
0
,
async
function
(
done
)
{
if
(
photoOutputPromise
==
null
||
photoOutputPromise
==
undefined
)
{
console
.
info
(
TAG
+
"photoOutput == null || undefined"
);
}
else
{
console
.
info
(
TAG
+
"Entering isMirrorSupported_PHOTO_OUTPUT to operate"
);
await
photoOutputPromise
.
isMirrorSupported
()
.
then
(
function
(
data
)
{
console
.
info
(
TAG
+
"Entering isMirrorSupported_PHOTO_OUTPUT is success"
);
console
.
info
(
TAG
+
"isMirrorSupported : "
+
data
);
expect
(
true
)
.
assertTrue
();
})
.
catch
((
err
)
=>
{
expect
()
.
assertFail
();
console
.
info
(
TAG
+
"isMirrorSupported_PHOTO_OUTPUT FAILED : "
+
err
.
message
);
});
await
sleep
(
1000
);
done
();
}
await
sleep
(
1000
);
done
();
})
/**
* @tc.number : PHOTO_OUTPUT_CALLBACK_ON_ERROR
* @tc.name : Photo output callback on error api
...
...
@@ -778,10 +748,10 @@ export default function cameraJSUnitPhotoPromise(surfaceId: any) {
expect
()
.
assertFail
();
console
.
info
(
TAG
+
"setMirror_true FAILED : "
+
err
.
message
);
});
await
sleep
(
2
000
);
await
sleep
(
1
000
);
done
();
}
await
sleep
(
2
000
);
await
sleep
(
1
000
);
done
();
})
...
...
@@ -808,70 +778,10 @@ export default function cameraJSUnitPhotoPromise(surfaceId: any) {
expect
()
.
assertFail
();
console
.
info
(
TAG
+
"setMirror_false FAILED : "
+
err
.
message
);
});
await
sleep
(
2000
);
done
();
}
await
sleep
(
2000
);
done
();
})
/**
* @tc.number : setMirror_1
* @tc.name : setMirror 1
* @tc.desc : setMirror 1
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'setMirror_1'
,
0
,
async
function
(
done
)
{
if
(
photoOutputPromise
==
null
||
photoOutputPromise
==
undefined
)
{
console
.
info
(
TAG
+
"photoOutput == null || undefined"
);
}
else
{
console
.
info
(
TAG
+
"Entering setMirror_1 to operate"
);
await
photoOutputPromise
.
setMirror
(
1
)
.
then
(
function
(
data
)
{
console
.
info
(
TAG
+
"Entering setMirror_1 is success:"
);
console
.
info
(
TAG
+
"setMirror is : "
+
'1'
);
expect
(
true
)
.
assertTrue
();
})
.
catch
((
err
)
=>
{
expect
()
.
assertFail
();
console
.
info
(
TAG
+
"setMirror_1 FAILED : "
+
err
.
message
);
});
await
sleep
(
2000
);
done
();
}
await
sleep
(
2000
);
done
();
})
/**
* @tc.number : setMirror_0
* @tc.name : setMirror 0
* @tc.desc : setMirror 0
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'setMirror_0'
,
0
,
async
function
(
done
)
{
if
(
photoOutputPromise
==
null
||
photoOutputPromise
==
undefined
)
{
console
.
info
(
TAG
+
"photoOutput == null || undefined"
);
}
else
{
console
.
info
(
TAG
+
"Entering setMirror_0 to operate"
);
await
photoOutputPromise
.
setMirror
(
0
)
.
then
(
function
(
data
)
{
console
.
info
(
TAG
+
"Entering setMirror_0 is success:"
);
console
.
info
(
TAG
+
"setMirror is : "
+
'0'
);
expect
(
true
)
.
assertTrue
();
})
.
catch
((
err
)
=>
{
expect
()
.
assertFail
();
console
.
info
(
TAG
+
"setMirror_0 FAILED : "
+
err
.
message
);
});
await
sleep
(
2000
);
await
sleep
(
1000
);
done
();
}
await
sleep
(
2
000
);
await
sleep
(
1
000
);
done
();
})
...
...
multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraJSUnitVideoAsync.test.ets
浏览文件 @
412a67bc
此差异已折叠。
点击以展开。
multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraJSUnitVideoPromise.test.ets
浏览文件 @
412a67bc
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录