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

!2195 修改videoPlayer test问题

Merge pull request !2195 from FULIZHONG/0305play
......@@ -41,10 +41,8 @@
{
"type": "ShellKit",
"run-command": [
"setenforce 0"
],
"teardown-command":[
"setenforce 1"
]
},
{
......
......@@ -10,10 +10,8 @@
{
"type": "ShellKit",
"run-command": [
"setenforce 0"
],
"teardown-command":[
"setenforce 1"
]
},
{
......
......@@ -18,10 +18,8 @@
{
"type": "ShellKit",
"run-command": [
"setenforce 0"
],
"teardown-command":[
"setenforce 1"
]
},
{
......
......@@ -815,8 +815,8 @@ describe('VideoPlayerFuncCallbackTest', function () {
console.info('case new surfaceID is ' + surfaceID);
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT, PREPARE_EVENT, PLAY_EVENT,
SEEK_MODE_EVENT, DURATION_TIME, media.SeekMode.SEEK_NEXT_SYNC,
SEEK_MODE_EVENT, DURATION_TIME, media.SeekMode.SEEK_PREV_SYNC, RELEASE_EVENT, END_EVENT);
SEEK_MODE_EVENT, DURATION_TIME, media.SeekMode.SEEK_PREV_SYNC,
SEEK_MODE_EVENT, DURATION_TIME, media.SeekMode.SEEK_NEXT_SYNC, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
}, 1000);
})
......@@ -854,8 +854,8 @@ describe('VideoPlayerFuncCallbackTest', function () {
console.info('case new surfaceID is ' + surfaceID);
let videoPlayer = null;
let mySteps = new Array(CREATE_EVENT, SETSURFACE_EVENT, PREPARE_EVENT, PLAY_EVENT,
SEEK_MODE_EVENT, DURATION_TIME + 1, media.SeekMode.SEEK_NEXT_SYNC,
SEEK_MODE_EVENT, DURATION_TIME + 1, media.SeekMode.SEEK_PREV_SYNC, RELEASE_EVENT, END_EVENT);
SEEK_MODE_EVENT, DURATION_TIME + 1, media.SeekMode.SEEK_PREV_SYNC,
SEEK_MODE_EVENT, DURATION_TIME + 1, media.SeekMode.SEEK_NEXT_SYNC, RELEASE_EVENT, END_EVENT);
eventEmitter.emit(mySteps[0], videoPlayer, mySteps, done);
}, 1000);
})
......
......@@ -824,12 +824,6 @@ describe('VideoPlayerFuncPromiseTest', function () {
expect(seekDoneTime).assertEqual(DURATION_TIME);
console.info('case seek called and seekDoneTime is' + seekDoneTime);
}, failureCallback).catch(catchCallback);
await videoPlayer.seek(DURATION_TIME, media.SeekMode.SEEK_PREV_SYNC).then((seekDoneTime) => {
expect(videoPlayer.state).assertEqual('playing');
expect(seekDoneTime).assertEqual(NEXT_FRAME_TIME);
console.info('case seek called and seekDoneTime is' + seekDoneTime);
}, failureCallback).catch(catchCallback);
await videoPlayer.release().then(() => {
console.info('case release called!!');
......@@ -1670,19 +1664,19 @@ describe('VideoPlayerFuncPromiseTest', function () {
}, failureCallback).catch(catchCallback);
let endTime = videoPlayer.currentTime;
expect(endTime - startTime).assertClose(PLAY_TIME, DELTA_TIME);
await videoPlayer.seek(DURATION_TIME, media.SeekMode.SEEK_NEXT_SYNC).then((seekDoneTime) => {
await videoPlayer.seek(DURATION_TIME, media.SeekMode.SEEK_PREV_SYNC).then((seekDoneTime) => {
expect(videoPlayer.state).assertEqual('playing');
expect(seekDoneTime).assertEqual(DURATION_TIME);
expect(seekDoneTime).assertEqual(NEXT_FRAME_TIME);
console.info('case seek called and seekDoneTime is' + seekDoneTime);
}, failureCallback).catch(catchCallback);
await videoPlayer.seek(DURATION_TIME, media.SeekMode.SEEK_PREV_SYNC).then((seekDoneTime) => {
await videoPlayer.seek(DURATION_TIME, media.SeekMode.SEEK_NEXT_SYNC).then((seekDoneTime) => {
expect(videoPlayer.state).assertEqual('playing');
expect(seekDoneTime).assertEqual(NEXT_FRAME_TIME);
expect(seekDoneTime).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);
......@@ -1816,18 +1810,17 @@ describe('VideoPlayerFuncPromiseTest', function () {
let endTime = videoPlayer.currentTime;
expect(endTime - startTime).assertClose(PLAY_TIME, DELTA_TIME);
await videoPlayer.seek(DURATION_TIME + 1, media.SeekMode.SEEK_NEXT_SYNC).then((seekDoneTime) => {
await videoPlayer.seek(DURATION_TIME + 1, media.SeekMode.SEEK_PREV_SYNC).then((seekDoneTime) => {
expect(videoPlayer.state).assertEqual('playing');
expect(seekDoneTime).assertEqual(DURATION_TIME);
expect(seekDoneTime).assertEqual(NEXT_FRAME_TIME);
console.info('case seek called and seekDoneTime is' + seekDoneTime);
}, failureCallback).catch(catchCallback);
await videoPlayer.seek(DURATION_TIME + 1, media.SeekMode.SEEK_PREV_SYNC).then((seekDoneTime) => {
await videoPlayer.seek(DURATION_TIME + 1, media.SeekMode.SEEK_NEXT_SYNC).then((seekDoneTime) => {
expect(videoPlayer.state).assertEqual('playing');
expect(seekDoneTime).assertEqual(NEXT_FRAME_TIME);
expect(seekDoneTime).assertEqual(DURATION_TIME);
console.info('case seek called and seekDoneTime is' + seekDoneTime);
}, failureCallback).catch(catchCallback);
}, 1000);
})
......
......@@ -10,10 +10,8 @@
{
"type": "ShellKit",
"run-command": [
"setenforce 0"
],
"teardown-command":[
"setenforce 1"
]
},
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册