Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
1628d15a
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看板
未验证
提交
1628d15a
编写于
7月 15, 2022
作者:
O
openharmony_ci
提交者:
Gitee
7月 15, 2022
浏览文件
操作
浏览文件
下载
差异文件
!4329 修改测试用例用于适配开发代码逻辑修改
Merge pull request !4329 from FULIZHONG/0714test
上级
ae3d59a0
3a92b77d
变更
8
显示空白变更内容
内联
并排
Showing
8 changed file
with
34 addition
and
28 deletion
+34
-28
multimedia/media/media_js_standard/AudioPlayerTestBase.js
multimedia/media/media_js_standard/AudioPlayerTestBase.js
+1
-1
multimedia/media/media_js_standard/audioPlayer/src/main/js/test/PlayerLocalTestAudioAPI.test.js
...ioPlayer/src/main/js/test/PlayerLocalTestAudioAPI.test.js
+2
-2
multimedia/media/media_js_standard/audioPlayer/src/main/js/test/PlayerLocalTestAudioFUNC.test.js
...oPlayer/src/main/js/test/PlayerLocalTestAudioFUNC.test.js
+2
-2
multimedia/media/media_js_standard/audioPlayer/src/main/js/test/PlayerLocalTestAudioFormat.test.js
...layer/src/main/js/test/PlayerLocalTestAudioFormat.test.js
+1
-1
multimedia/media/media_js_standard/audioRecorder/src/main/js/test/RecorderLocalTestAudioAPI.test.js
...corder/src/main/js/test/RecorderLocalTestAudioAPI.test.js
+12
-10
multimedia/media/media_js_standard/videoPlayer/src/main/js/test/VideoPlayerAPICallbackTest.test.js
...layer/src/main/js/test/VideoPlayerAPICallbackTest.test.js
+8
-6
multimedia/media/media_js_standard/videoPlayer/src/main/js/test/VideoPlayerFuncPromiseTest.test.js
...layer/src/main/js/test/VideoPlayerFuncPromiseTest.test.js
+1
-1
multimedia/media/media_js_standard/videoRecorder/src/main/js/test/VideoRecorderAPICallbackTest.test.js
...der/src/main/js/test/VideoRecorderAPICallbackTest.test.js
+7
-5
未找到文件。
multimedia/media/media_js_standard/AudioPlayerTestBase.js
浏览文件 @
1628d15a
...
...
@@ -39,7 +39,7 @@ export function playAudioSource(src, duration, playTime, checkSeekTime, done) {
}
audioPlayer
.
on
(
'
dataLoad
'
,
()
=>
{
console
.
info
(
'
case set source success
'
);
expect
(
audioPlayer
.
state
).
assertEqual
(
'
paused
'
);
expect
(
audioPlayer
.
state
).
assertEqual
(
'
idle
'
);
expect
(
audioPlayer
.
currentTime
).
assertEqual
(
0
);
expect
(
audioPlayer
.
duration
).
assertClose
(
duration
,
500
);
// step 0: dataLoad -> play
...
...
multimedia/media/media_js_standard/audioPlayer/src/main/js/test/PlayerLocalTestAudioAPI.test.js
浏览文件 @
1628d15a
...
...
@@ -147,7 +147,7 @@ describe('PlayerLocalTestAudioAPI', function () {
console
.
info
(
`case dataLoad called`
);
expect
(
audioPlayer
.
currentTime
).
assertEqual
(
0
);
expect
(
audioPlayer
.
duration
).
assertEqual
(
DURATION_TIME
);
expect
(
audioPlayer
.
state
).
assertEqual
(
'
paused
'
);
expect
(
audioPlayer
.
state
).
assertEqual
(
'
idle
'
);
nextStep
(
mySteps
,
done
);
});
audioPlayer
.
on
(
'
play
'
,
()
=>
{
...
...
@@ -736,7 +736,7 @@ describe('PlayerLocalTestAudioAPI', function () {
expect
(
audioPlayer
.
src
).
assertEqual
(
fdHead
+
fileDescriptor
.
fd
);
expect
(
audioPlayer
.
currentTime
).
assertEqual
(
0
);
expect
(
audioPlayer
.
duration
).
assertEqual
(
DURATION_TIME
);
expect
(
audioPlayer
.
state
).
assertEqual
(
'
paused
'
);
expect
(
audioPlayer
.
state
).
assertEqual
(
'
idle
'
);
expect
(
audioPlayer
.
loop
).
assertEqual
(
false
);
done
();
})
...
...
multimedia/media/media_js_standard/audioPlayer/src/main/js/test/PlayerLocalTestAudioFUNC.test.js
浏览文件 @
1628d15a
...
...
@@ -193,7 +193,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
console
.
info
(
`case dataLoad called`
);
expect
(
audioPlayer
.
currentTime
).
assertEqual
(
0
);
expect
(
audioPlayer
.
duration
).
assertEqual
(
DURATION_TIME
);
expect
(
audioPlayer
.
state
).
assertEqual
(
'
paused
'
);
expect
(
audioPlayer
.
state
).
assertEqual
(
'
idle
'
);
nextStep
(
mySteps
,
done
);
});
audioPlayer
.
on
(
'
play
'
,
()
=>
{
...
...
@@ -341,7 +341,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
testAudioPlayer
.
on
(
'
dataLoad
'
,
()
=>
{
expect
(
testAudioPlayer
.
duration
).
assertEqual
(
DURATION_TIME
);
expect
(
testAudioPlayer
.
state
).
assertEqual
(
'
paused
'
);
expect
(
testAudioPlayer
.
state
).
assertEqual
(
'
idle
'
);
testAudioPlayer
.
play
();
});
testAudioPlayer
.
on
(
'
play
'
,
()
=>
{
...
...
multimedia/media/media_js_standard/audioPlayer/src/main/js/test/PlayerLocalTestAudioFormat.test.js
浏览文件 @
1628d15a
...
...
@@ -50,7 +50,7 @@ describe('PlayerLocalTestAudioFormat', function () {
})
audioPlayer
.
on
(
'
dataLoad
'
,
()
=>
{
console
.
info
(
'
case set source success
'
);
expect
(
audioPlayer
.
state
).
assertEqual
(
'
paused
'
);
expect
(
audioPlayer
.
state
).
assertEqual
(
'
idle
'
);
expect
(
audioPlayer
.
currentTime
).
assertEqual
(
0
);
audioPlayer
.
play
();
});
...
...
multimedia/media/media_js_standard/audioRecorder/src/main/js/test/RecorderLocalTestAudioAPI.test.js
浏览文件 @
1628d15a
...
...
@@ -419,7 +419,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
);
...
...
@@ -484,7 +484,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
);
})
...
...
@@ -608,8 +609,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
);
})
...
...
@@ -654,7 +655,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
);
})
...
...
@@ -716,8 +717,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
);
})
...
...
@@ -733,7 +735,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
);
})
...
...
@@ -979,8 +981,8 @@ describe('RecorderLocalTestAudioAPI', function () {
*/
it
(
'
SUB_MEDIA_RECORDER_AudioRecorder_Reset_API_0900
'
,
0
,
async
function
(
done
)
{
initAudioRecorder
();
let
mySteps
=
new
Array
(
PRE_STATE
,
START_STATE
,
RESET_STATE
,
RESET_STATE
,
RESET_STATE
,
RELEASE_STATE
,
END_STATE
);
let
mySteps
=
new
Array
(
PRE_STATE
,
START_STATE
,
RESET_STATE
,
RE
SET_STATE
,
RESET_STATE
,
RE
LEASE_STATE
,
END_STATE
);
setCallback
(
mySteps
,
done
);
audioRecorder
.
prepare
(
audioConfig
);
})
...
...
multimedia/media/media_js_standard/videoPlayer/src/main/js/test/VideoPlayerAPICallbackTest.test.js
浏览文件 @
1628d15a
...
...
@@ -620,7 +620,7 @@ describe('VideoPlayerAPICallbackTest', function () {
mediaTestBase
.
isFileOpen
(
fileDescriptor
,
done
);
let
videoPlayer
=
null
;
let
mySteps
=
new
Array
(
CREATE_EVENT
,
SETURL_EVENT
,
SETSURFACE_EVENT
,
PREPARE_EVENT
,
GETDESCRIPTION
,
PREPARE_EVENT
,
RELEASE_EVENT
,
END_EVENT
);
PREPARE_EVENT
,
ERROR_EVENT
,
RELEASE_EVENT
,
END_EVENT
);
eventEmitter
.
emit
(
mySteps
[
0
],
videoPlayer
,
mySteps
,
done
);
})
...
...
@@ -636,7 +636,7 @@ describe('VideoPlayerAPICallbackTest', function () {
mediaTestBase
.
isFileOpen
(
fileDescriptor
,
done
);
let
videoPlayer
=
null
;
let
mySteps
=
new
Array
(
CREATE_EVENT
,
SETURL_EVENT
,
SETSURFACE_EVENT
,
PREPARE_EVENT
,
PREPARE_EVENT
,
PREPARE
_EVENT
,
RELEASE_EVENT
,
END_EVENT
);
ERROR_EVENT
,
PREPARE_EVENT
,
ERROR
_EVENT
,
RELEASE_EVENT
,
END_EVENT
);
eventEmitter
.
emit
(
mySteps
[
0
],
videoPlayer
,
mySteps
,
done
);
})
...
...
@@ -827,7 +827,7 @@ describe('VideoPlayerAPICallbackTest', function () {
mediaTestBase
.
isFileOpen
(
fileDescriptor
,
done
);
let
videoPlayer
=
null
;
let
mySteps
=
new
Array
(
CREATE_EVENT
,
SETURL_EVENT
,
SETSURFACE_EVENT
,
PREPARE_EVENT
,
PLAY_EVENT
,
PLAY_EVENT
,
PLAY
_EVENT
,
RELEASE_EVENT
,
END_EVENT
);
PREPARE_EVENT
,
PLAY_EVENT
,
PLAY_EVENT
,
ERROR_EVENT
,
PLAY_EVENT
,
ERROR
_EVENT
,
RELEASE_EVENT
,
END_EVENT
);
eventEmitter
.
emit
(
mySteps
[
0
],
videoPlayer
,
mySteps
,
done
);
})
...
...
@@ -1018,7 +1018,8 @@ describe('VideoPlayerAPICallbackTest', function () {
mediaTestBase
.
isFileOpen
(
fileDescriptor
,
done
);
let
videoPlayer
=
null
;
let
mySteps
=
new
Array
(
CREATE_EVENT
,
SETURL_EVENT
,
SETSURFACE_EVENT
,
PREPARE_EVENT
,
PLAY_EVENT
,
PAUSE_EVENT
,
PAUSE_EVENT
,
PAUSE_EVENT
,
RELEASE_EVENT
,
END_EVENT
);
PREPARE_EVENT
,
PLAY_EVENT
,
PAUSE_EVENT
,
PAUSE_EVENT
,
ERROR_EVENT
,
PAUSE_EVENT
,
ERROR_EVENT
,
RELEASE_EVENT
,
END_EVENT
);
eventEmitter
.
emit
(
mySteps
[
0
],
videoPlayer
,
mySteps
,
done
);
})
...
...
@@ -1209,7 +1210,8 @@ describe('VideoPlayerAPICallbackTest', function () {
mediaTestBase
.
isFileOpen
(
fileDescriptor
,
done
);
let
videoPlayer
=
null
;
let
mySteps
=
new
Array
(
CREATE_EVENT
,
SETURL_EVENT
,
SETSURFACE_EVENT
,
PREPARE_EVENT
,
PLAY_EVENT
,
STOP_EVENT
,
STOP_EVENT
,
STOP_EVENT
,
RELEASE_EVENT
,
END_EVENT
);
PREPARE_EVENT
,
PLAY_EVENT
,
STOP_EVENT
,
STOP_EVENT
,
ERROR_EVENT
,
STOP_EVENT
,
ERROR_EVENT
,
RELEASE_EVENT
,
END_EVENT
);
eventEmitter
.
emit
(
mySteps
[
0
],
videoPlayer
,
mySteps
,
done
);
})
...
...
@@ -1400,7 +1402,7 @@ describe('VideoPlayerAPICallbackTest', function () {
mediaTestBase
.
isFileOpen
(
fileDescriptor
,
done
);
let
videoPlayer
=
null
;
let
mySteps
=
new
Array
(
CREATE_EVENT
,
SETURL_EVENT
,
SETSURFACE_EVENT
,
PREPARE_EVENT
,
RESET_EVENT
,
RESET_EVENT
,
RESET
_EVENT
,
RELEASE_EVENT
,
END_EVENT
);
PREPARE_EVENT
,
RESET_EVENT
,
RESET_EVENT
,
ERROR_EVENT
,
RESET_EVENT
,
ERROR
_EVENT
,
RELEASE_EVENT
,
END_EVENT
);
eventEmitter
.
emit
(
mySteps
[
0
],
videoPlayer
,
mySteps
,
done
);
})
...
...
multimedia/media/media_js_standard/videoPlayer/src/main/js/test/VideoPlayerFuncPromiseTest.test.js
浏览文件 @
1628d15a
...
...
@@ -166,7 +166,7 @@ describe('VideoPlayerFuncPromiseTest', function () {
expect
(
videoPlayer
.
height
).
assertEqual
(
HEIGHT_VALUE
);
console
.
info
(
'
case prepare called!!
'
);
},
mediaTestBase
.
failureCallback
).
catch
(
mediaTestBase
.
catchCallback
);
videoPlayer
.
audioInterruptMode
=
audio
.
InterruptMode
.
INDEPENDENT_MODE
;
// 1
let
startTime
=
videoPlayer
.
currentTime
;
await
videoPlayer
.
play
().
then
(()
=>
{
console
.
info
(
'
case play called!!
'
);
...
...
multimedia/media/media_js_standard/videoRecorder/src/main/js/test/VideoRecorderAPICallbackTest.test.js
浏览文件 @
1628d15a
...
...
@@ -482,7 +482,7 @@ describe('VideoRecorderAPICallbackTest', function () {
let
videoRecorder
=
null
;
let
mySteps
=
new
Array
(
CREATE_EVENT
,
PREPARE_EVENT
,
GETSURFACE_EVENT
,
START_STREEAM
,
START_EVENT
,
PAUSE_EVENT
,
RESUME_EVENT
,
START_EVENT
,
RELEASE_EVENT
,
CLOSE_STREAM
,
END_EVENT
);
START_EVENT
,
ERROR_EVENT
,
RELEASE_EVENT
,
CLOSE_STREAM
,
END_EVENT
);
eventEmitter
.
emit
(
mySteps
[
0
],
videoRecorder
,
mySteps
,
done
);
})
...
...
@@ -542,7 +542,7 @@ describe('VideoRecorderAPICallbackTest', function () {
it
(
'
SUB_MEDIA_VIDEO_RECORDER_START_CALLBACK_0800
'
,
0
,
async
function
(
done
)
{
let
videoRecorder
=
null
;
let
mySteps
=
new
Array
(
CREATE_EVENT
,
PREPARE_EVENT
,
GETSURFACE_EVENT
,
START_STREEAM
,
START_EVENT
,
START_EVENT
,
START
_EVENT
,
RELEASE_EVENT
,
CLOSE_STREAM
,
END_EVENT
);
START_EVENT
,
START_EVENT
,
ERROR_EVENT
,
START_EVENT
,
ERROR
_EVENT
,
RELEASE_EVENT
,
CLOSE_STREAM
,
END_EVENT
);
eventEmitter
.
emit
(
mySteps
[
0
],
videoRecorder
,
mySteps
,
done
);
})
...
...
@@ -661,7 +661,8 @@ describe('VideoRecorderAPICallbackTest', function () {
it
(
'
SUB_MEDIA_VIDEO_RECORDER_PAUSE_CALLBACK_0800
'
,
0
,
async
function
(
done
)
{
let
videoRecorder
=
null
;
let
mySteps
=
new
Array
(
CREATE_EVENT
,
PREPARE_EVENT
,
GETSURFACE_EVENT
,
START_STREEAM
,
START_EVENT
,
PAUSE_EVENT
,
PAUSE_EVENT
,
PAUSE_EVENT
,
CLOSE_STREAM
,
RELEASE_EVENT
,
END_EVENT
);
START_EVENT
,
PAUSE_EVENT
,
PAUSE_EVENT
,
ERROR_EVENT
,
PAUSE_EVENT
,
ERROR_EVENT
,
CLOSE_STREAM
,
RELEASE_EVENT
,
END_EVENT
);
eventEmitter
.
emit
(
mySteps
[
0
],
videoRecorder
,
mySteps
,
done
);
})
...
...
@@ -704,7 +705,7 @@ describe('VideoRecorderAPICallbackTest', function () {
it
(
'
SUB_MEDIA_VIDEO_RECORDER_RESUME_CALLBACK_0300
'
,
0
,
async
function
(
done
)
{
let
videoRecorder
=
null
;
let
mySteps
=
new
Array
(
CREATE_EVENT
,
PREPARE_EVENT
,
GETSURFACE_EVENT
,
START_STREEAM
,
START_EVENT
,
RESUME_EVENT
,
RELEASE_EVENT
,
CLOSE_STREAM
,
END_EVENT
);
START_EVENT
,
RESUME_EVENT
,
ERROR_EVENT
,
RELEASE_EVENT
,
CLOSE_STREAM
,
END_EVENT
);
eventEmitter
.
emit
(
mySteps
[
0
],
videoRecorder
,
mySteps
,
done
);
})
...
...
@@ -781,7 +782,8 @@ describe('VideoRecorderAPICallbackTest', function () {
let
videoRecorder
=
null
;
let
mySteps
=
new
Array
(
CREATE_EVENT
,
PREPARE_EVENT
,
GETSURFACE_EVENT
,
START_STREEAM
,
START_EVENT
,
PAUSE_EVENT
,
RESUME_EVENT
,
RESUME_EVENT
,
RESUME_EVENT
,
RELEASE_EVENT
,
CLOSE_STREAM
,
END_EVENT
);
RESUME_EVENT
,
RESUME_EVENT
,
ERROR_EVENT
,
RESUME_EVENT
,
ERROR_EVENT
,
RELEASE_EVENT
,
CLOSE_STREAM
,
END_EVENT
);
eventEmitter
.
emit
(
mySteps
[
0
],
videoRecorder
,
mySteps
,
done
);
})
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录