diff --git a/multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraSessionBaseTest.test.ets b/multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraSessionBaseTest.test.ets index c2f53b1430d5679b4210ce740bca5ecb1ab98de2..2490a59b2ee1f4144aae7bdca4172f49df0d65de 100755 --- a/multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraSessionBaseTest.test.ets +++ b/multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraSessionBaseTest.test.ets @@ -1660,107 +1660,7 @@ export default function cameraSessionTest(surfaceId: any) { } }) - /** - * @tc.number : SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_OUTPUT_CALLBACK_0102 - * @tc.name : Check capture session add/remove output with callback or not for video - * @tc.desc : Check capture session add/remove output with callback or not for video - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 0 - */ - it('SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_OUTPUT_CALLBACK_0102', 0, async function (done) { - console.info("--------------SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_OUTPUT_CALLBACK_0102--------------"); - - if (isEmpty(mCameraInputArray)) { - console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_OUTPUT_CALLBACK_0102 FAILED with NoCamera"); - expect().assertFail(); - done(); - } - else { - if (!isEmpty(mVideoOutput) && (mCanAddOutput == true)) { - mCameraSession.addOutput(mVideoOutput, async (err) => { - console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_OUTPUT_CALLBACK_0102 add callback"); - if (!err) { - console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_OUTPUT_CALLBACK_0102 add PASSED"); - } else { - console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_OUTPUT_CALLBACK_0102 add FAILED : " + err.message); - expect().assertFail(); - } - }) - await mCameraSession.addInput(mCameraInputArray[0]); - await sleep(500); - - await commitCameraSessionConfig(); - await sleep(1); - await beginCameraSessionConfig(); - await sleep(1); - - await sleep(500); - - mCameraSession.removeOutput(mVideoOutput, async (err) => { - console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_OUTPUT_CALLBACK_0102 remove callback"); - if (!err) { - console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_OUTPUT_CALLBACK_0102 remove PASSED"); - } else { - console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_OUTPUT_CALLBACK_0102 remove FAILED : " + err.message); - expect().assertFail(); - } - }) - await mCameraSession.removeInput(mCameraInputArray[0]); - await sleep(500); - } else { - console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_OUTPUT_CALLBACK_0102 FAILED"); - expect().assertFail(); - } - - console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_OUTPUT_CALLBACK_0102 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 0 - */ - it('SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_OUTPUT_PROMISE_0102', 0, async function (done) { - console.info("--------------SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_OUTPUT_PROMISE_0102--------------"); - - if (isEmpty(mCameraInputArray)) { - console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_OUTPUT_PROMISE_0102 FAILED with NoCamera"); - expect().assertFail(); - done(); - } - else { - if (!isEmpty(mVideoOutput) && (mCanAddOutput == true)) { - await mCameraSession.addOutput(mVideoOutput); - console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_OUTPUT_PROMISE_0102 PASSED"); - await mCameraSession.addInput(mCameraInputArray[0]); - await sleep(500); - - await commitCameraSessionConfig(); - await sleep(1); - await beginCameraSessionConfig(); - await sleep(1); - - await sleep(500); - - await mCameraSession.removeOutput(mVideoOutput); - console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_OUTPUT_PROMISE_0102 remove PASSED"); - await mCameraSession.removeInput(mCameraInputArray[0]); - await sleep(500); - } else { - console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_OUTPUT_PROMISE_0102 FAILED"); - expect().assertFail(); - } - - console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_OUTPUT_PROMISE_0102 ends here"); - done(); - } - }) + /** * @tc.number : SUB_MULTIMEDIA_CAMERA_SESSION_STATUS_CALLBACK_0100