未验证 提交 610d5c91 编写于 作者: O openharmony_ci 提交者: Gitee

!6879 【媒体子系统】camera更新框架

Merge pull request !6879 from liuxueqi/master
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
import("//test/xts/tools/build/suite.gni") import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("camera_framework_ets_hap") { ohos_js_hap_suite("camera_framework_ets_hap") {
hap_profile = "./src/main/config.json" hap_profile = "./entry/src/config.json"
deps = [ deps = [
":camera_ets_assets", ":camera_ets_assets",
":camera_ets_resources", ":camera_ets_resources",
...@@ -26,9 +26,9 @@ ohos_js_hap_suite("camera_framework_ets_hap") { ...@@ -26,9 +26,9 @@ ohos_js_hap_suite("camera_framework_ets_hap") {
part_name = "multimedia_camera_framework" part_name = "multimedia_camera_framework"
} }
ohos_js_assets("camera_ets_assets") { ohos_js_assets("camera_ets_assets") {
source_dir = "./src/main/ets/MainAbility" source_dir = "./entry/src/main/ets/MainAbility"
} }
ohos_resources("camera_ets_resources") { ohos_resources("camera_ets_resources") {
sources = [ "./src/main/resources" ] sources = [ "./entry/src/resources" ]
hap_profile = "./src/main/config.json" hap_profile = "./entry/src/config.json"
} }
{ {
"description": "Configuration for camerastandard Tests", "description": "Configuration for camerastandard Tests",
"driver": { "driver": {
"type": "JSUnitTest", "type": "OHJSUnitTest",
"test-timeout": "3000000", "test-timeout": "3000000",
"package": "com.open.harmony.multimedia.cameratest", "bundle-name":"com.open.harmony.multimedia.cameratest",
"package-name": "com.open.harmony.multimedia.cameratest",
"shell-timeout": "60000" "shell-timeout": "60000"
}, },
"kits": [ "kits": [
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
"package": "com.open.harmony.multimedia.cameratest", "package": "com.open.harmony.multimedia.cameratest",
"name": ".MyApplication", "name": ".MyApplication",
"mainAbility": "com.open.harmony.multimedia.cameratest.MainAbility", "mainAbility": "com.open.harmony.multimedia.cameratest.MainAbility",
"srcPath": "",
"deviceType": [ "deviceType": [
"tablet", "tablet",
"default", "default",
...@@ -51,6 +52,19 @@ ...@@ -51,6 +52,19 @@
"label": "$string:entry_MainAbility", "label": "$string:entry_MainAbility",
"type": "page", "type": "page",
"launchType": "standard" "launchType": "standard"
},
{
"orientation": "unspecified",
"visible": true,
"srcPath": "TestAbility",
"name": ".TestAbility",
"srcLanguage": "ets",
"icon": "$media:icon",
"description": "$string:TestAbility_desc",
"formsEnabled": false,
"label": "$string:TestAbility_label",
"type": "page",
"launchType": "standard"
} }
], ],
"reqPermissions": [ "reqPermissions": [
...@@ -109,6 +123,20 @@ ...@@ -109,6 +123,20 @@
"designWidth": 720, "designWidth": 720,
"autoDesignWidth": false "autoDesignWidth": false
} }
},
{
"mode": {
"syntax": "ets",
"type": "pageAbility"
},
"pages": [
"pages/index"
],
"name": ".TestAbility",
"window": {
"designWidth": 720,
"autoDesignWidth": false
}
} }
] ]
} }
......
...@@ -13,9 +13,9 @@ ...@@ -13,9 +13,9 @@
* limitations under the License. * limitations under the License.
*/ */
import {Core, ExpectExtend} from "deccjsunit/index" import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry'
import cameraKit from "../test/Camera.test" import { Hypium } from '@ohos/hypium'
import featureAbility from "@ohos.ability.featureAbility" import cameraKit from '../../test/Camera.test.ets'
let TAG = 'CameraModuleTest: ' let TAG = 'CameraModuleTest: '
var mXComponentController: XComponentController = new XComponentController() var mXComponentController: XComponentController = new XComponentController()
...@@ -43,30 +43,14 @@ struct CameraIndex { ...@@ -43,30 +43,14 @@ struct CameraIndex {
console.info('CameraModuleTest: OnLoad() is called!') console.info('CameraModuleTest: OnLoad() is called!')
mXComponentController.setXComponentSurfaceSize({ surfaceWidth: 1920, surfaceHeight: 1080 }); mXComponentController.setXComponentSurfaceSize({ surfaceWidth: 1920, surfaceHeight: 1080 });
surfaceId = mXComponentController.getXComponentSurfaceId() surfaceId = mXComponentController.getXComponentSurfaceId()
globalThis.surfaceId = surfaceId
console.info('CameraModuleTest: XComponent onLoad surfaceId: ' + surfaceId) console.info('CameraModuleTest: XComponent onLoad surfaceId: ' + surfaceId)
featureAbility.getWant() var abilityDelegator: any
.then((Want) => { abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator()
const core = Core.getInstance() var abilityDelegatorArguments: any
const expectExtend = new ExpectExtend({ abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments()
'id': 'extend' //console.info(0x00, 'testTag', '%{public}s', 'start run testcase!!!');
}) Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, cameraKit)
console.info(TAG + 'Entering expectExtend')
core.addService('expect', expectExtend)
console.info(TAG + 'Entering addService')
core.init()
console.info(TAG + 'Entering core.init()')
console.info(TAG + 'Entering subscribeEvent')
const configService = core.getDefaultService('config')
Want.parameters['timeout'] = 600000
configService.setConfig(Want.parameters)
console.info(TAG + 'Entering configService')
cameraKit(surfaceId)
core.execute()
console.info(TAG + 'Operation successful. Data: ' + JSON.stringify(Want));
})
.catch((error) => {
console.error(TAG + 'Operation failed. Cause: ' + JSON.stringify(error));
})
}) })
.width('1920px') .width('1920px')
.height('1080px') .height('1080px')
......
/*
* Copyright (C) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export default {
onCreate() {
console.info('Application onCreate')
},
onDestroy() {
console.info('Application onDestroy')
},
}
\ No newline at end of file
/*
* Copyright (C) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import TestRunner from '@ohos.application.testRunner'
import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry'
var abilityDelegator = undefined
var abilityDelegatorArguments = undefined
function translateParamsToString(parameters) {
const keySet = new Set([
'-s class', '-s notClass', '-s suite', '-s itName',
'-s level', '-s testType', '-s size', '-s timeout',
'-s package'
])
let targetParams = '';
for (const key in parameters) {
if (keySet.has(key)) {
targetParams += ' ' + key + ' ' + parameters[key]
}
}
return targetParams.trim()
}
async function onAbilityCreateCallback() {
console.log('onAbilityCreateCallback');
}
async function addAbilityMonitorCallback(err: any) {
console.info('addAbilityMonitorCallback : ' + JSON.stringify(err))
}
export default class OpenHarmonyTestRunner implements TestRunner {
constructor() {
}
onPrepare() {
console.info('OpenHarmonyTestRunner OnPrepare')
}
onRun() {
console.log('OpenHarmonyTestRunner onRun run')
abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments()
abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator()
let lMonitor = {
abilityName: testAbilityName,
onAbilityCreate: onAbilityCreateCallback,
};
var testAbilityName = abilityDelegatorArguments.parameters['-p'] + '.MainAbility'
abilityDelegator.addAbilityMonitor(lMonitor, addAbilityMonitorCallback)
var cmd = 'aa start -d 0 -a ' + testAbilityName + ' -b ' + abilityDelegatorArguments.bundleName
cmd += ' '+translateParamsToString(abilityDelegatorArguments.parameters)
console.info('cmd : '+cmd)
abilityDelegator.executeShellCommand(cmd,
(err: any, d: any) => {
console.info('executeShellCommand : err : ' + JSON.stringify(err));
console.info('executeShellCommand : data : ' + d.stdResult);
console.info('executeShellCommand : data : ' + d.exitCode);
})
console.info('OpenHarmonyTestRunner onRun call abilityDelegator.getAppContext')
var context = abilityDelegator.getAppContext()
console.info('getAppContext : ' + JSON.stringify(context))
console.info('OpenHarmonyTestRunner onRun end')
}
};
\ No newline at end of file
...@@ -27,18 +27,16 @@ import cameraEnumTest from './CameraEnumTest.test.ets' ...@@ -27,18 +27,16 @@ import cameraEnumTest from './CameraEnumTest.test.ets'
let TAG = 'CameraModuleTest: ' let TAG = 'CameraModuleTest: '
export default function cameraKit(surfaceId: any) { export default function cameraKit() {
console.info(TAG + 'Entering cameraKit') console.info(TAG + 'Entering cameraKit')
console.info(TAG + 'surfaceId: ' + surfaceId) cameraInputTest()
cameraJSUnitOutput()
cameraInputTest(surfaceId) cameraSessionFlashTest()
cameraJSUnitOutput(surfaceId) cameraSessionExposureTest()
cameraSessionFlashTest(surfaceId) cameraSessionFocusTest()
cameraSessionExposureTest(surfaceId) cameraSessionZoomRatioTest()
cameraSessionFocusTest(surfaceId) cameraSessionVideoStabilizationTest()
cameraSessionZoomRatioTest(surfaceId) cameraSessionBaseTest()
cameraSessionVideoStabilizationTest(surfaceId) cameraManagerTest()
cameraSessionBaseTest(surfaceId) cameraEnumTest()
cameraManagerTest(surfaceId)
cameraEnumTest(surfaceId)
} }
\ No newline at end of file
...@@ -14,11 +14,11 @@ ...@@ -14,11 +14,11 @@
*/ */
import camera from '@ohos.multimedia.camera'; import camera from '@ohos.multimedia.camera';
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index'; import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium';
const TAG = "CameraEnumTest: "; const TAG = "CameraEnumTest: ";
export default function cameraEnumTest(surfaceId: any) { export default function cameraEnumTest() {
function isEmpty(data) { function isEmpty(data) {
if (data == null || data == undefined) { if (data == null || data == undefined) {
......
...@@ -14,10 +14,9 @@ ...@@ -14,10 +14,9 @@
*/ */
import cameraObj from '@ohos.multimedia.camera'; import cameraObj from '@ohos.multimedia.camera';
import image from '@ohos.multimedia.image'; import featureAbility from '@ohos.ability.featureAbility';
import abilityAccessCtrl from '@ohos.abilityAccessCtrl' import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from '@ohos/hypium';
import bundle from '@ohos.bundle' import {UiDriver, BY} from '@ohos.uitest'
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index';
const TAG = "CameraInputTest: "; const TAG = "CameraInputTest: ";
...@@ -31,7 +30,7 @@ let mCameraNum; ...@@ -31,7 +30,7 @@ let mCameraNum;
let mCameraInput; let mCameraInput;
let mPreviewOutput; let mPreviewOutput;
export default function CameraInputTest(surfaceId) { export default function CameraInputTest() {
function sleep(ms) { function sleep(ms) {
console.info(TAG + "Entering sleep -> Promise constructor"); console.info(TAG + "Entering sleep -> Promise constructor");
return new Promise(resolve => setTimeout(resolve, ms)); return new Promise(resolve => setTimeout(resolve, ms));
...@@ -44,62 +43,29 @@ export default function CameraInputTest(surfaceId) { ...@@ -44,62 +43,29 @@ export default function CameraInputTest(surfaceId) {
return false; return false;
} }
async function applyPermission() { async function getPermission() {
let appInfo = await bundle.getApplicationInfo('com.open.harmony.multimedia.cameratest', 0, 100); let permissions = ['ohos.permission.CAMERA',
let atManager = abilityAccessCtrl.createAtManager(); 'ohos.permission.MICROPHONE',
if (atManager != null) { 'ohos.permission.MEDIA_LOCATION',
let tokenID = appInfo.accessTokenId; 'ohos.permission.READ_MEDIA',
console.info('[permission] case accessTokenID is ' + tokenID); 'ohos.permission.WRITE_MEDIA',
let permissionName1 = 'ohos.permission.CAMERA'; 'ohos.permission.ABILITY_BACKGROUND_COMMUNICATION'];
let permissionName2 = 'ohos.permission.MICROPHONE'; featureAbility.getContext().requestPermissionsFromUser(permissions, 0, (data) => {
let permissionName3 = 'ohos.permission.MEDIA_LOCATION'; console.info("request success" + JSON.stringify(data));
let permissionName4 = 'ohos.permission.READ_MEDIA'; })
let permissionName5 = 'ohos.permission.WRITE_MEDIA'; }
let permissionName6 = 'ohos.permission.START_ABILIIES_FROM_BACKGROUND'; async function driveFn() {
let permissionName7 = 'ohos.permission.START_INVISIBLE_ABILITY'; console.info(`come in driveFn`);
let permissionName8 = 'ohos.permission.ABILITY_BACKGROUND_COMMUNICATION'; let driver = await UiDriver.create();
await atManager.grantUserGrantedPermission(tokenID, permissionName1, 1).then((result) => { console.info(`driver is ${JSON.stringify(driver)}`);
console.info('[permission] case grantUserGrantedPermission success :' + result); await sleep(2000);
}).catch((err) => { console.info(`UiDriver start`);
console.info('[permission] case grantUserGrantedPermission failed :' + err); let button = await driver.findComponent(BY.text('允许'));
}); while(button){
await atManager.grantUserGrantedPermission(tokenID, permissionName2, 1).then((result) => { console.info(`button is ${JSON.stringify(button)}`);
console.info('[permission] case grantUserGrantedPermission success :' + result); await button.click();
}).catch((err) => { await sleep(1000);
console.info('[permission] case grantUserGrantedPermission failed :' + err); button = await driver.findComponent(BY.text('允许'));
});
await atManager.grantUserGrantedPermission(tokenID, permissionName3, 1).then((result) => {
console.info('[permission] case grantUserGrantedPermission success :' + result);
}).catch((err) => {
console.info('[permission] case grantUserGrantedPermission failed :' + err);
});
await atManager.grantUserGrantedPermission(tokenID, permissionName4, 1).then((result) => {
console.info('[permission] case grantUserGrantedPermission success :' + result);
}).catch((err) => {
console.info('[permission] case grantUserGrantedPermission failed :' + err);
});
await atManager.grantUserGrantedPermission(tokenID, permissionName5, 1).then((result) => {
console.info('[permission] case grantUserGrantedPermission success :' + result);
}).catch((err) => {
console.info('[permission] case grantUserGrantedPermission failed :' + err);
});
await atManager.grantUserGrantedPermission(tokenID, permissionName6, 1).then((result) => {
console.info('[permission] case grantUserGrantedPermission success :' + result);
}).catch((err) => {
console.info('[permission] case grantUserGrantedPermission failed :' + err);
});
await atManager.grantUserGrantedPermission(tokenID, permissionName7, 1).then((result) => {
console.info('[permission] case grantUserGrantedPermission success :' + result);
}).catch((err) => {
console.info('[permission] case grantUserGrantedPermission failed :' + err);
});
await atManager.grantUserGrantedPermission(tokenID, permissionName8, 1).then((result) => {
console.info('[permission] case grantUserGrantedPermission success :' + result);
}).catch((err) => {
console.info('[permission] case grantUserGrantedPermission failed :' + err);
});
} else {
console.info('[permission] case apply permission failed, createAtManager failed');
} }
} }
...@@ -282,7 +248,7 @@ export default function CameraInputTest(surfaceId) { ...@@ -282,7 +248,7 @@ export default function CameraInputTest(surfaceId) {
if (!isEmpty(cameraOutputCap.previewProfiles)) { if (!isEmpty(cameraOutputCap.previewProfiles)) {
console.info(TAG + "cameraOutputCap.previewProfiles.length: " + cameraOutputCap.previewProfiles.length); console.info(TAG + "cameraOutputCap.previewProfiles.length: " + cameraOutputCap.previewProfiles.length);
for (let i = 0; i < cameraOutputCap.previewProfiles.length; i++) { for (let i = 0; i < cameraOutputCap.previewProfiles.length; i++) {
mPreviewOutput = await mCameraManager.createPreviewOutput(cameraOutputCap.previewProfiles[i], surfaceId); mPreviewOutput = await mCameraManager.createPreviewOutput(cameraOutputCap.previewProfiles[i], globalThis.surfaceId);
if (!isEmpty(mPreviewOutput)) { if (!isEmpty(mPreviewOutput)) {
break; break;
} }
...@@ -365,7 +331,9 @@ export default function CameraInputTest(surfaceId) { ...@@ -365,7 +331,9 @@ export default function CameraInputTest(surfaceId) {
describe('CameraInputTest', function () { describe('CameraInputTest', function () {
console.info(TAG + '----------CameraInputTest--------------'); console.info(TAG + '----------CameraInputTest--------------');
beforeAll(async function () { beforeAll(async function () {
await applyPermission(); await getPermission();
sleep(1000);
await driveFn();
await getCameraManagerInstance(); await getCameraManagerInstance();
await getCameraSupportDevicesArray(); await getCameraSupportDevicesArray();
await createCameraSessionInstance(); await createCameraSessionInstance();
......
...@@ -14,11 +14,9 @@ ...@@ -14,11 +14,9 @@
*/ */
import cameraObj from '@ohos.multimedia.camera'; import cameraObj from '@ohos.multimedia.camera';
import image from '@ohos.multimedia.image'; import image from '@ohos.multimedia.image';
import media from '@ohos.multimedia.media' import media from '@ohos.multimedia.media';
import abilityAccessCtrl from '@ohos.abilityAccessCtrl' import mediaLibrary from '@ohos.multimedia.mediaLibrary';
import bundle from '@ohos.bundle' import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium';
import mediaLibrary from '@ohos.multimedia.mediaLibrary'
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index';
const TAG = "CameraUnitTest: "; const TAG = "CameraUnitTest: ";
...@@ -80,7 +78,7 @@ let fdNumber; ...@@ -80,7 +78,7 @@ let fdNumber;
let mMetadataObjectTypeArray; let mMetadataObjectTypeArray;
let mMetadataObjectArray; let mMetadataObjectArray;
export default function cameraJSUnitOutput(surfaceId: any) { export default function cameraJSUnitOutput() {
async function getImageReceiverSurfaceId() { async function getImageReceiverSurfaceId() {
console.log(TAG + 'Entering create Image receiver') console.log(TAG + 'Entering create Image receiver')
...@@ -179,65 +177,6 @@ export default function cameraJSUnitOutput(surfaceId: any) { ...@@ -179,65 +177,6 @@ export default function cameraJSUnitOutput(surfaceId: any) {
return false; return false;
} }
async function applyPermission() {
let appInfo = await bundle.getApplicationInfo('com.open.harmony.multimedia.cameratest', 0, 100);
let atManager = abilityAccessCtrl.createAtManager();
if (atManager != null) {
let tokenID = appInfo.accessTokenId;
console.info('[permission] case accessTokenID is ' + tokenID);
let permissionName1 = 'ohos.permission.CAMERA';
let permissionName2 = 'ohos.permission.MICROPHONE';
let permissionName3 = 'ohos.permission.MEDIA_LOCATION';
let permissionName4 = 'ohos.permission.READ_MEDIA';
let permissionName5 = 'ohos.permission.WRITE_MEDIA';
let permissionName6 = 'ohos.permission.START_ABILIIES_FROM_BACKGROUND';
let permissionName7 = 'ohos.permission.START_INVISIBLE_ABILITY';
let permissionName8 = 'ohos.permission.ABILITY_BACKGROUND_COMMUNICATION';
await atManager.grantUserGrantedPermission(tokenID, permissionName1, 1).then((result) => {
console.info('[permission] case grantUserGrantedPermission success :' + result);
}).catch((err) => {
console.info('[permission] case grantUserGrantedPermission failed :' + err);
});
await atManager.grantUserGrantedPermission(tokenID, permissionName2, 1).then((result) => {
console.info('[permission] case grantUserGrantedPermission success :' + result);
}).catch((err) => {
console.info('[permission] case grantUserGrantedPermission failed :' + err);
});
await atManager.grantUserGrantedPermission(tokenID, permissionName3, 1).then((result) => {
console.info('[permission] case grantUserGrantedPermission success :' + result);
}).catch((err) => {
console.info('[permission] case grantUserGrantedPermission failed :' + err);
});
await atManager.grantUserGrantedPermission(tokenID, permissionName4, 1).then((result) => {
console.info('[permission] case grantUserGrantedPermission success :' + result);
}).catch((err) => {
console.info('[permission] case grantUserGrantedPermission failed :' + err);
});
await atManager.grantUserGrantedPermission(tokenID, permissionName5, 1).then((result) => {
console.info('[permission] case grantUserGrantedPermission success :' + result);
}).catch((err) => {
console.info('[permission] case grantUserGrantedPermission failed :' + err);
});
await atManager.grantUserGrantedPermission(tokenID, permissionName6, 1).then((result) => {
console.info('[permission] case grantUserGrantedPermission success :' + result);
}).catch((err) => {
console.info('[permission] case grantUserGrantedPermission failed :' + err);
});
await atManager.grantUserGrantedPermission(tokenID, permissionName7, 1).then((result) => {
console.info('[permission] case grantUserGrantedPermission success :' + result);
}).catch((err) => {
console.info('[permission] case grantUserGrantedPermission failed :' + err);
});
await atManager.grantUserGrantedPermission(tokenID, permissionName8, 1).then((result) => {
console.info('[permission] case grantUserGrantedPermission success :' + result);
}).catch((err) => {
console.info('[permission] case grantUserGrantedPermission failed :' + err);
});
} else {
console.info('[permission] case apply permission failed, createAtManager failed');
}
}
function getSupportedOutputCapabilityInPromise(cameraDevice) { function getSupportedOutputCapabilityInPromise(cameraDevice) {
if (isEmpty(cameraManager)) { if (isEmpty(cameraManager)) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_GET_CAMERAS_PROMISE_0100 cameraManager == null || undefined") console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_GET_CAMERAS_PROMISE_0100 cameraManager == null || undefined")
...@@ -255,7 +194,6 @@ export default function cameraJSUnitOutput(surfaceId: any) { ...@@ -255,7 +194,6 @@ export default function cameraJSUnitOutput(surfaceId: any) {
console.info(TAG + '----------cameraJSUnitOutput begin--------------') console.info(TAG + '----------cameraJSUnitOutput begin--------------')
beforeAll(async function () { beforeAll(async function () {
await applyPermission();
await getImageReceiverSurfaceId(); await getImageReceiverSurfaceId();
await getvideosurface(); await getvideosurface();
console.info('beforeAll case'); console.info('beforeAll case');
...@@ -420,7 +358,7 @@ export default function cameraJSUnitOutput(surfaceId: any) { ...@@ -420,7 +358,7 @@ export default function cameraJSUnitOutput(surfaceId: any) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_CREATE_PREVIEW_OUTPUT_CALLBACK_0100 previewProfilesArray == null || undefined") console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_CREATE_PREVIEW_OUTPUT_CALLBACK_0100 previewProfilesArray == null || undefined")
expect(isEmpty(previewProfilesArray)).assertFalse(); expect(isEmpty(previewProfilesArray)).assertFalse();
} }
cameraManager.createPreviewOutput(previewProfilesArray[0], surfaceId, async (err, data) => { cameraManager.createPreviewOutput(previewProfilesArray[0], globalThis.surfaceId, async (err, data) => {
if (!err) { if (!err) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_CREATE_PREVIEW_OUTPUT_CALLBACK_0100 is not error"); console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_CREATE_PREVIEW_OUTPUT_CALLBACK_0100 is not error");
expect(isEmpty(data)).assertFalse(); expect(isEmpty(data)).assertFalse();
......
...@@ -15,12 +15,9 @@ ...@@ -15,12 +15,9 @@
import cameraObj from '@ohos.multimedia.camera'; import cameraObj from '@ohos.multimedia.camera';
import image from '@ohos.multimedia.image'; import image from '@ohos.multimedia.image';
import fileio from '@ohos.fileio'; import mediaLibrary from '@ohos.multimedia.mediaLibrary';
import abilityAccessCtrl from '@ohos.abilityAccessCtrl' import media from '@ohos.multimedia.media';
import bundle from '@ohos.bundle' import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from '@ohos/hypium';
import mediaLibrary from '@ohos.multimedia.mediaLibrary'
import media from '@ohos.multimedia.media'
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index';
const TAG = "CameraUnitTest: "; const TAG = "CameraUnitTest: ";
...@@ -63,7 +60,7 @@ let mVideoConfig = { ...@@ -63,7 +60,7 @@ let mVideoConfig = {
maxDuration: 500 maxDuration: 500
} }
export default function cameraManagerTest(surfaceId: any) { export default function cameraManagerTest() {
async function getImageReceiverSurfaceId() { async function getImageReceiverSurfaceId() {
console.log(TAG + 'Entering create Image receiver') console.log(TAG + 'Entering create Image receiver')
...@@ -262,70 +259,10 @@ export default function cameraManagerTest(surfaceId: any) { ...@@ -262,70 +259,10 @@ export default function cameraManagerTest(surfaceId: any) {
return outputCapabilityPromise; return outputCapabilityPromise;
} }
async function applyPermission() {
let appInfo = await bundle.getApplicationInfo('com.open.harmony.multimedia.cameratest', 0, 100);
let atManager = abilityAccessCtrl.createAtManager();
if (atManager != null) {
let tokenID = appInfo.accessTokenId;
console.info('[permission] case accessTokenID is ' + tokenID);
let permissionName1 = 'ohos.permission.CAMERA';
let permissionName2 = 'ohos.permission.MICROPHONE';
let permissionName3 = 'ohos.permission.MEDIA_LOCATION';
let permissionName4 = 'ohos.permission.READ_MEDIA';
let permissionName5 = 'ohos.permission.WRITE_MEDIA';
let permissionName6 = 'ohos.permission.START_ABILIIES_FROM_BACKGROUND';
let permissionName7 = 'ohos.permission.START_INVISIBLE_ABILITY';
let permissionName8 = 'ohos.permission.ABILITY_BACKGROUND_COMMUNICATION';
await atManager.grantUserGrantedPermission(tokenID, permissionName1, 1).then((result) => {
console.info('[permission] case grantUserGrantedPermission success :' + result);
}).catch((err) => {
console.info('[permission] case grantUserGrantedPermission failed :' + err);
});
await atManager.grantUserGrantedPermission(tokenID, permissionName2, 1).then((result) => {
console.info('[permission] case grantUserGrantedPermission success :' + result);
}).catch((err) => {
console.info('[permission] case grantUserGrantedPermission failed :' + err);
});
await atManager.grantUserGrantedPermission(tokenID, permissionName3, 1).then((result) => {
console.info('[permission] case grantUserGrantedPermission success :' + result);
}).catch((err) => {
console.info('[permission] case grantUserGrantedPermission failed :' + err);
});
await atManager.grantUserGrantedPermission(tokenID, permissionName4, 1).then((result) => {
console.info('[permission] case grantUserGrantedPermission success :' + result);
}).catch((err) => {
console.info('[permission] case grantUserGrantedPermission failed :' + err);
});
await atManager.grantUserGrantedPermission(tokenID, permissionName5, 1).then((result) => {
console.info('[permission] case grantUserGrantedPermission success :' + result);
}).catch((err) => {
console.info('[permission] case grantUserGrantedPermission failed :' + err);
});
await atManager.grantUserGrantedPermission(tokenID, permissionName6, 1).then((result) => {
console.info('[permission] case grantUserGrantedPermission success :' + result);
}).catch((err) => {
console.info('[permission] case grantUserGrantedPermission failed :' + err);
});
await atManager.grantUserGrantedPermission(tokenID, permissionName7, 1).then((result) => {
console.info('[permission] case grantUserGrantedPermission success :' + result);
}).catch((err) => {
console.info('[permission] case grantUserGrantedPermission failed :' + err);
});
await atManager.grantUserGrantedPermission(tokenID, permissionName8, 1).then((result) => {
console.info('[permission] case grantUserGrantedPermission success :' + result);
}).catch((err) => {
console.info('[permission] case grantUserGrantedPermission failed :' + err);
});
} else {
console.info('[permission] case apply permission failed, createAtManager failed');
}
}
describe('CameraManagerTest', function () { describe('CameraManagerTest', function () {
console.info(TAG + '----------CameraManagerTest--------------') console.info(TAG + '----------CameraManagerTest--------------')
beforeAll(async function () { beforeAll(async function () {
await applyPermission();
await getCameraManagerInstance(); await getCameraManagerInstance();
await getImageReceiverSurfaceId(); await getImageReceiverSurfaceId();
await getVideoReceiveSurface(); await getVideoReceiveSurface();
...@@ -855,7 +792,7 @@ describe('CameraManagerTest', function () { ...@@ -855,7 +792,7 @@ describe('CameraManagerTest', function () {
expect().assertFail(); expect().assertFail();
} else { } else {
for (let j = 0; j < previewProfilesArray.length; j++) { for (let j = 0; j < previewProfilesArray.length; j++) {
mCameraManager.createPreviewOutput(previewProfilesArray[j], surfaceId, async (err, data) => { mCameraManager.createPreviewOutput(previewProfilesArray[j], globalThis.surfaceId, async (err, data) => {
if (isEmpty(data)) { if (isEmpty(data)) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_CREATE_CAMERA_PREVIEW_OUTPUT_CALLBACK_0100 data == null || undefined") console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_CREATE_CAMERA_PREVIEW_OUTPUT_CALLBACK_0100 data == null || undefined")
expect().assertFail(); expect().assertFail();
...@@ -893,7 +830,7 @@ describe('CameraManagerTest', function () { ...@@ -893,7 +830,7 @@ describe('CameraManagerTest', function () {
expect().assertFail(); expect().assertFail();
} else { } else {
for (let j = 0; j < previewProfilesArray.length; j++) { for (let j = 0; j < previewProfilesArray.length; j++) {
let previewOutputPromise = await mCameraManager.createPreviewOutput(previewProfilesArray[j], surfaceId); let previewOutputPromise = await mCameraManager.createPreviewOutput(previewProfilesArray[j], globalThis.surfaceId);
if (isEmpty(previewOutputPromise)) { if (isEmpty(previewOutputPromise)) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_CREATE_CAMERA_PREVIEW_OUTPUT_PROMISE_0100 previewOutputPromise == null || undefined") console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_CREATE_CAMERA_PREVIEW_OUTPUT_PROMISE_0100 previewOutputPromise == null || undefined")
expect().assertFail(); expect().assertFail();
......
...@@ -17,13 +17,10 @@ ...@@ -17,13 +17,10 @@
import cameraObj from '@ohos.multimedia.camera'; import cameraObj from '@ohos.multimedia.camera';
import image from '@ohos.multimedia.image'; import image from '@ohos.multimedia.image';
import media from '@ohos.multimedia.media' import media from '@ohos.multimedia.media';
import mediaLibrary from '@ohos.multimedia.mediaLibrary' import mediaLibrary from '@ohos.multimedia.mediaLibrary';
import fileio from '@ohos.fileio';
import abilityAccessCtrl from '@ohos.abilityAccessCtrl'
import bundle from '@ohos.bundle'
import deviceInfo from '@ohos.deviceInfo'; import deviceInfo from '@ohos.deviceInfo';
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index'; import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from '@ohos/hypium';
const TAG = "CameraModuleTest: "; const TAG = "CameraModuleTest: ";
...@@ -72,7 +69,7 @@ let mVideoConfig = { ...@@ -72,7 +69,7 @@ let mVideoConfig = {
maxDuration: 500 maxDuration: 500
} }
export default function cameraSessionTest(surfaceId: any) { export default function cameraSessionTest() {
function sleep(ms) { function sleep(ms) {
console.info(TAG + "Entering sleep -> Promise constructor"); console.info(TAG + "Entering sleep -> Promise constructor");
...@@ -118,65 +115,6 @@ export default function cameraSessionTest(surfaceId: any) { ...@@ -118,65 +115,6 @@ export default function cameraSessionTest(surfaceId: any) {
} }
} }
async function applyPermission() {
let appInfo = await bundle.getApplicationInfo('com.open.harmony.multimedia.cameratest', 0, 100);
let atManager = abilityAccessCtrl.createAtManager();
if (atManager != null) {
let tokenID = appInfo.accessTokenId;
console.info('[permission] case accessTokenID is ' + tokenID);
let permissionName1 = 'ohos.permission.CAMERA';
let permissionName2 = 'ohos.permission.MICROPHONE';
let permissionName3 = 'ohos.permission.MEDIA_LOCATION';
let permissionName4 = 'ohos.permission.READ_MEDIA';
let permissionName5 = 'ohos.permission.WRITE_MEDIA';
let permissionName6 = 'ohos.permission.START_ABILIIES_FROM_BACKGROUND';
let permissionName7 = 'ohos.permission.START_INVISIBLE_ABILITY';
let permissionName8 = 'ohos.permission.ABILITY_BACKGROUND_COMMUNICATION';
await atManager.grantUserGrantedPermission(tokenID, permissionName1, 1).then((result) => {
console.info('[permission] case grantUserGrantedPermission success :' + result);
}).catch((err) => {
console.info('[permission] case grantUserGrantedPermission failed :' + err);
});
await atManager.grantUserGrantedPermission(tokenID, permissionName2, 1).then((result) => {
console.info('[permission] case grantUserGrantedPermission success :' + result);
}).catch((err) => {
console.info('[permission] case grantUserGrantedPermission failed :' + err);
});
await atManager.grantUserGrantedPermission(tokenID, permissionName3, 1).then((result) => {
console.info('[permission] case grantUserGrantedPermission success :' + result);
}).catch((err) => {
console.info('[permission] case grantUserGrantedPermission failed :' + err);
});
await atManager.grantUserGrantedPermission(tokenID, permissionName4, 1).then((result) => {
console.info('[permission] case grantUserGrantedPermission success :' + result);
}).catch((err) => {
console.info('[permission] case grantUserGrantedPermission failed :' + err);
});
await atManager.grantUserGrantedPermission(tokenID, permissionName5, 1).then((result) => {
console.info('[permission] case grantUserGrantedPermission success :' + result);
}).catch((err) => {
console.info('[permission] case grantUserGrantedPermission failed :' + err);
});
await atManager.grantUserGrantedPermission(tokenID, permissionName6, 1).then((result) => {
console.info('[permission] case grantUserGrantedPermission success :' + result);
}).catch((err) => {
console.info('[permission] case grantUserGrantedPermission failed :' + err);
});
await atManager.grantUserGrantedPermission(tokenID, permissionName7, 1).then((result) => {
console.info('[permission] case grantUserGrantedPermission success :' + result);
}).catch((err) => {
console.info('[permission] case grantUserGrantedPermission failed :' + err);
});
await atManager.grantUserGrantedPermission(tokenID, permissionName8, 1).then((result) => {
console.info('[permission] case grantUserGrantedPermission success :' + result);
}).catch((err) => {
console.info('[permission] case grantUserGrantedPermission failed :' + err);
});
} else {
console.info('[permission] case apply permission failed, createAtManager failed');
}
}
async function getPhotoReceiverSurface() { async function getPhotoReceiverSurface() {
console.log(TAG + 'Entering getPhotoReceiverSurface') console.log(TAG + 'Entering getPhotoReceiverSurface')
let receiver = image.createImageReceiver(640, 480, 4, 8) let receiver = image.createImageReceiver(640, 480, 4, 8)
...@@ -413,7 +351,7 @@ export default function cameraSessionTest(surfaceId: any) { ...@@ -413,7 +351,7 @@ export default function cameraSessionTest(surfaceId: any) {
if (!isEmpty(cameraOutputCap.previewProfiles)) { if (!isEmpty(cameraOutputCap.previewProfiles)) {
console.info(TAG + "cameraOutputCap.previewProfiles.length: " + cameraOutputCap.previewProfiles.length); console.info(TAG + "cameraOutputCap.previewProfiles.length: " + cameraOutputCap.previewProfiles.length);
for (let i = 0; i < cameraOutputCap.previewProfiles.length; i++) { for (let i = 0; i < cameraOutputCap.previewProfiles.length; i++) {
mPreviewOutput = await mCameraManager.createPreviewOutput(cameraOutputCap.previewProfiles[i], surfaceId); mPreviewOutput = await mCameraManager.createPreviewOutput(cameraOutputCap.previewProfiles[i], globalThis.surfaceId);
if (!isEmpty(mPreviewOutput)) { if (!isEmpty(mPreviewOutput)) {
break; break;
} }
...@@ -592,7 +530,6 @@ export default function cameraSessionTest(surfaceId: any) { ...@@ -592,7 +530,6 @@ export default function cameraSessionTest(surfaceId: any) {
beforeAll(async function () { beforeAll(async function () {
sleep(100); sleep(100);
await applyPermission();
await getPhotoReceiverSurface(); await getPhotoReceiverSurface();
await getVideoReceiveSurface(); await getVideoReceiveSurface();
await getCameraManagerInstance(); await getCameraManagerInstance();
......
...@@ -17,13 +17,10 @@ ...@@ -17,13 +17,10 @@
import cameraObj from '@ohos.multimedia.camera'; import cameraObj from '@ohos.multimedia.camera';
import image from '@ohos.multimedia.image'; import image from '@ohos.multimedia.image';
import media from '@ohos.multimedia.media' import media from '@ohos.multimedia.media';
import mediaLibrary from '@ohos.multimedia.mediaLibrary' import mediaLibrary from '@ohos.multimedia.mediaLibrary';
import fileio from '@ohos.fileio';
import abilityAccessCtrl from '@ohos.abilityAccessCtrl'
import bundle from '@ohos.bundle'
import deviceInfo from '@ohos.deviceInfo'; import deviceInfo from '@ohos.deviceInfo';
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index'; import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from '@ohos/hypium';
const TAG = "CameraModuleTest: "; const TAG = "CameraModuleTest: ";
...@@ -127,7 +124,7 @@ let mMETERINGPointInvalidRB = { ...@@ -127,7 +124,7 @@ let mMETERINGPointInvalidRB = {
let mEnableCheckInvalidMETERINGPoint = false; let mEnableCheckInvalidMETERINGPoint = false;
export default function cameraSessionExposureTest(surfaceId: any) { export default function cameraSessionExposureTest() {
function sleep(ms) { function sleep(ms) {
console.info(TAG + "Entering sleep -> Promise constructor"); console.info(TAG + "Entering sleep -> Promise constructor");
...@@ -173,65 +170,6 @@ export default function cameraSessionExposureTest(surfaceId: any) { ...@@ -173,65 +170,6 @@ export default function cameraSessionExposureTest(surfaceId: any) {
} }
} }
async function applyPermission() {
let appInfo = await bundle.getApplicationInfo('com.open.harmony.multimedia.cameratest', 0, 100);
let atManager = abilityAccessCtrl.createAtManager();
if (atManager != null) {
let tokenID = appInfo.accessTokenId;
console.info('[permission] case accessTokenID is ' + tokenID);
let permissionName1 = 'ohos.permission.CAMERA';
let permissionName2 = 'ohos.permission.MICROPHONE';
let permissionName3 = 'ohos.permission.MEDIA_LOCATION';
let permissionName4 = 'ohos.permission.READ_MEDIA';
let permissionName5 = 'ohos.permission.WRITE_MEDIA';
let permissionName6 = 'ohos.permission.START_ABILIIES_FROM_BACKGROUND';
let permissionName7 = 'ohos.permission.START_INVISIBLE_ABILITY';
let permissionName8 = 'ohos.permission.ABILITY_BACKGROUND_COMMUNICATION';
await atManager.grantUserGrantedPermission(tokenID, permissionName1, 1).then((result) => {
console.info('[permission] case grantUserGrantedPermission success :' + result);
}).catch((err) => {
console.info('[permission] case grantUserGrantedPermission failed :' + err);
});
await atManager.grantUserGrantedPermission(tokenID, permissionName2, 1).then((result) => {
console.info('[permission] case grantUserGrantedPermission success :' + result);
}).catch((err) => {
console.info('[permission] case grantUserGrantedPermission failed :' + err);
});
await atManager.grantUserGrantedPermission(tokenID, permissionName3, 1).then((result) => {
console.info('[permission] case grantUserGrantedPermission success :' + result);
}).catch((err) => {
console.info('[permission] case grantUserGrantedPermission failed :' + err);
});
await atManager.grantUserGrantedPermission(tokenID, permissionName4, 1).then((result) => {
console.info('[permission] case grantUserGrantedPermission success :' + result);
}).catch((err) => {
console.info('[permission] case grantUserGrantedPermission failed :' + err);
});
await atManager.grantUserGrantedPermission(tokenID, permissionName5, 1).then((result) => {
console.info('[permission] case grantUserGrantedPermission success :' + result);
}).catch((err) => {
console.info('[permission] case grantUserGrantedPermission failed :' + err);
});
await atManager.grantUserGrantedPermission(tokenID, permissionName6, 1).then((result) => {
console.info('[permission] case grantUserGrantedPermission success :' + result);
}).catch((err) => {
console.info('[permission] case grantUserGrantedPermission failed :' + err);
});
await atManager.grantUserGrantedPermission(tokenID, permissionName7, 1).then((result) => {
console.info('[permission] case grantUserGrantedPermission success :' + result);
}).catch((err) => {
console.info('[permission] case grantUserGrantedPermission failed :' + err);
});
await atManager.grantUserGrantedPermission(tokenID, permissionName8, 1).then((result) => {
console.info('[permission] case grantUserGrantedPermission success :' + result);
}).catch((err) => {
console.info('[permission] case grantUserGrantedPermission failed :' + err);
});
} else {
console.info('[permission] case apply permission failed, createAtManager failed');
}
}
async function getPhotoReceiverSurface() { async function getPhotoReceiverSurface() {
console.log(TAG + 'Entering getPhotoReceiverSurface') console.log(TAG + 'Entering getPhotoReceiverSurface')
let receiver = image.createImageReceiver(640, 480, 4, 8) let receiver = image.createImageReceiver(640, 480, 4, 8)
...@@ -473,7 +411,7 @@ export default function cameraSessionExposureTest(surfaceId: any) { ...@@ -473,7 +411,7 @@ export default function cameraSessionExposureTest(surfaceId: any) {
if (!isEmpty(cameraOutputCap.previewProfiles)) { if (!isEmpty(cameraOutputCap.previewProfiles)) {
console.info(TAG + "cameraOutputCap.previewProfiles.length: " + cameraOutputCap.previewProfiles.length); console.info(TAG + "cameraOutputCap.previewProfiles.length: " + cameraOutputCap.previewProfiles.length);
for (let i = 0; i < cameraOutputCap.previewProfiles.length; i++) { for (let i = 0; i < cameraOutputCap.previewProfiles.length; i++) {
mPreviewOutput = await mCameraManager.createPreviewOutput(cameraOutputCap.previewProfiles[i], surfaceId); mPreviewOutput = await mCameraManager.createPreviewOutput(cameraOutputCap.previewProfiles[i], globalThis.surfaceId);
if (!isEmpty(mPreviewOutput)) { if (!isEmpty(mPreviewOutput)) {
break; break;
} }
...@@ -651,7 +589,6 @@ export default function cameraSessionExposureTest(surfaceId: any) { ...@@ -651,7 +589,6 @@ export default function cameraSessionExposureTest(surfaceId: any) {
beforeAll(async function () { beforeAll(async function () {
sleep(100); sleep(100);
await applyPermission();
await getPhotoReceiverSurface(); await getPhotoReceiverSurface();
await getVideoReceiveSurface(); await getVideoReceiveSurface();
await getCameraManagerInstance(); await getCameraManagerInstance();
......
...@@ -17,13 +17,10 @@ ...@@ -17,13 +17,10 @@
import cameraObj from '@ohos.multimedia.camera'; import cameraObj from '@ohos.multimedia.camera';
import image from '@ohos.multimedia.image'; import image from '@ohos.multimedia.image';
import media from '@ohos.multimedia.media' import media from '@ohos.multimedia.media';
import mediaLibrary from '@ohos.multimedia.mediaLibrary' import mediaLibrary from '@ohos.multimedia.mediaLibrary';
import fileio from '@ohos.fileio';
import abilityAccessCtrl from '@ohos.abilityAccessCtrl'
import bundle from '@ohos.bundle'
import deviceInfo from '@ohos.deviceInfo'; import deviceInfo from '@ohos.deviceInfo';
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index'; import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from '@ohos/hypium';
const TAG = "CameraModuleTest: "; const TAG = "CameraModuleTest: ";
...@@ -78,7 +75,7 @@ let mVideoConfig = { ...@@ -78,7 +75,7 @@ let mVideoConfig = {
let mPicWidthMax = 8192; let mPicWidthMax = 8192;
let mPicHeightMax = 8192; let mPicHeightMax = 8192;
export default function cameraSessionFlashTest(surfaceId: any) { export default function cameraSessionFlashTest() {
function sleep(ms) { function sleep(ms) {
console.info(TAG + "Entering sleep -> Promise constructor"); console.info(TAG + "Entering sleep -> Promise constructor");
...@@ -124,65 +121,6 @@ export default function cameraSessionFlashTest(surfaceId: any) { ...@@ -124,65 +121,6 @@ export default function cameraSessionFlashTest(surfaceId: any) {
} }
} }
async function applyPermission() {
let appInfo = await bundle.getApplicationInfo('com.open.harmony.multimedia.cameratest', 0, 100);
let atManager = abilityAccessCtrl.createAtManager();
if (atManager != null) {
let tokenID = appInfo.accessTokenId;
console.info('[permission] case accessTokenID is ' + tokenID);
let permissionName1 = 'ohos.permission.CAMERA';
let permissionName2 = 'ohos.permission.MICROPHONE';
let permissionName3 = 'ohos.permission.MEDIA_LOCATION';
let permissionName4 = 'ohos.permission.READ_MEDIA';
let permissionName5 = 'ohos.permission.WRITE_MEDIA';
let permissionName6 = 'ohos.permission.START_ABILIIES_FROM_BACKGROUND';
let permissionName7 = 'ohos.permission.START_INVISIBLE_ABILITY';
let permissionName8 = 'ohos.permission.ABILITY_BACKGROUND_COMMUNICATION';
await atManager.grantUserGrantedPermission(tokenID, permissionName1, 1).then((result) => {
console.info('[permission] case grantUserGrantedPermission success :' + result);
}).catch((err) => {
console.info('[permission] case grantUserGrantedPermission failed :' + err);
});
await atManager.grantUserGrantedPermission(tokenID, permissionName2, 1).then((result) => {
console.info('[permission] case grantUserGrantedPermission success :' + result);
}).catch((err) => {
console.info('[permission] case grantUserGrantedPermission failed :' + err);
});
await atManager.grantUserGrantedPermission(tokenID, permissionName3, 1).then((result) => {
console.info('[permission] case grantUserGrantedPermission success :' + result);
}).catch((err) => {
console.info('[permission] case grantUserGrantedPermission failed :' + err);
});
await atManager.grantUserGrantedPermission(tokenID, permissionName4, 1).then((result) => {
console.info('[permission] case grantUserGrantedPermission success :' + result);
}).catch((err) => {
console.info('[permission] case grantUserGrantedPermission failed :' + err);
});
await atManager.grantUserGrantedPermission(tokenID, permissionName5, 1).then((result) => {
console.info('[permission] case grantUserGrantedPermission success :' + result);
}).catch((err) => {
console.info('[permission] case grantUserGrantedPermission failed :' + err);
});
await atManager.grantUserGrantedPermission(tokenID, permissionName6, 1).then((result) => {
console.info('[permission] case grantUserGrantedPermission success :' + result);
}).catch((err) => {
console.info('[permission] case grantUserGrantedPermission failed :' + err);
});
await atManager.grantUserGrantedPermission(tokenID, permissionName7, 1).then((result) => {
console.info('[permission] case grantUserGrantedPermission success :' + result);
}).catch((err) => {
console.info('[permission] case grantUserGrantedPermission failed :' + err);
});
await atManager.grantUserGrantedPermission(tokenID, permissionName8, 1).then((result) => {
console.info('[permission] case grantUserGrantedPermission success :' + result);
}).catch((err) => {
console.info('[permission] case grantUserGrantedPermission failed :' + err);
});
} else {
console.info('[permission] case apply permission failed, createAtManager failed');
}
}
async function getPhotoReceiverSurface() { async function getPhotoReceiverSurface() {
console.log(TAG + 'Entering getPhotoReceiverSurface') console.log(TAG + 'Entering getPhotoReceiverSurface')
let receiver = image.createImageReceiver(640, 480, 4, 8) let receiver = image.createImageReceiver(640, 480, 4, 8)
...@@ -424,7 +362,7 @@ export default function cameraSessionFlashTest(surfaceId: any) { ...@@ -424,7 +362,7 @@ export default function cameraSessionFlashTest(surfaceId: any) {
if (!isEmpty(cameraOutputCap.previewProfiles)) { if (!isEmpty(cameraOutputCap.previewProfiles)) {
console.info(TAG + "cameraOutputCap.previewProfiles.length: " + cameraOutputCap.previewProfiles.length); console.info(TAG + "cameraOutputCap.previewProfiles.length: " + cameraOutputCap.previewProfiles.length);
for (let i = 0; i < cameraOutputCap.previewProfiles.length; i++) { for (let i = 0; i < cameraOutputCap.previewProfiles.length; i++) {
mPreviewOutput = await mCameraManager.createPreviewOutput(cameraOutputCap.previewProfiles[i], surfaceId); mPreviewOutput = await mCameraManager.createPreviewOutput(cameraOutputCap.previewProfiles[i], globalThis.surfaceId);
if (!isEmpty(mPreviewOutput)) { if (!isEmpty(mPreviewOutput)) {
break; break;
} }
...@@ -602,7 +540,6 @@ export default function cameraSessionFlashTest(surfaceId: any) { ...@@ -602,7 +540,6 @@ export default function cameraSessionFlashTest(surfaceId: any) {
beforeAll(async function () { beforeAll(async function () {
sleep(100); sleep(100);
await applyPermission();
await getPhotoReceiverSurface(); await getPhotoReceiverSurface();
await getVideoReceiveSurface(); await getVideoReceiveSurface();
await mgetCameraManagerInstance(); await mgetCameraManagerInstance();
......
...@@ -17,13 +17,10 @@ ...@@ -17,13 +17,10 @@
import cameraObj from '@ohos.multimedia.camera'; import cameraObj from '@ohos.multimedia.camera';
import image from '@ohos.multimedia.image'; import image from '@ohos.multimedia.image';
import media from '@ohos.multimedia.media' import media from '@ohos.multimedia.media';
import mediaLibrary from '@ohos.multimedia.mediaLibrary' import mediaLibrary from '@ohos.multimedia.mediaLibrary';
import fileio from '@ohos.fileio';
import abilityAccessCtrl from '@ohos.abilityAccessCtrl'
import bundle from '@ohos.bundle'
import deviceInfo from '@ohos.deviceInfo'; import deviceInfo from '@ohos.deviceInfo';
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index'; import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from '@ohos/hypium';
const TAG = "CameraModuleTest: "; const TAG = "CameraModuleTest: ";
...@@ -124,7 +121,7 @@ let mFocusPointInvalidRB = { ...@@ -124,7 +121,7 @@ let mFocusPointInvalidRB = {
let mEnableCheckInvalidFocusPoint = false; let mEnableCheckInvalidFocusPoint = false;
export default function cameraSessionFocusTest(surfaceId: any) { export default function cameraSessionFocusTest() {
function sleep(ms) { function sleep(ms) {
console.info(TAG + "Entering sleep -> Promise constructor"); console.info(TAG + "Entering sleep -> Promise constructor");
...@@ -170,65 +167,6 @@ export default function cameraSessionFocusTest(surfaceId: any) { ...@@ -170,65 +167,6 @@ export default function cameraSessionFocusTest(surfaceId: any) {
} }
} }
async function applyPermission() {
let appInfo = await bundle.getApplicationInfo('com.open.harmony.multimedia.cameratest', 0, 100);
let atManager = abilityAccessCtrl.createAtManager();
if (atManager != null) {
let tokenID = appInfo.accessTokenId;
console.info('[permission] case accessTokenID is ' + tokenID);
let permissionName1 = 'ohos.permission.CAMERA';
let permissionName2 = 'ohos.permission.MICROPHONE';
let permissionName3 = 'ohos.permission.MEDIA_LOCATION';
let permissionName4 = 'ohos.permission.READ_MEDIA';
let permissionName5 = 'ohos.permission.WRITE_MEDIA';
let permissionName6 = 'ohos.permission.START_ABILIIES_FROM_BACKGROUND';
let permissionName7 = 'ohos.permission.START_INVISIBLE_ABILITY';
let permissionName8 = 'ohos.permission.ABILITY_BACKGROUND_COMMUNICATION';
await atManager.grantUserGrantedPermission(tokenID, permissionName1, 1).then((result) => {
console.info('[permission] case grantUserGrantedPermission success :' + result);
}).catch((err) => {
console.info('[permission] case grantUserGrantedPermission failed :' + err);
});
await atManager.grantUserGrantedPermission(tokenID, permissionName2, 1).then((result) => {
console.info('[permission] case grantUserGrantedPermission success :' + result);
}).catch((err) => {
console.info('[permission] case grantUserGrantedPermission failed :' + err);
});
await atManager.grantUserGrantedPermission(tokenID, permissionName3, 1).then((result) => {
console.info('[permission] case grantUserGrantedPermission success :' + result);
}).catch((err) => {
console.info('[permission] case grantUserGrantedPermission failed :' + err);
});
await atManager.grantUserGrantedPermission(tokenID, permissionName4, 1).then((result) => {
console.info('[permission] case grantUserGrantedPermission success :' + result);
}).catch((err) => {
console.info('[permission] case grantUserGrantedPermission failed :' + err);
});
await atManager.grantUserGrantedPermission(tokenID, permissionName5, 1).then((result) => {
console.info('[permission] case grantUserGrantedPermission success :' + result);
}).catch((err) => {
console.info('[permission] case grantUserGrantedPermission failed :' + err);
});
await atManager.grantUserGrantedPermission(tokenID, permissionName6, 1).then((result) => {
console.info('[permission] case grantUserGrantedPermission success :' + result);
}).catch((err) => {
console.info('[permission] case grantUserGrantedPermission failed :' + err);
});
await atManager.grantUserGrantedPermission(tokenID, permissionName7, 1).then((result) => {
console.info('[permission] case grantUserGrantedPermission success :' + result);
}).catch((err) => {
console.info('[permission] case grantUserGrantedPermission failed :' + err);
});
await atManager.grantUserGrantedPermission(tokenID, permissionName8, 1).then((result) => {
console.info('[permission] case grantUserGrantedPermission success :' + result);
}).catch((err) => {
console.info('[permission] case grantUserGrantedPermission failed :' + err);
});
} else {
console.info('[permission] case apply permission failed, createAtManager failed');
}
}
async function getPhotoReceiverSurface() { async function getPhotoReceiverSurface() {
console.log(TAG + 'Entering getPhotoReceiverSurface') console.log(TAG + 'Entering getPhotoReceiverSurface')
let receiver = image.createImageReceiver(640, 480, 4, 8) let receiver = image.createImageReceiver(640, 480, 4, 8)
...@@ -469,7 +407,7 @@ export default function cameraSessionFocusTest(surfaceId: any) { ...@@ -469,7 +407,7 @@ export default function cameraSessionFocusTest(surfaceId: any) {
if (!isEmpty(cameraOutputCap.previewProfiles)) { if (!isEmpty(cameraOutputCap.previewProfiles)) {
console.info(TAG + "cameraOutputCap.previewProfiles.length: " + cameraOutputCap.previewProfiles.length); console.info(TAG + "cameraOutputCap.previewProfiles.length: " + cameraOutputCap.previewProfiles.length);
for (let i = 0; i < cameraOutputCap.previewProfiles.length; i++) { for (let i = 0; i < cameraOutputCap.previewProfiles.length; i++) {
mPreviewOutput = await mCameraManager.createPreviewOutput(cameraOutputCap.previewProfiles[i], surfaceId); mPreviewOutput = await mCameraManager.createPreviewOutput(cameraOutputCap.previewProfiles[i], globalThis.surfaceId);
if (!isEmpty(mPreviewOutput)) { if (!isEmpty(mPreviewOutput)) {
break; break;
} }
...@@ -647,7 +585,6 @@ export default function cameraSessionFocusTest(surfaceId: any) { ...@@ -647,7 +585,6 @@ export default function cameraSessionFocusTest(surfaceId: any) {
beforeAll(async function () { beforeAll(async function () {
sleep(100); sleep(100);
await applyPermission();
await getPhotoReceiverSurface(); await getPhotoReceiverSurface();
await getVideoReceiveSurface(); await getVideoReceiveSurface();
await getCameraManagerInstance(); await getCameraManagerInstance();
......
...@@ -17,13 +17,10 @@ ...@@ -17,13 +17,10 @@
import cameraObj from '@ohos.multimedia.camera'; import cameraObj from '@ohos.multimedia.camera';
import image from '@ohos.multimedia.image'; import image from '@ohos.multimedia.image';
import media from '@ohos.multimedia.media' import media from '@ohos.multimedia.media';
import mediaLibrary from '@ohos.multimedia.mediaLibrary' import mediaLibrary from '@ohos.multimedia.mediaLibrary';
import fileio from '@ohos.fileio';
import abilityAccessCtrl from '@ohos.abilityAccessCtrl'
import bundle from '@ohos.bundle'
import deviceInfo from '@ohos.deviceInfo'; import deviceInfo from '@ohos.deviceInfo';
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index'; import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from '@ohos/hypium';
const TAG = "CameraModuleTest: "; const TAG = "CameraModuleTest: ";
...@@ -77,7 +74,7 @@ let mVideoConfig = { ...@@ -77,7 +74,7 @@ let mVideoConfig = {
let mPicWidthMax = 8192; let mPicWidthMax = 8192;
let mPicHeightMax = 8192; let mPicHeightMax = 8192;
export default function cameraSessionVideoStabilizationTest(surfaceId: any) { export default function cameraSessionVideoStabilizationTest() {
function sleep(ms) { function sleep(ms) {
console.info(TAG + "Entering sleep -> Promise constructor"); console.info(TAG + "Entering sleep -> Promise constructor");
...@@ -123,65 +120,6 @@ export default function cameraSessionVideoStabilizationTest(surfaceId: any) { ...@@ -123,65 +120,6 @@ export default function cameraSessionVideoStabilizationTest(surfaceId: any) {
} }
} }
async function applyPermission() {
let appInfo = await bundle.getApplicationInfo('com.open.harmony.multimedia.cameratest', 0, 100);
let atManager = abilityAccessCtrl.createAtManager();
if (atManager != null) {
let tokenID = appInfo.accessTokenId;
console.info('[permission] case accessTokenID is ' + tokenID);
let permissionName1 = 'ohos.permission.CAMERA';
let permissionName2 = 'ohos.permission.MICROPHONE';
let permissionName3 = 'ohos.permission.MEDIA_LOCATION';
let permissionName4 = 'ohos.permission.READ_MEDIA';
let permissionName5 = 'ohos.permission.WRITE_MEDIA';
let permissionName6 = 'ohos.permission.START_ABILIIES_FROM_BACKGROUND';
let permissionName7 = 'ohos.permission.START_INVISIBLE_ABILITY';
let permissionName8 = 'ohos.permission.ABILITY_BACKGROUND_COMMUNICATION';
await atManager.grantUserGrantedPermission(tokenID, permissionName1, 1).then((result) => {
console.info('[permission] case grantUserGrantedPermission success :' + result);
}).catch((err) => {
console.info('[permission] case grantUserGrantedPermission failed :' + err);
});
await atManager.grantUserGrantedPermission(tokenID, permissionName2, 1).then((result) => {
console.info('[permission] case grantUserGrantedPermission success :' + result);
}).catch((err) => {
console.info('[permission] case grantUserGrantedPermission failed :' + err);
});
await atManager.grantUserGrantedPermission(tokenID, permissionName3, 1).then((result) => {
console.info('[permission] case grantUserGrantedPermission success :' + result);
}).catch((err) => {
console.info('[permission] case grantUserGrantedPermission failed :' + err);
});
await atManager.grantUserGrantedPermission(tokenID, permissionName4, 1).then((result) => {
console.info('[permission] case grantUserGrantedPermission success :' + result);
}).catch((err) => {
console.info('[permission] case grantUserGrantedPermission failed :' + err);
});
await atManager.grantUserGrantedPermission(tokenID, permissionName5, 1).then((result) => {
console.info('[permission] case grantUserGrantedPermission success :' + result);
}).catch((err) => {
console.info('[permission] case grantUserGrantedPermission failed :' + err);
});
await atManager.grantUserGrantedPermission(tokenID, permissionName6, 1).then((result) => {
console.info('[permission] case grantUserGrantedPermission success :' + result);
}).catch((err) => {
console.info('[permission] case grantUserGrantedPermission failed :' + err);
});
await atManager.grantUserGrantedPermission(tokenID, permissionName7, 1).then((result) => {
console.info('[permission] case grantUserGrantedPermission success :' + result);
}).catch((err) => {
console.info('[permission] case grantUserGrantedPermission failed :' + err);
});
await atManager.grantUserGrantedPermission(tokenID, permissionName8, 1).then((result) => {
console.info('[permission] case grantUserGrantedPermission success :' + result);
}).catch((err) => {
console.info('[permission] case grantUserGrantedPermission failed :' + err);
});
} else {
console.info('[permission] case apply permission failed, createAtManager failed');
}
}
async function getPhotoReceiverSurface() { async function getPhotoReceiverSurface() {
console.log(TAG + 'Entering getPhotoReceiverSurface') console.log(TAG + 'Entering getPhotoReceiverSurface')
let receiver = image.createImageReceiver(640, 480, 4, 8) let receiver = image.createImageReceiver(640, 480, 4, 8)
...@@ -422,7 +360,7 @@ export default function cameraSessionVideoStabilizationTest(surfaceId: any) { ...@@ -422,7 +360,7 @@ export default function cameraSessionVideoStabilizationTest(surfaceId: any) {
if (!isEmpty(cameraOutputCap.previewProfiles)) { if (!isEmpty(cameraOutputCap.previewProfiles)) {
console.info(TAG + "cameraOutputCap.previewProfiles.length: " + cameraOutputCap.previewProfiles.length); console.info(TAG + "cameraOutputCap.previewProfiles.length: " + cameraOutputCap.previewProfiles.length);
for (let i = 0; i < cameraOutputCap.previewProfiles.length; i++) { for (let i = 0; i < cameraOutputCap.previewProfiles.length; i++) {
mPreviewOutput = await mCameraManager.createPreviewOutput(cameraOutputCap.previewProfiles[i], surfaceId); mPreviewOutput = await mCameraManager.createPreviewOutput(cameraOutputCap.previewProfiles[i], globalThis.surfaceId);
if (!isEmpty(mPreviewOutput)) { if (!isEmpty(mPreviewOutput)) {
break; break;
} }
...@@ -600,7 +538,6 @@ export default function cameraSessionVideoStabilizationTest(surfaceId: any) { ...@@ -600,7 +538,6 @@ export default function cameraSessionVideoStabilizationTest(surfaceId: any) {
beforeAll(async function () { beforeAll(async function () {
sleep(100); sleep(100);
await applyPermission();
await getPhotoReceiverSurface(); await getPhotoReceiverSurface();
await getVideoReceiveSurface(); await getVideoReceiveSurface();
await getCameraManagerInstance(); await getCameraManagerInstance();
......
...@@ -17,13 +17,10 @@ ...@@ -17,13 +17,10 @@
import cameraObj from '@ohos.multimedia.camera'; import cameraObj from '@ohos.multimedia.camera';
import image from '@ohos.multimedia.image'; import image from '@ohos.multimedia.image';
import media from '@ohos.multimedia.media' import media from '@ohos.multimedia.media';
import mediaLibrary from '@ohos.multimedia.mediaLibrary' import mediaLibrary from '@ohos.multimedia.mediaLibrary';
import fileio from '@ohos.fileio';
import abilityAccessCtrl from '@ohos.abilityAccessCtrl'
import bundle from '@ohos.bundle'
import deviceInfo from '@ohos.deviceInfo'; import deviceInfo from '@ohos.deviceInfo';
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index'; import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from '@ohos/hypium';
const TAG = "CameraModuleTest: "; const TAG = "CameraModuleTest: ";
...@@ -79,7 +76,7 @@ let mVideoConfig = { ...@@ -79,7 +76,7 @@ let mVideoConfig = {
let mPicWidthMax = 8192; let mPicWidthMax = 8192;
let mPicHeightMax = 8192; let mPicHeightMax = 8192;
export default function cameraSessionZoomRatioTest(surfaceId: any) { export default function cameraSessionZoomRatioTest() {
function sleep(ms) { function sleep(ms) {
console.info(TAG + "Entering sleep -> Promise constructor"); console.info(TAG + "Entering sleep -> Promise constructor");
...@@ -125,65 +122,6 @@ export default function cameraSessionZoomRatioTest(surfaceId: any) { ...@@ -125,65 +122,6 @@ export default function cameraSessionZoomRatioTest(surfaceId: any) {
} }
} }
async function applyPermission() {
let appInfo = await bundle.getApplicationInfo('com.open.harmony.multimedia.cameratest', 0, 100);
let atManager = abilityAccessCtrl.createAtManager();
if (atManager != null) {
let tokenID = appInfo.accessTokenId;
console.info('[permission] case accessTokenID is ' + tokenID);
let permissionName1 = 'ohos.permission.CAMERA';
let permissionName2 = 'ohos.permission.MICROPHONE';
let permissionName3 = 'ohos.permission.MEDIA_LOCATION';
let permissionName4 = 'ohos.permission.READ_MEDIA';
let permissionName5 = 'ohos.permission.WRITE_MEDIA';
let permissionName6 = 'ohos.permission.START_ABILIIES_FROM_BACKGROUND';
let permissionName7 = 'ohos.permission.START_INVISIBLE_ABILITY';
let permissionName8 = 'ohos.permission.ABILITY_BACKGROUND_COMMUNICATION';
await atManager.grantUserGrantedPermission(tokenID, permissionName1, 1).then((result) => {
console.info('[permission] case grantUserGrantedPermission success :' + result);
}).catch((err) => {
console.info('[permission] case grantUserGrantedPermission failed :' + err);
});
await atManager.grantUserGrantedPermission(tokenID, permissionName2, 1).then((result) => {
console.info('[permission] case grantUserGrantedPermission success :' + result);
}).catch((err) => {
console.info('[permission] case grantUserGrantedPermission failed :' + err);
});
await atManager.grantUserGrantedPermission(tokenID, permissionName3, 1).then((result) => {
console.info('[permission] case grantUserGrantedPermission success :' + result);
}).catch((err) => {
console.info('[permission] case grantUserGrantedPermission failed :' + err);
});
await atManager.grantUserGrantedPermission(tokenID, permissionName4, 1).then((result) => {
console.info('[permission] case grantUserGrantedPermission success :' + result);
}).catch((err) => {
console.info('[permission] case grantUserGrantedPermission failed :' + err);
});
await atManager.grantUserGrantedPermission(tokenID, permissionName5, 1).then((result) => {
console.info('[permission] case grantUserGrantedPermission success :' + result);
}).catch((err) => {
console.info('[permission] case grantUserGrantedPermission failed :' + err);
});
await atManager.grantUserGrantedPermission(tokenID, permissionName6, 1).then((result) => {
console.info('[permission] case grantUserGrantedPermission success :' + result);
}).catch((err) => {
console.info('[permission] case grantUserGrantedPermission failed :' + err);
});
await atManager.grantUserGrantedPermission(tokenID, permissionName7, 1).then((result) => {
console.info('[permission] case grantUserGrantedPermission success :' + result);
}).catch((err) => {
console.info('[permission] case grantUserGrantedPermission failed :' + err);
});
await atManager.grantUserGrantedPermission(tokenID, permissionName8, 1).then((result) => {
console.info('[permission] case grantUserGrantedPermission success :' + result);
}).catch((err) => {
console.info('[permission] case grantUserGrantedPermission failed :' + err);
});
} else {
console.info('[permission] case apply permission failed, createAtManager failed');
}
}
async function getPhotoReceiverSurface() { async function getPhotoReceiverSurface() {
console.log(TAG + 'Entering getPhotoReceiverSurface') console.log(TAG + 'Entering getPhotoReceiverSurface')
let receiver = image.createImageReceiver(640, 480, 4, 8) let receiver = image.createImageReceiver(640, 480, 4, 8)
...@@ -426,7 +364,7 @@ export default function cameraSessionZoomRatioTest(surfaceId: any) { ...@@ -426,7 +364,7 @@ export default function cameraSessionZoomRatioTest(surfaceId: any) {
if (!isEmpty(cameraOutputCap.previewProfiles)) { if (!isEmpty(cameraOutputCap.previewProfiles)) {
console.info(TAG + "cameraOutputCap.previewProfiles.length: " + cameraOutputCap.previewProfiles.length); console.info(TAG + "cameraOutputCap.previewProfiles.length: " + cameraOutputCap.previewProfiles.length);
for (let i = 0; i < cameraOutputCap.previewProfiles.length; i++) { for (let i = 0; i < cameraOutputCap.previewProfiles.length; i++) {
mPreviewOutput = await mCameraManager.createPreviewOutput(cameraOutputCap.previewProfiles[i], surfaceId); mPreviewOutput = await mCameraManager.createPreviewOutput(cameraOutputCap.previewProfiles[i], globalThis.surfaceId);
if (!isEmpty(mPreviewOutput)) { if (!isEmpty(mPreviewOutput)) {
break; break;
} }
...@@ -604,8 +542,6 @@ export default function cameraSessionZoomRatioTest(surfaceId: any) { ...@@ -604,8 +542,6 @@ export default function cameraSessionZoomRatioTest(surfaceId: any) {
beforeAll(async function () { beforeAll(async function () {
sleep(100); sleep(100);
await applyPermission();
await getPhotoReceiverSurface(); await getPhotoReceiverSurface();
await getVideoReceiveSurface(); await getVideoReceiveSurface();
await getCameraManagerInstance(); await getCameraManagerInstance();
......
...@@ -7,6 +7,14 @@ ...@@ -7,6 +7,14 @@
{ {
"name": "description_mainability", "name": "description_mainability",
"value": "eTS_Empty Ability" "value": "eTS_Empty Ability"
},
{
"name": "TestAbility_desc",
"value": "description"
},
{
"name": "TestAbility_label",
"value": "label"
} }
] ]
} }
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册