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

!8520 AudioPlayer 测试用例根据开发代码改动去除本地播放缓冲校验

Merge pull request !8520 from FULIZHONG/0423flz
...@@ -43,7 +43,6 @@ describe('PlayerLocalTestAudioFUNC', function () { ...@@ -43,7 +43,6 @@ describe('PlayerLocalTestAudioFUNC', function () {
const GETDESCRIPTION_CALLBACK = 14; const GETDESCRIPTION_CALLBACK = 14;
const SECOND_INDEX = 1; const SECOND_INDEX = 1;
const MAX_VOLUME = 1; const MAX_VOLUME = 1;
let bufferFlag = false;
let fdHead = 'fd://'; let fdHead = 'fd://';
let fileDescriptor = undefined; let fileDescriptor = undefined;
let fdPath = ''; let fdPath = '';
...@@ -65,7 +64,6 @@ describe('PlayerLocalTestAudioFUNC', function () { ...@@ -65,7 +64,6 @@ describe('PlayerLocalTestAudioFUNC', function () {
}) })
beforeEach(function() { beforeEach(function() {
bufferFlag = false;
console.info('beforeEach case'); console.info('beforeEach case');
}) })
...@@ -97,7 +95,6 @@ describe('PlayerLocalTestAudioFUNC', function () { ...@@ -97,7 +95,6 @@ describe('PlayerLocalTestAudioFUNC', function () {
function nextStep(mySteps, done) { function nextStep(mySteps, done) {
if (mySteps[0] == END_STATE) { if (mySteps[0] == END_STATE) {
expect(bufferFlag).assertEqual(true);
done(); done();
console.info('case to done'); console.info('case to done');
return; return;
...@@ -190,7 +187,6 @@ describe('PlayerLocalTestAudioFUNC', function () { ...@@ -190,7 +187,6 @@ describe('PlayerLocalTestAudioFUNC', function () {
audioPlayer.on('bufferingUpdate', (infoType, value) => { audioPlayer.on('bufferingUpdate', (infoType, value) => {
console.info('case bufferingUpdate success infoType is ' + infoType); console.info('case bufferingUpdate success infoType is ' + infoType);
console.info('case bufferingUpdate success value is ' + value); console.info('case bufferingUpdate success value is ' + value);
bufferFlag = true;
}); });
audioPlayer.on('dataLoad', () => { audioPlayer.on('dataLoad', () => {
mySteps.shift(); mySteps.shift();
...@@ -286,7 +282,6 @@ describe('PlayerLocalTestAudioFUNC', function () { ...@@ -286,7 +282,6 @@ describe('PlayerLocalTestAudioFUNC', function () {
*/ */
it('SUB_MULTIMEDIA_MEDIA_AUDIOPLAYER_FUNCTION_SETSOURCE_0100', 0, async function (done) { it('SUB_MULTIMEDIA_MEDIA_AUDIOPLAYER_FUNCTION_SETSOURCE_0100', 0, async function (done) {
mediaTestBase.isFileOpen(fileDescriptor, done); mediaTestBase.isFileOpen(fileDescriptor, done);
bufferFlag = true;
let mySteps = new Array(SRC_STATE, ERROR_STATE, RELEASE_STATE, END_STATE); let mySteps = new Array(SRC_STATE, ERROR_STATE, RELEASE_STATE, END_STATE);
initAudioPlayer(); initAudioPlayer();
setCallback(mySteps, done); setCallback(mySteps, done);
...@@ -354,13 +349,11 @@ describe('PlayerLocalTestAudioFUNC', function () { ...@@ -354,13 +349,11 @@ describe('PlayerLocalTestAudioFUNC', function () {
mediaTestBase.isFileOpen(fileDescriptor, done); mediaTestBase.isFileOpen(fileDescriptor, done);
let playCount = 0; let playCount = 0;
let seekCount = 0; let seekCount = 0;
let bufferFlag = false;
let testAudioPlayer = media.createAudioPlayer(); let testAudioPlayer = media.createAudioPlayer();
testAudioPlayer.on('bufferingUpdate', (infoType, value) => { testAudioPlayer.on('bufferingUpdate', (infoType, value) => {
console.info('case bufferingUpdate success infoType is ' + infoType); console.info('case bufferingUpdate success infoType is ' + infoType);
console.info('case bufferingUpdate success value is ' + value); console.info('case bufferingUpdate success value is ' + value);
bufferFlag = true;
}); });
testAudioPlayer.on('dataLoad', () => { testAudioPlayer.on('dataLoad', () => {
...@@ -407,8 +400,6 @@ describe('PlayerLocalTestAudioFUNC', function () { ...@@ -407,8 +400,6 @@ describe('PlayerLocalTestAudioFUNC', function () {
testAudioPlayer.reset(); testAudioPlayer.reset();
}); });
testAudioPlayer.on('reset', () => { testAudioPlayer.on('reset', () => {
console.info('case reset success bufferFlag is ' + bufferFlag);
expect(bufferFlag).assertEqual(true);
expect(testAudioPlayer.state).assertEqual('idle'); expect(testAudioPlayer.state).assertEqual('idle');
testAudioPlayer.release(); testAudioPlayer.release();
testAudioPlayer = null; testAudioPlayer = null;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册