Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
08b3bba4
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看板
提交
08b3bba4
编写于
4月 12, 2022
作者:
N
NOBUGGERS
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fdSrc可靠性测试 Signed-off-by: NOBUGGERS <ruanmeng@huawei.com>
Signed-off-by:
N
NOBUGGERS
<
ruanmeng@huawei.com
>
上级
1a89cc13
变更
2
展开全部
隐藏空白更改
内联
并排
Showing
2 changed file
with
287 addition
and
117 deletion
+287
-117
multimedia/media/media_js_standard/audioPlayer/src/main/js/test/PlayerLocalTestAudioAPI.test.js
...ioPlayer/src/main/js/test/PlayerLocalTestAudioAPI.test.js
+74
-6
multimedia/media/media_js_standard/videoPlayer/src/main/js/test/VideoPlayerAPICallbackTest.test.js
...layer/src/main/js/test/VideoPlayerAPICallbackTest.test.js
+213
-111
未找到文件。
multimedia/media/media_js_standard/audioPlayer/src/main/js/test/PlayerLocalTestAudioAPI.test.js
浏览文件 @
08b3bba4
...
@@ -44,23 +44,23 @@ describe('PlayerLocalTestAudioAPI', function () {
...
@@ -44,23 +44,23 @@ describe('PlayerLocalTestAudioAPI', function () {
let
fileDescriptor
=
undefined
;
let
fileDescriptor
=
undefined
;
beforeAll
(
async
function
()
{
beforeAll
(
async
function
()
{
await
getFileDescriptor
(
AUDIO_SOURCE
).
then
((
res
)
=>
{
fileDescriptor
=
res
;
});
console
.
info
(
'
beforeAll case
'
);
console
.
info
(
'
beforeAll case
'
);
})
})
beforeEach
(
function
()
{
beforeEach
(
async
function
()
{
isTimeOut
=
false
;
isTimeOut
=
false
;
await
getFileDescriptor
(
AUDIO_SOURCE
).
then
((
res
)
=>
{
fileDescriptor
=
res
;
});
console
.
info
(
'
beforeEach case
'
);
console
.
info
(
'
beforeEach case
'
);
})
})
afterEach
(
function
()
{
afterEach
(
async
function
()
{
await
closeFileDescriptor
(
AUDIO_SOURCE
);
console
.
info
(
'
afterEach case
'
);
console
.
info
(
'
afterEach case
'
);
})
})
afterAll
(
async
function
()
{
afterAll
(
async
function
()
{
await
closeFileDescriptor
(
AUDIO_SOURCE
);
console
.
info
(
'
afterAll case
'
);
console
.
info
(
'
afterAll case
'
);
})
})
...
@@ -232,6 +232,7 @@ describe('PlayerLocalTestAudioAPI', function () {
...
@@ -232,6 +232,7 @@ describe('PlayerLocalTestAudioAPI', function () {
nextStep
(
mySteps
,
done
);
nextStep
(
mySteps
,
done
);
}
else
if
(
mySteps
[
0
]
==
ERROR_STATE
)
{
}
else
if
(
mySteps
[
0
]
==
ERROR_STATE
)
{
mySteps
.
shift
();
mySteps
.
shift
();
nextStep
(
mySteps
,
done
);
}
else
if
(
mySteps
[
0
]
==
END_STATE
)
{
}
else
if
(
mySteps
[
0
]
==
END_STATE
)
{
console
.
info
(
'
case release player error
'
);
console
.
info
(
'
case release player error
'
);
}
else
{
}
else
{
...
@@ -242,6 +243,73 @@ describe('PlayerLocalTestAudioAPI', function () {
...
@@ -242,6 +243,73 @@ describe('PlayerLocalTestAudioAPI', function () {
});
});
}
}
/* *
* @tc.number : SUB_MEDIA_PLAYER_AudioPlayer_SRC_API_0100
* @tc.name : fd is wrong
* @tc.desc : Reliability Test
* @tc.size : MediumTest
* @tc.type : Reliability
* @tc.level : Level2
*/
it
(
'
SUB_MEDIA_PLAYER_AudioPlayer_SRC_API_0100
'
,
0
,
async
function
(
done
)
{
isFileOpen
(
fileDescriptor
,
done
);
fileDescriptor
.
fd
=
-
1
;
let
mySteps
=
new
Array
(
ERROR_STATE
,
END_STATE
);
initAudioPlayer
();
setCallback
(
mySteps
,
done
);
audioPlayer
.
fdSrc
=
fileDescriptor
;
})
/* *
* @tc.number : SUB_MEDIA_PLAYER_AudioPlayer_SRC_API_0200
* @tc.name : offset is -1
* @tc.desc : Reliability Test
* @tc.size : MediumTest
* @tc.type : Reliability
* @tc.level : Level2
*/
it
(
'
SUB_MEDIA_PLAYER_AudioPlayer_SRC_API_0200
'
,
0
,
async
function
(
done
)
{
isFileOpen
(
fileDescriptor
,
done
);
fileDescriptor
.
offset
=
1
;
let
mySteps
=
new
Array
(
SRC_STATE
,
PLAY_STATE
,
PAUSE_STATE
,
PLAY_STATE
,
END_STATE
);
initAudioPlayer
();
setCallback
(
mySteps
,
done
);
audioPlayer
.
fdSrc
=
fileDescriptor
;
})
/* *
* @tc.number : SUB_MEDIA_PLAYER_AudioPlayer_SRC_API_0300
* @tc.name : length is -1
* @tc.desc : Reliability Test
* @tc.size : MediumTest
* @tc.type : Reliability
* @tc.level : Level2
*/
it
(
'
SUB_MEDIA_PLAYER_AudioPlayer_SRC_API_0300
'
,
0
,
async
function
(
done
)
{
isFileOpen
(
fileDescriptor
,
done
);
fileDescriptor
.
length
=
-
1
;
let
mySteps
=
new
Array
(
SRC_STATE
,
PLAY_STATE
,
PAUSE_STATE
,
PLAY_STATE
,
END_STATE
);
initAudioPlayer
();
setCallback
(
mySteps
,
done
);
audioPlayer
.
fdSrc
=
fileDescriptor
;
})
/* *
* @tc.number : SUB_MEDIA_PLAYER_AudioPlayer_SRC_API_0400
* @tc.name : fdSrc is undefined
* @tc.desc : Reliability Test
* @tc.size : MediumTest
* @tc.type : Reliability
* @tc.level : Level2
*/
it
(
'
SUB_MEDIA_PLAYER_AudioPlayer_SRC_API_0400
'
,
0
,
async
function
(
done
)
{
isFileOpen
(
fileDescriptor
,
done
);
let
mySteps
=
new
Array
(
ERROR_STATE
,
END_STATE
);
initAudioPlayer
();
setCallback
(
mySteps
,
done
);
audioPlayer
.
fdSrc
=
undefined
;
})
/* *
/* *
* @tc.number : SUB_MEDIA_PLAYER_AudioPlayer_Play_API_0100
* @tc.number : SUB_MEDIA_PLAYER_AudioPlayer_Play_API_0100
* @tc.name : 01.pause->play
* @tc.name : 01.pause->play
...
...
multimedia/media/media_js_standard/videoPlayer/src/main/js/test/VideoPlayerAPICallbackTest.test.js
浏览文件 @
08b3bba4
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录