From 30cfc2498a23c6cee7e659ca778a433620fa5947 Mon Sep 17 00:00:00 2001 From: SongChunPeng Date: Tue, 10 Jan 2023 16:27:49 +0800 Subject: [PATCH] fix async Signed-off-by: SongChunPeng --- .../ets/test/CameraSessionBaseTest.test.ets | 114 +----------------- 1 file changed, 2 insertions(+), 112 deletions(-) diff --git a/multimedia/camera/camera_js_standard/entry/src/main/ets/test/CameraSessionBaseTest.test.ets b/multimedia/camera/camera_js_standard/entry/src/main/ets/test/CameraSessionBaseTest.test.ets index 2e167d34f..09a6d3127 100644 --- a/multimedia/camera/camera_js_standard/entry/src/main/ets/test/CameraSessionBaseTest.test.ets +++ b/multimedia/camera/camera_js_standard/entry/src/main/ets/test/CameraSessionBaseTest.test.ets @@ -616,7 +616,7 @@ export default function cameraSessionTest() { done(); } }) - + /** * @tc.number : SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_RELEASE_PROMISE_0100 * @tc.name : Check capture session start/stop/release output with promise or not @@ -656,117 +656,7 @@ export default function cameraSessionTest() { console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_RELEASE_PROMISE_0100 ends here"); done(); } - }) - - - // /** - // * @tc.number : SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_OUTPUT_PROMISE_0101 - // * @tc.name : Check capture session can add/remove output with promise or not for photo - // * @tc.desc : Check capture session can add/remove output with promise or not for photo - // * @tc.size : MEDIUM - // * @tc.type : Function - // * @tc.level : Level 2 - // */ - // it('SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_OUTPUT_PROMISE_0101', 2, async function (done) { - // console.info("--------------SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_OUTPUT_PROMISE_0101--------------"); - - // if (mCameraNum == 0) { - // console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_OUTPUT_PROMISE_0101 FAILED with NoCamera"); - // expect().assertFail(); - // done(); - // } - // else { - // await createInput(0); - // createOutput(0); - - // if (!isEmpty(mPhotoOutput)) { - // if (!isEmpty(mPreviewOutput)) { - // console.info(TAG + "Start to addOutput mPreviewOutput"); - // await mCameraSession.addOutput(mPreviewOutput); - // } - // mCameraSession.addOutput(mPhotoOutput); - // console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_OUTPUT_PROMISE_0101 add PASSED"); - // mCameraSession.addInput(mCameraInput); - - // await mCameraSession.commitConfig(); - // mCameraSession.beginConfig(); - - // if (!isEmpty(mPreviewOutput)) { - // console.info(TAG + "Start to removeOutput mPreviewOutput"); - // mCameraSession.removeOutput(mPreviewOutput); - // } - // mCameraSession.removeOutput(mPhotoOutput); - // console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_OUTPUT_PROMISE_0101 remove PASSED"); - // mCameraSession.removeInput(mCameraInput); - // } else { - // console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_OUTPUT_PROMISE_0101 FAILED"); - // expect().assertFail(); - // } - - // await releaseInput(); - // await releaseOutput(); - - // console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_OUTPUT_PROMISE_0101 ends here"); - // done(); - // } - // }) - - - - // /** - // * @tc.number : SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_OUTPUT_PROMISE_0102 - // * @tc.name : Check capture session can add/remove output with promise or not for video - // * @tc.desc : Check capture session can add/remove output with promise or not for video - // * @tc.size : MEDIUM - // * @tc.type : Function - // * @tc.level : Level 2 - // */ - // it('SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_OUTPUT_PROMISE_0102', 2, async function (done) { - // console.info("--------------SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_OUTPUT_PROMISE_0102--------------"); - - // if (mCameraNum == 0) { - // console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_OUTPUT_PROMISE_0102 FAILED with NoCamera"); - // expect().assertFail(); - // done(); - // } - // else { - // await createInput(0); - // createOutput(0); - - // if (!isEmpty(mVideoOutput)) { - // if (!isEmpty(mPreviewOutput)) { - // console.info(TAG + "Start to addOutput mPreviewOutput"); - // mCameraSession.addOutput(mPreviewOutput); - // } - // mCameraSession.addOutput(mVideoOutput); - // console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_OUTPUT_PROMISE_0102 PASSED"); - // mCameraSession.addInput(mCameraInput); - - // await mCameraSession.commitConfig(); - // mCameraSession.beginConfig(); - - // if (!isEmpty(mPreviewOutput)) { - // console.info(TAG + "Start to removeOutput mPreviewOutput"); - // mCameraSession.removeOutput(mPreviewOutput); - // } - // mCameraSession.removeOutput(mVideoOutput); - // console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_OUTPUT_PROMISE_0102 remove PASSED"); - // mCameraSession.removeInput(mCameraInput); - // } else { - // console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_OUTPUT_PROMISE_0102 FAILED"); - // } - - // await releaseInput(); - // await releaseOutput(); - - // console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_OUTPUT_PROMISE_0102 ends here"); - // done(); - // } - // }) - - - - + }) /** * @tc.number : SUB_MULTIMEDIA_CAMERA_SESSION_RELEASE_PROMISE_0100 -- GitLab