From 5a5b6a240435b415164a813044d8eb6ede1532ce Mon Sep 17 00:00:00 2001 From: 15754133731 Date: Tue, 21 Mar 2023 17:32:00 +0800 Subject: [PATCH] =?UTF-8?q?<=E5=AA=92=E4=BD=93=E7=94=A8=E4=BE=8B=E9=80=82?= =?UTF-8?q?=E9=85=8D2>?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 15754133731 --- .../media/media_js_standard/MediaTestBase.js | 2 +- .../main/ets/test/AVPlayerLocalTest.test.js | 2 +- .../ets/test/AVPlayerStabilityTest.test.js | 50 ++++++++++--------- 3 files changed, 28 insertions(+), 26 deletions(-) diff --git a/multimedia/media/media_js_standard/MediaTestBase.js b/multimedia/media/media_js_standard/MediaTestBase.js index ab3d319af..0464f96d0 100644 --- a/multimedia/media/media_js_standard/MediaTestBase.js +++ b/multimedia/media/media_js_standard/MediaTestBase.js @@ -20,7 +20,7 @@ import mediaLibrary from '@ohos.multimedia.mediaLibrary' import fileio from '@ohos.fileio' import featureAbility from '@ohos.ability.featureAbility' import { UiDriver, BY, PointerMatrix } from '@ohos.UiTest' -const CODECMIMEVALUE = ['video/avc', 'audio/mp4a-latm', 'audio/mpeg'] +const CODECMIMEVALUE = ['video/x-h264', 'audio/mpeg', 'video/avc', 'audio/mp4a-latm'] const context = featureAbility.getContext(); export async function getPermission(permissionNames) { diff --git a/multimedia/media/media_js_standard/avPlayer/entry/src/main/ets/test/AVPlayerLocalTest.test.js b/multimedia/media/media_js_standard/avPlayer/entry/src/main/ets/test/AVPlayerLocalTest.test.js index 8ec9d5634..c4e45aca5 100644 --- a/multimedia/media/media_js_standard/avPlayer/entry/src/main/ets/test/AVPlayerLocalTest.test.js +++ b/multimedia/media/media_js_standard/avPlayer/entry/src/main/ets/test/AVPlayerLocalTest.test.js @@ -474,7 +474,7 @@ export default function AVPlayerLocalTest() { it('SUB_MULTIMEDIA_MEDIA_VIDEO_PLAYER_GETTRECKDESCRIPTION_0200', 0, async function (done) { let audioTrackKey = new Array('channel_count', 'codec_mime', 'sample_rate', 'track_index', 'track_type'); - let audioTrackValue = new Array(1, 2, 48000, 0, 0); + let audioTrackValue = new Array(1, 1, 48000, 0, 0); let descriptionKey = new Array(audioTrackKey); let descriptionValue = new Array(audioTrackValue); testCheckTrackDescription(fileDescriptor2, avPlayer, descriptionKey, descriptionValue, done) diff --git a/multimedia/media/media_js_standard/avPlayer/entry/src/main/ets/test/AVPlayerStabilityTest.test.js b/multimedia/media/media_js_standard/avPlayer/entry/src/main/ets/test/AVPlayerStabilityTest.test.js index d7921c202..3941aa8ea 100644 --- a/multimedia/media/media_js_standard/avPlayer/entry/src/main/ets/test/AVPlayerStabilityTest.test.js +++ b/multimedia/media/media_js_standard/avPlayer/entry/src/main/ets/test/AVPlayerStabilityTest.test.js @@ -81,7 +81,7 @@ export default function AVPlayerStabilityTest() { beforeAll(async function () { console.info('beforeAll case'); - for(var i = 0;i < VIDEO_SOURCES.length; i++){ + for (var i = 0; i < VIDEO_SOURCES.length; i++) { await getStageFdRead(VIDEO_SOURCES[i]).then((testNumber) => { fdNumber = testNumber; console.info(TAG + 'this fdNumber is :' + fdNumber) @@ -107,12 +107,12 @@ export default function AVPlayerStabilityTest() { } - beforeEach(async function() { + beforeEach(async function () { console.info('beforeEach case'); await AVPlayerTestBase.sleep(1000); }) - afterEach(async function() { + afterEach(async function () { if (avPlayer != null) { avPlayer.release().then(() => { console.info(TAG + 'this testCase execution completed') @@ -122,9 +122,9 @@ export default function AVPlayerStabilityTest() { await AVPlayerTestBase.sleep(1000); }) - afterAll(async function() { + afterAll(async function () { console.info('afterAll case'); - for(var i = 0;i < fdNumbers.length; i++){ + for (var i = 0; i < fdNumbers.length; i++) { await mediaTestBase.closeFdNumber(fdNumbers[i]); } }) @@ -223,7 +223,7 @@ export default function AVPlayerStabilityTest() { */ it('SUB_MULTIMEDIA_MEDIA_AVPLAYER_FORMAT_MP4_0500', 0, async function (done) { console.info(TAG + 'SUB_MULTIMEDIA_MEDIA_AVPLAYER_FORMAT_MP4_0500 start') - AVPlayerTestBase.avPlayerPlay(videos[4], avPlayer,done); + AVPlayerTestBase.avPlayerPlay(videos[4], avPlayer, done); console.info(TAG + 'SUB_MULTIMEDIA_MEDIA_AVPLAYER_FORMAT_MP4_0500 end') }) @@ -761,19 +761,7 @@ export default function AVPlayerStabilityTest() { }) - /* * - * @tc.number : SUB_MULTIMEDIA_MEDIA_AVPLAYER_FORMAT_SOURCE_0300 - * @tc.name : 001.test play source 4k - * @tc.desc : Local Video play source - * @tc.size : MediumTest - * @tc.type : Function test - * @tc.level : Level2 - */ - it('SUB_MULTIMEDIA_MEDIA_AVPLAYER_FORMAT_SOURCE_0300', 0, async function (done) { - console.info(TAG + 'SUB_MULTIMEDIA_MEDIA_AVPLAYER_FORMAT_SOURCE_0300 start') - AVPlayerTestBase.avPlayerPlay(videos[43], avPlayer, done); - console.info(TAG + 'SUB_MULTIMEDIA_MEDIA_AVPLAYER_FORMAT_SOURCE_0300 end') - }) + /* * * @tc.number : SUB_MULTIMEDIA_MEDIA_AVPLAYER_STABILITY_01_0100 @@ -895,11 +883,11 @@ export default function AVPlayerStabilityTest() { * @tc.type : Function test * @tc.level : Level3 */ -// it('SUB_MULTIMEDIA_MEDIA_AVPLAYER_PERFORMANCE_01_0100', 0, async function (done) { -// console.info(TAG + 'SUB_MULTIMEDIA_MEDIA_AVPLAYER_PERFORMANCE_01_0100 start') -// AVPlayerTestBase.createTimeWithCallback(videos[0], avPlayer, done); -// console.info(TAG + 'SUB_MULTIMEDIA_MEDIA_AVPLAYER_PERFORMANCE_01_0100 end') -// }) + // it('SUB_MULTIMEDIA_MEDIA_AVPLAYER_PERFORMANCE_01_0100', 0, async function (done) { + // console.info(TAG + 'SUB_MULTIMEDIA_MEDIA_AVPLAYER_PERFORMANCE_01_0100 start') + // AVPlayerTestBase.createTimeWithCallback(videos[0], avPlayer, done); + // console.info(TAG + 'SUB_MULTIMEDIA_MEDIA_AVPLAYER_PERFORMANCE_01_0100 end') + // }) /* * * @tc.number : SUB_MULTIMEDIA_MEDIA_AVPLAYER_PERFORMANCE_01_0110 @@ -1237,5 +1225,19 @@ export default function AVPlayerStabilityTest() { AVPlayerTestBase.firstFrameTime(videos[0], avPlayer, done); console.info(TAG + 'SUB_MULTIMEDIA_MEDIA_AVPLAYER_PERFORMANCE_02_0100 end') }) + + /* * + * @tc.number : SUB_MULTIMEDIA_MEDIA_AVPLAYER_FORMAT_SOURCE_0300 + * @tc.name : 001.test play source 4k + * @tc.desc : Local Video play source + * @tc.size : MediumTest + * @tc.type : Function test + * @tc.level : Level2 + */ + it('SUB_MULTIMEDIA_MEDIA_AVPLAYER_FORMAT_SOURCE_0300', 0, async function (done) { + console.info(TAG + 'SUB_MULTIMEDIA_MEDIA_AVPLAYER_FORMAT_SOURCE_0300 start') + AVPlayerTestBase.avPlayerPlay(videos[43], avPlayer, done); + console.info(TAG + 'SUB_MULTIMEDIA_MEDIA_AVPLAYER_FORMAT_SOURCE_0300 end') + }) }) } \ No newline at end of file -- GitLab