diff --git a/multimedia/media/media_js_standard/AVRecorderTestBase.js b/multimedia/media/media_js_standard/AVRecorderTestBase.js index cea7d9f23b4c366d3c521141a3cde4b880020bf8..03832e309743d5139ec7c827baccb3a4540ed093 100644 --- a/multimedia/media/media_js_standard/AVRecorderTestBase.js +++ b/multimedia/media/media_js_standard/AVRecorderTestBase.js @@ -381,29 +381,10 @@ export async function avRecorderReliabilitTest02(avConfig, avRecorder, recorderT } export async function avRecorderReliabilitTest03(avConfig, avRecorder, recorderTime, done) { - let result = true; avRecorder = await idle(avRecorder); setPrepareOnCallback(avConfig, avRecorder, recorderTime, done) await avRecorder.prepare(avConfig) } -export async function avRecorderReliabilitTest04(avConfig, avRecorder, recorderTime, done) { - avRecorder = await idle(avRecorder); - - await avRecorder.prepare(avConfig).then(() => { - expect(avRecorder.state).assertEqual(AV_RECORDER_STATE.PREPARED); - console.info('avRecorderReliabilitTest04 prepare success'); - }).catch((err) => { - console.info('avRecorderReliabilitTest04 prepare failed and catch error is ' + err.message); - }); - await avRecorder.release().then(() => { - console.info('avRecorderReliabilitTest04 release AVRecorder success'); - expect(avRecorder.state).assertEqual(AV_RECORDER_STATE.RELEASED); - done(); - }).catch((err) => { - console.info('avRecorderReliabilitTest04 release AVRecorder failed and catch error is ' + err.message); - }); -} - diff --git a/multimedia/media/media_js_standard/MediaTestBase.js b/multimedia/media/media_js_standard/MediaTestBase.js index 8d17d88bef17eb7fc247b62b7df64681ed5ae4be..ba700375ea4b23a1561b5f0fc4f3492f6ae8256b 100644 --- a/multimedia/media/media_js_standard/MediaTestBase.js +++ b/multimedia/media/media_js_standard/MediaTestBase.js @@ -19,7 +19,7 @@ import router from '@system.router' import mediaLibrary from '@ohos.multimedia.mediaLibrary' import fileio from '@ohos.fileio' import featureAbility from '@ohos.ability.featureAbility' -import { UiDriver, BY, PointerMatrix } from '@ohos.uitest' +import { UiDriver, BY, PointerMatrix } from '@ohos.UiTest' const CODECMIMEVALUE = ['video/avc', 'audio/mp4a-latm', 'audio/mpeg'] const context = featureAbility.getContext(); diff --git a/multimedia/media/media_js_standard/avRecorder/src/main/js/test/AVRecorderFuncTest.test.js b/multimedia/media/media_js_standard/avRecorder/src/main/js/test/AVRecorderFuncTest.test.js index 9505293cf1560042c832c60eee556ab8e67e19f1..1230def728949b60a8f0d74fe8532bf55425fdf0 100644 --- a/multimedia/media/media_js_standard/avRecorder/src/main/js/test/AVRecorderFuncTest.test.js +++ b/multimedia/media/media_js_standard/avRecorder/src/main/js/test/AVRecorderFuncTest.test.js @@ -153,24 +153,6 @@ export default function avRecorderTest() { avRecorderTestBase.avRecorderReliabilitTest03(avConfig, avRecorder, RECORDER_TIME, done); console.info(TAG + 'SUB_MULTIMEDIA_MEDIA_AVRECORDER_PREPARE_API_0300 end') }) - - /* * - * @tc.number : SUB_MULTIMEDIA_MEDIA_AVRECORDER_PREPARE_API_0400 - * @tc.name : 001.test resume->prepare - * @tc.desc : Local audio resume->prepare - * @tc.size : MediumTest - * @tc.type : Function test - * @tc.level : Level2 - */ - it('SUB_MULTIMEDIA_MEDIA_AVRECORDER_PREPARE_API_0400', 0, async function (done) { - console.info(TAG + 'SUB_MULTIMEDIA_MEDIA_AVRECORDER_PREPARE_API_0400 start') - fdObject = await mediaTestBase.getAvRecorderFd(AV_SOURCES[4], "audio"); - fdPath = "fd://" + fdObject.fdNumber; - avConfig.url = fdPath; - avRecorderTestBase.avRecorderReliabilitTest03(avConfig, avRecorder, RECORDER_TIME, done); - console.info(TAG + 'SUB_MULTIMEDIA_MEDIA_AVRECORDER_PREPARE_API_0400 end') - }) }) - }