diff --git a/multimedia/camera/camera_js_standard/Test.json b/multimedia/camera/camera_js_standard/Test.json index 2c119ed7ec7ddf4c82064d00c58884285fa42bdc..299a6ca6e109bb59dc77cc0fd0f36388bd6744a3 100644 --- a/multimedia/camera/camera_js_standard/Test.json +++ b/multimedia/camera/camera_js_standard/Test.json @@ -5,7 +5,7 @@ "test-timeout": "3000000", "bundle-name":"com.open.harmony.multimedia.cameratest", "package-name": "com.open.harmony.multimedia.cameratest", - "shell-timeout": "60000", + "shell-timeout": "600000", "testcase-timeout": 100000 }, "kits": [ diff --git a/multimedia/camera/camera_js_standard/entry/src/main/ets/test/CameraJSUnitOutput.test.ets b/multimedia/camera/camera_js_standard/entry/src/main/ets/test/CameraJSUnitOutput.test.ets index 3d8e8c8caca0be6039fca7796b2a571146bd65e2..0007ce5202a84e629e7924c958f908976baec3ad 100644 --- a/multimedia/camera/camera_js_standard/entry/src/main/ets/test/CameraJSUnitOutput.test.ets +++ b/multimedia/camera/camera_js_standard/entry/src/main/ets/test/CameraJSUnitOutput.test.ets @@ -1221,14 +1221,9 @@ export default function cameraJSUnitOutput() { } else { console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CALLBACK_ON_CAPTURE_START_0100 to operate"); let count = 0; - photoOutput.on('captureStart', async (err, data) => { - if (!err) { - count++; - console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CALLBACK_ON_CAPTURE_START_0100 success"); - } else { - expect().assertFail(); - console.info(TAG + "Error in SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CALLBACK_ON_CAPTURE_START_0100 FAILED: " + err.message); - } + photoOutput.on('captureStart', async (data) => { + count++; + console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CALLBACK_ON_CAPTURE_START_0100 success"); await sleep(1000); done(); }) @@ -1297,18 +1292,13 @@ export default function cameraJSUnitOutput() { } else { console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CALLBACK_ON_CAPTURE_END_0100 to operate"); let count = 0; - photoOutput.on('captureEnd', async (err, data) => { - if (!err) { - count++; - 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); - } - await sleep(1000); - done(); + photoOutput.on('captureEnd', async (data) => { + count++; + 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); + await sleep(1000); + done(); }) await sleep(1000); done(); 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 09a6d31275fe9d2efa0513b61fed1205c48bfc3e..1e722e3d1b999a5241812a7cd652d004fb1dd230 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 @@ -618,42 +618,39 @@ export default function cameraSessionTest() { }) /** - * @tc.number : SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_RELEASE_PROMISE_0100 + * @tc.number : SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_PROMISE_0100 * @tc.name : Check capture session start/stop/release output with promise or not * @tc.desc : Check capture session start/stop/release output with promise or not * @tc.size : MEDIUM * @tc.type : Function * @tc.level : Level 0 */ - it('SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_RELEASE_PROMISE_0100', 0, async function (done) { - console.info("--------------SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_RELEASE_PROMISE_0100--------------"); + it('SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_PROMISE_0100', 0, async function (done) { + console.info("--------------SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_PROMISE_0100--------------"); if (mCameraNum == 0) { - console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_RELEASE_PROMISE_0100 FAILED with NoCamera"); + console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_PROMISE_0100 FAILED with NoCamera"); expect().assertFail(); done(); } else { for (let i = 0; i < mCameraNum; i++) { - console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_RELEASE_PROMISE_0100 start for camera[" + i + "]"); + console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_PROMISE_0100 start for camera[" + i + "]"); await startCameraSession(i); await mCameraSession.start(); - console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_RELEASE_PROMISE_0100 start PASSED"); + console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_PROMISE_0100 start PASSED"); await sleep(2000); await mCameraSession.stop(); - console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_RELEASE_PROMISE_0100 stop PASSED"); + console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_PROMISE_0100 stop PASSED"); await sleep(500); - await mCameraSession.release(); - console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_RELEASE_PROMISE_0100 release PASSED"); - await sleep(500); - - console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_RELEASE_PROMISE_0100 end for camera[" + i + "]"); + await stopCameraSession(); + console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_PROMISE_0100 end for camera[" + i + "]"); } - console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_RELEASE_PROMISE_0100 ends here"); + console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_PROMISE_0100 ends here"); done(); } }) diff --git a/multimedia/camera/camera_js_standard/entry/src/main/ets/test/CameraSessionExposureTest.test.ets b/multimedia/camera/camera_js_standard/entry/src/main/ets/test/CameraSessionExposureTest.test.ets index ab20bbd91d6f77ba089f11076c025c5a277f0052..27d515a30a9315b14418b442da0c90ca0c0e2b56 100644 --- a/multimedia/camera/camera_js_standard/entry/src/main/ets/test/CameraSessionExposureTest.test.ets +++ b/multimedia/camera/camera_js_standard/entry/src/main/ets/test/CameraSessionExposureTest.test.ets @@ -74,12 +74,12 @@ let mVideoConfig = { maxDuration: 500 } -let mPicWidthMax = 8192; -let mPicHeightMax = 8192; +let mPicWidthMax = 1; +let mPicHeightMax = 1; let mMETERINGPoint = { - x: mPicWidthMax / 2, - y: mPicHeightMax / 2, + x: mPicWidthMax / 2.0, + y: mPicHeightMax / 2.0, } let mMETERINGPointLT = { @@ -898,9 +898,9 @@ export default function cameraSessionExposureTest() { } else { for (let i = 0; i < mCameraNum; i++) { console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_METERING_POINT_PROMISE_0101 start for camera[" + i + "]"); - + await startCameraSession(i); - + mCameraSession.setMeteringPoint(mMETERINGPointLT); console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_METERING_POINT_PROMISE_0101 finish"); console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_METERING_POINT_PROMISE_0101 PASSED with METERINGPoint is: " + mMETERINGPointLT.x + ", " + mMETERINGPointLT.y); diff --git a/multimedia/camera/camera_js_standard/entry/src/main/ets/test/CameraSessionFocusTest.test.ets b/multimedia/camera/camera_js_standard/entry/src/main/ets/test/CameraSessionFocusTest.test.ets index 026634ce249a47c015ed142044e7eff5635c122b..a044ecfc3e2867672691053596df6ccec8c3a0e4 100644 --- a/multimedia/camera/camera_js_standard/entry/src/main/ets/test/CameraSessionFocusTest.test.ets +++ b/multimedia/camera/camera_js_standard/entry/src/main/ets/test/CameraSessionFocusTest.test.ets @@ -71,12 +71,12 @@ let mVideoConfig = { maxDuration: 500 } -let mPicWidthMax = 8192; -let mPicHeightMax = 8192; +let mPicWidthMax = 1; +let mPicHeightMax = 1; let mFocusPoint = { - x: mPicWidthMax / 2, - y: mPicHeightMax / 2, + x: mPicWidthMax / 2.0, + y: mPicHeightMax / 2.0, } let mFocusPointLT = {