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

!1928 添加xcomponent组件到videoPlayer测试用例内

Merge pull request !1928 from FULIZHONG/0215play
......@@ -12,7 +12,7 @@
"pre-push": [
],
"push": [
"./resource/audio/01.mp4 ->/data/media/"
"./resource/audio/H264_AAC.mp4 ->/data/media/"
]
},
{
......@@ -27,7 +27,7 @@
},
{
"test-file-name": [
"AudioPlayerJsTest.hap"
"VideoPlayerJsTest.hap"
],
"type": "AppInstallKit",
"cleanup-apps": true
......
......@@ -2,4 +2,10 @@
<text class="title">
{{ $t('strings.hello') }} {{ title }}
</text>
<Xcomponent id = 'XcomponentId'
type = 'surface'
onload = 'LoadXcomponent'
style = "width:720px;height:480px;border-color:red;border-width:5px">
</Xcomponent>
</div>
......@@ -34,10 +34,21 @@ export default {
const configService = core.getDefaultService('config')
this.timeout = 60000
configService.setConfig(this)
//this.onload()
require('../../../test/List.test')
core.execute()
setTimeout(function() {
require('../../../test/List.test')
core.execute()
}, 2000)
},
onReady() {
},
LoadXcomponent() {
let surfaceid = this.$element('XcomponentId').getComponentSurfaceId()
this.saveSurfaceID(surfaceid);
},
saveSurfaceID(surfaceID) {
let writeStreamSync = Fileio.createStreamSync('/data/media/surfaceID.txt', 'ab+')
writeStreamSync.writeSync(surfaceID, {length : 13})
writeStreamSync.flushSync()
writeStreamSync.closeSync()
},
}
\ No newline at end of file
......@@ -14,10 +14,11 @@
*/
import media from '@ohos.multimedia.media'
import Fileio from '@ohos.fileio'
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index'
describe('VideoPlayerAPICallbackTest', function () {
const AUDIO_SOURCE = 'file://data/media/01.mp4';
const AUDIO_SOURCE = 'file://data/media/H264_AAC.mp4';
const PLAY_TIME = 1000;
const SEEK_TIME = 5000;
const SEEK_CLOSEST = 3;
......@@ -25,7 +26,6 @@ describe('VideoPlayerAPICallbackTest', function () {
const HEIGHT_VALUE = 480;
const DURATION_TIME = 10034;
const CREATE_EVENT = 'create';
const GETSURFACE_EVENT = 'getDisplaySurface';
const SETSURFACE_EVENT = 'setDisplaySurface';
const GETDESCRIPTION = 'getTrackDescription';
const PREPARE_EVENT = 'prepare';
......@@ -42,11 +42,12 @@ describe('VideoPlayerAPICallbackTest', function () {
const END_EVENT = 'end';
const VOLUME_VALUE = 1;
const SPEED_VALUE = 1;
let surfaceID = null;
let surfaceID = '';
let events = require('events');
let eventEmitter = new events.EventEmitter();
beforeAll(function() {
getSurfaceID();
console.info('beforeAll case');
})
......@@ -62,6 +63,19 @@ describe('VideoPlayerAPICallbackTest', function () {
console.info('afterAll case');
})
function getSurfaceID() {
let surfaceIDTest = new ArrayBuffer(20);
let readStreamSync = Fileio.createStreamSync('/data/media/surfaceID.txt', 'rb');
readStreamSync.readSync(surfaceIDTest, {length : 13});
let view = new Uint8Array(surfaceIDTest);
for (let i = 0; i < 13; i++) {
let value = view[i] - 48;
surfaceID = surfaceID + '' + value;
}
console.info('case getSurfaceID is ' + surfaceID);
readStreamSync.closeSync();
}
function sleep(time) {
for(let t = Date.now(); Date.now() - t <= time;);
}
......@@ -99,33 +113,13 @@ describe('VideoPlayerAPICallbackTest', function () {
expect(videoPlayer.state).assertEqual('idle');
console.info('case createVideoPlayer success!!');
toNextStep(videoPlayer, steps, done);
} else {
if (steps[0] == ERROR_EVENT) {
steps.shift();
toNextStep(videoPlayer, steps, done);
} else {
printfError(err, done);
}
}
});
});
eventEmitter.on(GETSURFACE_EVENT, (videoPlayer, steps, done) => {
steps.shift();
videoPlayer.getDisplaySurface((err, outSurface) => {
if (typeof (err) == 'undefined') {
surfaceID = outSurface;
console.info('case getDisplaySurface success!!');
} else if ((typeof (err) != 'undefined') && (steps[0] == ERROR_EVENT)) {
steps.shift();
toNextStep(videoPlayer, steps, done);
} else {
if (steps[0] == ERROR_EVENT) {
steps.shift();
toNextStep(videoPlayer, steps, done);
} else {
printfError(err, done);
}
printfError(err, done);
}
})
});
});
eventEmitter.on(SETSURFACE_EVENT, (videoPlayer, steps, done) => {
......@@ -136,13 +130,11 @@ describe('VideoPlayerAPICallbackTest', function () {
expect(videoPlayer.state).assertEqual('idle');
console.info('case setDisplaySurface success!!');
toNextStep(videoPlayer, steps, done);
} else if ((typeof (err) != 'undefined') && (steps[0] == ERROR_EVENT)) {
steps.shift();
toNextStep(videoPlayer, steps, done);
} else {
if (steps[0] == ERROR_EVENT) {
steps.shift();
toNextStep(videoPlayer, steps, done);
} else {
printfError(err, done);
}
printfError(err, done);
}
})
});
......@@ -158,13 +150,11 @@ describe('VideoPlayerAPICallbackTest', function () {
expect(videoPlayer.height).assertEqual(HEIGHT_VALUE);
console.info('case prepare success!!');
toNextStep(videoPlayer, steps, done);
} else if ((typeof (err) != 'undefined') && (steps[0] == ERROR_EVENT)) {
steps.shift();
toNextStep(videoPlayer, steps, done);
} else {
if (steps[0] == ERROR_EVENT) {
steps.shift();
toNextStep(videoPlayer, steps, done);
} else {
printfError(err, done);
}
printfError(err, done);
}
});
});
......@@ -177,13 +167,11 @@ describe('VideoPlayerAPICallbackTest', function () {
printfDescription(arrlist[i]);
}
toNextStep(videoPlayer, steps, done);
} else if ((typeof (err) != 'undefined') && (steps[0] == ERROR_EVENT)) {
steps.shift();
toNextStep(videoPlayer, steps, done);
} else {
if (steps[0] == ERROR_EVENT) {
steps.shift();
toNextStep(videoPlayer, steps, done);
} else {
printfError(err, done);
}
printfError(err, done);
}
});
});
......@@ -196,13 +184,11 @@ describe('VideoPlayerAPICallbackTest', function () {
console.info('case play success!!');
sleep(PLAY_TIME);
toNextStep(videoPlayer, steps, done);
} else if ((typeof (err) != 'undefined') && (steps[0] == ERROR_EVENT)) {
steps.shift();
toNextStep(videoPlayer, steps, done);
} else {
if (steps[0] == ERROR_EVENT) {
steps.shift();
toNextStep(videoPlayer, steps, done);
} else {
printfError(err, done);
}
printfError(err, done);
}
});
});
......@@ -214,13 +200,11 @@ describe('VideoPlayerAPICallbackTest', function () {
expect(videoPlayer.state).assertEqual('paused');
console.info('case pause success!!');
toNextStep(videoPlayer, steps, done);
} else if ((typeof (err) != 'undefined') && (steps[0] == ERROR_EVENT)) {
steps.shift();
toNextStep(videoPlayer, steps, done);
} else {
if (steps[0] == ERROR_EVENT) {
steps.shift();
toNextStep(videoPlayer, steps, done);
} else {
printfError(err, done);
}
printfError(err, done);
}
});
});
......@@ -232,13 +216,11 @@ describe('VideoPlayerAPICallbackTest', function () {
expect(videoPlayer.state).assertEqual('stopped');
console.info('case stop success!!');
toNextStep(videoPlayer, steps, done);
} else if ((typeof (err) != 'undefined') && (steps[0] == ERROR_EVENT)) {
steps.shift();
toNextStep(videoPlayer, steps, done);
} else {
if (steps[0] == ERROR_EVENT) {
steps.shift();
toNextStep(videoPlayer, steps, done);
} else {
printfError(err, done);
}
printfError(err, done);
}
});
});
......@@ -250,13 +232,11 @@ describe('VideoPlayerAPICallbackTest', function () {
expect(videoPlayer.state).assertEqual('idle');
console.info('case reset success!!');
toNextStep(videoPlayer, steps, done);
} else if ((typeof (err) != 'undefined') && (steps[0] == ERROR_EVENT)) {
steps.shift();
toNextStep(videoPlayer, steps, done);
} else {
if (steps[0] == ERROR_EVENT) {
steps.shift();
toNextStep(videoPlayer, steps, done);
} else {
printfError(err, done);
}
printfError(err, done);
}
});
});
......@@ -267,13 +247,11 @@ describe('VideoPlayerAPICallbackTest', function () {
if (typeof (err) == 'undefined') {
console.info('case release success!!');
toNextStep(videoPlayer, steps, done);
} else if ((typeof (err) != 'undefined') && (steps[0] == ERROR_EVENT)) {
steps.shift();
toNextStep(videoPlayer, steps, done);
} else {
if (steps[0] == ERROR_EVENT) {
steps.shift();
toNextStep(videoPlayer, steps, done);
} else {
printfError(err, done);
}
printfError(err, done);
}
});
});
......@@ -286,13 +264,11 @@ describe('VideoPlayerAPICallbackTest', function () {
if (typeof (err) == 'undefined') {
console.info('case seek success and seekDoneTime is '+ seekDoneTime);
toNextStep(videoPlayer, steps, done);
} else if ((typeof (err) != 'undefined') && (steps[0] == ERROR_EVENT)) {
steps.shift();
toNextStep(videoPlayer, steps, done);
} else {
if (steps[0] == ERROR_EVENT) {
steps.shift();
toNextStep(videoPlayer, steps, done);
} else {
printfError(err, done);
}
printfError(err, done);
}
});
});
......@@ -306,13 +282,11 @@ describe('VideoPlayerAPICallbackTest', function () {
expect(seekDoneTime).assertEqual(SEEK_TIME);
console.info('case seek success and seekDoneTime is '+ seekDoneTime);
toNextStep(videoPlayer, steps, done);
} else if ((typeof (err) != 'undefined') && (steps[0] == ERROR_EVENT)) {
steps.shift();
toNextStep(videoPlayer, steps, done);
} else {
if (steps[0] == ERROR_EVENT) {
steps.shift();
toNextStep(videoPlayer, steps, done);
} else {
printfError(err, done);
}
printfError(err, done);
}
});
});
......@@ -325,13 +299,11 @@ describe('VideoPlayerAPICallbackTest', function () {
if (typeof (err) == 'undefined') {
console.info('case setVolume success');
toNextStep(videoPlayer, steps, done);
} else if ((typeof (err) != 'undefined') && (steps[0] == ERROR_EVENT)) {
steps.shift();
toNextStep(videoPlayer, steps, done);
} else {
if (steps[0] == ERROR_EVENT) {
steps.shift();
toNextStep(videoPlayer, steps, done);
} else {
printfError(err, done);
}
printfError(err, done);
}
});
});
......@@ -344,13 +316,11 @@ describe('VideoPlayerAPICallbackTest', function () {
if (typeof (err) == 'undefined') {
console.info('case setSpeed success and speedMode is '+ speedMode);
toNextStep(videoPlayer, steps, done);
} else if ((typeof (err) != 'undefined') && (steps[0] == ERROR_EVENT)) {
steps.shift();
toNextStep(videoPlayer, steps, done);
} else {
if (steps[0] == ERROR_EVENT) {
steps.shift();
toNextStep(videoPlayer, steps, done);
} else {
printfError(err, done);
}
printfError(err, done);
}
});
});
......@@ -365,7 +335,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_PREPARE_CALLBACK_0100', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -380,7 +350,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_PREPARE_CALLBACK_0200', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT, PREPARE_EVENT, PLAY_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT, PREPARE_EVENT, PLAY_EVENT,
PREPARE_EVENT, ERROR_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -395,7 +365,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_PREPARE_CALLBACK_0300', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT, PREPARE_EVENT, PLAY_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT, PREPARE_EVENT, PLAY_EVENT,
PAUSE_EVENT, PREPARE_EVENT, ERROR_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -410,7 +380,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_PREPARE_CALLBACK_0400', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT, PREPARE_EVENT, PLAY_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT, PREPARE_EVENT, PLAY_EVENT,
STOP_EVENT, PREPARE_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -425,7 +395,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_PREPARE_CALLBACK_0500', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT, PREPARE_EVENT, PLAY_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT, PREPARE_EVENT, PLAY_EVENT,
RESET_EVENT, PREPARE_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -440,7 +410,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_PREPARE_CALLBACK_0600', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT, PREPARE_EVENT, PLAY_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT, PREPARE_EVENT, PLAY_EVENT,
SEEK_EVENT, SEEK_TIME, PREPARE_EVENT, ERROR_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -455,7 +425,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_PREPARE_CALLBACK_0700', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT, PREPARE_EVENT, PLAY_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT, PREPARE_EVENT, PLAY_EVENT,
SEEK_MODE_EVENT, SEEK_TIME, PREPARE_EVENT, ERROR_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -470,7 +440,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_PREPARE_CALLBACK_0800', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT, PREPARE_EVENT, PLAY_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT, PREPARE_EVENT, PLAY_EVENT,
SETVOLUME_EVENT, VOLUME_VALUE, PREPARE_EVENT, ERROR_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -485,7 +455,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_PREPARE_CALLBACK_0900', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT, PREPARE_EVENT, PLAY_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT, PREPARE_EVENT, PLAY_EVENT,
SETSPEED_EVENT, SPEED_VALUE, PREPARE_EVENT, ERROR_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -500,7 +470,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_PREPARE_CALLBACK_1000', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -515,7 +485,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_PREPARE_CALLBACK_1100', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT, PREPARE_EVENT, GETDESCRIPTION,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT, PREPARE_EVENT, GETDESCRIPTION,
PREPARE_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -530,7 +500,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_PREPARE_CALLBACK_1200', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT, PREPARE_EVENT, PREPARE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT, PREPARE_EVENT, PREPARE_EVENT,
PREPARE_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -559,7 +529,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_PLAY_CALLBACK_0200', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, PLAY_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -574,7 +544,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_PLAY_CALLBACK_0300', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, PLAY_EVENT, PAUSE_EVENT, PLAY_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -589,7 +559,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_PLAY_CALLBACK_0400', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, PLAY_EVENT, STOP_EVENT, PLAY_EVENT, ERROR_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -604,7 +574,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_PLAY_CALLBACK_0500', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, PLAY_EVENT, RESET_EVENT, PLAY_EVENT, ERROR_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -619,7 +589,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_PLAY_CALLBACK_0600', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, PLAY_EVENT, SEEK_EVENT, SEEK_TIME, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -634,7 +604,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_PLAY_CALLBACK_0700', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, PLAY_EVENT, SEEK_MODE_EVENT, SEEK_TIME, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -649,7 +619,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_PLAY_CALLBACK_0800', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, PLAY_EVENT, SETVOLUME_EVENT, VOLUME_VALUE, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -664,7 +634,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_PLAY_CALLBACK_0900', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, PLAY_EVENT, SETSPEED_EVENT, SPEED_VALUE, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -679,7 +649,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_PLAY_CALLBACK_1000', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PLAY_EVENT, ERROR_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -694,7 +664,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_PLAY_CALLBACK_1100', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, GETDESCRIPTION, PLAY_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -709,7 +679,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_PLAY_CALLBACK_1200', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, PLAY_EVENT, PLAY_EVENT, PLAY_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -738,7 +708,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_PAUSE_CALLBACK_0200', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, PAUSE_EVENT, ERROR_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -753,7 +723,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_PAUSE_CALLBACK_0300', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, PLAY_EVENT, PAUSE_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -768,7 +738,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_PAUSE_CALLBACK_0400', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, PLAY_EVENT, STOP_EVENT, PAUSE_EVENT, ERROR_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -783,7 +753,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_PAUSE_CALLBACK_0500', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, PLAY_EVENT, RESET_EVENT, PAUSE_EVENT, ERROR_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -798,7 +768,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_PAUSE_CALLBACK_0600', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, PLAY_EVENT, SEEK_EVENT, SEEK_TIME, PAUSE_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -813,7 +783,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_PAUSE_CALLBACK_0700', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, PLAY_EVENT, SEEK_MODE_EVENT, SEEK_TIME, PAUSE_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -828,7 +798,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_PAUSE_CALLBACK_0800', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, PLAY_EVENT, SETVOLUME_EVENT, VOLUME_VALUE, PAUSE_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -843,7 +813,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_PAUSE_CALLBACK_0900', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, PLAY_EVENT, SETSPEED_EVENT, SPEED_VALUE, PAUSE_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -858,7 +828,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_PAUSE_CALLBACK_1000', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PAUSE_EVENT, ERROR_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -873,7 +843,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_PAUSE_CALLBACK_1100', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, GETDESCRIPTION, PAUSE_EVENT, ERROR_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -888,7 +858,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_PAUSE_CALLBACK_1200', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, PLAY_EVENT, PAUSE_EVENT, PAUSE_EVENT, PAUSE_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -917,7 +887,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_STOP_CALLBACK_0200', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, STOP_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -932,7 +902,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_STOP_CALLBACK_0300', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, PLAY_EVENT, STOP_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -947,7 +917,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_STOP_CALLBACK_0400', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, PLAY_EVENT, PAUSE_EVENT, STOP_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -962,7 +932,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_STOP_CALLBACK_0500', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, PLAY_EVENT, RESET_EVENT, STOP_EVENT, ERROR_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -977,7 +947,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_STOP_CALLBACK_0600', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, PLAY_EVENT, SEEK_EVENT, SEEK_TIME, STOP_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -992,7 +962,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_STOP_CALLBACK_0700', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, PLAY_EVENT, SEEK_MODE_EVENT, SEEK_TIME, STOP_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -1007,7 +977,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_STOP_CALLBACK_0800', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, PLAY_EVENT, SETVOLUME_EVENT, VOLUME_VALUE, STOP_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -1022,7 +992,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_STOP_CALLBACK_0900', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, PLAY_EVENT, SETSPEED_EVENT, SPEED_VALUE, STOP_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -1037,7 +1007,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_STOP_CALLBACK_1000', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
STOP_EVENT, ERROR_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -1052,7 +1022,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_STOP_CALLBACK_1100', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, GETDESCRIPTION, STOP_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -1067,7 +1037,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_STOP_CALLBACK_1200', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, PLAY_EVENT, STOP_EVENT, STOP_EVENT, STOP_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -1096,7 +1066,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_RESET_CALLBACK_0200', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, RESET_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -1111,7 +1081,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_RESET_CALLBACK_0300', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, PLAY_EVENT, RESET_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -1126,7 +1096,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_RESET_CALLBACK_0400', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, PLAY_EVENT, PAUSE_EVENT, RESET_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -1141,7 +1111,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_RESET_CALLBACK_0500', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, PLAY_EVENT, STOP_EVENT, RESET_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -1156,7 +1126,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_RESET_CALLBACK_0600', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, PLAY_EVENT, SEEK_EVENT, SEEK_TIME, RESET_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -1171,7 +1141,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_RESET_CALLBACK_0700', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, PLAY_EVENT, SEEK_MODE_EVENT, SEEK_TIME, RESET_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -1186,7 +1156,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_RESET_CALLBACK_0800', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, PLAY_EVENT, SETVOLUME_EVENT, VOLUME_VALUE, RESET_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -1201,7 +1171,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_RESET_CALLBACK_0900', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, PLAY_EVENT, SETSPEED_EVENT, SPEED_VALUE, RESET_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -1216,7 +1186,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_RESET_CALLBACK_1000', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
RESET_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -1231,7 +1201,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_RESET_CALLBACK_1100', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, GETDESCRIPTION, RESET_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -1246,7 +1216,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_RESET_CALLBACK_1200', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, RESET_EVENT, RESET_EVENT, RESET_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -1275,7 +1245,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_RELEASE_CALLBACK_0200', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -1290,7 +1260,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_RELEASE_CALLBACK_0300', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, PLAY_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -1305,7 +1275,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_RELEASE_CALLBACK_0400', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, PLAY_EVENT, PAUSE_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -1320,7 +1290,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_RELEASE_CALLBACK_0500', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, PLAY_EVENT, STOP_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -1335,7 +1305,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_RELEASE_CALLBACK_0600', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, PLAY_EVENT, SEEK_EVENT, SEEK_TIME, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -1350,7 +1320,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_RELEASE_CALLBACK_0700', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, PLAY_EVENT, SEEK_MODE_EVENT, SEEK_TIME, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -1365,7 +1335,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_RELEASE_CALLBACK_0800', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, PLAY_EVENT, SETVOLUME_EVENT, VOLUME_VALUE, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -1380,7 +1350,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_RELEASE_CALLBACK_0900', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, PLAY_EVENT, SETSPEED_EVENT, SPEED_VALUE, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -1395,7 +1365,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_RELEASE_CALLBACK_1000', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT, RELEASE_EVENT, END_EVENT);
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -1409,7 +1379,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_RELEASE_CALLBACK_1100', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, GETDESCRIPTION, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -1424,7 +1394,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_RELEASE_CALLBACK_1200', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, RESET_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -1453,7 +1423,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_SEEK_CALLBACK_0200', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, SEEK_EVENT, SEEK_TIME, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -1468,7 +1438,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_SEEK_CALLBACK_0300', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, PLAY_EVENT, SEEK_EVENT, SEEK_TIME, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -1483,7 +1453,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_SEEK_CALLBACK_0400', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, PLAY_EVENT, PAUSE_EVENT, SEEK_EVENT, SEEK_TIME, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -1498,7 +1468,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_SEEK_CALLBACK_0500', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, PLAY_EVENT, STOP_EVENT, SEEK_EVENT, SEEK_TIME, ERROR_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -1513,7 +1483,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_SEEK_CALLBACK_0600', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, PLAY_EVENT, RESET_EVENT, SEEK_EVENT, SEEK_TIME, ERROR_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -1528,7 +1498,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_SEEK_CALLBACK_0700', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, PLAY_EVENT, SETVOLUME_EVENT, VOLUME_VALUE, SEEK_EVENT, SEEK_TIME, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -1543,7 +1513,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_SEEK_CALLBACK_0800', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, PLAY_EVENT, SETSPEED_EVENT, SPEED_VALUE,
SEEK_EVENT, SEEK_TIME, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
......@@ -1559,7 +1529,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_SEEK_CALLBACK_0900', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
SEEK_EVENT, SEEK_TIME, ERROR_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -1574,7 +1544,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_SEEK_CALLBACK_1000', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, PLAY_EVENT, GETDESCRIPTION, SEEK_EVENT, SEEK_TIME, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -1589,7 +1559,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_SEEK_CALLBACK_1100', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, PLAY_EVENT, SEEK_EVENT, SEEK_TIME, SEEK_EVENT, SEEK_TIME,
SEEK_EVENT, SEEK_TIME, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
......@@ -1605,7 +1575,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_SEEK_CALLBACK_1300', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, PLAY_EVENT, SEEK_EVENT, -1, ERROR_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -1620,7 +1590,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_SEEK_CALLBACK_1400', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, PLAY_EVENT, SEEK_EVENT, DURATION_TIME + 1000, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -1649,7 +1619,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_SETVOLUME_CALLBACK_0200', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, SETVOLUME_EVENT, VOLUME_VALUE, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -1664,7 +1634,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_SETVOLUME_CALLBACK_0300', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, PLAY_EVENT, SETVOLUME_EVENT, VOLUME_VALUE, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -1679,7 +1649,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_SETVOLUME_CALLBACK_0400', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, PLAY_EVENT, PAUSE_EVENT, SETVOLUME_EVENT, VOLUME_VALUE, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -1694,7 +1664,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_SETVOLUME_CALLBACK_0500', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, PLAY_EVENT, STOP_EVENT, SETVOLUME_EVENT, VOLUME_VALUE, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -1709,7 +1679,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_SETVOLUME_CALLBACK_0600', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, PLAY_EVENT, RESET_EVENT, SETVOLUME_EVENT, VOLUME_VALUE, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -1724,7 +1694,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_SETVOLUME_CALLBACK_0700', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, PLAY_EVENT, SEEK_EVENT, SEEK_TIME, SETVOLUME_EVENT, VOLUME_VALUE, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -1739,7 +1709,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_SETVOLUME_CALLBACK_0800', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, PLAY_EVENT, SETSPEED_EVENT, SPEED_VALUE, SETVOLUME_EVENT,
VOLUME_VALUE, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
......@@ -1755,7 +1725,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_SETVOLUME_CALLBACK_0900', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
SETVOLUME_EVENT, VOLUME_VALUE, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -1770,7 +1740,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_SETVOLUME_CALLBACK_1000', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, PLAY_EVENT, GETDESCRIPTION, SETVOLUME_EVENT, VOLUME_VALUE, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -1785,7 +1755,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_SETVOLUME_CALLBACK_1100', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, PLAY_EVENT, SETVOLUME_EVENT, VOLUME_VALUE, SETVOLUME_EVENT, VOLUME_VALUE,
SETVOLUME_EVENT, VOLUME_VALUE, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
......@@ -1801,7 +1771,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_SETVOLUME_CALLBACK_1300', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, PLAY_EVENT, SETVOLUME_EVENT, -1, ERROR_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -1816,7 +1786,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_SETVOLUME_CALLBACK_1400', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, PLAY_EVENT, SETVOLUME_EVENT, 2, ERROR_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -1845,7 +1815,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_SETSPEED_CALLBACK_0200', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, SETSPEED_EVENT, SPEED_VALUE, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -1860,7 +1830,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_SETSPEED_CALLBACK_0300', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, PLAY_EVENT, SETSPEED_EVENT, SPEED_VALUE, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -1875,7 +1845,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_SETSPEED_CALLBACK_0400', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, PLAY_EVENT, PAUSE_EVENT, SETSPEED_EVENT, SPEED_VALUE, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -1890,7 +1860,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_SETSPEED_CALLBACK_0500', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, PLAY_EVENT, STOP_EVENT, SETSPEED_EVENT, SPEED_VALUE,
ERROR_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
......@@ -1906,7 +1876,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_SETSPEED_CALLBACK_0600', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, PLAY_EVENT, RESET_EVENT, SETSPEED_EVENT, SPEED_VALUE,
ERROR_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
......@@ -1922,7 +1892,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_SETSPEED_CALLBACK_0700', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, PLAY_EVENT, SEEK_EVENT, SEEK_TIME, SETSPEED_EVENT, SPEED_VALUE, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -1937,7 +1907,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_SETSPEED_CALLBACK_0800', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, PLAY_EVENT, SETVOLUME_EVENT, VOLUME_VALUE, SETSPEED_EVENT,
SPEED_VALUE, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
......@@ -1953,7 +1923,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_SETSPEED_CALLBACK_0900', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
SETSPEED_EVENT, SPEED_VALUE, ERROR_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -1968,7 +1938,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_SETSPEED_CALLBACK_1000', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, PLAY_EVENT, GETDESCRIPTION, SETSPEED_EVENT, SPEED_VALUE, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -1983,7 +1953,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_SETSPEED_CALLBACK_1100', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, PLAY_EVENT, SETSPEED_EVENT, SPEED_VALUE, SETSPEED_EVENT, SPEED_VALUE,
SETSPEED_EVENT, SPEED_VALUE, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
......@@ -1999,7 +1969,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_SETSPEED_CALLBACK_1300', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, PLAY_EVENT, SETSPEED_EVENT, -1, ERROR_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -2014,7 +1984,7 @@ describe('VideoPlayerAPICallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_SETSPEED_CALLBACK_1400', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, PLAY_EVENT, SETSPEED_EVENT, 5, ERROR_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......
......@@ -14,10 +14,11 @@
*/
import media from '@ohos.multimedia.media'
import Fileio from '@ohos.fileio'
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index'
describe('VideoPlayerFuncCallbackTest', function () {
const AUDIO_SOURCE = 'file://data/media/01.mp4';
const AUDIO_SOURCE = 'file://data/media/H264_AAC.mp4';
const PLAY_TIME = 3000;
const SEEK_TIME = 5000;
const SEEK_CLOSEST = 3;
......@@ -25,7 +26,6 @@ describe('VideoPlayerFuncCallbackTest', function () {
const HEIGHT_VALUE = 480;
const DURATION_TIME = 10034;
const CREATE_EVENT = 'create';
const GETSURFACE_EVENT = 'getDisplaySurface';
const SETSURFACE_EVENT = 'setDisplaySurface';
const GETDESCRIPTION = 'getTrackDescription';
const PREPARE_EVENT = 'prepare';
......@@ -42,11 +42,12 @@ describe('VideoPlayerFuncCallbackTest', function () {
const VOLUME_VALUE = 1;
const SPEED_VALUE = 1;
const DELTA_TIME = 1000;
let surfaceID = null;
let surfaceID = '';
let events = require('events');
let eventEmitter = new events.EventEmitter();
beforeAll(function() {
getSurfaceID();
console.info('beforeAll case');
})
......@@ -62,6 +63,19 @@ describe('VideoPlayerFuncCallbackTest', function () {
console.info('afterAll case');
})
function getSurfaceID() {
let surfaceIDTest = new ArrayBuffer(20);
let readStreamSync = Fileio.createStreamSync('/data/media/surfaceID.txt', 'rb');
readStreamSync.readSync(surfaceIDTest, {length : 13});
let view = new Uint8Array(surfaceIDTest);
for (let i = 0; i < 13; i++) {
let value = view[i] - 48;
surfaceID = surfaceID + '' + value;
}
console.info('case getSurfaceID is ' + surfaceID);
readStreamSync.closeSync();
}
function sleep(time) {
for(let t = Date.now(); Date.now() - t <= time;);
}
......@@ -132,19 +146,6 @@ describe('VideoPlayerFuncCallbackTest', function () {
});
});
eventEmitter.on(GETSURFACE_EVENT, (videoPlayer, steps, done) => {
steps.shift();
videoPlayer.getDisplaySurface((err, outSurface) => {
if (typeof (err) == 'undefined') {
surfaceID = outSurface;
console.info('case getDisplaySurface success!!');
toNextStep(videoPlayer, steps, done);
} else {
printfError(err, done);
}
})
});
eventEmitter.on(SETSURFACE_EVENT, (videoPlayer, steps, done) => {
steps.shift();
videoPlayer.url = AUDIO_SOURCE;
......@@ -260,7 +261,6 @@ describe('VideoPlayerFuncCallbackTest', function () {
steps.shift();
videoPlayer.seek(seekTime, (err, seekDoneTime) => {
if (typeof (err) == 'undefined') {
expect(videoPlayer.state).assertEqual('playing');
console.info('case seek success and seekDoneTime is '+ seekDoneTime);
toNextStep(videoPlayer, steps, done);
} else {
......@@ -278,7 +278,7 @@ describe('VideoPlayerFuncCallbackTest', function () {
if (seekTime > DURATION_TIME) {
seekTime = DURATION_TIME;
}
expect(seekDoneTime).assertEqual(SEEK_TIME);
expect(seekDoneTime).assertEqual(seekTime);
expect(videoPlayer.currentTime + DELTA_TIME).assertClose(seekDoneTime + DELTA_TIME, DELTA_TIME);
console.info('case seek success and seekDoneTime is '+ seekDoneTime);
toNextStep(videoPlayer, steps, done);
......@@ -326,7 +326,7 @@ describe('VideoPlayerFuncCallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_FUNCTION_CALLBACK_0100', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT,
PREPARE_EVENT, PLAY_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -341,7 +341,7 @@ describe('VideoPlayerFuncCallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_FUNCTION_CALLBACK_0200', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT, PREPARE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT, PREPARE_EVENT,
PLAY_EVENT, PAUSE_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -356,7 +356,7 @@ describe('VideoPlayerFuncCallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_FUNCTION_CALLBACK_0300', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT, PREPARE_EVENT, PLAY_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT, PREPARE_EVENT, PLAY_EVENT,
PAUSE_EVENT, PLAY_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -371,7 +371,7 @@ describe('VideoPlayerFuncCallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_FUNCTION_CALLBACK_0400', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT, PREPARE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT, PREPARE_EVENT,
PLAY_EVENT, STOP_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -386,7 +386,7 @@ describe('VideoPlayerFuncCallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_FUNCTION_CALLBACK_0500', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT, PREPARE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT, PREPARE_EVENT,
PLAY_EVENT, RESET_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -401,7 +401,7 @@ describe('VideoPlayerFuncCallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_FUNCTION_CALLBACK_0600', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT, PREPARE_EVENT, PLAY_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT, PREPARE_EVENT, PLAY_EVENT,
SEEK_EVENT, SEEK_TIME, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -416,7 +416,7 @@ describe('VideoPlayerFuncCallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_FUNCTION_CALLBACK_0700', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT, PREPARE_EVENT, PLAY_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT, PREPARE_EVENT, PLAY_EVENT,
SEEK_MODE_EVENT, SEEK_TIME, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -431,7 +431,7 @@ describe('VideoPlayerFuncCallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_FUNCTION_CALLBACK_0800', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT, PREPARE_EVENT, PLAY_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT, PREPARE_EVENT, PLAY_EVENT,
SETVOLUME_EVENT, VOLUME_VALUE, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -446,7 +446,7 @@ describe('VideoPlayerFuncCallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_FUNCTION_CALLBACK_0900', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT, PREPARE_EVENT, PLAY_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT, PREPARE_EVENT, PLAY_EVENT,
SETSPEED_EVENT, SPEED_VALUE, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -461,7 +461,7 @@ describe('VideoPlayerFuncCallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_FUNCTION_CALLBACK_1000', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT, PREPARE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT, PREPARE_EVENT,
GETDESCRIPTION, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -476,7 +476,7 @@ describe('VideoPlayerFuncCallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_FUNCTION_CALLBACK_1200', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT, PREPARE_EVENT, PLAY_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT, PREPARE_EVENT, PLAY_EVENT,
PAUSE_EVENT, STOP_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -491,7 +491,7 @@ describe('VideoPlayerFuncCallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_FUNCTION_CALLBACK_1300', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT, PREPARE_EVENT, PLAY_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT, PREPARE_EVENT, PLAY_EVENT,
PAUSE_EVENT, RESET_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -506,7 +506,7 @@ describe('VideoPlayerFuncCallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_FUNCTION_CALLBACK_1400', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT, PREPARE_EVENT, PLAY_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT, PREPARE_EVENT, PLAY_EVENT,
PAUSE_EVENT, SEEK_EVENT, SEEK_TIME, PLAY_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -521,7 +521,7 @@ describe('VideoPlayerFuncCallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_FUNCTION_CALLBACK_1500', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT, PREPARE_EVENT, PLAY_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT, PREPARE_EVENT, PLAY_EVENT,
PAUSE_EVENT, SEEK_MODE_EVENT, SEEK_TIME, PLAY_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -536,7 +536,7 @@ describe('VideoPlayerFuncCallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_FUNCTION_CALLBACK_1600', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT, PREPARE_EVENT, PLAY_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT, PREPARE_EVENT, PLAY_EVENT,
PAUSE_EVENT, SETVOLUME_EVENT, VOLUME_VALUE, PLAY_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -551,7 +551,7 @@ describe('VideoPlayerFuncCallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_FUNCTION_CALLBACK_1700', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT, PREPARE_EVENT, PLAY_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT, PREPARE_EVENT, PLAY_EVENT,
PAUSE_EVENT, SETSPEED_EVENT, SPEED_VALUE, PLAY_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -566,7 +566,7 @@ describe('VideoPlayerFuncCallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_FUNCTION_CALLBACK_1800', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT, PREPARE_EVENT, PLAY_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT, PREPARE_EVENT, PLAY_EVENT,
STOP_EVENT, RESET_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -581,8 +581,8 @@ describe('VideoPlayerFuncCallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_FUNCTION_CALLBACK_1900', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT, PREPARE_EVENT, PLAY_EVENT,
STOP_EVENT, RESET_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT, PREPARE_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT, PREPARE_EVENT, PLAY_EVENT,
STOP_EVENT, RESET_EVENT, SETSURFACE_EVENT, PREPARE_EVENT,
PLAY_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -597,7 +597,7 @@ describe('VideoPlayerFuncCallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_FUNCTION_CALLBACK_2000', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT, PREPARE_EVENT, PLAY_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT, PREPARE_EVENT, PLAY_EVENT,
SEEK_EVENT, 0, PAUSE_EVENT, STOP_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -612,7 +612,7 @@ describe('VideoPlayerFuncCallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_FUNCTION_CALLBACK_2100', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT, PREPARE_EVENT, PLAY_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT, PREPARE_EVENT, PLAY_EVENT,
SEEK_MODE_EVENT, 0, PAUSE_EVENT, STOP_EVENT, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -627,7 +627,7 @@ describe('VideoPlayerFuncCallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_FUNCTION_CALLBACK_2200', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT, PREPARE_EVENT, PLAY_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT, PREPARE_EVENT, PLAY_EVENT,
SEEK_EVENT, DURATION_TIME, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -642,7 +642,7 @@ describe('VideoPlayerFuncCallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_FUNCTION_CALLBACK_2300', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT, PREPARE_EVENT, PLAY_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT, PREPARE_EVENT, PLAY_EVENT,
SEEK_MODE_EVENT, DURATION_TIME, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -657,7 +657,7 @@ describe('VideoPlayerFuncCallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_FUNCTION_CALLBACK_2400', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT, PREPARE_EVENT, PLAY_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT, PREPARE_EVENT, PLAY_EVENT,
SEEK_EVENT, DURATION_TIME + 1, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -672,7 +672,7 @@ describe('VideoPlayerFuncCallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_FUNCTION_CALLBACK_2500', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT, PREPARE_EVENT, PLAY_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT, PREPARE_EVENT, PLAY_EVENT,
SEEK_MODE_EVENT, DURATION_TIME + 1, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
})
......@@ -687,7 +687,7 @@ describe('VideoPlayerFuncCallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_FUNCTION_CALLBACK_2600', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT, PREPARE_EVENT, PLAY_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT, PREPARE_EVENT, PLAY_EVENT,
SETVOLUME_EVENT, 0, SETVOLUME_EVENT, 0.2, SETVOLUME_EVENT, 0.4, SETVOLUME_EVENT, 0.6,
SETVOLUME_EVENT, 0.8, SETVOLUME_EVENT, 1, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
......@@ -703,7 +703,7 @@ describe('VideoPlayerFuncCallbackTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_FUNCTION_CALLBACK_2700', 0, async function (done) {
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, GETSURFACE_EVENT, SETSURFACE_EVENT, PREPARE_EVENT, PLAY_EVENT,
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT, PREPARE_EVENT, PLAY_EVENT,
SETSPEED_EVENT, 0, SETSPEED_EVENT, 1, SETSPEED_EVENT, 2,
SETSPEED_EVENT, 3, SETSPEED_EVENT, 4, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
......
......@@ -14,10 +14,11 @@
*/
import media from '@ohos.multimedia.media'
import Fileio from '@ohos.fileio'
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index'
describe('VideoPlayerFuncPromiseTest', function () {
const AUDIO_SOURCE = 'file://data/media/01.mp4';
const AUDIO_SOURCE = 'file://data/media/H264_AAC.mp4';
const PLAY_TIME = 3000;
const SEEK_TIME = 5000;
const SEEK_CLOSEST = 3;
......@@ -25,8 +26,9 @@ describe('VideoPlayerFuncPromiseTest', function () {
const HEIGHT_VALUE = 480;
const DURATION_TIME = 10034;
const DELTA_TIME = 1000;
let surfaceID = '';
beforeAll(function() {
getSurfaceID();
console.info('beforeAll case');
})
......@@ -42,6 +44,19 @@ describe('VideoPlayerFuncPromiseTest', function () {
console.info('afterAll case');
})
function getSurfaceID() {
let surfaceIDTest = new ArrayBuffer(20);
let readStreamSync = Fileio.createStreamSync('/data/media/surfaceID.txt', 'rb');
readStreamSync.readSync(surfaceIDTest, {length : 13});
let view = new Uint8Array(surfaceIDTest);
for (let i = 0; i < 13; i++) {
let value = view[i] - 48;
surfaceID = surfaceID + '' + value;
}
console.info('case getSurfaceID is ' + surfaceID);
readStreamSync.closeSync();
}
function sleep(time) {
for(let t = Date.now(); Date.now() - t <= time;);
}
......@@ -105,7 +120,6 @@ describe('VideoPlayerFuncPromiseTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_FUNCTION_PROMISE_0100', 0, async function (done) {
let videoPlayer = null;
let surfaceID = null;
await media.createVideoPlayer().then((video) => {
if (typeof (video) != 'undefined') {
console.info('case createVideoPlayer success');
......@@ -117,12 +131,7 @@ describe('VideoPlayerFuncPromiseTest', function () {
}
}, failureCallback).catch(catchCallback);
await videoPlayer.getDisplaySurface().then((outSurface) => {
console.info('case getDisplaySurface success and surfaceID is ' + outSurface);
videoPlayer.url = AUDIO_SOURCE;
surfaceID = outSurface;
}, failureCallback).catch(catchCallback);
videoPlayer.url = AUDIO_SOURCE;
await videoPlayer.setDisplaySurface(surfaceID).then(() => {
console.info('case setDisplaySurface success');
expect(videoPlayer.state).assertEqual('idle');
......@@ -158,7 +167,6 @@ describe('VideoPlayerFuncPromiseTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_FUNCTION_PROMISE_0200', 0, async function (done) {
let videoPlayer = null;
let surfaceID = null;
await media.createVideoPlayer().then((video) => {
if (typeof (video) != 'undefined') {
videoPlayer = video;
......@@ -169,12 +177,7 @@ describe('VideoPlayerFuncPromiseTest', function () {
}
}, failureCallback).catch(catchCallback);
await videoPlayer.getDisplaySurface().then((outSurface) => {
console.info('case getDisplaySurface success and surfaceID is ' + outSurface);
videoPlayer.url = AUDIO_SOURCE;
surfaceID = outSurface;
}, failureCallback).catch(catchCallback);
videoPlayer.url = AUDIO_SOURCE;
await videoPlayer.setDisplaySurface(surfaceID).then(() => {
console.info('case setDisplaySurface success');
expect(videoPlayer.state).assertEqual('idle');
......@@ -215,7 +218,6 @@ describe('VideoPlayerFuncPromiseTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_FUNCTION_PROMISE_0300', 0, async function (done) {
let videoPlayer = null;
let surfaceID = null;
await media.createVideoPlayer().then((video) => {
if (typeof (video) != 'undefined') {
videoPlayer = video;
......@@ -226,12 +228,7 @@ describe('VideoPlayerFuncPromiseTest', function () {
}
}, failureCallback).catch(catchCallback);
await videoPlayer.getDisplaySurface().then((outSurface) => {
console.info('case getDisplaySurface success and surfaceID is ' + outSurface);
videoPlayer.url = AUDIO_SOURCE;
surfaceID = outSurface;
}, failureCallback).catch(catchCallback);
videoPlayer.url = AUDIO_SOURCE;
await videoPlayer.setDisplaySurface(surfaceID).then(() => {
expect(videoPlayer.state).assertEqual('idle');
console.info('case setDisplaySurface success');
......@@ -278,7 +275,6 @@ describe('VideoPlayerFuncPromiseTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_FUNCTION_PROMISE_0400', 0, async function (done) {
let videoPlayer = null;
let surfaceID = null;
await media.createVideoPlayer().then((video) => {
if (typeof (video) != 'undefined') {
videoPlayer = video;
......@@ -289,12 +285,7 @@ describe('VideoPlayerFuncPromiseTest', function () {
}
}, failureCallback).catch(catchCallback);
await videoPlayer.getDisplaySurface().then((outSurface) => {
console.info('case getDisplaySurface success and surfaceID is ' + outSurface);
videoPlayer.url = AUDIO_SOURCE;
surfaceID = outSurface;
}, failureCallback).catch(catchCallback);
videoPlayer.url = AUDIO_SOURCE;
await videoPlayer.setDisplaySurface(surfaceID).then(() => {
expect(videoPlayer.state).assertEqual('idle');
console.info('case setDisplaySurface success');
......@@ -335,7 +326,6 @@ describe('VideoPlayerFuncPromiseTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_FUNCTION_PROMISE_0500', 0, async function (done) {
let videoPlayer = null;
let surfaceID = null;
await media.createVideoPlayer().then((video) => {
if (typeof (video) != 'undefined') {
videoPlayer = video;
......@@ -346,12 +336,7 @@ describe('VideoPlayerFuncPromiseTest', function () {
}
}, failureCallback).catch(catchCallback);
await videoPlayer.getDisplaySurface().then((outSurface) => {
console.info('case getDisplaySurface success and surfaceID is ' + outSurface);
videoPlayer.url = AUDIO_SOURCE;
surfaceID = outSurface;
}, failureCallback).catch(catchCallback);
videoPlayer.url = AUDIO_SOURCE;
await videoPlayer.setDisplaySurface(surfaceID).then(() => {
expect(videoPlayer.state).assertEqual('idle');
console.info('case setDisplaySurface success');
......@@ -392,7 +377,6 @@ describe('VideoPlayerFuncPromiseTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_FUNCTION_PROMISE_0600', 0, async function (done) {
let videoPlayer = null;
let surfaceID = null;
await media.createVideoPlayer().then((video) => {
if (typeof (video) != 'undefined') {
videoPlayer = video;
......@@ -403,12 +387,7 @@ describe('VideoPlayerFuncPromiseTest', function () {
}
}, failureCallback).catch(catchCallback);
await videoPlayer.getDisplaySurface().then((outSurface) => {
console.info('case getDisplaySurface success and surfaceID is ' + outSurface);
videoPlayer.url = AUDIO_SOURCE;
surfaceID = outSurface;
}, failureCallback).catch(catchCallback);
videoPlayer.url = AUDIO_SOURCE;
await videoPlayer.setDisplaySurface(surfaceID).then(() => {
expect(videoPlayer.state).assertEqual('idle');
console.info('case setDisplaySurface success');
......@@ -449,7 +428,6 @@ describe('VideoPlayerFuncPromiseTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_FUNCTION_PROMISE_0700', 0, async function (done) {
let videoPlayer = null;
let surfaceID = null;
await media.createVideoPlayer().then((video) => {
if (typeof (video) != 'undefined') {
videoPlayer = video;
......@@ -460,12 +438,7 @@ describe('VideoPlayerFuncPromiseTest', function () {
}
}, failureCallback).catch(catchCallback);
await videoPlayer.getDisplaySurface().then((outSurface) => {
console.info('case getDisplaySurface success and surfaceID is ' + outSurface);
videoPlayer.url = AUDIO_SOURCE;
surfaceID = outSurface;
}, failureCallback).catch(catchCallback);
videoPlayer.url = AUDIO_SOURCE;
await videoPlayer.setDisplaySurface(surfaceID).then(() => {
expect(videoPlayer.state).assertEqual('idle');
console.info('case setDisplaySurface success');
......@@ -508,7 +481,6 @@ describe('VideoPlayerFuncPromiseTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_FUNCTION_PROMISE_0800', 0, async function (done) {
let videoPlayer = null;
let surfaceID = null;
await media.createVideoPlayer().then((video) => {
if (typeof (video) != 'undefined') {
videoPlayer = video;
......@@ -519,11 +491,7 @@ describe('VideoPlayerFuncPromiseTest', function () {
}
}, failureCallback).catch(catchCallback);
await videoPlayer.getDisplaySurface().then((outSurface) => {
videoPlayer.url = AUDIO_SOURCE;
surfaceID = outSurface;
}, failureCallback).catch(catchCallback);
videoPlayer.url = AUDIO_SOURCE;
await videoPlayer.setDisplaySurface(surfaceID).then(() => {
expect(videoPlayer.state).assertEqual('idle');
console.info('case setDisplaySurface success');
......@@ -564,7 +532,6 @@ describe('VideoPlayerFuncPromiseTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_FUNCTION_PROMISE_0900', 0, async function (done) {
let videoPlayer = null;
let surfaceID = null;
await media.createVideoPlayer().then((video) => {
if (typeof (video) != 'undefined') {
videoPlayer = video;
......@@ -575,11 +542,7 @@ describe('VideoPlayerFuncPromiseTest', function () {
}
}, failureCallback).catch(catchCallback);
await videoPlayer.getDisplaySurface().then((outSurface) => {
videoPlayer.url = AUDIO_SOURCE;
surfaceID = outSurface;
}, failureCallback).catch(catchCallback);
videoPlayer.url = AUDIO_SOURCE;
await videoPlayer.setDisplaySurface(surfaceID).then(() => {
expect(videoPlayer.state).assertEqual('idle');
console.info('case setDisplaySurface success');
......@@ -620,7 +583,6 @@ describe('VideoPlayerFuncPromiseTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_FUNCTION_PROMISE_1000', 0, async function (done) {
let videoPlayer = null;
let surfaceID = null;
let arrayDescription = null;
await media.createVideoPlayer().then((video) => {
if (typeof (video) != 'undefined') {
......@@ -632,11 +594,7 @@ describe('VideoPlayerFuncPromiseTest', function () {
}
}, failureCallback).catch(catchCallback);
await videoPlayer.getDisplaySurface().then((outSurface) => {
videoPlayer.url = AUDIO_SOURCE;
surfaceID = outSurface;
}, failureCallback).catch(catchCallback);
videoPlayer.url = AUDIO_SOURCE;
await videoPlayer.setDisplaySurface(surfaceID).then(() => {
expect(videoPlayer.state).assertEqual('idle');
console.info('case setDisplaySurface success');
......@@ -673,7 +631,6 @@ describe('VideoPlayerFuncPromiseTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_FUNCTION_PROMISE_1100', 0, async function (done) {
let videoPlayer = null;
let surfaceID = null;
await media.createVideoPlayer().then((video) => {
if (typeof (video) != 'undefined') {
videoPlayer = video;
......@@ -684,11 +641,7 @@ describe('VideoPlayerFuncPromiseTest', function () {
}
}, failureCallback).catch(catchCallback);
await videoPlayer.getDisplaySurface().then((outSurface) => {
videoPlayer.url = AUDIO_SOURCE;
surfaceID = outSurface;
}, failureCallback).catch(catchCallback);
videoPlayer.url = AUDIO_SOURCE;
await videoPlayer.setDisplaySurface(surfaceID).then(() => {
expect(videoPlayer.state).assertEqual('idle');
console.info('case setDisplaySurface success');
......@@ -733,7 +686,6 @@ describe('VideoPlayerFuncPromiseTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_FUNCTION_PROMISE_1200', 0, async function (done) {
let videoPlayer = null;
let surfaceID = null;
await media.createVideoPlayer().then((video) => {
if (typeof (video) != 'undefined') {
videoPlayer = video;
......@@ -744,11 +696,7 @@ describe('VideoPlayerFuncPromiseTest', function () {
}
}, failureCallback).catch(catchCallback);
await videoPlayer.getDisplaySurface().then((outSurface) => {
videoPlayer.url = AUDIO_SOURCE;
surfaceID = outSurface;
}, failureCallback).catch(catchCallback);
videoPlayer.url = AUDIO_SOURCE;
await videoPlayer.setDisplaySurface(surfaceID).then(() => {
expect(videoPlayer.state).assertEqual('idle');
console.info('case setDisplaySurface success');
......@@ -794,7 +742,6 @@ describe('VideoPlayerFuncPromiseTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_FUNCTION_PROMISE_1300', 0, async function (done) {
let videoPlayer = null;
let surfaceID = null;
await media.createVideoPlayer().then((video) => {
if (typeof (video) != 'undefined') {
videoPlayer = video;
......@@ -805,11 +752,7 @@ describe('VideoPlayerFuncPromiseTest', function () {
}
}, failureCallback).catch(catchCallback);
await videoPlayer.getDisplaySurface().then((outSurface) => {
videoPlayer.url = AUDIO_SOURCE;
surfaceID = outSurface;
}, failureCallback).catch(catchCallback);
videoPlayer.url = AUDIO_SOURCE;
await videoPlayer.setDisplaySurface(surfaceID).then(() => {
expect(videoPlayer.state).assertEqual('idle');
console.info('case setDisplaySurface success');
......@@ -855,7 +798,6 @@ describe('VideoPlayerFuncPromiseTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_FUNCTION_PROMISE_1400', 0, async function (done) {
let videoPlayer = null;
let surfaceID = null;
await media.createVideoPlayer().then((video) => {
if (typeof (video) != 'undefined') {
videoPlayer = video;
......@@ -866,11 +808,7 @@ describe('VideoPlayerFuncPromiseTest', function () {
}
}, failureCallback).catch(catchCallback);
await videoPlayer.getDisplaySurface().then((outSurface) => {
videoPlayer.url = AUDIO_SOURCE;
surfaceID = outSurface;
}, failureCallback).catch(catchCallback);
videoPlayer.url = AUDIO_SOURCE;
await videoPlayer.setDisplaySurface(surfaceID).then(() => {
expect(videoPlayer.state).assertEqual('idle');
console.info('case setDisplaySurface success');
......@@ -922,7 +860,6 @@ describe('VideoPlayerFuncPromiseTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_FUNCTION_PROMISE_1500', 0, async function (done) {
let videoPlayer = null;
let surfaceID = null;
await media.createVideoPlayer().then((video) => {
if (typeof (video) != 'undefined') {
videoPlayer = video;
......@@ -933,11 +870,7 @@ describe('VideoPlayerFuncPromiseTest', function () {
}
}, failureCallback).catch(catchCallback);
await videoPlayer.getDisplaySurface().then((outSurface) => {
videoPlayer.url = AUDIO_SOURCE;
surfaceID = outSurface;
}, failureCallback).catch(catchCallback);
videoPlayer.url = AUDIO_SOURCE;
await videoPlayer.setDisplaySurface(surfaceID).then(() => {
expect(videoPlayer.state).assertEqual('idle');
console.info('case setDisplaySurface success');
......@@ -990,7 +923,6 @@ describe('VideoPlayerFuncPromiseTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_FUNCTION_PROMISE_1600', 0, async function (done) {
let videoPlayer = null;
let surfaceID = null;
await media.createVideoPlayer().then((video) => {
if (typeof (video) != 'undefined') {
videoPlayer = video;
......@@ -1001,11 +933,7 @@ describe('VideoPlayerFuncPromiseTest', function () {
}
}, failureCallback).catch(catchCallback);
await videoPlayer.getDisplaySurface().then((outSurface) => {
videoPlayer.url = AUDIO_SOURCE;
surfaceID = outSurface;
}, failureCallback).catch(catchCallback);
videoPlayer.url = AUDIO_SOURCE;
await videoPlayer.setDisplaySurface(surfaceID).then(() => {
expect(videoPlayer.state).assertEqual('idle');
console.info('case setDisplaySurface success');
......@@ -1057,7 +985,6 @@ describe('VideoPlayerFuncPromiseTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_FUNCTION_PROMISE_1700', 0, async function (done) {
let videoPlayer = null;
let surfaceID = null;
await media.createVideoPlayer().then((video) => {
if (typeof (video) != 'undefined') {
videoPlayer = video;
......@@ -1068,11 +995,7 @@ describe('VideoPlayerFuncPromiseTest', function () {
}
}, failureCallback).catch(catchCallback);
await videoPlayer.getDisplaySurface().then((outSurface) => {
videoPlayer.url = AUDIO_SOURCE;
surfaceID = outSurface;
}, failureCallback).catch(catchCallback);
videoPlayer.url = AUDIO_SOURCE;
await videoPlayer.setDisplaySurface(surfaceID).then(() => {
expect(videoPlayer.state).assertEqual('idle');
console.info('case setDisplaySurface success');
......@@ -1124,7 +1047,6 @@ describe('VideoPlayerFuncPromiseTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_FUNCTION_PROMISE_1800', 0, async function (done) {
let videoPlayer = null;
let surfaceID = null;
await media.createVideoPlayer().then((video) => {
if (typeof (video) != 'undefined') {
videoPlayer = video;
......@@ -1135,11 +1057,7 @@ describe('VideoPlayerFuncPromiseTest', function () {
}
}, failureCallback).catch(catchCallback);
await videoPlayer.getDisplaySurface().then((outSurface) => {
videoPlayer.url = AUDIO_SOURCE;
surfaceID = outSurface;
}, failureCallback).catch(catchCallback);
videoPlayer.url = AUDIO_SOURCE;
await videoPlayer.setDisplaySurface(surfaceID).then(() => {
expect(videoPlayer.state).assertEqual('idle');
console.info('case setDisplaySurface success');
......@@ -1185,7 +1103,6 @@ describe('VideoPlayerFuncPromiseTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_FUNCTION_PROMISE_1900', 0, async function (done) {
let videoPlayer = null;
let surfaceID = null;
await media.createVideoPlayer().then((video) => {
if (typeof (video) != 'undefined') {
videoPlayer = video;
......@@ -1196,11 +1113,7 @@ describe('VideoPlayerFuncPromiseTest', function () {
}
}, failureCallback).catch(catchCallback);
await videoPlayer.getDisplaySurface().then((outSurface) => {
videoPlayer.url = AUDIO_SOURCE;
surfaceID = outSurface;
}, failureCallback).catch(catchCallback);
videoPlayer.url = AUDIO_SOURCE;
await videoPlayer.setDisplaySurface(surfaceID).then(() => {
expect(videoPlayer.state).assertEqual('idle');
console.info('case setDisplaySurface success');
......@@ -1270,7 +1183,6 @@ describe('VideoPlayerFuncPromiseTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_FUNCTION_PROMISE_2000', 0, async function (done) {
let videoPlayer = null;
let surfaceID = null;
await media.createVideoPlayer().then((video) => {
if (typeof (video) != 'undefined') {
videoPlayer = video;
......@@ -1281,11 +1193,7 @@ describe('VideoPlayerFuncPromiseTest', function () {
}
}, failureCallback).catch(catchCallback);
await videoPlayer.getDisplaySurface().then((outSurface) => {
videoPlayer.url = AUDIO_SOURCE;
surfaceID = outSurface;
}, failureCallback).catch(catchCallback);
videoPlayer.url = AUDIO_SOURCE;
await videoPlayer.setDisplaySurface(surfaceID).then(() => {
expect(videoPlayer.state).assertEqual('idle');
console.info('case setDisplaySurface success');
......@@ -1336,7 +1244,6 @@ describe('VideoPlayerFuncPromiseTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_FUNCTION_PROMISE_2100', 0, async function (done) {
let videoPlayer = null;
let surfaceID = null;
await media.createVideoPlayer().then((video) => {
if (typeof (video) != 'undefined') {
videoPlayer = video;
......@@ -1347,11 +1254,7 @@ describe('VideoPlayerFuncPromiseTest', function () {
}
}, failureCallback).catch(catchCallback);
await videoPlayer.getDisplaySurface().then((outSurface) => {
videoPlayer.url = AUDIO_SOURCE;
surfaceID = outSurface;
}, failureCallback).catch(catchCallback);
videoPlayer.url = AUDIO_SOURCE;
await videoPlayer.setDisplaySurface(surfaceID).then(() => {
expect(videoPlayer.state).assertEqual('idle');
console.info('case setDisplaySurface success');
......@@ -1403,7 +1306,6 @@ describe('VideoPlayerFuncPromiseTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_FUNCTION_PROMISE_2200', 0, async function (done) {
let videoPlayer = null;
let surfaceID = null;
await media.createVideoPlayer().then((video) => {
if (typeof (video) != 'undefined') {
videoPlayer = video;
......@@ -1423,11 +1325,7 @@ describe('VideoPlayerFuncPromiseTest', function () {
}, failureCallback).catch(catchCallback);
});
await videoPlayer.getDisplaySurface().then((outSurface) => {
videoPlayer.url = AUDIO_SOURCE;
surfaceID = outSurface;
}, failureCallback).catch(catchCallback);
videoPlayer.url = AUDIO_SOURCE;
await videoPlayer.setDisplaySurface(surfaceID).then(() => {
expect(videoPlayer.state).assertEqual('idle');
console.info('case setDisplaySurface success');
......@@ -1452,6 +1350,11 @@ describe('VideoPlayerFuncPromiseTest', function () {
expect(videoPlayer.currentTime + DELTA_TIME).assertClose(seekDoneTime + DELTA_TIME, DELTA_TIME);
console.info('case seek called and seekDoneTime is' + seekDoneTime);
}, failureCallback).catch(catchCallback);
await videoPlayer.release().then(() => {
console.info('case release called!!');
}, failureCallback).catch(catchCallback);
done();
})
/* *
......@@ -1464,7 +1367,6 @@ describe('VideoPlayerFuncPromiseTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_FUNCTION_PROMISE_2300', 0, async function (done) {
let videoPlayer = null;
let surfaceID = null;
await media.createVideoPlayer().then((video) => {
if (typeof (video) != 'undefined') {
videoPlayer = video;
......@@ -1484,11 +1386,7 @@ describe('VideoPlayerFuncPromiseTest', function () {
}, failureCallback).catch(catchCallback);
});
await videoPlayer.getDisplaySurface().then((outSurface) => {
videoPlayer.url = AUDIO_SOURCE;
surfaceID = outSurface;
}, failureCallback).catch(catchCallback);
videoPlayer.url = AUDIO_SOURCE;
await videoPlayer.setDisplaySurface(surfaceID).then(() => {
expect(videoPlayer.state).assertEqual('idle');
console.info('case setDisplaySurface success');
......@@ -1514,6 +1412,11 @@ describe('VideoPlayerFuncPromiseTest', function () {
expect(videoPlayer.currentTime).assertEqual(DURATION_TIME);
console.info('case seek called and seekDoneTime is' + seekDoneTime);
}, failureCallback).catch(catchCallback);
await videoPlayer.release().then(() => {
console.info('case release called!!');
}, failureCallback).catch(catchCallback);
done();
})
/* *
......@@ -1526,7 +1429,6 @@ describe('VideoPlayerFuncPromiseTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_FUNCTION_PROMISE_2400', 0, async function (done) {
let videoPlayer = null;
let surfaceID = null;
await media.createVideoPlayer().then((video) => {
if (typeof (video) != 'undefined') {
videoPlayer = video;
......@@ -1546,11 +1448,7 @@ describe('VideoPlayerFuncPromiseTest', function () {
}, failureCallback).catch(catchCallback);
});
await videoPlayer.getDisplaySurface().then((outSurface) => {
videoPlayer.url = AUDIO_SOURCE;
surfaceID = outSurface;
}, failureCallback).catch(catchCallback);
videoPlayer.url = AUDIO_SOURCE;
await videoPlayer.setDisplaySurface(surfaceID).then(() => {
expect(videoPlayer.state).assertEqual('idle');
console.info('case setDisplaySurface success');
......@@ -1577,6 +1475,11 @@ describe('VideoPlayerFuncPromiseTest', function () {
console.info('case seek out of duration called');
done();
}).catch(catchCallback);
await videoPlayer.release().then(() => {
console.info('case release called!!');
}, failureCallback).catch(catchCallback);
done();
})
/* *
......@@ -1589,7 +1492,6 @@ describe('VideoPlayerFuncPromiseTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_FUNCTION_PROMISE_2500', 0, async function (done) {
let videoPlayer = null;
let surfaceID = null;
await media.createVideoPlayer().then((video) => {
if (typeof (video) != 'undefined') {
videoPlayer = video;
......@@ -1609,11 +1511,7 @@ describe('VideoPlayerFuncPromiseTest', function () {
}, failureCallback).catch(catchCallback);
});
await videoPlayer.getDisplaySurface().then((outSurface) => {
videoPlayer.url = AUDIO_SOURCE;
surfaceID = outSurface;
}, failureCallback).catch(catchCallback);
videoPlayer.url = AUDIO_SOURCE;
await videoPlayer.setDisplaySurface(surfaceID).then(() => {
expect(videoPlayer.state).assertEqual('idle');
console.info('case setDisplaySurface success');
......@@ -1641,6 +1539,11 @@ describe('VideoPlayerFuncPromiseTest', function () {
console.info('case seek out of duration called');
done();
}).catch(catchCallback);
await videoPlayer.release().then(() => {
console.info('case release called!!');
}, failureCallback).catch(catchCallback);
done();
})
/* *
......@@ -1653,7 +1556,6 @@ describe('VideoPlayerFuncPromiseTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_FUNCTION_PROMISE_2600', 0, async function (done) {
let videoPlayer = null;
let surfaceID = null;
await media.createVideoPlayer().then((video) => {
if (typeof (video) != 'undefined') {
videoPlayer = video;
......@@ -1664,11 +1566,7 @@ describe('VideoPlayerFuncPromiseTest', function () {
}
}, failureCallback).catch(catchCallback);
await videoPlayer.getDisplaySurface().then((outSurface) => {
videoPlayer.url = AUDIO_SOURCE;
surfaceID = outSurface;
}, failureCallback).catch(catchCallback);
videoPlayer.url = AUDIO_SOURCE;
await videoPlayer.setDisplaySurface(surfaceID).then(() => {
expect(videoPlayer.state).assertEqual('idle');
console.info('case setDisplaySurface success');
......@@ -1711,7 +1609,6 @@ describe('VideoPlayerFuncPromiseTest', function () {
*/
it('SUB_MEDIA_VIDEO_PLAYER_FUNCTION_PROMISE_2700', 0, async function (done) {
let videoPlayer = null;
let surfaceID = null;
await media.createVideoPlayer().then((video) => {
if (typeof (video) != 'undefined') {
videoPlayer = video;
......@@ -1722,11 +1619,7 @@ describe('VideoPlayerFuncPromiseTest', function () {
}
}, failureCallback).catch(catchCallback);
await videoPlayer.getDisplaySurface().then((outSurface) => {
videoPlayer.url = AUDIO_SOURCE;
surfaceID = outSurface;
}, failureCallback).catch(catchCallback);
videoPlayer.url = AUDIO_SOURCE;
await videoPlayer.setDisplaySurface(surfaceID).then(() => {
expect(videoPlayer.state).assertEqual('idle');
console.info('case setDisplaySurface success');
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册