提交 14fb4dfb 编写于 作者: S SongChunPeng

fix async

Signed-off-by: NSongChunPeng <songchunpeng@huawei.com>
上级 0ce97632
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册