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

!3551 hls testcase update, http 冗余测试用例删除

Merge pull request !3551 from NOBUGGERS/r00514670_0614
......@@ -45,7 +45,7 @@ describe('AudioPlayerHLSTest', function () {
* @tc.type : Function test
* @tc.level : Level0
*/
it('SUB_MEDIA_AUDIO_PLAYER_HLS', 0, async function (done) {
it('testHlsAudioPlayer', 0, async function (done) {
playAudioSource(HTTP_PATH + '05.hls/audio_only/index.m3u8', 219600, PLAY_TIME, false, done);
})
......@@ -55,9 +55,9 @@ describe('AudioPlayerHLSTest', function () {
* @tc.desc : HLS Video playback control test
* @tc.size : MediumTest
* @tc.type : Function test
* @tc.level : Level0
* @tc.level : Level2
*/
it('SUB_MEDIA_AUDIO_PLAYER_HLS_VARIANT', 0, async function (done) {
it('testHlsAudioPlayerVariant', 0, async function (done) {
playAudioSource(HTTP_PATH + '05.hls/hls_variant_audio/index.m3u8', 219600, PLAY_TIME, false, done);
})
})
......@@ -15,4 +15,4 @@
require('./VideoPlayerHLSTest.test.js')
require('./AudioPlayerHLSTest.test.js')
// require('./VideoPlayerHLSBitrateTest.test.js')
\ No newline at end of file
require('./VideoPlayerHLSBitrateTest.test.js')
\ No newline at end of file
......@@ -14,7 +14,6 @@
*/
import media from '@ohos.multimedia.media'
import {toNewPage, clearRouter} from '../../../../../VideoPlayerTestBase.js';
import * as mediaTestBase from '../../../../../MediaTestBase.js';
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index'
......@@ -67,7 +66,8 @@ describe('VideoPlayerHLSBitrateTest.test', function () {
console.info('case videoSizeChanged width: ' + w + ' height: ' + h + 'videoSizeId: ' + videoSizeId);
width = w;
height = h;
if (w == videoSizeArray[videoSizeId][0] && h == videoSizeArray[videoSizeId][1]) {
if (videoSizeId >= 0 && videoSizeId < videoSizeArray.length &&
w == videoSizeArray[videoSizeId][0] && h == videoSizeArray[videoSizeId][1]) {
releaseVideoPlayer(done);
}
});
......@@ -134,7 +134,7 @@ describe('VideoPlayerHLSBitrateTest.test', function () {
* @tc.type : Function test
* @tc.level : Level0
*/
it('SUB_MEDIA_VIDEO_PLAYER_HLS_SET_BITRATE_0100', 0, async function (done) {
it('testHlsVideoPlayerSelectBitrate_0100', 0, async function (done) {
await initVideoPlayer(done);
await setVideoUrl(HTTP_PATH + '05.hls/hls_variant/index.m3u8');
await playAndSetLoop(PLAY_TIME * 2);
......@@ -142,7 +142,6 @@ describe('VideoPlayerHLSBitrateTest.test', function () {
videoSizeArray = [ [256, 144], [426, 240], [640, 360], [854, 480], [1280, 720] ];
checkArray(bitrateArray, expectBitrateArray);
videoSizeId = 1;
console.info('case selectBitRate aaa' + expectBitrateArray[videoSizeId]);
videoPlayer.selectBitrate(expectBitrateArray[videoSizeId]).then((bitrate) => {
console.info('case selectBitrate called');
expect(bitrate).assertEqual(expectBitrateArray[videoSizeId]);
......@@ -157,15 +156,14 @@ describe('VideoPlayerHLSBitrateTest.test', function () {
* @tc.type : Function test
* @tc.level : Level0
*/
it('SUB_MEDIA_VIDEO_PLAYER_HLS_SET_BITRATE_0200', 0, async function (done) {
it('testHlsVideoPlayerSelectBitrate_0200', 0, async function (done) {
await initVideoPlayer(done);
await setVideoUrl(HTTP_PATH + '05.hls/hls_variant/index.m3u8');
await playAndSetLoop(PLAY_TIME);
expectBitrateArray = [165340, 344388, 387360, 765178, 1676816];
videoSizeArray = [ [256, 144], [426, 240], [640, 360], [854, 480], [1280, 720] ];
checkArray(bitrateArray, expectBitrateArray);
videoSizeId = videoSizeArray.length - 1;
console.info('case selectBitRate' + expectBitrateArray[videoSizeId]);
videoSizeId = videoSizeArray.length - 2;
videoPlayer.selectBitrate(expectBitrateArray[videoSizeId], (err, bitrate) => {
console.info('case selectBitrate called');
if (typeof (err) == 'undefined') {
......
......@@ -54,7 +54,7 @@ describe('VideoPlayerHLSTest', function () {
* @tc.type : Function test
* @tc.level : Level0
*/
it('SUB_MEDIA_VIDEO_PLAYER_HLS', 0, async function (done) {
it('testHlsVideoPlayer', 0, async function (done) {
await playVideoSource(HTTP_PATH + '05.hls/1/index.m3u8', 640, 320, 10033, PLAY_TIME, done);
done();
})
......@@ -65,9 +65,9 @@ describe('VideoPlayerHLSTest', function () {
* @tc.desc : HLS Video playback control test
* @tc.size : MediumTest
* @tc.type : Function test
* @tc.level : Level0
* @tc.level : Level1
*/
it('SUB_MEDIA_VIDEO_PLAYER_HLS_SEPARATE', 0, async function (done) {
it('testHlsVideoPlayerSeparate', 0, async function (done) {
await playVideoSource(HTTP_PATH + '05.hls/2/index.m3u8', 640, 320, 10033, PLAY_TIME, done);
done();
})
......@@ -78,9 +78,9 @@ describe('VideoPlayerHLSTest', function () {
* @tc.desc : HLS Video playback control test
* @tc.size : MediumTest
* @tc.type : Function test
* @tc.level : Level0
* @tc.level : Level1
*/
it('SUB_MEDIA_VIDEO_PLAYER_HLS_AUDIOONLY', 0, async function (done) {
it('testHlsVideoPlayerAudioOnly', 0, async function (done) {
await playVideoSource(HTTP_PATH + '05.hls/audio_only/index.m3u8', 0, 0, 10033, PLAY_TIME, done);
done();
})
......@@ -93,8 +93,8 @@ describe('VideoPlayerHLSTest', function () {
* @tc.type : Function test
* @tc.level : Level0
*/
it('SUB_MEDIA_VIDEO_PLAYER_HLS_VARIANT', 0, async function (done) {
await playVideoSource(HTTP_PATH + '05.hls/hls_variant/index.m3u8', null, null, 120000, PLAY_TIME, done);
it('testHlsVideoPlayerVariant', 0, async function (done) {
await playVideoSource(HTTP_PATH + '05.hls/hls_variant/index.m3u8', null, null, 10033, PLAY_TIME, done);
done();
})
......@@ -104,10 +104,10 @@ describe('VideoPlayerHLSTest', function () {
* @tc.desc : HLS Video playback control test
* @tc.size : MediumTest
* @tc.type : Function test
* @tc.level : Level0
* @tc.level : Level1
*/
it('SUB_MEDIA_VIDEO_PLAYER_HLS_VARIANT_AUDIOOFF', 0, async function (done) {
await playVideoSource(HTTP_PATH + '05.hls/hls_variant2/index.m3u8', null, null, 120000, PLAY_TIME, done);
it('testHlsVideoPlayerVariantAudioOff', 0, async function (done) {
await playVideoSource(HTTP_PATH + '05.hls/hls_variant2/index.m3u8', null, null, 10080, PLAY_TIME, done);
done();
})
......@@ -117,10 +117,10 @@ describe('VideoPlayerHLSTest', function () {
* @tc.desc : HLS Video playback control test
* @tc.size : MediumTest
* @tc.type : Function test
* @tc.level : Level0
* @tc.level : Level2
*/
it('SUB_MEDIA_VIDEO_PLAYER_HLS_CODEC_CHAGNGE', 0, async function (done) {
await playVideoSource(HTTP_PATH + '05.hls/hls_variant3/index.m3u8', null, null, 120000, PLAY_TIME, done);
it('testHlsVideoPlayerCodecChange', 0, async function (done) {
await playVideoSource(HTTP_PATH + '05.hls/hls_variant3/index.m3u8', null, null, 10080, PLAY_TIME, done);
done();
})
......
......@@ -59,7 +59,7 @@ describe('HttpPlayerCompatibilityTest', function () {
* @tc.type : Function test
* @tc.level : Level1
*/
it('SUB_MEDIA_VIDEO_PLAYER_HTTP_FORMAT_MP4_0100', 0, async function (done) {
it('testHttpVideoPlayerFormatMp4_0100', 0, async function (done) {
let path = VIDEOPLAYER_PATH + 'mp4/h264_aac_640x320_30r.mp4';
await playVideoSource(path, 640, 320, 10100, PLAY_TIME, done);
done();
......@@ -73,7 +73,7 @@ describe('HttpPlayerCompatibilityTest', function () {
* @tc.type : Function test
* @tc.level : Level1
*/
it('SUB_MEDIA_VIDEO_PLAYER_HTTP_FORMAT_MP4_0200', 0, async function (done) {
it('testHttpVideoPlayerFormatMp4_0200', 0, async function (done) {
let path = VIDEOPLAYER_PATH + 'mp4/h264_mp3_640x480_25r.mp4';
await playVideoSource(path, 640, 480, 10080, PLAY_TIME, done);
done();
......@@ -87,7 +87,7 @@ describe('HttpPlayerCompatibilityTest', function () {
* @tc.type : Function test
* @tc.level : Level1
*/
it('SUB_MEDIA_VIDEO_PLAYER_HTTP_FORMAT_TS_0100', 0, async function (done) {
it('testHttpVideoPlayerFormatTs_0100', 0, async function (done) {
let path = VIDEOPLAYER_PATH + 'mpeg_ts/h264_aac_640x480_30r.ts';
await playVideoSource(path, 640, 480, 10161, PLAY_TIME, done);
done();
......@@ -101,7 +101,7 @@ describe('HttpPlayerCompatibilityTest', function () {
* @tc.type : Function test
* @tc.level : Level1
*/
it('SUB_MEDIA_VIDEO_PLAYER_HTTP_FORMAT_TS_0200', 0, async function (done) {
it('testHttpVideoPlayerFormatTs_0200', 0, async function (done) {
let path = VIDEOPLAYER_PATH + 'mpeg_ts/h264_mp3_640x480_25r.ts';
await playVideoSource(path, 640, 480, 10169, PLAY_TIME, done);
done();
......@@ -115,7 +115,7 @@ describe('HttpPlayerCompatibilityTest', function () {
* @tc.type : Function test
* @tc.level : Level1
*/
it('SUB_MEDIA_VIDEO_PLAYER_HTTP_FORMAT_MKV_0100', 0, async function (done) {
it('testHttpVideoPlayerFormatMkv_0100', 0, async function (done) {
let path = VIDEO_PATH + 'H264_AAC.mkv';
await playVideoSource(path, 720, 480, 10057, PLAY_TIME, done);
done();
......@@ -129,7 +129,7 @@ describe('HttpPlayerCompatibilityTest', function () {
* @tc.type : Function test
* @tc.level : Level1
*/
it('SUB_MEDIA_VIDEO_PLAYER_HTTP_FORMAT_MKV_0200', 0, async function (done) {
it('testHttpVideoPlayerFormatMkv_0200', 0, async function (done) {
let path = VIDEO_PATH + 'H264_MP3.mkv';
await playVideoSource(path, 720, 480, 10059, PLAY_TIME, done);
done();
......@@ -143,7 +143,7 @@ describe('HttpPlayerCompatibilityTest', function () {
* @tc.type : Function test
* @tc.level : Level1
*/
it('SUB_MEDIA_VIDEO_PLAYER_HTTP_FORMAT_MKV_0500', 0, async function (done) {
it('testHttpVideoPlayerFormatMkv_0500', 0, async function (done) {
let path = VIDEO_PATH + 'MPEG2_AAC.mkv';
await playVideoSource(path, 720, 480, 10057, PLAY_TIME, done);
done();
......@@ -157,7 +157,7 @@ describe('HttpPlayerCompatibilityTest', function () {
* @tc.type : Function test
* @tc.level : Level1
*/
it('SUB_MEDIA_VIDEO_PLAYER_HTTP_FORMAT_MKV_0600', 0, async function (done) {
it('testHttpVideoPlayerFormatMkv_0600', 0, async function (done) {
let path = VIDEO_PATH + 'MPEG2_MP3.mkv';
await playVideoSource(path, 720, 480, 10059, PLAY_TIME, done);
done();
......@@ -171,7 +171,7 @@ describe('HttpPlayerCompatibilityTest', function () {
* @tc.type : Function test
* @tc.level : Level1
*/
it('SUB_MEDIA_VIDEO_PLAYER_HTTP_FORMAT_MKV_0800', 0, async function (done) {
it('testHttpVideoPlayerFormatMkv_0800', 0, async function (done) {
let path = VIDEO_PATH + 'MPEG4_MP3.mkv';
await playVideoSource(path, 720, 480, 10059, PLAY_TIME, done);
done();
......@@ -185,7 +185,7 @@ describe('HttpPlayerCompatibilityTest', function () {
* @tc.type : Function test
* @tc.level : Level1
*/
it('SUB_MEDIA_VIDEO_PLAYER_HTTP_FORMAT_WEBM_0100', 0, async function (done) {
it('testHttpVideoPlayerFormatWebm_0100', 0, async function (done) {
let path = VIDEO_PATH + 'VP8_VORBIS.webm';
await playVideoSource(path, 720, 480, 10083, PLAY_TIME, done);
done();
......@@ -199,7 +199,7 @@ describe('HttpPlayerCompatibilityTest', function () {
* @tc.type : Function test
* @tc.level : Level1
*/
it('SUB_MEDIA_AUDIO_PLAYER_HTTP_FORMAT_MP3_0100', 0, async function (done) {
it('testHttpAudioPlayerFormatMp3_0100', 0, async function (done) {
let path = AUDIO_PATH + '01.mp3';
await playAudioSource(path, 219600, PLAY_TIME, true, done);
})
......@@ -212,7 +212,7 @@ describe('HttpPlayerCompatibilityTest', function () {
* @tc.type : Function test
* @tc.level : Level1
*/
it('SUB_MEDIA_AUDIO_PLAYER_HTTP_FORMAT_AAC_0100', 0, async function (done) {
it('testHttpAudioPlayerFormatAac_0100', 0, async function (done) {
let path = AUDIOPLAYER_PATH + 'aac/aac_96ksr_64kbr_2ch.aac';
await playAudioSource(path, 12198, PLAY_TIME, true, done);
})
......@@ -225,7 +225,7 @@ describe('HttpPlayerCompatibilityTest', function () {
* @tc.type : Function test
* @tc.level : Level1
*/
it('SUB_MEDIA_AUDIO_PLAYER_HTTP_FORMAT_WAV_0100', 0, async function (done) {
it('testHttpAudioPlayerFormatWav_0100', 0, async function (done) {
let path = AUDIOPLAYER_PATH + 'wav/pcm_48ksr_16kbr_1ch.wav';
await playAudioSource(path, 5461, PLAY_TIME, true, done);
})
......@@ -238,7 +238,7 @@ describe('HttpPlayerCompatibilityTest', function () {
* @tc.type : Function test
* @tc.level : Level1
*/
it('SUB_MEDIA_AUDIO_PLAYER_HTTP_FORMAT_FLAC_0100', 0, async function (done) {
it('testHttpAudioPlayerFormatFlac_0100', 0, async function (done) {
let path = AUDIOPLAYER_PATH + 'flac/flac_96ksr_64kbr_2ch.flac';
await playAudioSource(path, 10000, PLAY_TIME, true, done);
})
......@@ -251,7 +251,7 @@ describe('HttpPlayerCompatibilityTest', function () {
* @tc.type : Function test
* @tc.level : Level1
*/
it('SUB_MEDIA_AUDIO_PLAYER_HTTP_FORMAT_M4A_0100', 0, async function (done) {
it('testHttpAudioPlayerFormatM4a_0100', 0, async function (done) {
let path = AUDIO_PATH + '55.m4a';
await playAudioSource(path, 219575, PLAY_TIME, true, done);
})
......@@ -264,7 +264,7 @@ describe('HttpPlayerCompatibilityTest', function () {
* @tc.type : Function test
* @tc.level : Level1
*/
it('SUB_MEDIA_AUDIO_PLAYER_HTTP_FORMAT_OGG_0100', 0, async function (done) {
it('testHttpAudioPlayerFormatOgg_0100', 0, async function (done) {
let path = AUDIOPLAYER_PATH + 'ogg/vorbis_48ksr_32kbr_1ch.ogg';
await playAudioSource(path, 10009, PLAY_TIME, true, done);
})
......
......@@ -12,6 +12,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
require('./HttpPlayerCompatibilityTest.test.js')
require('./HttpPlayerFuncPromiseTest.test.js')
require('./HttpPlayerFuncCallbackTest.test.js')
require('./HttpPlayerFuncPromiseTest.test.js')
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册