diff --git a/multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraInputTest.test.ets b/multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraInputTest.test.ets index 65261c37a45df91f9490c16d261006df77d0adfa..702650a3e9432414414d6a93212b35ff2d3404e7 100755 --- a/multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraInputTest.test.ets +++ b/multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraInputTest.test.ets @@ -621,7 +621,7 @@ export default function CameraInputTest(surfaceId) { }).catch((err) => { successFlag = false; console.info(TAG + functionTag + "open FAILED: " + err.message); - });; + }); await sleep(400); await cameraInput.close().then(async () => { console.info(TAG + functionTag + "PASSED close with CameraID :" + camerasArray[i].cameraId); diff --git a/multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraJSUnitOutput.test.ets b/multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraJSUnitOutput.test.ets index b75ea9ad5b3fe7ffd45819ae98f0a7400c51f7dd..6625a460c68e3232d4f48cff676cdfbf784a19dd 100755 --- a/multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraJSUnitOutput.test.ets +++ b/multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraJSUnitOutput.test.ets @@ -22,7 +22,16 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from const TAG = "CameraUnitTest: "; +let captureLocation = { + latitude: 0, + longitude: 0, + altitude: 0, +} let captureSetting = { + quality: cameraObj.QualityLevel.QUALITY_LEVEL_LOW, + rotation: cameraObj.ImageRotation.ROTATION_0, + location: captureLocation, + mirror: false } // 创建视频录制的参数 @@ -1092,6 +1101,7 @@ export default function cameraJSUnitOutput(surfaceId: any) { expect().assertFail(); }); console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_GET_METADATA_BOUNDING_BOX_PROMISE_0100 success, boundingBox : " + boundingBox.width + "x" + boundingBox.height); + console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_GET_METADATA_BOUNDING_BOX_PROMISE_0100 success, boundingBox : " + boundingBox.topLeftX + "x" + boundingBox.topLeftY); } await sleep(1000); done(); @@ -1478,6 +1488,13 @@ export default function cameraJSUnitOutput(surfaceId: any) { console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CAPTURE_SETTING_PROMISE_0100 photoOutput == null || undefined") expect().assertFail(); } else { + console.info('SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CAPTURE_SETTING_PROMISE_0100 captureSetting.quality = ' + captureSetting.quality); + console.info('SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CAPTURE_SETTING_PROMISE_0100 captureSetting.rotation = ' + captureSetting.rotation); + console.info('SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CAPTURE_SETTING_PROMISE_0100 captureSetting.location.latitude = ' + captureSetting.location.latitude); + console.info('SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CAPTURE_SETTING_PROMISE_0100 captureSetting.location.longitude = ' + captureSetting.location.longitude); + console.info('SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CAPTURE_SETTING_PROMISE_0100 captureSetting.location.altitude = ' + captureSetting.location.altitude); + console.info('SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CAPTURE_SETTING_PROMISE_0100 captureSetting.mirror = ' + captureSetting.mirror); + await photoOutput.capture(captureSetting).then((result) => { console.info('SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CAPTURE_SETTING_PROMISE_0100 success :' + result); }).catch((err) => { @@ -1575,6 +1592,8 @@ export default function cameraJSUnitOutput(surfaceId: any) { if (!err) { expect(true).assertTrue(); console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CALLBACK_ON_FRAME_SHUTTER_0100 success"); + console.info(TAG + "SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CALLBACK_ON_FRAME_SHUTTER_0100, captureId = " + data.captureId); + console.info(TAG + "SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CALLBACK_ON_FRAME_SHUTTER_0100, timestamp = " + data.timestamp); } else { expect().assertFail(); console.info(TAG + "Error in SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CALLBACK_ON_FRAME_SHUTTER_0100 FAILED: " + err.message); @@ -1608,6 +1627,8 @@ export default function cameraJSUnitOutput(surfaceId: any) { if (!err) { expect(true).assertTrue(); console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CALLBACK_ON_CAPTURE_END_0100 success"); + console.info(TAG + "SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CALLBACK_ON_CAPTURE_END_0100, captureId = " + data.captureId); + console.info(TAG + "SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CALLBACK_ON_CAPTURE_END_0100, frameCount = " + data.frameCount); } else { expect().assertFail(); console.info(TAG + "Error in SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CALLBACK_ON_CAPTURE_END_0100 FAILED: " + err.message);