Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
e3d4bf72
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看板
提交
e3d4bf72
编写于
3月 20, 2023
作者:
B
bayanxing
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
avRecorder多场景测试用例 codecheck
Signed-off-by:
N
bayanxing
<
bayanxing@kaihong.com
>
上级
4a7e13a0
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
1 addition
and
38 deletion
+1
-38
multimedia/media/media_js_standard/AVRecorderTestBase.js
multimedia/media/media_js_standard/AVRecorderTestBase.js
+0
-19
multimedia/media/media_js_standard/MediaTestBase.js
multimedia/media/media_js_standard/MediaTestBase.js
+1
-1
multimedia/media/media_js_standard/avRecorder/src/main/js/test/AVRecorderFuncTest.test.js
...rd/avRecorder/src/main/js/test/AVRecorderFuncTest.test.js
+0
-18
未找到文件。
multimedia/media/media_js_standard/AVRecorderTestBase.js
浏览文件 @
e3d4bf72
...
@@ -381,29 +381,10 @@ export async function avRecorderReliabilitTest02(avConfig, avRecorder, recorderT
...
@@ -381,29 +381,10 @@ export async function avRecorderReliabilitTest02(avConfig, avRecorder, recorderT
}
}
export
async
function
avRecorderReliabilitTest03
(
avConfig
,
avRecorder
,
recorderTime
,
done
)
{
export
async
function
avRecorderReliabilitTest03
(
avConfig
,
avRecorder
,
recorderTime
,
done
)
{
let
result
=
true
;
avRecorder
=
await
idle
(
avRecorder
);
avRecorder
=
await
idle
(
avRecorder
);
setPrepareOnCallback
(
avConfig
,
avRecorder
,
recorderTime
,
done
)
setPrepareOnCallback
(
avConfig
,
avRecorder
,
recorderTime
,
done
)
await
avRecorder
.
prepare
(
avConfig
)
await
avRecorder
.
prepare
(
avConfig
)
}
}
export
async
function
avRecorderReliabilitTest04
(
avConfig
,
avRecorder
,
recorderTime
,
done
)
{
avRecorder
=
await
idle
(
avRecorder
);
await
avRecorder
.
prepare
(
avConfig
).
then
(()
=>
{
expect
(
avRecorder
.
state
).
assertEqual
(
AV_RECORDER_STATE
.
PREPARED
);
console
.
info
(
'
avRecorderReliabilitTest04 prepare success
'
);
}).
catch
((
err
)
=>
{
console
.
info
(
'
avRecorderReliabilitTest04 prepare failed and catch error is
'
+
err
.
message
);
});
await
avRecorder
.
release
().
then
(()
=>
{
console
.
info
(
'
avRecorderReliabilitTest04 release AVRecorder success
'
);
expect
(
avRecorder
.
state
).
assertEqual
(
AV_RECORDER_STATE
.
RELEASED
);
done
();
}).
catch
((
err
)
=>
{
console
.
info
(
'
avRecorderReliabilitTest04 release AVRecorder failed and catch error is
'
+
err
.
message
);
});
}
multimedia/media/media_js_standard/MediaTestBase.js
浏览文件 @
e3d4bf72
...
@@ -19,7 +19,7 @@ import router from '@system.router'
...
@@ -19,7 +19,7 @@ import router from '@system.router'
import
mediaLibrary
from
'
@ohos.multimedia.mediaLibrary
'
import
mediaLibrary
from
'
@ohos.multimedia.mediaLibrary
'
import
fileio
from
'
@ohos.fileio
'
import
fileio
from
'
@ohos.fileio
'
import
featureAbility
from
'
@ohos.ability.featureAbility
'
import
featureAbility
from
'
@ohos.ability.featureAbility
'
import
{
UiDriver
,
BY
,
PointerMatrix
}
from
'
@ohos.
uit
est
'
import
{
UiDriver
,
BY
,
PointerMatrix
}
from
'
@ohos.
UiT
est
'
const
CODECMIMEVALUE
=
[
'
video/avc
'
,
'
audio/mp4a-latm
'
,
'
audio/mpeg
'
]
const
CODECMIMEVALUE
=
[
'
video/avc
'
,
'
audio/mp4a-latm
'
,
'
audio/mpeg
'
]
const
context
=
featureAbility
.
getContext
();
const
context
=
featureAbility
.
getContext
();
...
...
multimedia/media/media_js_standard/avRecorder/src/main/js/test/AVRecorderFuncTest.test.js
浏览文件 @
e3d4bf72
...
@@ -153,24 +153,6 @@ export default function avRecorderTest() {
...
@@ -153,24 +153,6 @@ export default function avRecorderTest() {
avRecorderTestBase
.
avRecorderReliabilitTest03
(
avConfig
,
avRecorder
,
RECORDER_TIME
,
done
);
avRecorderTestBase
.
avRecorderReliabilitTest03
(
avConfig
,
avRecorder
,
RECORDER_TIME
,
done
);
console
.
info
(
TAG
+
'
SUB_MULTIMEDIA_MEDIA_AVRECORDER_PREPARE_API_0300 end
'
)
console
.
info
(
TAG
+
'
SUB_MULTIMEDIA_MEDIA_AVRECORDER_PREPARE_API_0300 end
'
)
})
})
/* *
* @tc.number : SUB_MULTIMEDIA_MEDIA_AVRECORDER_PREPARE_API_0400
* @tc.name : 001.test resume->prepare
* @tc.desc : Local audio resume->prepare
* @tc.size : MediumTest
* @tc.type : Function test
* @tc.level : Level2
*/
it
(
'
SUB_MULTIMEDIA_MEDIA_AVRECORDER_PREPARE_API_0400
'
,
0
,
async
function
(
done
)
{
console
.
info
(
TAG
+
'
SUB_MULTIMEDIA_MEDIA_AVRECORDER_PREPARE_API_0400 start
'
)
fdObject
=
await
mediaTestBase
.
getAvRecorderFd
(
AV_SOURCES
[
4
],
"
audio
"
);
fdPath
=
"
fd://
"
+
fdObject
.
fdNumber
;
avConfig
.
url
=
fdPath
;
avRecorderTestBase
.
avRecorderReliabilitTest03
(
avConfig
,
avRecorder
,
RECORDER_TIME
,
done
);
console
.
info
(
TAG
+
'
SUB_MULTIMEDIA_MEDIA_AVRECORDER_PREPARE_API_0400 end
'
)
})
})
})
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录