提交 e6a8b128 编写于 作者: N NOBUGGERS

hls testcase update, http 冗余测试用例删除 Signed-off-by: NOBUGGERS <ruanmeng@huawei.com>

Signed-off-by: NNOBUGGERS <ruanmeng@huawei.com>
上级 5df70a33
...@@ -15,4 +15,4 @@ ...@@ -15,4 +15,4 @@
require('./VideoPlayerHLSTest.test.js') require('./VideoPlayerHLSTest.test.js')
require('./AudioPlayerHLSTest.test.js') require('./AudioPlayerHLSTest.test.js')
// require('./VideoPlayerHLSBitrateTest.test.js') require('./VideoPlayerHLSBitrateTest.test.js')
\ No newline at end of file \ No newline at end of file
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
*/ */
import media from '@ohos.multimedia.media' import media from '@ohos.multimedia.media'
import {toNewPage, clearRouter} from '../../../../../VideoPlayerTestBase.js';
import * as mediaTestBase from '../../../../../MediaTestBase.js'; import * as mediaTestBase from '../../../../../MediaTestBase.js';
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index' import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index'
...@@ -67,7 +66,8 @@ describe('VideoPlayerHLSBitrateTest.test', function () { ...@@ -67,7 +66,8 @@ describe('VideoPlayerHLSBitrateTest.test', function () {
console.info('case videoSizeChanged width: ' + w + ' height: ' + h + 'videoSizeId: ' + videoSizeId); console.info('case videoSizeChanged width: ' + w + ' height: ' + h + 'videoSizeId: ' + videoSizeId);
width = w; width = w;
height = h; 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); releaseVideoPlayer(done);
} }
}); });
...@@ -142,7 +142,6 @@ describe('VideoPlayerHLSBitrateTest.test', function () { ...@@ -142,7 +142,6 @@ describe('VideoPlayerHLSBitrateTest.test', function () {
videoSizeArray = [ [256, 144], [426, 240], [640, 360], [854, 480], [1280, 720] ]; videoSizeArray = [ [256, 144], [426, 240], [640, 360], [854, 480], [1280, 720] ];
checkArray(bitrateArray, expectBitrateArray); checkArray(bitrateArray, expectBitrateArray);
videoSizeId = 1; videoSizeId = 1;
console.info('case selectBitRate aaa' + expectBitrateArray[videoSizeId]);
videoPlayer.selectBitrate(expectBitrateArray[videoSizeId]).then((bitrate) => { videoPlayer.selectBitrate(expectBitrateArray[videoSizeId]).then((bitrate) => {
console.info('case selectBitrate called'); console.info('case selectBitrate called');
expect(bitrate).assertEqual(expectBitrateArray[videoSizeId]); expect(bitrate).assertEqual(expectBitrateArray[videoSizeId]);
...@@ -164,8 +163,7 @@ describe('VideoPlayerHLSBitrateTest.test', function () { ...@@ -164,8 +163,7 @@ describe('VideoPlayerHLSBitrateTest.test', function () {
expectBitrateArray = [165340, 344388, 387360, 765178, 1676816]; expectBitrateArray = [165340, 344388, 387360, 765178, 1676816];
videoSizeArray = [ [256, 144], [426, 240], [640, 360], [854, 480], [1280, 720] ]; videoSizeArray = [ [256, 144], [426, 240], [640, 360], [854, 480], [1280, 720] ];
checkArray(bitrateArray, expectBitrateArray); checkArray(bitrateArray, expectBitrateArray);
videoSizeId = videoSizeArray.length - 1; videoSizeId = videoSizeArray.length - 2;
console.info('case selectBitRate' + expectBitrateArray[videoSizeId]);
videoPlayer.selectBitrate(expectBitrateArray[videoSizeId], (err, bitrate) => { videoPlayer.selectBitrate(expectBitrateArray[videoSizeId], (err, bitrate) => {
console.info('case selectBitrate called'); console.info('case selectBitrate called');
if (typeof (err) == 'undefined') { if (typeof (err) == 'undefined') {
......
...@@ -94,7 +94,7 @@ describe('VideoPlayerHLSTest', function () { ...@@ -94,7 +94,7 @@ describe('VideoPlayerHLSTest', function () {
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_VIDEO_PLAYER_HLS_VARIANT', 0, async function (done) { 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); await playVideoSource(HTTP_PATH + '05.hls/hls_variant/index.m3u8', null, null, 10033, PLAY_TIME, done);
done(); done();
}) })
...@@ -120,7 +120,7 @@ describe('VideoPlayerHLSTest', function () { ...@@ -120,7 +120,7 @@ describe('VideoPlayerHLSTest', function () {
* @tc.level : Level0 * @tc.level : Level0
*/ */
it('SUB_MEDIA_VIDEO_PLAYER_HLS_CODEC_CHAGNGE', 0, async function (done) { 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); await playVideoSource(HTTP_PATH + '05.hls/hls_variant3/index.m3u8', null, null, 10080, PLAY_TIME, done);
done(); done();
}) })
......
...@@ -12,6 +12,6 @@ ...@@ -12,6 +12,6 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
require('./HttpPlayerCompatibilityTest.test.js') require('./HttpPlayerCompatibilityTest.test.js')
require('./HttpPlayerFuncPromiseTest.test.js') require('./HttpPlayerFuncPromiseTest.test.js')
require('./HttpPlayerFuncCallbackTest.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.
先完成此消息的编辑!
想要评论请 注册