Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
456fc38c
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看板
提交
456fc38c
编写于
7月 21, 2022
作者:
F
fulizhong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
modify testcases Signed-off-by: FULIZHONG<fulizhong1@huawei.com>
Signed-off-by:
N
fulizhong
<
fulizhong@huawei.com
>
上级
adcc7294
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
19 addition
and
21 deletion
+19
-21
multimedia/media/media_js_standard/audioRecorder/src/main/js/test/RecorderLocalTestAudioAPI.test.js
...corder/src/main/js/test/RecorderLocalTestAudioAPI.test.js
+16
-16
multimedia/media/media_js_standard/audioRecorder/src/main/js/test/RecorderLocalTestAudioFUNC.test.js
...order/src/main/js/test/RecorderLocalTestAudioFUNC.test.js
+3
-5
未找到文件。
multimedia/media/media_js_standard/audioRecorder/src/main/js/test/RecorderLocalTestAudioAPI.test.js
浏览文件 @
456fc38c
...
...
@@ -48,9 +48,9 @@ describe('RecorderLocalTestAudioAPI', function () {
}
function
initAudioRecorder
()
{
if
(
typeof
(
audioRecorder
)
!=
'
undefined
'
)
{
if
(
audioRecorder
!=
null
)
{
audioRecorder
.
release
();
audioRecorder
=
undefined
;
audioRecorder
=
null
;
}
audioRecorder
=
media
.
createAudioRecorder
();
}
...
...
@@ -89,7 +89,7 @@ describe('RecorderLocalTestAudioAPI', function () {
case
RELEASE_STATE
:
console
.
info
(
'
case to release
'
);
audioRecorder
.
release
();
audioRecorder
=
undefined
;
audioRecorder
=
null
;
break
;
case
ERROR_STATE
:
console
.
info
(
'
case to wait error callback
'
);
...
...
@@ -144,9 +144,7 @@ describe('RecorderLocalTestAudioAPI', function () {
nextStep
(
mySteps
,
done
);
});
audioRecorder
.
on
(
'
error
'
,
(
err
)
=>
{
console
.
info
(
`case error called,errName is
${
err
.
name
}
`
);
console
.
info
(
`case error called,errCode is
${
err
.
code
}
`
);
console
.
info
(
`case error called,errMessage is
${
err
.
message
}
`
);
mySteps
.
shift
();
expect
(
mySteps
[
0
]).
assertEqual
(
ERROR_STATE
);
mySteps
.
shift
();
...
...
@@ -213,9 +211,9 @@ describe('RecorderLocalTestAudioAPI', function () {
* @tc.level : Level2
*/
it
(
'
SUB_MEDIA_RECORDER_createAudioRecorder_API_0100
'
,
0
,
async
function
(
done
)
{
let
testAudioRecorder
=
undefined
;
let
testAudioRecorder
=
null
;
testAudioRecorder
=
media
.
createAudioRecorder
();
expect
(
testAudioRecorder
!=
undefined
).
assertTrue
();
expect
(
testAudioRecorder
!=
null
).
assertTrue
();
done
();
})
...
...
@@ -456,7 +454,7 @@ describe('RecorderLocalTestAudioAPI', function () {
*/
it
(
'
SUB_MEDIA_RECORDER_AudioRecorder_Start_API_0400
'
,
0
,
async
function
(
done
)
{
initAudioRecorder
();
let
mySteps
=
new
Array
(
PRE_STATE
,
START_STATE
,
PAUSE_STATE
,
RESUME_STATE
,
START_STATE
,
let
mySteps
=
new
Array
(
PRE_STATE
,
START_STATE
,
PAUSE_STATE
,
RESUME_STATE
,
START_STATE
,
ERROR_STATE
,
RELEASE_STATE
,
END_STATE
);
setCallback
(
mySteps
,
done
);
audioRecorder
.
prepare
(
audioConfig
);
...
...
@@ -521,7 +519,8 @@ describe('RecorderLocalTestAudioAPI', function () {
*/
it
(
'
SUB_MEDIA_RECORDER_AudioRecorder_Start_API_0900
'
,
0
,
async
function
(
done
)
{
initAudioRecorder
();
let
mySteps
=
new
Array
(
PRE_STATE
,
START_STATE
,
START_STATE
,
START_STATE
,
RELEASE_STATE
,
END_STATE
);
let
mySteps
=
new
Array
(
PRE_STATE
,
START_STATE
,
START_STATE
,
ERROR_STATE
,
START_STATE
,
ERROR_STATE
,
RELEASE_STATE
,
END_STATE
);
setCallback
(
mySteps
,
done
);
audioRecorder
.
prepare
(
audioConfig
);
})
...
...
@@ -645,8 +644,8 @@ describe('RecorderLocalTestAudioAPI', function () {
*/
it
(
'
SUB_MEDIA_RECORDER_AudioRecorder_Pause_API_0900
'
,
0
,
async
function
(
done
)
{
initAudioRecorder
();
let
mySteps
=
new
Array
(
PRE_STATE
,
START_STATE
,
PAUSE_STATE
,
PAUSE_STATE
,
PAUSE_STATE
,
RELEASE_STATE
,
END_STATE
);
let
mySteps
=
new
Array
(
PRE_STATE
,
START_STATE
,
PAUSE_STATE
,
PAUSE_STATE
,
ERROR_STATE
,
PAUSE_STATE
,
ERROR_STATE
,
RELEASE_STATE
,
END_STATE
);
setCallback
(
mySteps
,
done
);
audioRecorder
.
prepare
(
audioConfig
);
})
...
...
@@ -691,7 +690,7 @@ describe('RecorderLocalTestAudioAPI', function () {
*/
it
(
'
SUB_MEDIA_RECORDER_AudioRecorder_Resume_API_0300
'
,
0
,
async
function
(
done
)
{
initAudioRecorder
();
let
mySteps
=
new
Array
(
PRE_STATE
,
START_STATE
,
RESUME_STATE
,
RELEASE_STATE
,
END_STATE
);
let
mySteps
=
new
Array
(
PRE_STATE
,
START_STATE
,
RESUME_STATE
,
ERROR_STATE
,
RELEASE_STATE
,
END_STATE
);
setCallback
(
mySteps
,
done
);
audioRecorder
.
prepare
(
audioConfig
);
})
...
...
@@ -753,8 +752,9 @@ describe('RecorderLocalTestAudioAPI', function () {
*/
it
(
'
SUB_MEDIA_RECORDER_AudioRecorder_Resume_API_0800
'
,
0
,
async
function
(
done
)
{
initAudioRecorder
();
let
mySteps
=
new
Array
(
PRE_STATE
,
START_STATE
,
RESUME_STATE
,
PAUSE_STATE
,
RESUME_STATE
,
STOP_STATE
,
RESUME_STATE
,
ERROR_STATE
,
RESET_STATE
,
RESUME_STATE
,
ERROR_STATE
,
RELEASE_STATE
,
END_STATE
);
let
mySteps
=
new
Array
(
PRE_STATE
,
START_STATE
,
RESUME_STATE
,
ERROR_STATE
,
PAUSE_STATE
,
RESUME_STATE
,
STOP_STATE
,
RESUME_STATE
,
ERROR_STATE
,
RESET_STATE
,
RESUME_STATE
,
ERROR_STATE
,
RELEASE_STATE
,
END_STATE
);
setCallback
(
mySteps
,
done
);
audioRecorder
.
prepare
(
audioConfig
);
})
...
...
@@ -770,7 +770,7 @@ describe('RecorderLocalTestAudioAPI', function () {
it
(
'
SUB_MEDIA_RECORDER_AudioRecorder_Resume_API_0900
'
,
0
,
async
function
(
done
)
{
initAudioRecorder
();
let
mySteps
=
new
Array
(
PRE_STATE
,
START_STATE
,
PAUSE_STATE
,
RESUME_STATE
,
RESUME_STATE
,
RESUME
_STATE
,
RELEASE_STATE
,
END_STATE
);
RESUME_STATE
,
RESUME_STATE
,
ERROR_STATE
,
RESUME_STATE
,
ERROR
_STATE
,
RELEASE_STATE
,
END_STATE
);
setCallback
(
mySteps
,
done
);
audioRecorder
.
prepare
(
audioConfig
);
})
...
...
@@ -1035,7 +1035,7 @@ describe('RecorderLocalTestAudioAPI', function () {
let
mySteps
=
new
Array
(
RELEASE_STATE
,
END_STATE
);
setCallback
(
mySteps
,
done
);
audioRecorder
.
release
();
audioRecorder
=
undefined
;
audioRecorder
=
null
;
})
/* *
...
...
multimedia/media/media_js_standard/audioRecorder/src/main/js/test/RecorderLocalTestAudioFUNC.test.js
浏览文件 @
456fc38c
...
...
@@ -64,9 +64,9 @@ describe('RecorderLocalTestAudioFUNC', function () {
}
function
initAudioRecorder
()
{
if
(
typeof
(
audioRecorder
)
!=
'
undefined
'
)
{
if
(
audioRecorder
!=
null
)
{
audioRecorder
.
release
();
audioRecorder
=
undefined
;
audioRecorder
=
null
;
}
audioRecorder
=
media
.
createAudioRecorder
();
}
...
...
@@ -191,7 +191,7 @@ describe('RecorderLocalTestAudioFUNC', function () {
case
RELEASE_STATE
:
console
.
info
(
'
case to release
'
);
audioRecorder
.
release
();
audioRecorder
=
undefined
;
audioRecorder
=
null
;
break
;
case
ERROR_STATE
:
console
.
info
(
'
case to wait error callback
'
);
...
...
@@ -246,9 +246,7 @@ describe('RecorderLocalTestAudioFUNC', function () {
nextStep
(
mySteps
,
done
);
});
audioRecorder
.
on
(
'
error
'
,
(
err
)
=>
{
console
.
info
(
`case error called,errName is
${
err
.
name
}
`
);
console
.
info
(
`case error called,errCode is
${
err
.
code
}
`
);
console
.
info
(
`case error called,errMessage is
${
err
.
message
}
`
);
mySteps
.
shift
();
expect
(
mySteps
[
0
]).
assertEqual
(
ERROR_STATE
);
mySteps
.
shift
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录