From 2d143284c0dbf05860b6a62428a470a6bf6d126b Mon Sep 17 00:00:00 2001 From: NOBUGGERS Date: Fri, 16 Sep 2022 15:37:38 +0800 Subject: [PATCH] recorderProfile delete Signed-off-by: NOBUGGERS Signed-off-by: NOBUGGERS --- multimedia/BUILD.gn | 1 - .../recorderProfile/BUILD.gn | 36 -- .../recorderProfile/Test.json | 20 - .../signature/openharmony_sx.p7b | Bin 3457 -> 0 bytes .../recorderProfile/src/main/config.json | 124 ------ .../src/main/js/MainAbility/app.js | 23 -- .../src/main/js/MainAbility/i18n/en-US.json | 6 - .../src/main/js/MainAbility/i18n/zh-CN.json | 6 - .../main/js/MainAbility/pages/index/index.css | 61 --- .../main/js/MainAbility/pages/index/index.hml | 20 - .../main/js/MainAbility/pages/index/index.js | 29 -- .../src/main/js/TestAbility/app.js | 31 -- .../src/main/js/TestAbility/i18n/en-US.json | 8 - .../src/main/js/TestAbility/i18n/zh-CN.json | 8 - .../main/js/TestAbility/pages/index/index.css | 30 -- .../main/js/TestAbility/pages/index/index.hml | 5 - .../main/js/TestAbility/pages/index/index.js | 26 -- .../js/TestRunner/OpenHarmonyTestRunner.js | 59 --- .../src/main/js/test/List.test.js | 25 -- .../test/ProfileAbnormalTestCallback.test.js | 342 ----------------- .../test/ProfileAbnormalTestPromise.test.js | 355 ----------------- .../src/main/js/test/ProfileTestBase.js | 330 ---------------- .../main/js/test/ProfileTestCallback.test.js | 342 ----------------- .../main/js/test/ProfileTestPromise.test.js | 363 ------------------ .../main/resources/base/element/string.json | 28 -- .../src/main/resources/base/media/icon.png | Bin 6790 -> 0 bytes 26 files changed, 2278 deletions(-) delete mode 100644 multimedia/media/media_js_standard/recorderProfile/BUILD.gn delete mode 100644 multimedia/media/media_js_standard/recorderProfile/Test.json delete mode 100644 multimedia/media/media_js_standard/recorderProfile/signature/openharmony_sx.p7b delete mode 100644 multimedia/media/media_js_standard/recorderProfile/src/main/config.json delete mode 100644 multimedia/media/media_js_standard/recorderProfile/src/main/js/MainAbility/app.js delete mode 100644 multimedia/media/media_js_standard/recorderProfile/src/main/js/MainAbility/i18n/en-US.json delete mode 100644 multimedia/media/media_js_standard/recorderProfile/src/main/js/MainAbility/i18n/zh-CN.json delete mode 100644 multimedia/media/media_js_standard/recorderProfile/src/main/js/MainAbility/pages/index/index.css delete mode 100644 multimedia/media/media_js_standard/recorderProfile/src/main/js/MainAbility/pages/index/index.hml delete mode 100644 multimedia/media/media_js_standard/recorderProfile/src/main/js/MainAbility/pages/index/index.js delete mode 100644 multimedia/media/media_js_standard/recorderProfile/src/main/js/TestAbility/app.js delete mode 100644 multimedia/media/media_js_standard/recorderProfile/src/main/js/TestAbility/i18n/en-US.json delete mode 100644 multimedia/media/media_js_standard/recorderProfile/src/main/js/TestAbility/i18n/zh-CN.json delete mode 100644 multimedia/media/media_js_standard/recorderProfile/src/main/js/TestAbility/pages/index/index.css delete mode 100644 multimedia/media/media_js_standard/recorderProfile/src/main/js/TestAbility/pages/index/index.hml delete mode 100644 multimedia/media/media_js_standard/recorderProfile/src/main/js/TestAbility/pages/index/index.js delete mode 100644 multimedia/media/media_js_standard/recorderProfile/src/main/js/TestRunner/OpenHarmonyTestRunner.js delete mode 100644 multimedia/media/media_js_standard/recorderProfile/src/main/js/test/List.test.js delete mode 100644 multimedia/media/media_js_standard/recorderProfile/src/main/js/test/ProfileAbnormalTestCallback.test.js delete mode 100644 multimedia/media/media_js_standard/recorderProfile/src/main/js/test/ProfileAbnormalTestPromise.test.js delete mode 100644 multimedia/media/media_js_standard/recorderProfile/src/main/js/test/ProfileTestBase.js delete mode 100644 multimedia/media/media_js_standard/recorderProfile/src/main/js/test/ProfileTestCallback.test.js delete mode 100644 multimedia/media/media_js_standard/recorderProfile/src/main/js/test/ProfileTestPromise.test.js delete mode 100644 multimedia/media/media_js_standard/recorderProfile/src/main/resources/base/element/string.json delete mode 100644 multimedia/media/media_js_standard/recorderProfile/src/main/resources/base/media/icon.png diff --git a/multimedia/BUILD.gn b/multimedia/BUILD.gn index 85d609da6..495fd62a5 100644 --- a/multimedia/BUILD.gn +++ b/multimedia/BUILD.gn @@ -43,7 +43,6 @@ group("multimedia") { "media/media_js_standard/audioPlayer:audio_player_js_hap", "media/media_js_standard/audioRecorder:audio_recorder_js_hap", "media/media_js_standard/recorderFormat:recorder_format_js_hap", - "media/media_js_standard/recorderProfile:recorder_profile_js_hap", "media/media_js_standard/videoPlayer:video_player_js_hap", "medialibrary/mediaLibrary_album:mediaLibrary_album_hap", "medialibrary/mediaLibrary_base:mediaLibrary_base_hap", diff --git a/multimedia/media/media_js_standard/recorderProfile/BUILD.gn b/multimedia/media/media_js_standard/recorderProfile/BUILD.gn deleted file mode 100644 index e72aae52e..000000000 --- a/multimedia/media/media_js_standard/recorderProfile/BUILD.gn +++ /dev/null @@ -1,36 +0,0 @@ -# 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("//test/xts/tools/build/suite.gni") - -ohos_js_hap_suite("recorder_profile_js_hap") { - hap_profile = "./src/main/config.json" - js2abc = true - deps = [ - ":profile_js_assets", - ":profile_resources", - ] - certificate_profile = "./signature/openharmony_sx.p7b" - hap_name = "ActsRecorderProfileJsTest" - subsystem_name = "multimedia" - part_name = "multimedia_player_framework" -} -ohos_js_assets("profile_js_assets") { - js2abc = true - hap_profile = "./src/main/config.json" - source_dir = "./src/main/js" -} -ohos_resources("profile_resources") { - sources = [ "./src/main/resources" ] - hap_profile = "./src/main/config.json" -} diff --git a/multimedia/media/media_js_standard/recorderProfile/Test.json b/multimedia/media/media_js_standard/recorderProfile/Test.json deleted file mode 100644 index d36404479..000000000 --- a/multimedia/media/media_js_standard/recorderProfile/Test.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "description": "Configuration for profile Tests", - "driver": { - "type": "OHJSUnitTest", - "test-timeout": "2000000", - "shell-timeout": "2000000", - "testcase-timeout": 60000, - "bundle-name": "ohos.acts.multimedia.recorder.profile", - "package-name": "ohos.acts.multimedia.recorder.profile" - }, - "kits": [ - { - "test-file-name": [ - "ActsRecorderProfileJsTest.hap" - ], - "type": "AppInstallKit", - "cleanup-apps": true - } - ] -} \ No newline at end of file diff --git a/multimedia/media/media_js_standard/recorderProfile/signature/openharmony_sx.p7b b/multimedia/media/media_js_standard/recorderProfile/signature/openharmony_sx.p7b deleted file mode 100644 index 02772ce36b607a459e0e124b0240997e7e0c5523..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3457 zcmcgvYj6|S6}BF>V~ntg0fP(J2!jbA`>rh6l2a0PrPa$`$tz2?WlYUVTD>go%F@a! zi$bVq+yDVeGX*z1VlWtJcyxfoxHBOkO?V^?3<)Kf6q6F-X(1GvLJ|svcGq^nX5dFB zGwhGuIp>~x@3-fC=eu)3QnDm1V|Kft{d^v{ZS_3cg7fg zzo7^^+T^Dg(iGQzpb zRBA^3NYBTDL8rX&ocpE9qXw+Z{jRtm-UYIo^u-AwZ7EMV)3uB1a+u~~u zSgLVc3$u0@(_?W>0yZIDb1ecpY;d#L!mVJ%S=8&$*5Y_2$}-h1eQm5puWNJGsbi!K zZNLzh9)|3wCXV5@QY7eX_W4{PsMSd|du#QzzDCMvLj#xw9f*SC81ZlvUXQR&eK6pt zw}zc^g%<}XYw)?uSO8_Q0Nlo5uo>eP8y2tQyk>2491CFa`@R4|V|bL+-~$--C~MN% z0;nBBjDxs*SXCqS(4KL<4Xz*j&!`PW)oeqZ(&(r+F;2NsY1CPRjye#p)WV^`7|hm4 z8NfqPsE&2%<6(zf2M8_~Mx80>3Y zO>KG1gX%nlk+CLV%Rn@)LST;yMPN*WC}7sWXVeNT2;x9>)l57R^936zmleUICO7M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K^amUulvMp!d zr^VC#jv{8G5EQ;%_zQaBp6ThEjd`1P+*q+9`^K4$X)A8Mu;|d7{99K}UR-lqX76$VVuUz7k|X~I z#~vweBTg8RF9nc75IX-8)$-pk*I)SEtqNb$?&D=!E*;4}elF+I5>K|J-(de@#j;7h z9^*gHUg;VC@s)F9Ik7tS6wU6gh-|g?%#_`Eqkhl(>(^($8+^8JLUQummoAuBNBY+g zm%lux%+E`Mgmr%Fw+q0(pXAS|xZ!1Z)rcJ_?2u50A^LSccF jzWuchKE1Ffd{jSw!I<7aI~v$8i>SkUtFd{Rp@#ngZh=_^ diff --git a/multimedia/media/media_js_standard/recorderProfile/src/main/config.json b/multimedia/media/media_js_standard/recorderProfile/src/main/config.json deleted file mode 100644 index 0c8c8f09d..000000000 --- a/multimedia/media/media_js_standard/recorderProfile/src/main/config.json +++ /dev/null @@ -1,124 +0,0 @@ -{ - "app": { - "apiVersion": { - "compatible": 6, - "releaseType": "Beta1", - "target": 7 - }, - "vendor": "acts", - "bundleName": "ohos.acts.multimedia.recorder.profile", - "version": { - "code": 1000000, - "name": "1.0.0" - } - }, - "deviceConfig": { - "default": { - "debug": true - } - }, - "module": { - "abilities": [ - { - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "action.system.home" - ] - } - ], - "orientation": "unspecified", - "formsEnabled": false, - "name": ".MainAbility", - "srcLanguage": "js", - "srcPath": "MainAbility", - "icon": "$media:icon", - "description": "$string:MainAbility_desc", - "label": "$string:MainAbility_label", - "type": "page", - "visible": true, - "launchType": "standard" - }, - { - "orientation": "unspecified", - "formsEnabled": false, - "name": ".TestAbility", - "srcLanguage": "js", - "srcPath": "TestAbility", - "icon": "$media:icon", - "description": "$string:TestAbility_desc", - "label": "$string:TestAbility_label", - "type": "page", - "visible": true, - "launchType": "standard" - } - ], - "deviceType": [ - "phone", - "tablet", - "tv", - "wearable" - ], - "reqPermissions": [ - { - "name": "ohos.permission.GRANT_SENSITIVE_PERMISSIONS", - "reason": "use ohos.permission.GRANT_SENSITIVE_PERMISSIONS" - }, - { - "name": "ohos.permission.REVOKE_SENSITIVE_PERMISSIONS", - "reason": "use ohos.permission.REVOKE_SENSITIVE_PERMISSIONS" - }, - { - "name": "ohos.permission.MEDIA_LOCATION", - "reason": "use ohos.permission.MEDIA_LOCATION" - }, - { - "name": "ohos.permission.READ_MEDIA", - "reason": "use ohos.permission.READ_MEDIA" - }, - { - "name": "ohos.permission.WRITE_MEDIA", - "reason": "use ohos.permission.WRITE_MEDIA" - } - ], - "mainAbility": ".MainAbility", - "distro": { - "moduleType": "entry", - "installationFree": false, - "deliveryWithInstall": true, - "moduleName": "entry" - }, - "package": "ohos.acts.multimedia.recorder.profile", - "name": ".entry", - "js": [ - { - "pages": [ - "pages/index/index" - ], - "name": "default", - "window": { - "designWidth": 720, - "autoDesignWidth": true - } - }, - { - "pages": [ - "pages/index/index" - ], - "name": ".TestAbility", - "window": { - "designWidth": 720, - "autoDesignWidth": false - } - } - ], - "testRunner": { - "name": "OpenHarmonyTestRunner", - "srcPath": "TestRunner" - }, - "srcPath": "" - } -} \ No newline at end of file diff --git a/multimedia/media/media_js_standard/recorderProfile/src/main/js/MainAbility/app.js b/multimedia/media/media_js_standard/recorderProfile/src/main/js/MainAbility/app.js deleted file mode 100644 index 8fe0b77dc..000000000 --- a/multimedia/media/media_js_standard/recorderProfile/src/main/js/MainAbility/app.js +++ /dev/null @@ -1,23 +0,0 @@ -/* - * 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('AceApplication onCreate'); - }, - onDestroy() { - console.info('AceApplication onDestroy'); - } -}; diff --git a/multimedia/media/media_js_standard/recorderProfile/src/main/js/MainAbility/i18n/en-US.json b/multimedia/media/media_js_standard/recorderProfile/src/main/js/MainAbility/i18n/en-US.json deleted file mode 100644 index a4c13dcbd..000000000 --- a/multimedia/media/media_js_standard/recorderProfile/src/main/js/MainAbility/i18n/en-US.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "Hello", - "world": "World" - } -} \ No newline at end of file diff --git a/multimedia/media/media_js_standard/recorderProfile/src/main/js/MainAbility/i18n/zh-CN.json b/multimedia/media/media_js_standard/recorderProfile/src/main/js/MainAbility/i18n/zh-CN.json deleted file mode 100644 index b1c02368f..000000000 --- a/multimedia/media/media_js_standard/recorderProfile/src/main/js/MainAbility/i18n/zh-CN.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "您好", - "world": "世界" - } -} \ No newline at end of file diff --git a/multimedia/media/media_js_standard/recorderProfile/src/main/js/MainAbility/pages/index/index.css b/multimedia/media/media_js_standard/recorderProfile/src/main/js/MainAbility/pages/index/index.css deleted file mode 100644 index a80eb6e2b..000000000 --- a/multimedia/media/media_js_standard/recorderProfile/src/main/js/MainAbility/pages/index/index.css +++ /dev/null @@ -1,61 +0,0 @@ -/* - * 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. - */ - -.container { - flex-direction: column; - justify-content: center; - align-items: center; - width: 100%; - height: 100%; -} - -.title { - font-size: 40px; - color: #000000; - opacity: 0.9; -} - -@media screen and (device-type: tablet) and (orientation: landscape) { - .title { - font-size: 100px; - } -} - -@media screen and (device-type: wearable) { - .title { - font-size: 28px; - color: #FFFFFF; - } -} - -@media screen and (device-type: tv) { - .container { - background-image: url("/common/images/Wallpaper.png"); - background-size: cover; - background-repeat: no-repeat; - background-position: center; - } - - .title { - font-size: 100px; - color: #FFFFFF; - } -} - -@media screen and (device-type: phone) and (orientation: landscape) { - .title { - font-size: 60px; - } -} diff --git a/multimedia/media/media_js_standard/recorderProfile/src/main/js/MainAbility/pages/index/index.hml b/multimedia/media/media_js_standard/recorderProfile/src/main/js/MainAbility/pages/index/index.hml deleted file mode 100644 index 992653a1e..000000000 --- a/multimedia/media/media_js_standard/recorderProfile/src/main/js/MainAbility/pages/index/index.hml +++ /dev/null @@ -1,20 +0,0 @@ - - -
- - {{ $t('strings.hello') }} {{ title }} - -
diff --git a/multimedia/media/media_js_standard/recorderProfile/src/main/js/MainAbility/pages/index/index.js b/multimedia/media/media_js_standard/recorderProfile/src/main/js/MainAbility/pages/index/index.js deleted file mode 100644 index 9f776a29e..000000000 --- a/multimedia/media/media_js_standard/recorderProfile/src/main/js/MainAbility/pages/index/index.js +++ /dev/null @@ -1,29 +0,0 @@ -/* - * 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 { - data: { - title: "" - }, - onInit() { - this.title = this.$t('strings.world'); - }, - onShow() { - console.info('onShow finish') - }, - onReady() { - }, -} \ No newline at end of file diff --git a/multimedia/media/media_js_standard/recorderProfile/src/main/js/TestAbility/app.js b/multimedia/media/media_js_standard/recorderProfile/src/main/js/TestAbility/app.js deleted file mode 100644 index cdc31f3dc..000000000 --- a/multimedia/media/media_js_standard/recorderProfile/src/main/js/TestAbility/app.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - * 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 AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry' -import { Hypium } from '@ohos/hypium' -import testsuite from '../test/List.test' - -export default { - onCreate() { - console.info('TestApplication onCreate') - var abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - var abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() - console.info('start run testcase!!!') - Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite) - }, - onDestroy() { - console.info("TestApplication onDestroy"); - } -}; diff --git a/multimedia/media/media_js_standard/recorderProfile/src/main/js/TestAbility/i18n/en-US.json b/multimedia/media/media_js_standard/recorderProfile/src/main/js/TestAbility/i18n/en-US.json deleted file mode 100644 index 3cb24b374..000000000 --- a/multimedia/media/media_js_standard/recorderProfile/src/main/js/TestAbility/i18n/en-US.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "strings": { - "hello": "Hello", - "world": "World" - }, - "Files": { - } -} \ No newline at end of file diff --git a/multimedia/media/media_js_standard/recorderProfile/src/main/js/TestAbility/i18n/zh-CN.json b/multimedia/media/media_js_standard/recorderProfile/src/main/js/TestAbility/i18n/zh-CN.json deleted file mode 100644 index c804e32c0..000000000 --- a/multimedia/media/media_js_standard/recorderProfile/src/main/js/TestAbility/i18n/zh-CN.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "strings": { - "hello": "您好", - "world": "世界" - }, - "Files": { - } -} \ No newline at end of file diff --git a/multimedia/media/media_js_standard/recorderProfile/src/main/js/TestAbility/pages/index/index.css b/multimedia/media/media_js_standard/recorderProfile/src/main/js/TestAbility/pages/index/index.css deleted file mode 100644 index b1bcd4338..000000000 --- a/multimedia/media/media_js_standard/recorderProfile/src/main/js/TestAbility/pages/index/index.css +++ /dev/null @@ -1,30 +0,0 @@ -.container { - display: flex; - flex-direction: column; - justify-content: center; - align-items: center; - left: 0px; - top: 0px; - width: 100%; - height: 100%; -} - -.title { - font-size: 60px; - text-align: center; - width: 100%; - height: 40%; - margin: 10px; -} - -@media screen and (device-type: phone) and (orientation: landscape) { - .title { - font-size: 60px; - } -} - -@media screen and (device-type: tablet) and (orientation: landscape) { - .title { - font-size: 100px; - } -} \ No newline at end of file diff --git a/multimedia/media/media_js_standard/recorderProfile/src/main/js/TestAbility/pages/index/index.hml b/multimedia/media/media_js_standard/recorderProfile/src/main/js/TestAbility/pages/index/index.hml deleted file mode 100644 index f629c71a9..000000000 --- a/multimedia/media/media_js_standard/recorderProfile/src/main/js/TestAbility/pages/index/index.hml +++ /dev/null @@ -1,5 +0,0 @@ -
- - {{ $t('strings.hello') }} {{ title }} - -
diff --git a/multimedia/media/media_js_standard/recorderProfile/src/main/js/TestAbility/pages/index/index.js b/multimedia/media/media_js_standard/recorderProfile/src/main/js/TestAbility/pages/index/index.js deleted file mode 100644 index 88b083a7f..000000000 --- a/multimedia/media/media_js_standard/recorderProfile/src/main/js/TestAbility/pages/index/index.js +++ /dev/null @@ -1,26 +0,0 @@ -/* - * 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 { - data: { - title: "" - }, - onInit() { - this.title = this.$t('strings.world'); - } -} - - - diff --git a/multimedia/media/media_js_standard/recorderProfile/src/main/js/TestRunner/OpenHarmonyTestRunner.js b/multimedia/media/media_js_standard/recorderProfile/src/main/js/TestRunner/OpenHarmonyTestRunner.js deleted file mode 100644 index c5fa8620c..000000000 --- a/multimedia/media/media_js_standard/recorderProfile/src/main/js/TestRunner/OpenHarmonyTestRunner.js +++ /dev/null @@ -1,59 +0,0 @@ -/* - * 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 AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry' - -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', '-s dryRun' - ]) - let targetParams = ''; - for (const key in parameters) { - if (keySet.has(key)) { - targetParams += ' ' + key + ' ' + parameters[key] - } - } - return targetParams.trim() -} - - export default { - onPrepare() { - console.info('OpenHarmonyTestRunner OnPrepare') - }, - onRun() { - console.log('OpenHarmonyTestRunner onRun run') - var abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() - var abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - - var testAbilityName = abilityDelegatorArguments.parameters['-p'] + '.TestAbility' - - var cmd = 'aa start -d 0 -a ' + testAbilityName + ' -b ' + abilityDelegatorArguments.bundleName - cmd += ' ' + translateParamsToString(abilityDelegatorArguments.parameters) - var debug = abilityDelegatorArguments.parameters["-D"] - console.info('debug value : '+debug) - if (debug == 'true') - { - cmd += ' -D' - } - console.info('cmd : '+cmd) - abilityDelegator.executeShellCommand(cmd, (err, data) => { - console.info('executeShellCommand : err : ' + JSON.stringify(err)); - console.info('executeShellCommand : data : ' + data.stdResult); - console.info('executeShellCommand : data : ' + data.exitCode); - }) - } -}; diff --git a/multimedia/media/media_js_standard/recorderProfile/src/main/js/test/List.test.js b/multimedia/media/media_js_standard/recorderProfile/src/main/js/test/List.test.js deleted file mode 100644 index a49b12678..000000000 --- a/multimedia/media/media_js_standard/recorderProfile/src/main/js/test/List.test.js +++ /dev/null @@ -1,25 +0,0 @@ -/* - * 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 ProfileAbnormalTestCallback from './ProfileAbnormalTestCallback.test.js' -import ProfileAbnormalTestPromise from './ProfileAbnormalTestPromise.test.js' -import ProfileTestCallback from './ProfileTestCallback.test.js' -import ProfileTestPromise from './ProfileTestPromise.test.js' -export default function testsuite() { -ProfileAbnormalTestCallback() -ProfileAbnormalTestPromise() -ProfileTestCallback() -ProfileTestPromise() -} diff --git a/multimedia/media/media_js_standard/recorderProfile/src/main/js/test/ProfileAbnormalTestCallback.test.js b/multimedia/media/media_js_standard/recorderProfile/src/main/js/test/ProfileAbnormalTestCallback.test.js deleted file mode 100644 index da4e87302..000000000 --- a/multimedia/media/media_js_standard/recorderProfile/src/main/js/test/ProfileAbnormalTestCallback.test.js +++ /dev/null @@ -1,342 +0,0 @@ -/* - * 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 media from '@ohos.multimedia.media' -import * as base from './ProfileTestBase.js'; -import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' - -export default function ProfileAbnormalTestCallback() { -describe('ProfileAbnormalTestCallback', function () { - beforeAll(function () { - console.info('beforeAll case'); - }) - - beforeEach(async function () { - console.info('beforeEach case'); - }) - - afterEach(function () { - console.info('afterEach case'); - }) - - afterAll(function () { - console.info('afterAll case'); - }) - - async function callbackAbnormalGetVideoProfile(sourceId, qualityLevel, done){ - media.getMediaCapability((err, mediaCaps) => { - expect(err).assertUndefined(); - console.info('getMediaCapability success'); - if (typeof (mediaCaps) != 'undefined') { - mediaCaps.getVideoRecorderProfile(sourceId, qualityLevel, (err, videoCapsArray) => { - expect(err).assertUndefined(); - base.checkVideoCapsArray(videoCapsArray); - console.info('getVideoRecorderProfile success'); - done(); - }) - } else { - console.info('mediaCaps is not defined'); - expect().assertFail(); - done(); - } - }) - } - - async function callbackAbnormalAudioRecorderConfigSupported(audioProfile, done) { - media.getMediaCapability((err, mediaCaps) => { - expect(err).assertUndefined(); - console.info('getMediaCapability success'); - if (typeof (mediaCaps) != 'undefined') { - mediaCaps.isAudioRecorderConfigSupported(audioProfile, (err, ean) => { - expect(err).assertUndefined(); - expect(ean).assertEqual(false); - console.info('isAudioRecorderConfigSupported: success'); - done(); - }) - } else { - console.info('mediaCaps is undefined'); - expect().assertFail(); - done(); - } - }) - } - - async function callbackAbnormalHasVideoProfile(sourceId, qualityLevel, done) { - media.getMediaCapability((err, mediaCaps) => { - expect(err).assertUndefined(); - console.info('getMediaCapability success'); - if (typeof (mediaCaps) != 'undefined') { - mediaCaps.hasVideoRecorderProfile(sourceId, qualityLevel, (err, ean) => { - expect(err).assertUndefined(); - expect(ean).assertEqual(false); - console.info('hasVideoRecorderProfile success'); - done(); - }) - } else { - console.info('mediaCaps is undefined'); - expect().assertFail(); - done(); - } - }) - } - - /* * - * @tc.number : SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_CALLBACK_0100 - * @tc.name : test isAudioRecorderConfigSupported false - * @tc.desc : 5 args all set wrong - * @tc.size : MediumTest - * @tc.type : Function test - * @tc.level : Level2 - */ - it('SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_CALLBACK_0100', 0, async function (done) { - console.info("test getAudioRecorderCaps"); - callbackAbnormalAudioRecorderConfigSupported(base.audioRecorderAbnormalAll, done); - }) - - /* * - * @tc.number : SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_CALLBACK_0200 - * @tc.name : test isAudioRecorderConfigSupported false - * @tc.desc : FormatType is wrong - * @tc.size : MediumTest - * @tc.type : Function test - * @tc.level : Level2 - */ - it('SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_CALLBACK_0200', 0, async function (done) { - console.info("test getAudioRecorderCaps"); - callbackAbnormalAudioRecorderConfigSupported(base.audioRecorderAbnormalFormatType, done); - }) - - /* * - * @tc.number : SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_CALLBACK_0300 - * @tc.name : test isAudioRecorderConfigSupported fasle - * @tc.desc : CodecMimeType is wrong - * @tc.size : MediumTest - * @tc.type : Function test - * @tc.level : Level2 - */ - it('SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_CALLBACK_0300', 0, async function (done) { - console.info("test getAudioRecorderCaps"); - callbackAbnormalAudioRecorderConfigSupported(base.audioRecorderAbnormalCodecMimeType, done); - }) - - /* * - * @tc.number : SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_CALLBACK_0400 - * @tc.name : test isAudioRecorderConfigSupported false - * @tc.desc : bitrate is wrong - * @tc.size : MediumTest - * @tc.type : Function test - * @tc.level : Level2 - */ - it('SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_CALLBACK_0400', 0, async function (done) { - console.info("test getAudioRecorderCaps"); - callbackAbnormalAudioRecorderConfigSupported(base.audioRecorderAbnormalBitrate, done); - }) - - /* * - * @tc.number : SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_CALLBACK_0500 - * @tc.name : test isAudioRecorderConfigSupported false - * @tc.desc : sampleRate is wrong - * @tc.size : MediumTest - * @tc.type : Function test - * @tc.level : Level2 - */ - it('SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_CALLBACK_0500', 0, async function (done) { - console.info("test getAudioRecorderCaps"); - callbackAbnormalAudioRecorderConfigSupported(base.audioRecorderAbnormalSampleRate, done); - }) - - /* * - * @tc.number : SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_CALLBACK_0600 - * @tc.name : test isAudioRecorderConfigSupported false - * @tc.desc : channel is wrong - * @tc.size : MediumTest - * @tc.type : Function test - * @tc.level : Level2 - */ - it('SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_CALLBACK_0600', 0, async function (done) { - console.info("test getAudioRecorderCaps"); - callbackAbnormalAudioRecorderConfigSupported(base.audioRecorderAbnormalSampleChannel, done); - }) - - /* * - * @tc.number : SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_CALLBACK_0700 - * @tc.name : test hasVideoRecorderProfile - * @tc.desc : sourceId 1 qualityLevel 0 - * @tc.size : MediumTest - * @tc.type : Function test - * @tc.level : Level2 - */ - it('SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_CALLBACK_0700', 0, async function (done) { - console.info('test hasVideoRecorderProfile'); - callbackAbnormalHasVideoProfile(1, media.VideoRecorderQualityLevel.RECORDER_QUALITY_LOW, done); - }) - - /* * - * @tc.number : SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_CALLBACK_0800 - * @tc.name : test hasVideoRecorderProfile sourceId -1 - * @tc.desc : sourceId -1 qualityLevel 0 - * @tc.size : MediumTest - * @tc.type : Abnormal test - * @tc.level : Level2 - */ - it('SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_CALLBACK_0800', 0, async function (done) { - console.info("test hasVideoRecorderProfile"); - callbackAbnormalHasVideoProfile(-1, media.VideoRecorderQualityLevel.RECORDER_QUALITY_LOW, done); - }) - - /* * - * @tc.number : SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_CALLBACK_0900 - * @tc.name : test hasVideoRecorderProfile qualityLevel -1 - * @tc.desc : sourceId 0 qualityLevel -1 - * @tc.size : MediumTest - * @tc.type : Abnormal test - * @tc.level : Level2 - */ - it('SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_CALLBACK_0900', 0, async function (done) { - console.info("test hasVideoRecorderProfile"); - callbackAbnormalHasVideoProfile(0, -1, done); - }) - - /* * - * @tc.number : SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_CALLBACK_1000 - * @tc.name : test hasVideoRecorderProfile sourceId 65536 - * @tc.desc : sourceId 65535 qualityLevel 0 - * @tc.size : MediumTest - * @tc.type : Abnormal test - * @tc.level : Level2 - */ - it('SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_CALLBACK_1000', 0, async function (done) { - console.info("test hasVideoRecorderProfile"); - callbackAbnormalHasVideoProfile(65535, media.VideoRecorderQualityLevel.RECORDER_QUALITY_LOW, done); - }) - - /* * - * @tc.number : SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_CALLBACK_1100 - * @tc.name : test hasVideoRecorderProfile sourceId 65536 - * @tc.desc : sourceId 65536 qualityLevel 0 - * @tc.size : MediumTest - * @tc.type : Abnormal test - * @tc.level : Level2 - */ - it('SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_CALLBACK_1100', 0, async function (done) { - console.info("test hasVideoRecorderProfile"); - callbackAbnormalHasVideoProfile(65536, media.VideoRecorderQualityLevel.RECORDER_QUALITY_LOW, done); - }) - - /* * - * @tc.number : SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_CALLBACK_1200 - * @tc.name : test hasVideoRecorderProfile qualityLevel 65536 - * @tc.desc : sourceId 0 qualityLevel 65535 - * @tc.size : MediumTest - * @tc.type : Abnormal test - * @tc.level : Level2 - */ - it('SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_CALLBACK_1200', 0, async function (done) { - console.info("test hasVideoRecorderProfile"); - callbackAbnormalHasVideoProfile(0, 65535, done); - }) - - /* * - * @tc.number : SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_CALLBACK_1300 - * @tc.name : test hasVideoRecorderProfile qualityLevel 65536 - * @tc.desc : sourceId 0 qualityLevel 65536 - * @tc.size : MediumTest - * @tc.type : Abnormal test - * @tc.level : Level2 - */ - it('SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_CALLBACK_1300', 0, async function (done) { - console.info("test hasVideoRecorderProfile"); - callbackAbnormalHasVideoProfile(0, 65536, done); - }) - - /* * - * @tc.number : SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_CALLBACK_1400 - * @tc.name : test getVideoRecorderProfile sourceId -1 - * @tc.desc : sourceId -1 qualityLevel 0 - * @tc.size : MediumTest - * @tc.type : Abnormal test - * @tc.level : Level2 - */ - it('SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_CALLBACK_1400', 0, async function (done) { - console.info("test getVideoRecorderProfile"); - callbackAbnormalGetVideoProfile(-1, media.VideoRecorderQualityLevel.RECORDER_QUALITY_LOW, done); - }) - - /* * - * @tc.number : SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_CALLBACK_1500 - * @tc.name : test getVideoRecorderProfile qualityLevel -1 - * @tc.desc : sourceId 0 qualityLevel -1 - * @tc.size : MediumTest - * @tc.type : Abnormal test - * @tc.level : Level2 - */ - it('SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_CALLBACK_1500', 0, async function (done) { - console.info("test getVideoRecorderProfile"); - callbackAbnormalGetVideoProfile(0, -1, done); - }) - - /* * - * @tc.number : SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_CALLBACK_1600 - * @tc.name : test getVideoRecorderProfile sourceId 65535 - * @tc.desc : sourceId 65535 qualityLevel 0 - * @tc.size : MediumTest - * @tc.type : Abnormal test - * @tc.level : Level2 - */ - it('SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_CALLBACK_1600', 0, async function (done) { - console.info("test getVideoRecorderProfile"); - callbackAbnormalGetVideoProfile(65535, media.VideoRecorderQualityLevel.RECORDER_QUALITY_LOW, done); - }) - - /* * - * @tc.number : SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_CALLBACK_1700 - * @tc.name : test getVideoRecorderProfile sourceId 65536 - * @tc.desc : sourceId 65536 qualityLevel 0 - * @tc.size : MediumTest - * @tc.type : Abnormal test - * @tc.level : Level2 - */ - it('SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_CALLBACK_1700', 0, async function (done) { - console.info("test getVideoRecorderProfile"); - callbackAbnormalGetVideoProfile(65536, media.VideoRecorderQualityLevel.RECORDER_QUALITY_LOW, done); - }) - - - /* * - * @tc.number : SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_CALLBACK_1800 - * @tc.name : test getVideoRecorderProfile qualityLevel 65535 - * @tc.desc : sourceId 0 qualityLevel 65535 - * @tc.size : MediumTest - * @tc.type : Abnormal test - * @tc.level : Level2 - */ - it('SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_CALLBACK_1800', 0, async function (done) { - console.info("test getVideoRecorderProfile"); - callbackAbnormalGetVideoProfile(0, 65535, done); - }) - - /* * - * @tc.number : SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_CALLBACK_1900 - * @tc.name : test getVideoRecorderProfile qualityLevel 65536 - * @tc.desc : sourceId 0 qualityLevel 65536 - * @tc.size : MediumTest - * @tc.type : Abnormal test - * @tc.level : Level2 - */ - it('SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_CALLBACK_1900', 0, async function (done) { - console.info("test getVideoRecorderProfile"); - callbackAbnormalGetVideoProfile(0, 65536, done); - }) -})} diff --git a/multimedia/media/media_js_standard/recorderProfile/src/main/js/test/ProfileAbnormalTestPromise.test.js b/multimedia/media/media_js_standard/recorderProfile/src/main/js/test/ProfileAbnormalTestPromise.test.js deleted file mode 100644 index 97ece99da..000000000 --- a/multimedia/media/media_js_standard/recorderProfile/src/main/js/test/ProfileAbnormalTestPromise.test.js +++ /dev/null @@ -1,355 +0,0 @@ -/* - * 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 media from '@ohos.multimedia.media' -import * as base from './ProfileTestBase.js'; -import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' - -export default function ProfileAbnormalTestPromise() { -describe('ProfileAbnormalTestPromise', function () { - beforeAll(function () { - console.info('beforeAll case'); - }) - - beforeEach(async function () { - console.info('beforeEach case'); - }) - - afterEach(function () { - console.info('afterEach case'); - }) - - afterAll(function () { - console.info('afterAll case'); - }) - - async function promiseAbnormalGetVideoProfile(sourceId, qualityLevel, done) { - media.getMediaCapability().then(async (mediaCaps) => { - console.info('getMediaCapability success'); - if (typeof (mediaCaps) != 'undefined') { - mediaCaps.getVideoRecorderProfile(sourceId, qualityLevel).then(async (videoCapsArray) => { - base.checkVideoCapsArray(videoCapsArray); - console.info('getVideoRecorderProfile success'); - done(); - }, err => { - expect(err).assertUndefined(); - done(); - }) - } else { - console.info('mediaCaps is undefined'); - expect().assertFail(); - done(); - } - }, err => { - expect(err).assertUndefined(); - done(); - }) - } - - async function promiseAbnormalAudioRecoderConfigSupported(audioProfile, done) { - media.getMediaCapability().then(async (mediaCaps) => { - if (typeof (mediaCaps) != 'undefined') { - mediaCaps.isAudioRecoderConfigSupported(audioProfile).then(async (ean) => { - console.info('isAudioRecoderConfigSupported: success' + ean); - expect(ean).assertEqual(false); - console.info('isAudioRecoderConfigSupported: success'); - done(); - }, err => { - expect(err).assertUndefined(); - done(); - }) - } else { - console.info('mediaCaps is undefined'); - expect().assertFail(); - done(); - } - }, err => { - expect(err).assertUndefined(); - done(); - }) - } - - async function promiseAbnormalHasVideoProfile(sourceId, qualityLevel, done) { - media.getMediaCapability().then(async (mediaCaps) => { - console.info('getMediaCapability success'); - if (typeof (mediaCaps) != 'undefined') { - mediaCaps.hasVideoRecorderProfile(sourceId, qualityLevel).then(async (ean) => { - expect(ean).assertEqual(false); - console.info('hasVideoRecorderProfile success'); - done(); - }, err => { - expect(err).assertUndefined(); - done(); - }) - } else { - console.info('mediaCaps is undefined'); - expect().assertFail(); - done(); - } - }, err => { - expect(err).assertUndefined(); - done(); - }) - } - - - /* * - * @tc.number : SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_PROMISE_0100 - * @tc.name : test isAudioRecoderConfigSupported false - * @tc.desc : 5 args all set wrong - * @tc.size : MediumTest - * @tc.type : Function test - * @tc.level : Level2 - */ - it('SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_PROMISE_0100', 0, async function (done) { - console.info("test getAudioRecorderCaps"); - promiseAbnormalAudioRecoderConfigSupported(base.audioRecorderAbnormalAll, done); - }) - - /* * - * @tc.number : SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_PROMISE_0200 - * @tc.name : test isAudioRecoderConfigSupported false - * @tc.desc : FormatType is wrong - * @tc.size : MediumTest - * @tc.type : Function test - * @tc.level : Level2 - */ - it('SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_PROMISE_0200', 0, async function (done) { - console.info("test getAudioRecorderCaps"); - promiseAbnormalAudioRecoderConfigSupported(base.audioRecorderAbnormalFormatType, done); - }) - - /* * - * @tc.number : SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_PROMISE_0300 - * @tc.name : test isAudioRecoderConfigSupported - * @tc.desc : CodecMimeType is wrong - * @tc.size : MediumTest - * @tc.type : Function test - * @tc.level : Level2 - */ - it('SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_PROMISE_0300', 0, async function (done) { - console.info("test getAudioRecorderCaps"); - promiseAbnormalAudioRecoderConfigSupported(base.audioRecorderAbnormalCodecMimeType, done); - }) - - /* * - * @tc.number : SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_PROMISE_0400 - * @tc.name : test isAudioRecoderConfigSupported - * @tc.desc : bitrate is wrong - * @tc.size : MediumTest - * @tc.type : Function test - * @tc.level : Level2 - */ - it('SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_PROMISE_0400', 0, async function (done) { - console.info("test getAudioRecorderCaps"); - promiseAbnormalAudioRecoderConfigSupported(base.audioRecorderAbnormalBitrate, done); - }) - - /* * - * @tc.number : SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_PROMISE_0500 - * @tc.name : test isAudioRecoderConfigSupported - * @tc.desc : sampleRate is wrong - * @tc.size : MediumTest - * @tc.type : Function test - * @tc.level : Level2 - */ - it('SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_PROMISE_0500', 0, async function (done) { - console.info("test getAudioRecorderCaps"); - promiseAbnormalAudioRecoderConfigSupported(base.audioRecorderAbnormalSampleRate, done); - }) - - /* * - * @tc.number : SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_PROMISE_0600 - * @tc.name : test isAudioRecoderConfigSupported - * @tc.desc : channel is wrong - * @tc.size : MediumTest - * @tc.type : Function test - * @tc.level : Level2 - */ - it('SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_PROMISE_0600', 0, async function (done) { - console.info("test getAudioRecorderCaps"); - promiseAbnormalAudioRecoderConfigSupported(base.audioRecorderAbnormalSampleChannel, done); - }) - - /* * - * @tc.number : SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_PROMISE_0700 - * @tc.name : test hasVideoRecorderProfile - * @tc.desc : sourceId 1 qualityLevel 0 - * @tc.size : MediumTest - * @tc.type : Function test - * @tc.level : Level2 - */ - it('SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_PROMISE_0700', 0, async function (done) { - console.info('test hasVideoRecorderProfile'); - promiseAbnormalHasVideoProfile(1, media.VideoRecorderQualityLevel.RECORDER_QUALITY_LOW, done); - }) - - /* * - * @tc.number : SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_PROMISE_0800 - * @tc.name : test hasVideoRecorderProfile sourceId -1 - * @tc.desc : sourceId -1 qualityLevel 0 - * @tc.size : MediumTest - * @tc.type : Abnormal test - * @tc.level : Level2 - */ - it('SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_PROMISE_0800', 0, async function (done) { - console.info("test hasVideoRecorderProfile"); - promiseAbnormalHasVideoProfile(-1, media.VideoRecorderQualityLevel.RECORDER_QUALITY_LOW, done); - }) - - /* * - * @tc.number : SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_PROMISE_0900 - * @tc.name : test hasVideoRecorderProfile qualityLevel -1 - * @tc.desc : sourceId 0 qualityLevel -1 - * @tc.size : MediumTest - * @tc.type : Abnormal test - * @tc.level : Level2 - */ - it('SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_PROMISE_0900', 0, async function (done) { - console.info("test hasVideoRecorderProfile"); - promiseAbnormalHasVideoProfile(0, -1, done); - }) - - /* * - * @tc.number : SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_PROMISE_1000 - * @tc.name : test hasVideoRecorderProfile sourceId 65536 - * @tc.desc : sourceId 65535 qualityLevel 0 - * @tc.size : MediumTest - * @tc.type : Abnormal test - * @tc.level : Level2 - */ - it('SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_PROMISE_1000', 0, async function (done) { - console.info("test hasVideoRecorderProfile"); - promiseAbnormalHasVideoProfile(65535, media.VideoRecorderQualityLevel.RECORDER_QUALITY_LOW, done); - }) - - /* * - * @tc.number : SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_PROMISE_1100 - * @tc.name : test hasVideoRecorderProfile sourceId 65536 - * @tc.desc : sourceId 65536 qualityLevel 0 - * @tc.size : MediumTest - * @tc.type : Abnormal test - * @tc.level : Level2 - */ - it('SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_PROMISE_1100', 0, async function (done) { - console.info("test hasVideoRecorderProfile"); - promiseAbnormalHasVideoProfile(65536, media.VideoRecorderQualityLevel.RECORDER_QUALITY_LOW, done); - }) - - /* * - * @tc.number : SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_PROMISE_1200 - * @tc.name : test hasVideoRecorderProfile qualityLevel 65536 - * @tc.desc : sourceId 0 qualityLevel 65535 - * @tc.size : MediumTest - * @tc.type : Abnormal test - * @tc.level : Level2 - */ - it('SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_PROMISE_1200', 0, async function (done) { - console.info("test hasVideoRecorderProfile"); - promiseAbnormalHasVideoProfile(0, 65535, done); - }) - - /* * - * @tc.number : SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_PROMISE_1300 - * @tc.name : test hasVideoRecorderProfile qualityLevel 65536 - * @tc.desc : sourceId 0 qualityLevel 65536 - * @tc.size : MediumTest - * @tc.type : Abnormal test - * @tc.level : Level2 - */ - it('SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_PROMISE_1300', 0, async function (done) { - console.info("test hasVideoRecorderProfile"); - promiseAbnormalHasVideoProfile(0, 65536, done); - }) - - /* * - * @tc.number : SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_PROMISE_1400 - * @tc.name : test getVideoRecorderProfile sourceId -1 - * @tc.desc : sourceId -1 qualityLevel 0 - * @tc.size : MediumTest - * @tc.type : Abnormal test - * @tc.level : Level2 - */ - it('SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_PROMISE_1400', 0, async function (done) { - console.info("test getVideoRecorderProfile"); - promiseAbnormalGetVideoProfile(-1, media.VideoRecorderQualityLevel.RECORDER_QUALITY_LOW, done); - }) - - /* * - * @tc.number : SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_PROMISE_1500 - * @tc.name : test getVideoRecorderProfile qualityLevel -1 - * @tc.desc : sourceId 0 qualityLevel -1 - * @tc.size : MediumTest - * @tc.type : Abnormal test - * @tc.level : Level2 - */ - it('SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_PROMISE_1500', 0, async function (done) { - console.info("test getVideoRecorderProfile"); - promiseAbnormalGetVideoProfile(0, -1, done); - }) - - /* * - * @tc.number : SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_PROMISE_1600 - * @tc.name : test getVideoRecorderProfile sourceId 65535 - * @tc.desc : sourceId 65535 qualityLevel 0 - * @tc.size : MediumTest - * @tc.type : Abnormal test - * @tc.level : Level2 - */ - it('SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_PROMISE_1600', 0, async function (done) { - console.info("test getVideoRecorderProfile"); - promiseAbnormalGetVideoProfile(65535, media.VideoRecorderQualityLevel.RECORDER_QUALITY_LOW, done); - }) - - /* * - * @tc.number : SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_PROMISE_1700 - * @tc.name : test getVideoRecorderProfile sourceId 65536 - * @tc.desc : sourceId 65536 qualityLevel 0 - * @tc.size : MediumTest - * @tc.type : Abnormal test - * @tc.level : Level2 - */ - it('SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_PROMISE_1700', 0, async function (done) { - console.info("test getVideoRecorderProfile"); - promiseAbnormalGetVideoProfile(65536, media.VideoRecorderQualityLevel.RECORDER_QUALITY_LOW, done); - }) - - /* * - * @tc.number : SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_PROMISE_1800 - * @tc.name : test getVideoRecorderProfile qualityLevel 65535 - * @tc.desc : sourceId 0 qualityLevel 65535 - * @tc.size : MediumTest - * @tc.type : Abnormal test - * @tc.level : Level2 - */ - it('SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_PROMISE_1800', 0, async function (done) { - console.info("test getVideoRecorderProfile"); - promiseAbnormalGetVideoProfile(0, 65535, done); - }) - - /* * - * @tc.number : SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_PROMISE_1900 - * @tc.name : test getVideoRecorderProfile qualityLevel 65536 - * @tc.desc : sourceId 0 qualityLevel 65536 - * @tc.size : MediumTest - * @tc.type : Abnormal test - * @tc.level : Level2 - */ - it('SUB_MULTIMEDIA_MEDIA_PROFILE_RELIABILITY_PROMISE_1900', 0, async function (done) { - console.info("test getVideoRecorderProfile"); - promiseAbnormalGetVideoProfile(0, 65536, done); - }) -}) -} diff --git a/multimedia/media/media_js_standard/recorderProfile/src/main/js/test/ProfileTestBase.js b/multimedia/media/media_js_standard/recorderProfile/src/main/js/test/ProfileTestBase.js deleted file mode 100644 index 33d23654f..000000000 --- a/multimedia/media/media_js_standard/recorderProfile/src/main/js/test/ProfileTestBase.js +++ /dev/null @@ -1,330 +0,0 @@ -/* - * 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 media from '@ohos.multimedia.media' -import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' - -const audioRecorderCaps = { - outputFormat: media.ContainerFormatType.CFT_MPEG_4A, - audioEncoderMime: media.CodecMimeType.AUDIO_AAC, - sampleRates: [8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000, 64000, 88200, 96000], - bitrateRange: { min: 1, max: 384000 }, - channelRange: { min: 1, max: 2 }, -} -const audioRecorderCapsArray = [audioRecorderCaps]; - -const videoRecorderCaps = { - audioRecorderCaps, - outputFormat: media.ContainerFormatType.CFT_MPEG_4, - videoEncoderMime: media.CodecMimeType.VIDEO_MPEG4, - videoWidthRange: { min: 2, max: 1920 }, - videoBitrateRange: { min: 1, max: 3000000 }, - videoFramerateRange: { min: 1, max: 30 }, - videoHeightRange: { min: 2, max: 1080 }, -} -const videoRecorderCaps2 = { - audioRecorderCaps, - outputFormat: media.ContainerFormatType.CFT_MPEG_4, - videoEncoderMime: media.CodecMimeType.VIDEO_AVC, - videoWidthRange: { min: 2, max: 1920 }, - videoBitrateRange: { min: 1, max: 3000000 }, - videoFramerateRange: { min: 1, max: 30 }, - videoHeightRange: { min: 2, max: 1080 }, -} -const videoRecorderCapsArray = [videoRecorderCaps, videoRecorderCaps2]; - -export const recorderQualityLowPara = { - audioBitrate: 96000, - audioChannels: 2, - audioCodec: media.CodecMimeType.AUDIO_AAC, - audioSampleRate: 48000, - durationTime: 30, - fileFormat: media.ContainerFormatType.CFT_MPEG_4, - qualityLevel: media.VideoRecorderQualityLevel.RECORDER_QUALITY_LOW, - videoBitrate: 192000, - videoCodec: media.CodecMimeType.VIDEO_MPEG4, - videoFrameWidth: 176, - videoFrameHeight: 144, - videoFrameRate: 30 -}; - -export const recorderQualityHighPara = { - audioBitrate: 192000, - audioChannels: 2, - audioCodec: media.CodecMimeType.AUDIO_AAC, - audioSampleRate: 48000, - durationTime: 30, - fileFormat: media.ContainerFormatType.CFT_MPEG_4, - qualityLevel: media.VideoRecorderQualityLevel.RECORDER_QUALITY_HIGH, - videoBitrate: 17000000, - videoCodec: media.CodecMimeType.VIDEO_MPEG4, - videoFrameWidth: 1920, - videoFrameHeight: 1080, - videoFrameRate: 30 -}; - -export const recorderQualityQcifPara = { - audioBitrate: 96000, - audioChannels: 2, - audioCodec: media.CodecMimeType.AUDIO_AAC, - audioSampleRate: 48000, - durationTime: 30, - fileFormat: media.ContainerFormatType.CFT_MPEG_4, - qualityLevel: media.VideoRecorderQualityLevel.RECORDER_QUALITY_QCIF, - videoBitrate: 192000, - videoCodec: media.CodecMimeType.VIDEO_MPEG4, - videoFrameWidth: 176, - videoFrameHeight: 144, - videoFrameRate: 30 -}; - -export const recorderQualityCifPara = { - audioBitrate: 96000, - audioChannels: 2, - audioCodec: media.CodecMimeType.AUDIO_AAC, - audioSampleRate: 48000, - durationTime: 30, - fileFormat: media.ContainerFormatType.CFT_MPEG_4, - qualityLevel: media.VideoRecorderQualityLevel.RECORDER_QUALITY_CIF, - videoBitrate: 1536000, - videoCodec: media.CodecMimeType.VIDEO_MPEG4, - videoFrameWidth: 352, - videoFrameHeight: 288, - videoFrameRate: 30 -}; - -export const recorderQuality480PPara = { - audioBitrate: 96000, - audioChannels: 2, - audioCodec: media.CodecMimeType.AUDIO_AAC, - audioSampleRate: 48000, - durationTime: 30, - fileFormat: media.ContainerFormatType.CFT_MPEG_4, - qualityLevel: media.VideoRecorderQualityLevel.RECORDER_QUALITY_480P, - videoBitrate: 5000000, - videoCodec: media.CodecMimeType.VIDEO_MPEG4, - videoFrameWidth: 640, - videoFrameHeight: 480, - videoFrameRate: 30 -}; - -export const recorderQuality720PPara = { - audioBitrate: 192000, - audioChannels: 2, - audioCodec: media.CodecMimeType.AUDIO_AAC, - audioSampleRate: 48000, - durationTime: 30, - fileFormat: media.ContainerFormatType.CFT_MPEG_4, - qualityLevel: media.VideoRecorderQualityLevel.RECORDER_QUALITY_720P, - videoBitrate: 12000000, - videoCodec: media.CodecMimeType.VIDEO_MPEG4, - videoFrameWidth: 1280, - videoFrameHeight: 720, - videoFrameRate: 30 -}; - -export const recorderQuality1080PPara = { - audioBitrate: 192000, - audioChannels: 2, - audioCodec: media.CodecMimeType.AUDIO_AAC, - audioSampleRate: 48000, - durationTime: 30, - fileFormat: media.ContainerFormatType.CFT_MPEG_4, - qualityLevel: media.VideoRecorderQualityLevel.RECORDER_QUALITY_1080P, - videoBitrate: 17000000, - videoCodec: media.CodecMimeType.VIDEO_MPEG4, - videoFrameWidth: 1920, - videoFrameHeight: 1080, - videoFrameRate: 30 -}; - -export const recorderQualityQvgaPara = { - audioBitrate: 96000, - audioChannels: 2, - audioCodec: media.CodecMimeType.AUDIO_AAC, - audioSampleRate: 48000, - durationTime: 30, - fileFormat: media.ContainerFormatType.CFT_MPEG_4, - qualityLevel: media.VideoRecorderQualityLevel.RECORDER_QUALITY_QVGA, - videoBitrate: 1200000, - videoCodec: media.CodecMimeType.VIDEO_MPEG4, - videoFrameWidth: 320, - videoFrameHeight: 240, - videoFrameRate: 30 -}; - -export const recorderQualityLowParaSourceId1 = { - audioBitrate: 0, - audioChannels: 0, - audioCodec: '', - audioSampleRate: 0, - durationTime: 0, - fileFormat: '', - qualityLevel: media.VideoRecorderQualityLevel.RECORDER_QUALITY_LOW, - videoBitrate: 0, - videoCodec: '', - videoFrameWidth: 0, - videoFrameHeight: 0, - videoFrameRate: 0 -}; - -export const audioRecorderPara1 = { - outputFormat: media.ContainerFormatType.CFT_MPEG_4, - audioEncoderMime: media.CodecMimeType.AUDIO_AAC, - bitrate: 96000, - sampleRate: 48000, - channel: 2 -}; - -export const audioRecorderPara2 = { - outputFormat: media.ContainerFormatType.CFT_MPEG_4, - audioEncoderMime: media.CodecMimeType.AUDIO_AAC, - bitrate: 192000, - sampleRate: 48000, - channel: 2 -}; - -export const audioRecorderAbnormalAll = { - outputFormat: 'aaa', - audioEncoderMime: 'aaa', - bitrate: 655360, - sampleRate: 655360, - channel: 0 -}; - -export const audioRecorderAbnormalFormatType = { - outputFormat: 'aaa', - audioEncoderMime: media.CodecMimeType.AUDIO_AAC, - bitrate: 96000, - sampleRate: 48000, - channel: 2 -}; - -export const audioRecorderAbnormalCodecMimeType = { - outputFormat: media.ContainerFormatType.CFT_MPEG_4, - audioEncoderMime: 'aaa', - bitrate: 96000, - sampleRate: 48000, - channel: 2 -}; - -export const audioRecorderAbnormalBitrate = { - outputFormat: media.ContainerFormatType.CFT_MPEG_4, - audioEncoderMime: media.CodecMimeType.AUDIO_AAC, - bitrate: 655360, - sampleRate: 48000, - channel: 2 -}; - -export const audioRecorderAbnormalSampleRate = { - outputFormat: media.ContainerFormatType.CFT_MPEG_4, - audioEncoderMime: media.CodecMimeType.AUDIO_AAC, - bitrate: 96000, - sampleRate: 655360, - channel: 2 -}; - -export const audioRecorderAbnormalSampleChannel = { - outputFormat: media.ContainerFormatType.CFT_MPEG_4, - audioEncoderMime: media.CodecMimeType.AUDIO_AAC, - bitrate: 96000, - sampleRate: 4800, - channel: 0 -}; - -export function checkVideoCapsArray(videoCapsArray) { - let expectProfile = { - audioBitrate: 0, - audioChannels: 0, - audioCodec:'', - audioSampleRate: 0, - durationTime: 0, - fileFormat: '', - qualityLevel: 0, - videoBitrate: 0, - videoCodec: '', - videoFrameWidth: 0, - videoFrameHeight: 0, - videoFrameRate: 0, - }; - expect(Object.keys(expectProfile).length).assertEqual(Object.keys(videoCapsArray).length); - let keys = Object.keys(videoCapsArray); - if (keys.length != 0) { - for (let i = 0; i < keys.length; i++) { - let key = keys[i]; - expect(videoCapsArray[key]).assertEqual(expectProfile[key]); - console.info('check videoCapsArray success'); - } - } else { - console.info('check videoCapsArray failed'); - } -} - -export function checkAudioArray(audioCapsArray, done) { - expect(audioCapsArray.length).assertEqual(audioRecorderCapsArray.length); - for (let i = 0; i < audioCapsArray.length; i++) { - expect(audioCapsArray[i].outputFormat).assertEqual(audioRecorderCapsArray[i].outputFormat); - expect(audioCapsArray[i].audioEncoderMime).assertEqual(audioRecorderCapsArray[i].audioEncoderMime); - for (let j = 0; j < audioCapsArray[i].sampleRates.length; j++) { - expect(audioCapsArray[i].sampleRates[j]).assertEqual(audioRecorderCapsArray[i].sampleRates[j]); - } - expect(audioCapsArray[i].bitrateRange.min).assertEqual(audioRecorderCapsArray[i].bitrateRange.min); - expect(audioCapsArray[i].bitrateRange.max).assertEqual(audioRecorderCapsArray[i].bitrateRange.max); - expect(audioCapsArray[i].channelRange.min).assertEqual(audioRecorderCapsArray[i].channelRange.min); - expect(audioCapsArray[i].channelRange.max).assertEqual(audioRecorderCapsArray[i].channelRange.max); - } - done(); -} - -export function checkVideoArray(videoCapsArray, done) { - expect(videoCapsArray.length).assertEqual(videoRecorderCapsArray.length); - for (let i = 0; i < videoCapsArray.length; i++) { - expect(videoCapsArray[i].audioEncoderMime).assertEqual - (videoRecorderCapsArray[i].audioRecorderCaps.audioEncoderMime); - for (let j = 0; j < videoCapsArray[i].audioSampleRates.length; j++) { - expect(videoCapsArray[i].audioSampleRates[j]).assertEqual - (videoRecorderCapsArray[i].audioRecorderCaps.sampleRates[j]); - } - expect(videoCapsArray[i].audioBitrateRange.min).assertEqual - (videoRecorderCapsArray[i].audioRecorderCaps.bitrateRange.min); - expect(videoCapsArray[i].audioBitrateRange.max).assertEqual - (videoRecorderCapsArray[i].audioRecorderCaps.bitrateRange.max); - expect(videoCapsArray[i].audioChannelRange.min).assertEqual - (videoRecorderCapsArray[i].audioRecorderCaps.channelRange.min); - expect(videoCapsArray[i].audioChannelRange.max).assertEqual - (videoRecorderCapsArray[i].audioRecorderCaps.channelRange.max); - expect(videoCapsArray[i].outputFormat).assertEqual - (videoRecorderCapsArray[i].outputFormat); - expect(videoCapsArray[i].videoWidthRange.min).assertEqual - (videoRecorderCapsArray[i].videoWidthRange.min); - expect(videoCapsArray[i].videoWidthRange.max).assertEqual - (videoRecorderCapsArray[i].videoWidthRange.max); - expect(videoCapsArray[i].videoBitrateRange.min).assertEqual - (videoRecorderCapsArray[i].videoBitrateRange.min); - expect(videoCapsArray[i].videoBitrateRange.max).assertEqual - (videoRecorderCapsArray[i].videoBitrateRange.max); - expect(videoCapsArray[i].videoFramerateRange.min).assertEqual - (videoRecorderCapsArray[i].videoFramerateRange.min); - expect(videoCapsArray[i].videoFramerateRange.max).assertEqual - (videoRecorderCapsArray[i].videoFramerateRange.max); - expect(videoCapsArray[i].videoHeightRange.min).assertEqual - (videoRecorderCapsArray[i].videoHeightRange.min); - expect(videoCapsArray[i].videoHeightRange.max).assertEqual - (videoRecorderCapsArray[i].videoHeightRange.max); - expect(videoCapsArray[i].videoEncoderMime).assertEqual - (videoRecorderCapsArray[i].videoEncoderMime); - } - done(); -} diff --git a/multimedia/media/media_js_standard/recorderProfile/src/main/js/test/ProfileTestCallback.test.js b/multimedia/media/media_js_standard/recorderProfile/src/main/js/test/ProfileTestCallback.test.js deleted file mode 100644 index 62b5af6f7..000000000 --- a/multimedia/media/media_js_standard/recorderProfile/src/main/js/test/ProfileTestCallback.test.js +++ /dev/null @@ -1,342 +0,0 @@ -/* - * 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 media from '@ohos.multimedia.media' -import * as base from './ProfileTestBase.js'; -import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' - -export default function ProfileTestCallback() { -describe('ProfileTestCallback', function () { - beforeAll(function () { - console.info('beforeAll case'); - }) - - beforeEach(async function () { - console.info('beforeEach case'); - }) - - afterEach(function () { - console.info('afterEach case'); - }) - - afterAll(function () { - console.info('afterAll case'); - }) - - async function getAudioRecorderCapsTest(done) { - media.getMediaCapability((err, mediaCaps) => { - expect(err).assertUndefined(); - console.info('getMediaCapability success'); - if (typeof (mediaCaps) != 'undefined') { - mediaCaps.getAudioRecorderCaps((err, audioCapsArray) => { - expect(err).assertUndefined(); - console.info('getAudioRecorderCaps success'); - if (typeof (audioCapsArray) != 'undefined') { - base.checkAudioArray(audioCapsArray, done); - } else { - console.info('audioCaps is not defined'); - expect().assertFail(); - done(); - } - - }) - } else { - console.info('mediaCaps is not defined'); - expect().assertFail(); - done(); - } - }) - } - - async function getVideoRecorderCapsTest(done) { - media.getMediaCapability((err, mediaCaps) => { - expect(err).assertUndefined(); - console.info('getMediaCapability success'); - if (typeof (mediaCaps) != 'undefined') { - mediaCaps.getVideoRecorderCaps((err, videoCapsArray) => { - expect(err).assertUndefined(); - console.info('getVideoRecorderCapsTest success'); - if (typeof (videoCapsArray) != 'undefined') { - base.checkVideoArray(videoCapsArray, done); - } else { - console.info('videoCaps is not defined'); - expect().assertFail(); - done(); - } - }) - } else { - console.info('mediaCaps is not defined'); - expect().assertFail(); - done(); - } - }) - } - - async function callbackGetVideoProfile(sourceId, qualityLevel, expectProfile, done) { - media.getMediaCapability((err, mediaCaps) => { - expect(err).assertUndefined(); - console.info('getMediaCapability success'); - if (typeof (mediaCaps) != 'undefined') { - mediaCaps.getVideoRecorderProfile(sourceId, qualityLevel, (err, videoCapsArray) => { - expect(err).assertUndefined(); - console.info('getVideoRecorderProfile success'); - expect(Object.keys(expectProfile).length).assertEqual(Object.keys(videoCapsArray).length); - let keys = Object.keys(videoCapsArray); - for (let i = 0; i < keys.length; i++) { - let key = keys[i]; - expect(videoCapsArray[key]).assertEqual(expectProfile[key]); - } - done(); - }) - } else { - console.info('mediaCaps is undefined'); - expect().assertFail(); - done(); - } - }) - } - - async function callbackAudioRecoderConfigSupported(audioProfile, done) { - media.getMediaCapability((err, mediaCaps) => { - expect(err).assertUndefined(); - console.info('getMediaCapability success'); - if (typeof (mediaCaps) != 'undefined') { - mediaCaps.isAudioRecoderConfigSupported(audioProfile, (err, ean) => { - expect(err).assertUndefined(); - expect(ean).assertEqual(true); - console.info('isAudioRecoderConfigSupported: success'); - done(); - }) - } else { - console.info('mediaCaps is undefined'); - expect().assertFail(); - done(); - } - }) - } - - async function callbackHasVideoProfile(sourceId, qualityLevel, done) { - media.getMediaCapability((err, mediaCaps) => { - expect(err).assertUndefined(); - console.info('getMediaCapability success'); - if (typeof (mediaCaps) != 'undefined') { - mediaCaps.hasVideoRecorderProfile(sourceId, qualityLevel, (err, ean) => { - expect(err).assertUndefined(); - expect(ean).assertEqual(true); - console.info('hasVideoRecorderProfile success'); - done(); - }) - } else { - console.info('mediaCaps is undefined'); - expect().assertFail(); - done(); - } - }) - } - - /* * - * @tc.number : SUB_MULTIMEDIA_MEDIA_PROFILE_FUNCTION_CALLBACK_0100 - * @tc.name : test getAudioRecorderCaps - * @tc.desc : outputFormat/audioEncoderMime/sampleRates/bitrateRange/channelRange - * @tc.size : MediumTest - * @tc.type : Function test - * @tc.level : Level0 - */ - it('SUB_MULTIMEDIA_MEDIA_PROFILE_FUNCTION_CALLBACK_0100', 0, async function (done) { - console.info("test getAudioRecorderCaps"); - getAudioRecorderCapsTest(done); - console.info("test getAudioRecorderCaps success "); - }) - - /* * - * @tc.number : SUB_MULTIMEDIA_MEDIA_PROFILE_FUNCTION_CALLBACK_0200 - * @tc.name : test getVideoRecorderCapsTest - * @tc.desc : outputFormat/audioEncoderMime/audioSampleRates/videoEncoderMime/audioBitrateRange/ - audioChannelRange/videoBitrateRange/videoFramerateRange/videoWidthRange/videoHeightRange - * @tc.size : MediumTest - * @tc.type : Function test - * @tc.level : Level0 - */ - it('SUB_MULTIMEDIA_MEDIA_PROFILE_FUNCTION_CALLBACK_0200', 0, async function (done) { - console.info("test getAudioRecorderCaps"); - getVideoRecorderCapsTest(done); - }) - - /* * - * @tc.number : SUB_MULTIMEDIA_MEDIA_PROFILE_FUNCTION_CALLBACK_0300 - * @tc.name : test getVideoRecorderProfile - * @tc.desc : sourceId 0 qualityLevel 0 - * @tc.size : MediumTest - * @tc.type : Function test - * @tc.level : Level1 - */ - it('SUB_MULTIMEDIA_MEDIA_PROFILE_FUNCTION_CALLBACK_0300', 0, async function (done) { - console.info("test getAudioRecorderCaps"); - callbackGetVideoProfile(0,media.VideoRecorderQualityLevel.RECORDER_QUALITY_LOW, - base.recorderQualityLowPara, done); - }) - - /* * - * @tc.number : SUB_MULTIMEDIA_MEDIA_PROFILE_FUNCTION_CALLBACK_0400 - * @tc.name : test getVideoRecorderProfile - * @tc.desc : sourceId 0 qualityLevel 1 - * @tc.size : MediumTest - * @tc.type : Function test - * @tc.level : Level1 - */ - it('SUB_MULTIMEDIA_MEDIA_PROFILE_FUNCTION_CALLBACK_0400', 0, async function (done) { - console.info("test getAudioRecorderCaps"); - callbackGetVideoProfile(0, media.VideoRecorderQualityLevel.RECORDER_QUALITY_HIGH, - base.recorderQualityHighPara, done); - }) - - /* * - * @tc.number : SUB_MULTIMEDIA_MEDIA_PROFILE_FUNCTION_CALLBACK_0500 - * @tc.name : test getVideoRecorderProfile - * @tc.desc : sourceId 0 qualityLevel 2 - * @tc.size : MediumTest - * @tc.type : Function test - * @tc.level : Level1 - */ - it('SUB_MULTIMEDIA_MEDIA_PROFILE_FUNCTION_CALLBACK_0500', 0, async function (done) { - console.info("test getAudioRecorderCaps"); - callbackGetVideoProfile(0, media.VideoRecorderQualityLevel.RECORDER_QUALITY_QCIF, - base.recorderQualityQcifPara, done); - }) - - /* * - * @tc.number : SUB_MULTIMEDIA_MEDIA_PROFILE_FUNCTION_CALLBACK_0600 - * @tc.name : test getVideoRecorderProfile - * @tc.desc : sourceId 0 qualityLevel 3 - * @tc.size : MediumTest - * @tc.type : Function test - * @tc.level : Level1 - */ - it('SUB_MULTIMEDIA_MEDIA_PROFILE_FUNCTION_CALLBACK_0600', 0, async function (done) { - console.info("test getAudioRecorderCaps"); - callbackGetVideoProfile(0, media.VideoRecorderQualityLevel.RECORDER_QUALITY_CIF, - base.recorderQualityCifPara, done); - }) - - /* * - * @tc.number : SUB_MULTIMEDIA_MEDIA_PROFILE_FUNCTION_CALLBACK_0700 - * @tc.name : test getVideoRecorderProfile - * @tc.desc : sourceId 0 qualityLevel 4 - * @tc.size : MediumTest - * @tc.type : Function test - * @tc.level : Level1 - */ - it('SUB_MULTIMEDIA_MEDIA_PROFILE_FUNCTION_CALLBACK_0700', 0, async function (done) { - console.info("test getAudioRecorderCaps"); - callbackGetVideoProfile(0, media.VideoRecorderQualityLevel.RECORDER_QUALITY_480P, - base.recorderQuality480PPara, done); - }) - - /* * - * @tc.number : SUB_MULTIMEDIA_MEDIA_PROFILE_FUNCTION_CALLBACK_0800 - * @tc.name : test getVideoRecorderProfile - * @tc.desc : sourceId 0 qualityLevel 5 - * @tc.size : MediumTest - * @tc.type : Function test - * @tc.level : Level1 - */ - it('SUB_MULTIMEDIA_MEDIA_PROFILE_FUNCTION_CALLBACK_0800', 0, async function (done) { - console.info("test getAudioRecorderCaps"); - callbackGetVideoProfile(0, media.VideoRecorderQualityLevel.RECORDER_QUALITY_720P, - base.recorderQuality720PPara, done); - }) - - /* * - * @tc.number : SUB_MULTIMEDIA_MEDIA_PROFILE_FUNCTION_CALLBACK_0900 - * @tc.name : test getVideoRecorderProfile - * @tc.desc : sourceId 0 qualityLevel 6 - * @tc.size : MediumTest - * @tc.type : Function test - * @tc.level : Level1 - */ - it('SUB_MULTIMEDIA_MEDIA_PROFILE_FUNCTION_CALLBACK_0900', 0, async function (done) { - console.info("test getAudioRecorderCaps"); - callbackGetVideoProfile(0, media.VideoRecorderQualityLevel.RECORDER_QUALITY_1080P, - base.recorderQuality1080PPara, done); - }) - - /* * - * @tc.number : SUB_MULTIMEDIA_MEDIA_PROFILE_FUNCTION_CALLBACK_1000 - * @tc.name : test getVideoRecorderProfile - * @tc.desc : sourceId 0 qualityLevel 7 - * @tc.size : MediumTest - * @tc.type : Function test - * @tc.level : Level1 - */ - it('SUB_MULTIMEDIA_MEDIA_PROFILE_FUNCTION_CALLBACK_1000', 0, async function (done) { - console.info("test getAudioRecorderCaps"); - callbackGetVideoProfile(0, media.VideoRecorderQualityLevel.RECORDER_QUALITY_QVGA, - base.recorderQualityQvgaPara, done); - }) - - /* * - * @tc.number : SUB_MULTIMEDIA_MEDIA_PROFILE_FUNCTION_CALLBACK_1100 - * @tc.name : test getVideoRecorderProfile - * @tc.desc : sourceId 1 qualityLevel 0 - * @tc.size : MediumTest - * @tc.type : Function test - * @tc.level : Level1 - */ - it('SUB_MULTIMEDIA_MEDIA_PROFILE_FUNCTION_CALLBACK_1100', 0, async function (done) { - console.info("test getAudioRecorderCaps"); - callbackGetVideoProfile(1, media.VideoRecorderQualityLevel.RECORDER_QUALITY_LOW, - base.recorderQualityLowParaSourceId1, done); - }) - - /* * - * @tc.number : SUB_MULTIMEDIA_MEDIA_PROFILE_FUNCTION_CALLBACK_1200 - * @tc.name : test isAudioRecoderConfigSupported - * @tc.desc : isAudioRecoderConfigSupported true - * @tc.size : MediumTest - * @tc.type : Function test - * @tc.level : Level1 - */ - it('SUB_MULTIMEDIA_MEDIA_PROFILE_FUNCTION_CALLBACK_1200', 0, async function (done) { - console.info("test getAudioRecorderCaps"); - callbackAudioRecoderConfigSupported(base.audioRecorderPara1, done); - }) - - /* * - * @tc.number : SUB_MULTIMEDIA_MEDIA_PROFILE_FUNCTION_CALLBACK_1300 - * @tc.name : test isAudioRecoderConfigSupported - * @tc.desc : isAudioRecoderConfigSupported true - * @tc.size : MediumTest - * @tc.type : Function test - * @tc.level : Level1 - */ - it('SUB_MULTIMEDIA_MEDIA_PROFILE_FUNCTION_CALLBACK_1300', 0, async function (done) { - console.info("test getAudioRecorderCaps"); - callbackAudioRecoderConfigSupported(base.audioRecorderPara2, done); - }) - - /* * - * @tc.number : SUB_MULTIMEDIA_MEDIA_PROFILE_FUNCTION_CALLBACK_1400 - * @tc.name : test hasVideoRecorderProfile - * @tc.desc : sourceId 0 qualityLevel 0 - * @tc.size : MediumTest - * @tc.type : Function test - * @tc.level : Level1 - */ - it('SUB_MULTIMEDIA_MEDIA_PROFILE_FUNCTION_CALLBACK_1400', 0, async function (done) { - console.info('test hasVideoRecorderProfile'); - callbackHasVideoProfile(0, media.VideoRecorderQualityLevel.RECORDER_QUALITY_LOW, done); - }) - -})} diff --git a/multimedia/media/media_js_standard/recorderProfile/src/main/js/test/ProfileTestPromise.test.js b/multimedia/media/media_js_standard/recorderProfile/src/main/js/test/ProfileTestPromise.test.js deleted file mode 100644 index 105485c11..000000000 --- a/multimedia/media/media_js_standard/recorderProfile/src/main/js/test/ProfileTestPromise.test.js +++ /dev/null @@ -1,363 +0,0 @@ -/* - * 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 media from '@ohos.multimedia.media' -import * as base from './ProfileTestBase.js'; -import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' - -export default function ProfileTestPromise() { -describe('ProfileTestPromise', function () { - beforeAll(function () { - console.info('beforeAll case'); - }) - - beforeEach(async function () { - console.info('beforeEach case'); - }) - - afterEach(function () { - console.info('afterEach case'); - }) - - afterAll(function () { - console.info('afterAll case'); - }) - - async function getAudioRecorderCapsTest(done) { - media.getMediaCapability().then(async (mediaCaps) => { - console.info('getMediaCapability success'); - if (typeof (mediaCaps) != 'undefined') { - mediaCaps.getAudioRecorderCaps().then(async (audioCapsArray) => { - console.info('getAudioRecorderCaps success'); - if (typeof (audioCapsArray) != 'undefined') { - base.checkAudioArray(audioCapsArray, done); - } else { - console.info('audioCaps is undefined'); - expect().assertFail(); - done(); - } - }, err => { - expect(err).assertUndefined(); - done(); - }) - } else { - console.info('mediaCaps is undefined'); - expect().assertFail(); - done(); - } - }, err => { - expect(err).assertUndefined(); - done(); - }) - } - - async function getVideoRecorderCapsTest(done) { - media.getMediaCapability().then(async (mediaCaps) => { - console.info('getMediaCapability success'); - if (typeof (mediaCaps) != 'undefined') { - mediaCaps.getVideoRecorderCaps().then(async (videoCapsArray) => { - console.info('getVideoRecorderCaps success'); - if (typeof (videoCapsArray) != 'undefined') { - base.checkVideoArray(videoCapsArray, done); - } else { - console.info('audioCaps is undefined'); - expect().assertFail(); - done(); - } - }, err => { - expect(err).assertUndefined(); - done(); - }) - } else { - console.info('mediaCaps is undefined'); - expect().assertFail(); - done(); - } - }, err => { - expect(err).assertUndefined(); - done(); - }) - } - - async function promiseGetVideoProfile(sourceId, qualityLevel, expectProfile, done) { - media.getMediaCapability().then(async (mediaCaps) => { - console.info('getMediaCapability success'); - if (typeof (mediaCaps) != 'undefined') { - mediaCaps.getVideoRecorderProfile(sourceId, qualityLevel).then(async (videoCapsArray) => { - console.info('getVideoRecorderProfile success'); - expect(Object.keys(expectProfile).length).assertEqual(Object.keys(videoCapsArray).length); - let keys = Object.keys(videoCapsArray); - for (let i = 0; i < keys.length; i++) { - let key = keys[i]; - expect(videoCapsArray[key]).assertEqual(expectProfile[key]); - } - done(); - }, err => { - expect(err).assertUndefined(); - done(); - }) - } else { - console.info('mediaCaps is undefined'); - expect().assertFail(); - done(); - } - }, err => { - expect(err).assertUndefined(); - done(); - }) - } - - async function promiseAudioRecoderConfigSupported(audioProfile, done) { - media.getMediaCapability().then(async (mediaCaps) => { - console.info('getMediaCapability success'); - if (typeof (mediaCaps) != 'undefined') { - mediaCaps.isAudioRecoderConfigSupported(audioProfile).then(async (ean) => { - console.info('isAudioRecoderConfigSupported: success' + ean); - expect(ean).assertEqual(true); - console.info('isAudioRecoderConfigSupported: success'); - done(); - }, err => { - expect(err).assertUndefined(); - done(); - }) - } else { - console.info('mediaCaps is undefined'); - expect().assertFail(); - done(); - } - }, err => { - expect(err).assertUndefined(); - done(); - }) - } - - async function promiseHasVideoProfile(sourceId, qualityLevel, done) { - media.getMediaCapability().then(async (mediaCaps) => { - console.info('getMediaCapability success'); - if (typeof (mediaCaps) != 'undefined') { - mediaCaps.hasVideoRecorderProfile(sourceId, qualityLevel).then(async (ean) => { - expect(ean).assertEqual(true); - console.info('hasVideoRecorderProfile success'); - done(); - }, err => { - expect(err).assertUndefined(); - done(); - }) - } else { - console.info('mediaCaps is undefined'); - expect().assertFail(); - done(); - } - }, err => { - expect(err).assertUndefined(); - done(); - }) - } - - /* * - * @tc.number : SUB_MULTIMEDIA_MEDIA_PROFILE_FUNCTION_PROMISE_0100 - * @tc.name : test getAudioRecorderCaps - * @tc.desc : outputFormat/audioEncoderMime/sampleRates/bitrateRange/channelRange - * @tc.size : MediumTest - * @tc.type : Function test - * @tc.level : Level0 - */ - it('SUB_MULTIMEDIA_MEDIA_PROFILE_FUNCTION_PROMISE_0100', 0, async function (done) { - console.info("test getAudioRecorderCaps"); - getAudioRecorderCapsTest(done); - console.info("test getAudioRecorderCaps success "); - }) - - /* * - * @tc.number : SUB_MULTIMEDIA_MEDIA_PROFILE_FUNCTION_PROMISE_0200 - * @tc.name : test getVideoRecorderCapsTest - * @tc.desc : outputFormat/audioEncoderMime/audioSampleRates/videoEncoderMime/audioBitrateRange/ - audioChannelRange/videoBitrateRange/videoFramerateRange/videoWidthRange/videoHeightRange - * @tc.size : MediumTest - * @tc.type : Function test - * @tc.level : Level0 - */ - it('SUB_MULTIMEDIA_MEDIA_PROFILE_FUNCTION_PROMISE_0200', 0, async function (done) { - console.info("test getAudioRecorderCaps"); - getVideoRecorderCapsTest(done); - }) - - /* * - * @tc.number : SUB_MULTIMEDIA_MEDIA_PROFILE_FUNCTION_PROMISE_0300 - * @tc.name : test getVideoRecorderProfile - * @tc.desc : sourceId 0 qualityLevel 0 - * @tc.size : MediumTest - * @tc.type : Function test - * @tc.level : Level1 - */ - it('SUB_MULTIMEDIA_MEDIA_PROFILE_FUNCTION_PROMISE_0300', 0, async function (done) { - console.info("test getAudioRecorderCaps"); - promiseGetVideoProfile(0,media.VideoRecorderQualityLevel.RECORDER_QUALITY_LOW, - base.recorderQualityLowPara, done); - }) - - /* * - * @tc.number : SUB_MULTIMEDIA_MEDIA_PROFILE_FUNCTION_PROMISE_0400 - * @tc.name : test getVideoRecorderProfile - * @tc.desc : sourceId 0 qualityLevel 1 - * @tc.size : MediumTest - * @tc.type : Function test - * @tc.level : Level1 - */ - it('SUB_MULTIMEDIA_MEDIA_PROFILE_FUNCTION_PROMISE_0400', 0, async function (done) { - console.info("test getAudioRecorderCaps"); - promiseGetVideoProfile(0, media.VideoRecorderQualityLevel.RECORDER_QUALITY_HIGH, - base.recorderQualityHighPara, done); - }) - - /* * - * @tc.number : SUB_MULTIMEDIA_MEDIA_PROFILE_FUNCTION_PROMISE_0500 - * @tc.name : test getVideoRecorderProfile - * @tc.desc : sourceId 0 qualityLevel 2 - * @tc.size : MediumTest - * @tc.type : Function test - * @tc.level : Level1 - */ - it('SUB_MULTIMEDIA_MEDIA_PROFILE_FUNCTION_PROMISE_0500', 0, async function (done) { - console.info("test getAudioRecorderCaps"); - promiseGetVideoProfile(0, media.VideoRecorderQualityLevel.RECORDER_QUALITY_QCIF, - base.recorderQualityQcifPara, done); - }) - - /* * - * @tc.number : SUB_MULTIMEDIA_MEDIA_PROFILE_FUNCTION_PROMISE_0600 - * @tc.name : test getVideoRecorderProfile - * @tc.desc : sourceId 0 qualityLevel 3 - * @tc.size : MediumTest - * @tc.type : Function test - * @tc.level : Level1 - */ - it('SUB_MULTIMEDIA_MEDIA_PROFILE_FUNCTION_PROMISE_0600', 0, async function (done) { - console.info("test getAudioRecorderCaps"); - promiseGetVideoProfile(0, media.VideoRecorderQualityLevel.RECORDER_QUALITY_CIF, - base.recorderQualityCifPara, done); - }) - - /* * - * @tc.number : SUB_MULTIMEDIA_MEDIA_PROFILE_FUNCTION_PROMISE_0700 - * @tc.name : test getVideoRecorderProfile - * @tc.desc : sourceId 0 qualityLevel 4 - * @tc.size : MediumTest - * @tc.type : Function test - * @tc.level : Level1 - */ - it('SUB_MULTIMEDIA_MEDIA_PROFILE_FUNCTION_PROMISE_0700', 0, async function (done) { - console.info("test getAudioRecorderCaps"); - promiseGetVideoProfile(0, media.VideoRecorderQualityLevel.RECORDER_QUALITY_480P, - base.recorderQuality480PPara, done); - }) - - /* * - * @tc.number : SUB_MULTIMEDIA_MEDIA_PROFILE_FUNCTION_PROMISE_0800 - * @tc.name : test getVideoRecorderProfile - * @tc.desc : sourceId 0 qualityLevel 5 - * @tc.size : MediumTest - * @tc.type : Function test - * @tc.level : Level1 - */ - it('SUB_MULTIMEDIA_MEDIA_PROFILE_FUNCTION_PROMISE_0800', 0, async function (done) { - console.info("test getAudioRecorderCaps"); - promiseGetVideoProfile(0, media.VideoRecorderQualityLevel.RECORDER_QUALITY_720P, - base.recorderQuality720PPara, done); - }) - - /* * - * @tc.number : SUB_MULTIMEDIA_MEDIA_PROFILE_FUNCTION_PROMISE_0900 - * @tc.name : test getVideoRecorderProfile - * @tc.desc : sourceId 0 qualityLevel 6 - * @tc.size : MediumTest - * @tc.type : Function test - * @tc.level : Level1 - */ - it('SUB_MULTIMEDIA_MEDIA_PROFILE_FUNCTION_PROMISE_0900', 0, async function (done) { - console.info("test getAudioRecorderCaps"); - promiseGetVideoProfile(0, media.VideoRecorderQualityLevel.RECORDER_QUALITY_1080P, - base.recorderQuality1080PPara, done); - }) - - /* * - * @tc.number : SUB_MULTIMEDIA_MEDIA_PROFILE_FUNCTION_PROMISE_1000 - * @tc.name : test getVideoRecorderProfile - * @tc.desc : sourceId 0 qualityLevel 7 - * @tc.size : MediumTest - * @tc.type : Function test - * @tc.level : Level1 - */ - it('SUB_MULTIMEDIA_MEDIA_PROFILE_FUNCTION_PROMISE_1000', 0, async function (done) { - console.info("test getAudioRecorderCaps"); - promiseGetVideoProfile(0, media.VideoRecorderQualityLevel.RECORDER_QUALITY_QVGA, - base.recorderQualityQvgaPara, done); - }) - - /* * - * @tc.number : SUB_MULTIMEDIA_MEDIA_PROFILE_FUNCTION_PROMISE_1100 - * @tc.name : test getVideoRecorderProfile - * @tc.desc : sourceId 1 qualityLevel 0 - * @tc.size : MediumTest - * @tc.type : Function test - * @tc.level : Level1 - */ - it('SUB_MULTIMEDIA_MEDIA_PROFILE_FUNCTION_PROMISE_1100', 0, async function (done) { - console.info("test getAudioRecorderCaps"); - promiseGetVideoProfile(1, media.VideoRecorderQualityLevel.RECORDER_QUALITY_LOW, - base.recorderQualityLowParaSourceId1, done); - }) - - /* * - * @tc.number : SUB_MULTIMEDIA_MEDIA_PROFILE_FUNCTION_PROMISE_1200 - * @tc.name : test isAudioRecoderConfigSupported - * @tc.desc : isAudioRecoderConfigSupported true - * @tc.size : MediumTest - * @tc.type : Function test - * @tc.level : Level1 - */ - it('SUB_MULTIMEDIA_MEDIA_PROFILE_FUNCTION_PROMISE_1200', 0, async function (done) { - console.info("test getAudioRecorderCaps"); - promiseAudioRecoderConfigSupported(base.audioRecorderPara1, done); - }) - - /* * - * @tc.number : SUB_MULTIMEDIA_MEDIA_PROFILE_FUNCTION_PROMISE_1300 - * @tc.name : test isAudioRecoderConfigSupported - * @tc.desc : isAudioRecoderConfigSupported true - * @tc.size : MediumTest - * @tc.type : Function test - * @tc.level : Level1 - */ - it('SUB_MULTIMEDIA_MEDIA_PROFILE_FUNCTION_PROMISE_1300', 0, async function (done) { - console.info("test getAudioRecorderCaps"); - promiseAudioRecoderConfigSupported(base.audioRecorderPara2, done); - }) - - /* * - * @tc.number : SUB_MULTIMEDIA_MEDIA_PROFILE_FUNCTION_PROMISE_1400 - * @tc.name : test hasVideoRecorderProfile - * @tc.desc : sourceId 0 qualityLevel 0 - * @tc.size : MediumTest - * @tc.type : Function test - * @tc.level : Level1 - */ - it('SUB_MULTIMEDIA_MEDIA_PROFILE_FUNCTION_PROMISE_1400', 0, async function (done) { - console.info('test hasVideoRecorderProfile'); - promiseHasVideoProfile(0, media.VideoRecorderQualityLevel.RECORDER_QUALITY_LOW, done); - }) - -}) -} diff --git a/multimedia/media/media_js_standard/recorderProfile/src/main/resources/base/element/string.json b/multimedia/media/media_js_standard/recorderProfile/src/main/resources/base/element/string.json deleted file mode 100644 index 8afb12da3..000000000 --- a/multimedia/media/media_js_standard/recorderProfile/src/main/resources/base/element/string.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "string": [ - { - "name": "entry_MainAbility", - "value": "entry_MainAbility" - }, - { - "name": "mainability_description", - "value": "JS_Empty Ability" - }, - { - "name": "MainAbility_desc", - "value": "description" - }, - { - "name": "MainAbility_label", - "value": "label" - }, - { - "name": "TestAbility_desc", - "value": "description" - }, - { - "name": "TestAbility_label", - "value": "label" - } - ] -} \ No newline at end of file diff --git a/multimedia/media/media_js_standard/recorderProfile/src/main/resources/base/media/icon.png b/multimedia/media/media_js_standard/recorderProfile/src/main/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6790 zcmX|G1ymHk)?T_}Vd;>R?p|tHQo6fg38|$UVM!6BLrPFWk?s;$LOP{GmJpBl$qoSA!PUg~PA65-S00{{S`XKG6NkG0RgjEntPrmV+?0|00mu7;+5 zrdpa{2QLqPJ4Y{j7=Mrl{BaxrkdY69+c~(w{Fv-v&aR%aEI&JYSeRTLWm!zbv;?)_ ziZB;fwGbbeL5Q}YLx`J$lp~A09KK8t_z}PZ=4ZzgdeKtgoc+o5EvN9A1K1_<>M?MBqb#!ASf&# zEX?<)!RH(7>1P+j=jqG(58}TVN-$psA6K}atCuI!KTJD&FMmH-78ZejBm)0qc{ESp z|LuG1{QnBUJRg_E=h1#XMWt2%fcoN@l7eAS!Es?Q+;XsRNPhiiE=@AqlLkJzF`O18 zbsbSmKN=aaq8k3NFYZfDWpKmM!coBU0(XnL8R{4=i|wi{!uWYM2je{U{B*K2PVdu&=E zTq*-XsEsJ$u5H4g6DIm2Y!DN`>^v|AqlwuCD;w45K0@eqauiqWf7l&o)+YLHm~|L~ z7$0v5mkobriU!H<@mVJHLlmQqzQ3d6Rh_-|%Yy2li*tHO>_vcnuZ7OR_xkAIuIU&x z-|8Y0wj|6|a6_I(v91y%k_kNw6pnkNdxjqG8!%Vz_d%c_!X+6-;1`GC9_FpjoHev5fEV7RhJ>r=mh-jp$fqbqRJ=obwdgLDVP5+s zy1=_DWG0Y-Jb3t^WXmkr(d9~08k-|#Ly zaNOmT(^9tIb&eb4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