未验证 提交 d3f2d8ce 编写于 作者: O openharmony_ci 提交者: Gitee

!5654 videoPlayer测试用例倍速时间校验方式修改

Merge pull request !5654 from FULIZHONG/master
......@@ -458,7 +458,8 @@ describe('PlayerLocalTestAudioFUNC', function () {
console.info('case wait for next player');
}
playAudioSource(fdPath, DURATION_TIME, PLAY_TIME, true, waitForDone);
mediaTestBase.msleep(1000);
await mediaTestBase.msleepAsync(1000).then(
() => {}, mediaTestBase.failureCallback).catch(mediaTestBase.catchCallback);
playAudioSource(fdPath, DURATION_TIME, PLAY_TIME, true, done);
})
})
......
......@@ -10,7 +10,7 @@
{
"type": "ShellKit",
"run-command": [
"rm -rf /storage/media/100/local/files/Videos/audio_*",
"rm -rf /storage/media/100/local/files/Audios/audio_*",
"power-shell setmode 602"
],
"teardown-command":[
......
......@@ -626,7 +626,7 @@ describe('RecorderLocalTestAudioFUNC', function () {
let trackArray = videoRecorderBase.getTrackArray(ONLYAUDIO_TYPE, audioConfig);
initAudioRecorder();
let mySteps = new Array(PRE_STATE, START_STATE, PAUSE_STATE, RESUME_STATE, PAUSE_STATE,
STOP_STATE, RELEASE_STATE, CHECK_STATE, trackArray, RECORDER_TIME, END_STATE);
STOP_STATE, RELEASE_STATE, CHECK_STATE, trackArray, RECORDER_TIME * 2, END_STATE);
setCallback(mySteps, done);
audioRecorder.prepare(audioConfig);
})
......
......@@ -1233,7 +1233,7 @@ describe('VideoPlayerFuncPromiseTest', function () {
expect(videoPlayer.state).assertEqual('playing');
}, mediaTestBase.failureCallback).catch(mediaTestBase.catchCallback);
endTime = videoPlayer.currentTime;
checkTime(PLAY_TIME * 2, (endTime - startTime), DELTA_TIME);
checkTime(PLAY_TIME * 2, (endTime - startTime), DELTA_TIME * 2);
})
})
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册