diff --git a/appexecfwk/bundle_standard/bundlemanager/BUILD.gn b/appexecfwk/bundle_standard/bundlemanager/BUILD.gn index 6e968e26f6323c774137dabcbd05147cfbaac3e7..2237be7ca1f2b1505f489c1bf56f1b133ec51c29 100644 --- a/appexecfwk/bundle_standard/bundlemanager/BUILD.gn +++ b/appexecfwk/bundle_standard/bundlemanager/BUILD.gn @@ -43,6 +43,7 @@ group("bundlemanager") { "sceneProject/bmsgetinfosscenesystemtwo:bmsSystemBundleTest2", "sceneProject/bmsgetinfosscenevendor:bmsVendorBundleTest1", "sceneProject/bmsgetinfossecondscene:bmsThirdBundleTest2", + "sceneProject/bmsgetinfosseventhscene:bmsThirdBundleTest7", "sceneProject/bmsgetinfossixthscene:bmsThirdBundleTest6", "sceneProject/bmsgetinfosthirdscene:bmsThirdBundleTest3", "sceneProject/bmsmainabilityfirstscene:bmsMainAbilityFirstScene", diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/Test.json b/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/Test.json index 846e77340c16336ea9c1a6c69e22ce9b44b04d44..b27900711d5b9b94cd3ebd4a37a6150272aa3c3c 100644 --- a/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/Test.json +++ b/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/Test.json @@ -35,7 +35,8 @@ "bmsJstest3.hap -> /data/test/bmsJstest3.hap", "bmsJstest4.hap -> /data/test/bmsJstest4.hap", "bmsJstest5.hap -> /data/test/bmsJstest5.hap", - "bmsJstest6.hap -> /data/test/bmsJstest6.hap" + "bmsJstest6.hap -> /data/test/bmsJstest6.hap", + "bmsThirdBundleTest7.hap->/data/test/bmsThirdBundleTest7.hap" ] }, { @@ -51,7 +52,8 @@ "bm install -p /data/test/bmsJstest3.hap", "bm install -p /data/test/bmsJstest4.hap", "bm install -p /data/test/bmsJstest5.hap", - "bm install -p /data/test/bmsJstest6.hap" + "bm install -p /data/test/bmsJstest6.hap", + "bm install -p /data/test/bmsThirdBundleTest7.hap" ], "teardown-command":[ "bm uninstall -n com.example.third1", @@ -61,6 +63,7 @@ "bm uninstall -n com.example.myapplication4", "bm uninstall -n com.example.myapplication5", "bm uninstall -n com.example.myapplication6", + "bm uninstall -n com.example.third7", "bm uninstall -n ohos.acts.bundle.stage" ] } diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/test/GetQueryAbilityByWant.test.ets b/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/test/GetQueryAbilityByWant.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..8ed9c62eff84faedf48bb1e7798b16d5848f10ee --- /dev/null +++ b/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/test/GetQueryAbilityByWant.test.ets @@ -0,0 +1,1011 @@ +/* + * 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 bundle from '@ohos.bundle' +import account from '@ohos.account.osAccount' +import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit' + +const BUNDLE_NAME1 = 'com.example.third1'; +const SYSTEM_NAME = 'com.example.system2'; +const ABILITIY_NAME8 = 'com.example.system2.MainAbility'; +let userId: number = 0; +const INVALID_CODE: number = 1; + +export default function ActsBmsQueryAbilityByWant() { + describe('ActsBmsQueryAbilityByWant', function () { + + beforeAll(async function (done) { + await account.getAccountManager().getOsAccountLocalIdFromProcess().then(account => { + console.info("getOsAccountLocalIdFromProcess userid ==========" + account); + userId = account; + done(); + }).catch(err => { + console.info("getOsAccountLocalIdFromProcess err ==========" + JSON.stringify(err)); + done(); + }) + }); + + /* + * @tc.number: bms_queryAbilityByWant_0100 + * @tc.name: Use the implicit query method in queryAbilityByWant to get abilityInfos + * @tc.desc: queryAbilityByWant for third app + */ + it('bms_queryAbilityByWant_0100', 0, async function (done) { + bundle.queryAbilityByWant( + { + "action": "" + }, bundle.BundleFlag.GET_BUNDLE_DEFAULT, userId).then(res => { + expect(res).assertFail() + done() + }).catch(err => { + expect(err).assertEqual(INVALID_CODE) + done() + }) + }); + + /* + * @tc.number: bms_queryAbilityByWant_0200 + * @tc.name: Use the implicit query method in queryAbilityByWant to get abilityInfos + * @tc.desc: queryAbilityByWant for third app + */ + it('bms_queryAbilityByWant_0200', 0, async function (done) { + bundle.queryAbilityByWant( + {}, bundle.BundleFlag.GET_BUNDLE_DEFAULT, userId).then(res => { + expect(res).assertFail() + done() + }).catch(err => { + expect(err).assertEqual(INVALID_CODE) + done() + }) + }); + + /* + * @tc.number: bms_queryAbilityByWant_0300 + * @tc.name: Use the implicit query method in queryAbilityByWant to get abilityInfos + * @tc.desc: queryAbilityByWant for third app + */ + it('bms_queryAbilityByWant_0300', 0, async function (done) { + bundle.queryAbilityByWant( + { + action: "action_a" + }, bundle.BundleFlag.GET_BUNDLE_DEFAULT, userId).then(res => { + console.info(' success bms_queryAbilityByWant_0300'+ JSON.stringify(res)) + expect(res[0].name).assertEqual('com.example.third7.actionSingleString') + expect(res[0].description).assertEqual('actionSingleString') + done() + }).catch(err => { + console.error(' fail bms_queryAbilityByWant_0300' + JSON.stringify(err)) + expect().assertFail() + done() + }) + + }); + + /* + * @tc.number: bms_queryAbilityByWant_0400 + * @tc.name: Use the implicit query method in queryAbilityByWant to get abilityInfos + * @tc.desc: queryAbilityByWant for third app + */ + it('bms_queryAbilityByWant_0400', 0, async function (done) { + bundle.queryAbilityByWant( + { + "action": "action_b2" + }, bundle.BundleFlag.GET_BUNDLE_DEFAULT, userId).then(res => { + console.info(' success bms_queryAbilityByWant_0400'+ JSON.stringify(res)) + expect(res[0].name).assertEqual('com.example.third7.actionDoubleString') + expect(res[0].description).assertEqual('actionDoubleString') + done() + }).catch(err => { + console.error(' fail bms_queryAbilityByWant_0400' + JSON.stringify(err)) + expect().assertFail() + done() + }) + }); + + /* + * @tc.number: bms_queryAbilityByWant_0500 + * @tc.name: Use the implicit query method in queryAbilityByWant to get abilityInfos + * @tc.desc: queryAbilityByWant for third app + */ + it('bms_queryAbilityByWant_0500', 0, async function (done) { + bundle.queryAbilityByWant( + { + "action": "action_c1" + }, bundle.BundleFlag.GET_BUNDLE_DEFAULT, userId).then(res => { + console.info(' success bms_queryAbilityByWant_0500'+ JSON.stringify(res)) + expect(res[0].name).assertEqual('com.example.third7.actionDoubleSkill') + expect(res[0].description).assertEqual('actionDoubleSkill') + done() + }).catch(err => { + console.error(' fail bms_queryAbilityByWant_0500' + JSON.stringify(err)) + expect().assertFail() + done() + }) + }); + + /* + * @tc.number: bms_queryAbilityByWant_0600 + * @tc.name: Use the implicit query method in queryAbilityByWant to get abilityInfos + * @tc.desc: queryAbilityByWant for third appl + */ + it('bms_queryAbilityByWant_0600', 0, async function (done) { + bundle.queryAbilityByWant( + { + "action": "action_d2" + }, bundle.BundleFlag.GET_BUNDLE_DEFAULT, userId).then(res => { + console.info(' success bms_queryAbilityByWant_0600'+ JSON.stringify(res)) + expect(res[0].name).assertEqual('com.example.third7.actionDoubleSkill') + expect(res[0].description).assertEqual('actionDoubleSkill') + done() + }).catch(err => { + console.error(' fail bms_queryAbilityByWant_0600' + JSON.stringify(err)) + expect().assertFail() + done() + }) + }); + + + /* + * @tc.number: bms_queryAbilityByWant_0700 + * @tc.name: Use the implicit query method in queryAbilityByWant to get abilityInfos + * @tc.desc: queryAbilityByWant for third app + */ + it('bms_queryAbilityByWant_0700', 0, async function (done) { + bundle.queryAbilityByWant( + { + "action": "action_not_exist" + }, bundle.BundleFlag.GET_BUNDLE_DEFAULT, userId).then(res => { + expect(res).assertFail() + done() + }).catch(err => { + console.error(' fail bms_queryAbilityByWant_0700' + JSON.stringify(err)) + expect(err).assertEqual(INVALID_CODE) + done() + }) + }); + + /* + * @tc.number: bms_queryAbilityByWant_0800 + * @tc.name: Use the implicit query method in queryAbilityByWant to get abilityInfos + * @tc.desc: queryAbilityByWant for third app + */ + it('bms_queryAbilityByWant_0800', 0, async function (done) { + bundle.queryAbilityByWant( + { + "action": "entity_reserved", + "entities": [] + }, bundle.BundleFlag.GET_BUNDLE_DEFAULT, userId).then(res => { + console.info(' success bms_queryAbilityByWant_0800 '+ JSON.stringify(res)) + const list = ['entityDoubleSkill','entityDoubleString','entitySingleString','entityEmpty'] + if(res && res.length) { + for(let i = 0; i < res.length; i++) { + expect(list.includes(res[i].description)).assertEqual(true) + } + } + done() + }).catch(err => { + console.error(' fail bms_queryAbilityByWant_0800 ' + JSON.stringify(err)) + expect().assertFail() + done() + }) + }); + + /* + * @tc.number: bms_queryAbilityByWant_0900 + * @tc.name: Use the implicit query method in queryAbilityByWant to get abilityInfos + * @tc.desc: queryAbilityByWant for third app + */ + it('bms_queryAbilityByWant_0900', 0, async function (done) { + bundle.queryAbilityByWant( + { + "action": "entity_reserved", + "entities": [""] + }, bundle.BundleFlag.GET_BUNDLE_DEFAULT, userId).then(res => { + expect(res).assertFail() + done() + }).catch(err => { + console.error(' fail bms_queryAbilityByWant_0900' + JSON.stringify(err)) + expect(err).assertEqual(INVALID_CODE) + done() + }) + }); + + /* + * @tc.number: bms_queryAbilityByWant_1000 + * @tc.name: Use the implicit query method in queryAbilityByWant to get abilityInfos + * @tc.desc: queryAbilityByWant for third app + */ + it('bms_queryAbilityByWant_1000', 0, async function (done) { + bundle.queryAbilityByWant( + { + "action": "entity_reserved", + "entities": ["entity_a"] + }, bundle.BundleFlag.GET_BUNDLE_DEFAULT, userId).then(res => { + console.info(' success bms_queryAbilityByWant_1000'+ JSON.stringify(res)) + expect(res[0].name).assertEqual('com.example.third7.entitySingleString') + expect(res[0].description).assertEqual('entitySingleString') + done() + }).catch(err => { + console.error(' fail bms_queryAbilityByWant_1000' + JSON.stringify(err)) + expect().assertFail() + done() + }) + }); + + /* + * @tc.number: bms_queryAbilityByWant_1100 + * @tc.name: Use the implicit query method in queryAbilityByWant to get abilityInfos + * @tc.desc: queryAbilityByWant for third app + */ + it('bms_queryAbilityByWant_1100', 0, async function (done) { + bundle.queryAbilityByWant( + { + "action": "entity_reserved", + "entities": ["entity_b2"] + }, bundle.BundleFlag.GET_BUNDLE_DEFAULT, userId).then(res => { + console.info(' success bms_queryAbilityByWant_1100'+ JSON.stringify(res)) + expect(res[0].name).assertEqual('com.example.third7.entityDoubleString') + expect(res[0].description).assertEqual('entityDoubleString') + done() + }).catch(err => { + console.error(' fail bms_queryAbilityByWant_1100' + JSON.stringify(err)) + expect().assertFail() + done() + }) + }); + + /* + * @tc.number: bms_queryAbilityByWant_1200 + * @tc.name: Use the implicit query method in queryAbilityByWant to get abilityInfos + * @tc.desc: queryAbilityByWant for third app + */ + it('bms_queryAbilityByWant_1200', 0, async function (done) { + bundle.queryAbilityByWant( + { + "action": "entity_reserved", + "entities": ["entity_d1"] + }, bundle.BundleFlag.GET_BUNDLE_DEFAULT, userId).then(res => { + console.info(' success bms_queryAbilityByWant_1200'+ JSON.stringify(res)) + expect(res[0].name).assertEqual('com.example.third7.entityDoubleSkill') + expect(res[0].description).assertEqual('entityDoubleSkill') + done() + }).catch(err => { + console.error(' fail bms_queryAbilityByWant_1200' + JSON.stringify(err)) + expect().assertFail() + done() + }) + }); + + /* + * @tc.number: bms_queryAbilityByWant_1300 + * @tc.name: Use the implicit query method in queryAbilityByWant to get abilityInfos + * @tc.desc: queryAbilityByWant for third app + */ + it('bms_queryAbilityByWant_1300', 0, async function (done) { + bundle.queryAbilityByWant( + { + "action": "entity_reserved", + "entities": ["entity_c1", "entity_c2"] + }, bundle.BundleFlag.GET_BUNDLE_DEFAULT, userId).then(res => { + console.info(' success bms_queryAbilityByWant_1300'+ JSON.stringify(res)) + expect(res[0].name).assertEqual('com.example.third7.entityDoubleSkill') + expect(res[0].description).assertEqual('entityDoubleSkill') + done() + }).catch(err => { + console.error(' fail bms_queryAbilityByWant_1300' + JSON.stringify(err)) + expect().assertFail() + done() + }) + }); + + /* + * @tc.number: bms_queryAbilityByWant_1400 + * @tc.name: Use the implicit query method in queryAbilityByWant to get abilityInfos + * @tc.desc: queryAbilityByWant for third app + */ + it('bms_queryAbilityByWant_1400', 0, async function (done) { + bundle.queryAbilityByWant( + { + "action": "entity_reserved", + "entities": ["entity_b1", "entity_not_exist"] + }, bundle.BundleFlag.GET_BUNDLE_DEFAULT, userId).then(res => { + expect(res).assertFail() + done() + }).catch(err => { + console.error(' fail bms_queryAbilityByWant_1400' + JSON.stringify(err)) + expect(err).assertEqual(INVALID_CODE) + done() + }) + }); + + /* + * @tc.number: bms_queryAbilityByWant_1500 + * @tc.name: Use the implicit query method in queryAbilityByWant to get abilityInfos + * @tc.desc: queryAbilityByWant for third app + */ + it('bms_queryAbilityByWant_1500', 0, async function (done) { + bundle.queryAbilityByWant( + { + "action": "entity_reserved", + "entities": ["entity_b1", "entity_b2", "entity_not_exist"] + }, bundle.BundleFlag.GET_BUNDLE_DEFAULT, userId).then(res => { + expect(res).assertFail() + done() + }).catch(err => { + console.error(' fail bms_queryAbilityByWant_1500' + JSON.stringify(err)) + expect(err).assertEqual(INVALID_CODE) + done() + }) + }); + + /* + * @tc.number: bms_queryAbilityByWant_1600 + * @tc.name: Use the implicit query method in queryAbilityByWant to get abilityInfos + * @tc.desc: queryAbilityByWant for third app + */ + it('bms_queryAbilityByWant_1600', 0, async function (done) { + bundle.queryAbilityByWant( + { + "action": "entity_reserved", + "entities": ["entity_not_exist"] + }, bundle.BundleFlag.GET_BUNDLE_DEFAULT, userId).then(res => { + expect(res).assertFail() + done() + }).catch(err => { + console.error(' fail bms_queryAbilityByWant_1600' + JSON.stringify(err)) + expect(err).assertEqual(INVALID_CODE) + done() + }) + }); + + /* + * @tc.number: bms_queryAbilityByWant_1700 + * @tc.name: Use the implicit query method in queryAbilityByWant to get abilityInfos + * @tc.desc: queryAbilityByWant for third app + */ + it('bms_queryAbilityByWant_1700', 0, async function (done) { + bundle.queryAbilityByWant( + { + "action": "entity_reserved", + }, bundle.BundleFlag.GET_BUNDLE_DEFAULT, userId).then(res => { + console.info(' success bms_queryAbilityByWant_1700 '+ JSON.stringify(res)) + const list = ['entityDoubleSkill','entityDoubleString','entitySingleString','entityEmpty'] + if(res && res.length) { + for(let i = 0; i < res.length; i++) { + expect(list.includes(res[i].description)).assertEqual(true) + } + } + done() + }).catch(err => { + console.error(' fail bms_queryAbilityByWant_1700 ' + JSON.stringify(err)) + expect().assertFail() + done() + }) + }); + + /* + * @tc.number: bms_queryAbilityByWant_1800 + * @tc.name: Use the implicit query method in queryAbilityByWant to get abilityInfos + * @tc.desc: queryAbilityByWant for third app + */ + it('bms_queryAbilityByWant_1800', 0, async function (done) { + bundle.queryAbilityByWant( + { + "action": "uri_reserved", + "uri": "" + }, bundle.BundleFlag.GET_BUNDLE_DEFAULT, userId).then(res => { + console.info(' success bms_queryAbilityByWant_1800 '+ JSON.stringify(res)) + const list = ['uriEmpty','uriSchemeEmpty'] + if(res && res.length) { + for(let i = 0; i < res.length; i++) { + expect(list.includes(res[i].description)).assertEqual(true) + } + } + done() + }).catch(err => { + console.error(' fail bms_queryAbilityByWant_1800 ' + JSON.stringify(err)) + expect().assertFail() + done() + }) + }); + + /* + * @tc.number: bms_queryAbilityByWant_1900 + * @tc.name: Use the implicit query method in queryAbilityByWant to get abilityInfos + * @tc.desc: queryAbilityByWant for third app + */ + it('bms_queryAbilityByWant_1900', 0, async function (done) { + bundle.queryAbilityByWant( + { + "action": "uri_reserved", + "uri": "content" + }, bundle.BundleFlag.GET_BUNDLE_DEFAULT, userId).then(res => { + console.info(' success bms_queryAbilityByWant_1900 '+ JSON.stringify(res)) + const list = ['uriHostEmpty','uriScheme'] + if(res && res.length) { + for(let i = 0; i < res.length; i++) { + expect(list.includes(res[i].description)).assertEqual(true) + } + } + done() + }).catch(err => { + console.error(' fail bms_queryAbilityByWant_1900 ' + JSON.stringify(err)) + expect().assertFail() + done() + }) + }); + + /* + * @tc.number: bms_queryAbilityByWant_2000 + * @tc.name: Use the implicit query method in queryAbilityByWant to get abilityInfos + * @tc.desc: queryAbilityByWant for third app + */ + it('bms_queryAbilityByWant_2000', 0, async function (done) { + bundle.queryAbilityByWant( + { + "action": "uri_reserved", + "uri": "content://www.test.com" + }, bundle.BundleFlag.GET_BUNDLE_DEFAULT, userId).then(res => { + console.info(' success bms_queryAbilityByWant_2000 '+ JSON.stringify(res)) + expect(res[0].description).assertEqual('uriSchemeHost') + done() + }).catch(err => { + console.error(' fail bms_queryAbilityByWant_2000 ' + JSON.stringify(err)) + expect().assertFail() + done() + }) + }); + + /* + * @tc.number: bms_queryAbilityByWant_2100 + * @tc.name: Use the implicit query method in queryAbilityByWant to get abilityInfos + * @tc.desc: queryAbilityByWant for third app + */ + it('bms_queryAbilityByWant_2100', 0, async function (done) { + bundle.queryAbilityByWant( + { + "action": "uri_reserved", + "uri": "content://www.test.com:8080" + }, bundle.BundleFlag.GET_BUNDLE_DEFAULT, userId).then(res => { + console.info(' success bms_queryAbilityByWant_2100 '+ JSON.stringify(res)) + expect(res[0].description).assertEqual('uriSchemeHostPort') + done() + }).catch(err => { + console.error(' fail bms_queryAbilityByWant_2100 ' + JSON.stringify(err)) + expect().assertFail() + done() + }) + }); + + /* + * @tc.number: bms_queryAbilityByWant_2200 + * @tc.name: Use the implicit query method in queryAbilityByWant to get abilityInfos + * @tc.desc: queryAbilityByWant for third app + */ + it('bms_queryAbilityByWant_2200', 0, async function (done) { + bundle.queryAbilityByWant( + { + "action": "uri_reserved", + "uri": "content://www.test.com:8080/query/student/name" + }, bundle.BundleFlag.GET_BUNDLE_DEFAULT, userId).then(res => { + console.info(' success bms_queryAbilityByWant_2200 '+ JSON.stringify(res)) + const list = ['uriSchemeHostPortPath','uriSchemeHostPortPathStartWith','uriSchemeHostPortPathRegx'] + if(res && res.length) { + for(let i = 0; i < res.length; i++) { + expect(list.includes(res[i].description)).assertEqual(true) + } + } + done() + }).catch(err => { + console.error(' fail bms_queryAbilityByWant_2200 ' + JSON.stringify(err)) + expect().assertFail() + done() + }) + }); + + /* + * @tc.number: bms_queryAbilityByWant_2300 + * @tc.name: Use the implicit query method in queryAbilityByWant to get abilityInfos + * @tc.desc: queryAbilityByWant for third app + */ + it('bms_queryAbilityByWant_2300', 0, async function (done) { + bundle.queryAbilityByWant( + { + "action": "uri_reserved", + "uri": "content://www.test.com/query/student/name" + }, bundle.BundleFlag.GET_BUNDLE_DEFAULT, userId).then(res => { + console.info(' success bms_queryAbilityByWant_2300 '+ JSON.stringify(res)) + const list = ['uriPortEmptyWithPath','uriPortEmptyWithPathStartWith','uriPortEmptyWithPathRegx'] + if(res && res.length) { + for(let i = 0; i < res.length; i++) { + expect(list.includes(res[i].description)).assertEqual(true) + } + } + done() + }).catch(err => { + console.error(' fail bms_queryAbilityByWant_2300 ' + JSON.stringify(err)) + expect().assertFail() + done() + }) + }); + + /* + * @tc.number: bms_queryAbilityByWant_2400 + * @tc.name: Use the implicit query method in queryAbilityByWant to get abilityInfos + * @tc.desc: queryAbilityByWant for third app + */ + it('bms_queryAbilityByWant_2400', 0, async function (done) { + bundle.queryAbilityByWant( + { + "action": "uri_reserved", + "uri": "content://www.test.com:8080/query/teacher/name" + }, bundle.BundleFlag.GET_BUNDLE_DEFAULT, userId).then(res => { + console.info(' success bms_queryAbilityByWant_2400 '+ JSON.stringify(res)) + expect(res[0].description).assertEqual('uriSchemeHostPortPathRegx') + done() + }).catch(err => { + console.error(' fail bms_queryAbilityByWant_2400 ' + JSON.stringify(err)) + expect().assertFail() + done() + }) + }); + + /* + * @tc.number: bms_queryAbilityByWant_2500 + * @tc.name: Use the implicit query method in queryAbilityByWant to get abilityInfos + * @tc.desc: queryAbilityByWant for third app + */ + it('bms_queryAbilityByWant_2500', 0, async function (done) { + bundle.queryAbilityByWant( + { + "action": "uri_reserved", + "uri": "content://www.test.com:8080/query/student/jack" + }, bundle.BundleFlag.GET_BUNDLE_DEFAULT, userId).then(res => { + console.info(' success bms_queryAbilityByWant_2500 '+ JSON.stringify(res)) + expect(res[0].description).assertEqual('uriSchemeHostPortPathStartWith') + done() + }).catch(err => { + console.error(' fail bms_queryAbilityByWant_2500 ' + JSON.stringify(err)) + expect().assertFail() + done() + }) + }); + + /* + * @tc.number: bms_queryAbilityByWant_2600 + * @tc.name: Use the implicit query method in queryAbilityByWant to get abilityInfos + * @tc.desc: queryAbilityByWant for third app + */ + it('bms_queryAbilityByWant_2600', 0, async function (done) { + bundle.queryAbilityByWant( + { + "action": "uri_reserved", + "uri": "file://www.test.com:8080/query/student/name" + }, bundle.BundleFlag.GET_BUNDLE_DEFAULT, userId).then(res => { + console.info(' success bms_queryAbilityByWant_2600 '+ JSON.stringify(res)) + expect(res[0].description).assertEqual('uriMultiPath') + done() + }).catch(err => { + console.error(' fail bms_queryAbilityByWant_2600 ' + JSON.stringify(err)) + expect().assertFail() + done() + }) + }); + + /* + * @tc.number: bms_queryAbilityByWant_2700 + * @tc.name: Use the implicit query method in queryAbilityByWant to get abilityInfos + * @tc.desc: queryAbilityByWant for third app + */ + it('bms_queryAbilityByWant_2700', 0, async function (done) { + bundle.queryAbilityByWant( + { + "action": "uri_reserved", + "uri": "file://www.test.com:8080/query/teacher/hello" + }, bundle.BundleFlag.GET_BUNDLE_DEFAULT, userId).then(res => { + console.info(' success bms_queryAbilityByWant_2700 '+ JSON.stringify(res)) + expect(res[0].description).assertEqual('uriMultiPath') + done() + }).catch(err => { + console.error(' fail bms_queryAbilityByWant_2700 ' + JSON.stringify(err)) + expect().assertFail() + done() + }) + }); + + /* + * @tc.number: bms_queryAbilityByWant_2800 + * @tc.name: Use the implicit query method in queryAbilityByWant to get abilityInfos + * @tc.desc: queryAbilityByWant for third app + */ + it('bms_queryAbilityByWant_2800', 0, async function (done) { + bundle.queryAbilityByWant( + { + "action": "uri_reserved", + "uri": "content://abc" + }, bundle.BundleFlag.GET_BUNDLE_DEFAULT, userId).then(res => { + expect(res).assertFail() + done() + }).catch(err => { + console.error(' fail bms_queryAbilityByWant_2800' + JSON.stringify(err)) + expect(err).assertEqual(INVALID_CODE) + done() + }) + }); + + /* + * @tc.number: bms_queryAbilityByWant_2900 + * @tc.name: Use the implicit query method in queryAbilityByWant to get abilityInfos + * @tc.desc: queryAbilityByWant for third app + */ + it('bms_queryAbilityByWant_2900', 0, async function (done) { + bundle.queryAbilityByWant( + { + "type": "*/*" + }, bundle.BundleFlag.GET_BUNDLE_DEFAULT, userId).then(res => { + console.info(' success bms_queryAbilityByWant_2900 '+ JSON.stringify(res)) + const list = ['TypeDoubleWildCard','TypeSingleWildCard','TypeString', 'TypeStringExt'] + if(res && res.length) { + for(let i = 0; i < res.length; i++) { + expect(list.includes(res[i].description)).assertEqual(true) + } + } + done() + }).catch(err => { + console.error(' fail bms_queryAbilityByWant_2900' + JSON.stringify(err)) + expect().assertFail() + done() + }) + }); + + /* + * @tc.number: bms_queryAbilityByWant_3000 + * @tc.name: Use the implicit query method in queryAbilityByWant to get abilityInfos + * @tc.desc: queryAbilityByWant for third app + */ + it('bms_queryAbilityByWant_3000', 0, async function (done) { + bundle.queryAbilityByWant( + { + "type": "prefixType/*" + }, bundle.BundleFlag.GET_BUNDLE_DEFAULT, userId).then(res => { + console.info(' success bms_queryAbilityByWant_3000 '+ JSON.stringify(res)) + const list = ['TypeDoubleWildCard','TypeSingleWildCard','TypeString'] + if(res && res.length) { + for(let i = 0; i < res.length; i++) { + expect(list.includes(res[i].description)).assertEqual(true) + } + } + done() + }).catch(err => { + console.error(' fail bms_queryAbilityByWant_3000 ' + JSON.stringify(err)) + expect().assertFail() + done() + }) + }); + + /* + * @tc.number: bms_queryAbilityByWant_3100 + * @tc.name: Use the implicit query method in queryAbilityByWant to get abilityInfos + * @tc.desc: queryAbilityByWant for third app + */ + it('bms_queryAbilityByWant_3100', 0, async function (done) { + bundle.queryAbilityByWant( + { + "type": "prefixType/suffixType" + }, bundle.BundleFlag.GET_BUNDLE_DEFAULT, userId).then(res => { + console.info(' success bms_queryAbilityByWant_3100 '+ JSON.stringify(res)) + const list = ['TypeDoubleWildCard','TypeSingleWildCard','TypeString'] + if(res && res.length) { + for(let i = 0; i < res.length; i++) { + expect(list.includes(res[i].description)).assertEqual(true) + } + } + done() + }).catch(err => { + console.error(' fail bms_queryAbilityByWant_3100' + JSON.stringify(err)) + expect().assertFail() + done() + }) + }); + + /* + * @tc.number: bms_queryAbilityByWant_3200 + * @tc.name: Use the implicit query method in queryAbilityByWant to get abilityInfos + * @tc.desc: queryAbilityByWant for third app + */ + it('bms_queryAbilityByWant_3200', 0, async function (done) { + bundle.queryAbilityByWant( + { + "type": "prefixTypeExt/suffixTypeExt" + }, bundle.BundleFlag.GET_BUNDLE_DEFAULT, userId).then(res => { + console.info(' success bms_queryAbilityByWant_3200 '+ JSON.stringify(res)) + const list = ['TypeStringExt','TypeDoubleWildCard'] + if(res && res.length) { + for(let i = 0; i < res.length; i++) { + expect(list.includes(res[i].description)).assertEqual(true) + } + } + done() + }).catch(err => { + console.error(' fail bms_queryAbilityByWant_3200' + JSON.stringify(err)) + expect().assertFail() + done() + }) + }); + + /* + * @tc.number: bms_queryAbilityByWant_3300 + * @tc.name: Use the implicit query method in queryAbilityByWant to get abilityInfos + * @tc.desc: queryAbilityByWant for third app + */ + it('bms_queryAbilityByWant_3300', 0, async function (done) { + bundle.queryAbilityByWant( + { + "action": "type_reserved" + }, bundle.BundleFlag.GET_BUNDLE_DEFAULT, userId).then(res => { + console.info(' success bms_queryAbilityByWant_3300 '+ JSON.stringify(res)) + const list = ['TypeEmpty','TypeEmptyExt'] + if(res && res.length) { + for(let i = 0; i < res.length; i++) { + expect(list.includes(res[i].description)).assertEqual(true) + } + } + done() + }).catch(err => { + console.error(' fail bms_queryAbilityByWant_3300 ' + JSON.stringify(err)) + expect().assertFail() + done() + }) + }); + + /* + * @tc.number: bms_queryAbilityByWant_3400 + * @tc.name: Use the implicit query method in queryAbilityByWant to get abilityInfos + * @tc.desc: queryAbilityByWant for third app + */ + it('bms_queryAbilityByWant_3400', 0, async function (done) { + bundle.queryAbilityByWant( + { + "action": "type_reserved", + "type": "" + }, bundle.BundleFlag.GET_BUNDLE_DEFAULT, userId).then(res => { + console.info(' success bms_queryAbilityByWant_3400 '+ JSON.stringify(res)) + const list = ['TypeEmpty','TypeEmptyExt'] + if(res && res.length) { + for(let i = 0; i < res.length; i++) { + expect(list.includes(res[i].description)).assertEqual(true) + } + } + done() + }).catch(err => { + console.error(' fail bms_queryAbilityByWant_3400 ' + JSON.stringify(err)) + expect().assertFail() + done() + }) + }); + + /* + * @tc.number: bms_queryAbilityByWant_3500 + * @tc.name: Use the implicit query method in queryAbilityByWant to get abilityInfos + * @tc.desc: queryAbilityByWant for third app + */ + it('bms_queryAbilityByWant_3500', 0, async function (done) { + bundle.queryAbilityByWant( + { + "type": "none/none" + }, bundle.BundleFlag.GET_BUNDLE_DEFAULT, userId).then(res => { + console.info(' success bms_queryAbilityByWant_3500'+ JSON.stringify(res)) + expect(res[0].description).assertEqual('TypeDoubleWildCard') + done() + }).catch(err => { + console.error(' fail bms_queryAbilityByWant_3500' + JSON.stringify(err)) + expect().assertFail() + done() + }) + }); + + /* + * @tc.number: bms_queryAbilityByWant_3600 + * @tc.name: Use the implicit query method in queryAbilityByWant to get abilityInfos + * @tc.desc: queryAbilityByWant for third app + */ + it('bms_queryAbilityByWant_3600', 0, async function (done) { + bundle.queryAbilityByWant( + { + "action": "all_action_a", + "entities":["all_entity_a"] + }, bundle.BundleFlag.GET_BUNDLE_DEFAULT, userId).then(res => { + console.info(' success bms_queryAbilityByWant_3600'+ JSON.stringify(res)) + expect(res[0].description).assertEqual('allAE') + done() + }).catch(err => { + console.error(' fail bms_queryAbilityByWant_3600' + JSON.stringify(err)) + expect().assertFail() + done() + }) + }); + + /* + * @tc.number: bms_queryAbilityByWant_3700 + * @tc.name: Use the implicit query method in queryAbilityByWant to get abilityInfos + * @tc.desc: queryAbilityByWant for third app + */ + it('bms_queryAbilityByWant_3700', 0, async function (done) { + bundle.queryAbilityByWant( + { + "action": "all_action_b", + "entities":["all_entity_b1", "all_entity_b2"] + }, bundle.BundleFlag.GET_BUNDLE_DEFAULT, userId).then(res => { + console.info(' success bms_queryAbilityByWant_3700'+ JSON.stringify(res)) + expect(res[0].description).assertEqual('allAEs') + done() + }).catch(err => { + console.error(' fail bms_queryAbilityByWant_3700' + JSON.stringify(err)) + expect().assertFail() + done() + }) + }); + + /* + * @tc.number: bms_queryAbilityByWant_3800 + * @tc.name: Use the implicit query method in queryAbilityByWant to get abilityInfos + * @tc.desc: queryAbilityByWant for third app + */ + it('bms_queryAbilityByWant_3800', 0, async function (done) { + bundle.queryAbilityByWant( + { + "uri" :"http://www.test.com:8080/query/student/name", + "type":"text/plain" + }, bundle.BundleFlag.GET_BUNDLE_DEFAULT, userId).then(res => { + console.info(' success bms_queryAbilityByWant_3800'+ JSON.stringify(res)) + expect(res[0].description).assertEqual('allUT') + done() + }).catch(err => { + console.error(' fail bms_queryAbilityByWant_3800' + JSON.stringify(err)) + expect().assertFail() + done() + }) + }); + + /* + * @tc.number: bms_queryAbilityByWant_3900 + * @tc.name: Use the implicit query method in queryAbilityByWant to get abilityInfos + * @tc.desc: queryAbilityByWant for third app + */ + it('bms_queryAbilityByWant_3900', 0, async function (done) { + bundle.queryAbilityByWant( + { + "uri" :"http://www.test.com:8080/query/student/name", + "type":"text/*" + }, bundle.BundleFlag.GET_BUNDLE_DEFAULT, userId).then(res => { + console.info(' success bms_queryAbilityByWant_3900'+ JSON.stringify(res)) + expect(res[0].description).assertEqual('allUT') + done() + }).catch(err => { + console.error(' fail bms_queryAbilityByWant_3900' + JSON.stringify(err)) + expect().assertFail() + done() + }) + }); + + /* + * @tc.number: bms_queryAbilityByWant_4000 + * @tc.name: Use the implicit query method in queryAbilityByWant to get abilityInfos + * @tc.desc: queryAbilityByWant for third app + */ + it('bms_queryAbilityByWant_4000', 0, async function (done) { + bundle.queryAbilityByWant( + { + "uri" :"http://www.test.com:8080/query/teacher", + "type":"text/plain" + }, bundle.BundleFlag.GET_BUNDLE_DEFAULT, userId).then(res => { + console.info(' success bms_queryAbilityByWant_4000'+ JSON.stringify(res)) + expect(res[0].description).assertEqual('allUT') + done() + }).catch(err => { + console.error(' fail bms_queryAbilityByWant_4000' + JSON.stringify(err)) + expect().assertFail() + done() + }) + }); + + /* + * @tc.number: bms_queryAbilityByWant_4100 + * @tc.name: Use the implicit query method in queryAbilityByWant to get abilityInfos + * @tc.desc: queryAbilityByWant for third app + */ + it('bms_queryAbilityByWant_4100', 0, async function (done) { + bundle.queryAbilityByWant( + { + "uri" :"http://www.test.com:8080/query/teacher/hello", + "type":"text/plain" + }, bundle.BundleFlag.GET_BUNDLE_DEFAULT, userId).then(res => { + console.info(' success bms_queryAbilityByWant_4100'+ JSON.stringify(res)) + expect(res[0].description).assertEqual('allUT') + done() + }).catch(err => { + console.error(' fail bms_queryAbilityByWant_4100' + JSON.stringify(err)) + expect().assertFail() + done() + }) + }); + + /* + * @tc.number: bms_queryAbilityByWant_4200 + * @tc.name: Use the implicit query method in queryAbilityByWant to get abilityInfos + * @tc.desc: queryAbilityByWant for third app + */ + it('bms_queryAbilityByWant_4200', 0, async function (done) { + bundle.queryAbilityByWant( + { + "uri" :"http://www.test.com:8080/update/hello/world/name", + "type":"text/plain" + }, bundle.BundleFlag.GET_BUNDLE_DEFAULT, userId).then(res => { + console.info(' success bms_queryAbilityByWant_4200 '+ JSON.stringify(res)) + expect(res[0].description).assertEqual('allUT') + done() + }).catch(err => { + console.error(' fail bms_queryAbilityByWant_4200 ' + JSON.stringify(err)) + expect().assertFail() + done() + }) + }); + + /* + * @tc.number: bms_queryAbilityByWant_4300 + * @tc.name: Use the implicit query method in queryAbilityByWant to get abilityInfos + * @tc.desc: queryAbilityByWant for third app + */ + it('bms_queryAbilityByWant_4300', 0, async function (done) { + bundle.queryAbilityByWant( + { + "action":"all_action_c", + "entities":["all_entity_c1"], + "uri" :"https://www.test.com:8080/query/student/name", + "type":"text/plain" + }, bundle.BundleFlag.GET_BUNDLE_DEFAULT, userId).then(res => { + console.info(' success bms_queryAbilityByWant_4300 '+ JSON.stringify(res)) + expect(res[0].description).assertEqual('allAEUT') + done() + }).catch(err => { + console.error(' fail bms_queryAbilityByWant_4300 ' + JSON.stringify(err)) + expect().assertFail() + done() + }) + }); + + /* + * @tc.number: bms_queryAbilityByWant_4400 + * @tc.name: Use the implicit query method in queryAbilityByWant to get abilityInfos + * @tc.desc: queryAbilityByWant for third app + */ + it('bms_queryAbilityByWant_4400', 0, async function (done) { + bundle.queryAbilityByWant( + { + "action":"all_action_c", + "entities":["all_entity_c1", "all_entity_c2"], + "uri" :"https://www.test.com:8080/query/student/name", + "type":"text/*" + }, bundle.BundleFlag.GET_BUNDLE_DEFAULT, userId).then(res => { + console.info(' success bms_queryAbilityByWant_4400 '+ JSON.stringify(res)) + expect(res[0].description).assertEqual('allAEUT') + done() + }).catch(err => { + console.error(' fail bms_queryAbilityByWant_4400 ' + JSON.stringify(err)) + expect().assertFail() + done() + }) + }); + }) +} diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/test/List.test.ets b/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/test/List.test.ets index c5ff6d6de98c6dbb22a2c0c2bfc9317a85b61ae7..921a5131e54fde50bde99504a6dd31de35893a0a 100644 --- a/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/test/List.test.ets +++ b/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/test/List.test.ets @@ -23,6 +23,7 @@ import getAbilityIcon from "./GetAbilityIcon.test.ets"; import getNameForUid from "./GetNameForUid.test.ets"; import queryExtensionAbilityInfos from "./QueryExtensionAbilityInfos.test.ets"; import getBundleArchiveInfo from "./getBundleArchiveInfo.test.ets"; +import getQueryAbilityByWant from './GetQueryAbilityByWant.test.ets'; export default function testsuite() { getBundleArchiveInfo(); @@ -30,6 +31,7 @@ export default function testsuite() { getAbilityIcon(); getLaunchWantForBundle(); getNameForUid(); + getQueryAbilityByWant(); //RM.007 getApplicationInfoJsunit(); getAllAppInfoJsunit(); diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosseventhscene/BUILD.gn b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosseventhscene/BUILD.gn new file mode 100644 index 0000000000000000000000000000000000000000..bfa07fdbffc53adbd7cd27a34829c7407614c8a8 --- /dev/null +++ b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosseventhscene/BUILD.gn @@ -0,0 +1,34 @@ +# 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_hap("bmsThirdBundleTest7") { + hap_profile = "./src/main/config.json" + hap_name = "bmsThirdBundleTest7" + subsystem_name = XTS_SUITENAME + final_hap_path = + "${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap" + testonly = true + deps = [ + ":hjs_demo_js_assets", + ":hjs_demo_resources", + ] + certificate_profile = "./signature/openharmony_sx.p7b" +} +ohos_js_assets("hjs_demo_js_assets") { + source_dir = "./src/main/js/default" +} +ohos_resources("hjs_demo_resources") { + sources = [ "./src/main/js/resources" ] + hap_profile = "./src/main/config.json" +} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosseventhscene/Test.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosseventhscene/Test.json new file mode 100644 index 0000000000000000000000000000000000000000..7a88763ed8d2ac31dd30211b9574f47273e84549 --- /dev/null +++ b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosseventhscene/Test.json @@ -0,0 +1,3 @@ +{ + "description": "Configuration for hjunit demo Tests", +} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosseventhscene/signature/openharmony_sx.p7b b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosseventhscene/signature/openharmony_sx.p7b new file mode 100644 index 0000000000000000000000000000000000000000..66b4457a8a81fb8d3356cf46d67226c850944858 Binary files /dev/null and b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosseventhscene/signature/openharmony_sx.p7b differ diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosseventhscene/src/main/config.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosseventhscene/src/main/config.json new file mode 100644 index 0000000000000000000000000000000000000000..e0599f80c5953d9384dcca6dbbeab38b36c5fd37 --- /dev/null +++ b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosseventhscene/src/main/config.json @@ -0,0 +1,1251 @@ +{ + "app": { + "vendor": "example", + "bundleName": "com.example.third7", + "version": { + "code": 1000000, + "name": "2.0.0" + }, + "apiVersion": { + "compatible": 4, + "target": 5, + "releaseType": "Beta1" + } + }, + "deviceConfig": { + "default": { + "process": "helloworld", + "keepAlive": true + } + }, + "module": { + "mainAbility": ".MainAbility", + "deviceType": [ + "phone" + ], + "abilities": [ + { + "skills": [ + { + "entities": [ + "entity.system.home" + ], + "actions": [ + "action.system.home" + ] + } + ], + + "visible": true, + "srcPath": "MainAbility", + "name": ".MainAbility", + "srcLanguage": "ets", + "icon": "$media:icon", + "description": "$string:master_desc", + "formsEnabled": false, + "label": "$string:app_name", + "type": "page", + "launchType": "standard" + }, + { + "skills": [ + { + "actions": [] + } + ], + "visible": true, + "srcPath": "MainAbility", + "name": ".actionEmpty", + "srcLanguage": "ets", + "icon": "$media:icon", + "description": "actionEmpty", + "formsEnabled": false, + "label": "$string:app_name", + "type": "page", + "launchType": "standard" + }, + { + "skills": [ + { + "actions": [ + "" + ] + } + ], + + "visible": true, + "srcPath": "MainAbility", + "name": ".actionStringLenZero", + "srcLanguage": "ets", + "icon": "$media:icon", + "description": "actionStringLenZero", + "formsEnabled": false, + "label": "$string:app_name", + "type": "page", + "launchType": "standard" + }, + { + "skills": [ + { + "actions": [ + "action_a" + ] + } + ], + + "visible": true, + "srcPath": "MainAbility", + "name": ".actionSingleString", + "srcLanguage": "ets", + "icon": "$media:icon", + "description": "actionSingleString", + "formsEnabled": false, + "label": "$string:app_name", + "type": "page", + "launchType": "standard" + }, + { + "skills": [ + { + "actions": [ + "action_b1", + "action_b2" + ] + } + ], + + "visible": true, + "srcPath": "MainAbility", + "name": ".actionDoubleString", + "srcLanguage": "ets", + "icon": "$media:icon", + "description": "actionDoubleString", + "formsEnabled": false, + "label": "$string:app_name", + "type": "page", + "launchType": "standard" + }, + { + "skills": [ + { + "actions": [ + "action_c1", + "action_c2" + ] + }, + { + "actions": [ + "action_d1", + "action_d2" + ] + } + ], + + "visible": true, + "srcPath": "MainAbility", + "name": ".actionDoubleSkill", + "srcLanguage": "ets", + "icon": "$media:icon", + "description": "actionDoubleSkill", + "formsEnabled": false, + "label": "$string:app_name", + "type": "page", + "launchType": "standard" + }, + { + "skills": [ + { + "entities": [], + "actions": [ + "entity_reserved" + ] + } + ], + + "visible": true, + "srcPath": "MainAbility", + "name": ".entityEmpty", + "srcLanguage": "ets", + "icon": "$media:icon", + "description": "entityEmpty", + "formsEnabled": false, + "label": "$string:app_name", + "type": "page", + "launchType": "standard" + }, + { + "skills": [ + { + "entities": [ + "entity_a" + ], + "actions": [ + "entity_reserved" + ] + } + ], + + "visible": true, + "srcPath": "MainAbility", + "name": ".entitySingleString", + "srcLanguage": "ets", + "icon": "$media:icon", + "description": "entitySingleString", + "formsEnabled": false, + "label": "$string:app_name", + "type": "page", + "launchType": "standard" + }, + { + "skills": [ + { + "entities": [ + "entity_b1", + "entity_b2" + ], + "actions": [ + "entity_reserved" + ] + } + ], + + "visible": true, + "srcPath": "MainAbility", + "name": ".entityDoubleString", + "srcLanguage": "ets", + "icon": "$media:icon", + "description": "entityDoubleString", + "formsEnabled": false, + "label": "$string:app_name", + "type": "page", + "launchType": "standard" + }, + { + "skills": [ + { + "entities": [ + "entity_c1", + "entity_c2" + ], + "actions": [ + "entity_reserved" + ] + }, + { + "entities": [ + "entity_d1", + "entity_d2" + ], + "actions": [ + "entity_reserved" + ] + } + ], + + "visible": true, + "srcPath": "MainAbility", + "name": ".entityDoubleSkill", + "srcLanguage": "ets", + "icon": "$media:icon", + "description": "entityDoubleSkill", + "formsEnabled": false, + "label": "$string:app_name", + "type": "page", + "launchType": "standard" + }, + { + "skills": [ + { + "uris": [], + "actions": [ + "uri_reserved" + ] + } + ], + + "visible": true, + "srcPath": "MainAbility", + "name": ".uriEmpty", + "srcLanguage": "ets", + "icon": "$media:icon", + "description": "uriEmpty", + "formsEnabled": false, + "label": "$string:app_name", + "type": "page", + "launchType": "standard" + }, + { + "skills": [ + { + "uris": [ + { + "scheme": "content" + } + ], + "actions": [ + "uri_reserved" + ] + } + ], + + "visible": true, + "srcPath": "MainAbility", + "name": ".uriScheme", + "srcLanguage": "ets", + "icon": "$media:icon", + "description": "uriScheme", + "formsEnabled": false, + "label": "$string:app_name", + "type": "page", + "launchType": "standard" + }, + { + "skills": [ + { + "uris": [ + { + "scheme": "content", + "host": "www.test.com" + } + ], + "actions": [ + "uri_reserved" + ] + } + ], + + "visible": true, + "srcPath": "MainAbility", + "name": ".uriSchemeHost", + "srcLanguage": "ets", + "icon": "$media:icon", + "description": "uriSchemeHost", + "formsEnabled": false, + "label": "$string:app_name", + "type": "page", + "launchType": "standard" + }, + { + "skills": [ + { + "uris": [ + { + "scheme": "content", + "port": "8080", + "host": "www.test.com" + } + ], + "actions": [ + "uri_reserved" + ] + } + ], + + "visible": true, + "srcPath": "MainAbility", + "name": ".uriSchemeHostPort", + "srcLanguage": "ets", + "icon": "$media:icon", + "description": "uriSchemeHostPort", + "formsEnabled": false, + "label": "$string:app_name", + "type": "page", + "launchType": "standard" + }, + { + "skills": [ + { + "uris": [ + { + "path": "query/student/name", + "scheme": "content", + "port": "8080", + "host": "www.test.com" + } + ], + "actions": [ + "uri_reserved" + ] + } + ], + + "visible": true, + "srcPath": "MainAbility", + "name": ".uriSchemeHostPortPath", + "srcLanguage": "ets", + "icon": "$media:icon", + "description": "uriSchemeHostPortPath", + "formsEnabled": false, + "label": "$string:app_name", + "type": "page", + "launchType": "standard" + }, + { + "skills": [ + { + "uris": [ + { + "pathStartWith": "query/student", + "scheme": "content", + "port": "8080", + "host": "www.test.com" + } + ], + "actions": [ + "uri_reserved" + ] + } + ], + + "visible": true, + "srcPath": "MainAbility", + "name": ".uriSchemeHostPortPathStartWith", + "srcLanguage": "ets", + "icon": "$media:icon", + "description": "uriSchemeHostPortPathStartWith", + "formsEnabled": false, + "label": "$string:app_name", + "type": "page", + "launchType": "standard" + }, + { + "skills": [ + { + "uris": [ + { + "scheme": "content", + "port": "8080", + "host": "www.test.com", + "pathRegx": "query/.*/name" + } + ], + "actions": [ + "uri_reserved" + ] + } + ], + + "visible": true, + "srcPath": "MainAbility", + "name": ".uriSchemeHostPortPathRegx", + "srcLanguage": "ets", + "icon": "$media:icon", + "description": "uriSchemeHostPortPathRegx", + "formsEnabled": false, + "label": "$string:app_name", + "type": "page", + "launchType": "standard" + }, + { + "skills": [ + { + "uris": [ + { + "scheme": "", + "port": "8080", + "host": "www.test.com" + } + ], + "actions": [ + "uri_reserved" + ] + } + ], + + "visible": true, + "srcPath": "MainAbility", + "name": ".uriSchemeEmpty", + "srcLanguage": "ets", + "icon": "$media:icon", + "description": "uriSchemeEmpty", + "formsEnabled": false, + "label": "$string:app_name", + "type": "page", + "launchType": "standard" + }, + { + "skills": [ + { + "uris": [ + { + "scheme": "content", + "port": "8080", + "host": "" + } + ], + "actions": [ + "uri_reserved" + ] + } + ], + + "visible": true, + "srcPath": "MainAbility", + "name": ".uriHostEmpty", + "srcLanguage": "ets", + "icon": "$media:icon", + "description": "uriHostEmpty", + "formsEnabled": false, + "label": "$string:app_name", + "type": "page", + "launchType": "standard" + }, + { + "skills": [ + { + "uris": [ + { + "path": "query/student/name", + "scheme": "content", + "host": "www.test.com" + } + ], + "actions": [ + "uri_reserved" + ] + } + ], + + "visible": true, + "srcPath": "MainAbility", + "name": ".uriPortEmptyWithPath", + "srcLanguage": "ets", + "icon": "$media:icon", + "description": "uriPortEmptyWithPath", + "formsEnabled": false, + "label": "$string:app_name", + "type": "page", + "launchType": "standard" + }, + { + "skills": [ + { + "uris": [ + { + "pathStartWith": "query/student", + "scheme": "content", + "host": "www.test.com" + } + ], + "actions": [ + "uri_reserved" + ] + } + ], + + "visible": true, + "srcPath": "MainAbility", + "name": ".uriPortEmptyWithPathStartWith", + "srcLanguage": "ets", + "icon": "$media:icon", + "description": "uriPortEmptyWithPathStartWith", + "formsEnabled": false, + "label": "$string:app_name", + "type": "page", + "launchType": "standard" + }, + { + "skills": [ + { + "uris": [ + { + "scheme": "content", + "host": "www.test.com", + "pathRegx": "query/.*/name" + } + ], + "actions": [ + "uri_reserved" + ] + } + ], + + "visible": true, + "srcPath": "MainAbility", + "name": ".uriPortEmptyWithPathRegx", + "srcLanguage": "ets", + "icon": "$media:icon", + "description": "uriPortEmptyWithPathRegx", + "formsEnabled": false, + "label": "$string:app_name", + "type": "page", + "launchType": "standard" + }, + { + "skills": [ + { + "uris": [ + { + "path": "query/student/name", + "pathStartWith": "query/teacher", + "scheme": "file", + "port": "8080", + "host": "www.test.com", + "pathRegx": "update/.*/name" + } + ], + "actions": [ + "uri_reserved" + ] + } + ], + + "visible": true, + "srcPath": "MainAbility", + "name": ".uriMultiPath", + "srcLanguage": "ets", + "icon": "$media:icon", + "description": "uriMultiPath", + "formsEnabled": false, + "label": "$string:app_name", + "type": "page", + "launchType": "standard" + }, + { + "skills": [ + { + "uris": [ + { + "type": "*/*" + } + ], + "actions": [ + "type_reserved" + ] + } + ], + + "visible": true, + "srcPath": "MainAbility", + "name": ".TypeDoubleWildCard", + "srcLanguage": "ets", + "icon": "$media:icon", + "description": "TypeDoubleWildCard", + "formsEnabled": false, + "label": "$string:app_name", + "type": "page", + "launchType": "standard" + }, + { + "skills": [ + { + "uris": [ + { + "type": "prefixType/*" + } + ], + "actions": [ + "type_reserved" + ] + } + ], + + "visible": true, + "srcPath": "MainAbility", + "name": ".TypeSingleWildCard", + "srcLanguage": "ets", + "icon": "$media:icon", + "description": "TypeSingleWildCard", + "formsEnabled": false, + "label": "$string:app_name", + "type": "page", + "launchType": "standard" + }, + { + "skills": [ + { + "uris": [ + { + "type": "prefixType/suffixType" + } + ], + "actions": [ + "type_reserved" + ] + } + ], + + "visible": true, + "srcPath": "MainAbility", + "name": ".TypeString", + "srcLanguage": "ets", + "icon": "$media:icon", + "description": "TypeString", + "formsEnabled": false, + "label": "$string:app_name", + "type": "page", + "launchType": "standard" + }, + { + "skills": [ + { + "uris": [ + { + "type": "prefixTypeExt/suffixTypeExt" + } + ], + "actions": [ + "type_reserved" + ] + } + ], + + "visible": true, + "srcPath": "MainAbility", + "name": ".TypeStringExt", + "srcLanguage": "ets", + "icon": "$media:icon", + "description": "TypeStringExt", + "formsEnabled": false, + "label": "$string:app_name", + "type": "page", + "launchType": "standard" + }, + { + "skills": [ + { + "uris": [ + { + "type": "" + } + ], + "actions": [ + "type_reserved" + ] + } + ], + + "visible": true, + "srcPath": "MainAbility", + "name": ".TypeEmpty", + "srcLanguage": "ets", + "icon": "$media:icon", + "description": "TypeEmpty", + "formsEnabled": false, + "label": "$string:app_name", + "type": "page", + "launchType": "standard" + }, + { + "skills": [ + { + "uris": [ + {} + ], + "actions": [ + "type_reserved" + ] + } + ], + + "visible": true, + "srcPath": "MainAbility", + "name": ".TypeEmptyExt", + "srcLanguage": "ets", + "icon": "$media:icon", + "description": "TypeEmptyExt", + "formsEnabled": false, + "label": "$string:app_name", + "type": "page", + "launchType": "standard" + }, + { + "skills": [ + { + "entities": [ + "all_entity_a" + ], + "actions": [ + "all_action_a" + ] + } + ], + + "visible": true, + "srcPath": "MainAbility", + "name": ".allAE", + "srcLanguage": "ets", + "icon": "$media:icon", + "description": "allAE", + "formsEnabled": false, + "label": "$string:app_name", + "type": "page", + "launchType": "standard" + }, + { + "skills": [ + { + "entities": [ + "all_entity_b1", + "all_entity_b2" + ], + "actions": [ + "all_action_b" + ] + } + ], + + "visible": true, + "srcPath": "MainAbility", + "name": ".allAEs", + "srcLanguage": "ets", + "icon": "$media:icon", + "description": "allAEs", + "formsEnabled": false, + "label": "$string:app_name", + "type": "page", + "launchType": "standard" + }, + { + "skills": [ + { + "uris": [ + { + "path": "query/student/name", + "pathStartWith": "query/teacher", + "scheme": "http", + "port": "8080", + "host": "www.test.com", + "pathRegx": "update/.*/name", + "type": "text/plain" + } + ], + "actions": [ + "all_reserved" + ] + } + ], + + "visible": true, + "srcPath": "MainAbility", + "name": ".allUT", + "srcLanguage": "ets", + "icon": "$media:icon", + "description": "allUT", + "formsEnabled": false, + "label": "$string:app_name", + "type": "page", + "launchType": "standard" + }, + { + "skills": [ + { + "uris": [ + { + "path": "query/student/name", + "scheme": "https", + "port": "8080", + "host": "www.test.com", + "type": "text/*" + } + ], + "entities": [ + "all_entity_c1", + "all_entity_c2" + ], + "actions": [ + "all_action_c" + ] + } + ], + + "visible": true, + "srcPath": "MainAbility", + "name": ".allAEUT", + "srcLanguage": "ets", + "icon": "$media:icon", + "description": "allAEUT", + "formsEnabled": false, + "label": "$string:app_name", + "type": "page", + "launchType": "standard" + } + ], + "distro": { + "moduleType": "entry", + "installationFree": false, + "deliveryWithInstall": true, + "moduleName": "entry" + }, + "package": "com.example.third7", + "name": ".MyApplication", + "shortcuts": [ + { + "intents": [ + { + "targetBundle": "com.hello.world", + "targetClass": "com.hello.world.MainAbility" + }, + { + "targetBundle": "com.example.third7", + "targetClass": "com.example.third7.MainAbility" + } + ], + "icon": "$media:icon", + "label": "$string:app_name", + "shortcutId": "id001" + }, + { + "intents": [ + { + "targetBundle": "com.hello.world2", + "targetClass": "com.hello.world2.MainAbility" + }, + { + "targetBundle": "com.example.third72", + "targetClass": "com.example.third72.MainAbility" + } + ], + "icon": "$media:icon", + "label": "$string:app_name", + "shortcutId": "id002" + } + ], + "js": [ + { + "mode": { + "syntax": "ets", + "type": "pageAbility" + }, + "pages": [ + "pages/index" + ], + "name": ".MainAbility", + "window": { + "designWidth": 720, + "autoDesignWidth": false + } + }, + { + "mode": { + "syntax": "ets", + "type": "pageAbility" + }, + "pages": [ + "pages/index" + ], + "name": ".actionEmpty" + }, + { + "mode": { + "syntax": "ets", + "type": "pageAbility" + }, + "pages": [ + "pages/index" + ], + "name": ".actionStringLenZero" + }, + { + "mode": { + "syntax": "ets", + "type": "pageAbility" + }, + "pages": [ + "pages/index" + ], + "name": ".actionSingleString" + }, + { + "mode": { + "syntax": "ets", + "type": "pageAbility" + }, + "pages": [ + "pages/index" + ], + "name": ".actionDoubleString" + }, + { + "mode": { + "syntax": "ets", + "type": "pageAbility" + }, + "pages": [ + "pages/index" + ], + "name": ".actionDoubleSkill" + }, + { + "mode": { + "syntax": "ets", + "type": "pageAbility" + }, + "pages": [ + "pages/index" + ], + "name": ".entityEmpty" + }, + { + "mode": { + "syntax": "ets", + "type": "pageAbility" + }, + "pages": [ + "pages/index" + ], + "name": ".entitySingleString" + }, + { + "mode": { + "syntax": "ets", + "type": "pageAbility" + }, + "pages": [ + "pages/index" + ], + "name": ".entityDoubleString" + }, + { + "mode": { + "syntax": "ets", + "type": "pageAbility" + }, + "pages": [ + "pages/index" + ], + "name": ".entityDoubleSkill" + }, + { + "mode": { + "syntax": "ets", + "type": "pageAbility" + }, + "pages": [ + "pages/index" + ], + "name": ".uriEmpty" + }, + { + "mode": { + "syntax": "ets", + "type": "pageAbility" + }, + "pages": [ + "pages/index" + ], + "name": ".uriScheme" + }, + { + "mode": { + "syntax": "ets", + "type": "pageAbility" + }, + "pages": [ + "pages/index" + ], + "name": ".uriSchemeHost" + }, + { + "mode": { + "syntax": "ets", + "type": "pageAbility" + }, + "pages": [ + "pages/index" + ], + "name": ".uriSchemeHostPort" + }, + { + "mode": { + "syntax": "ets", + "type": "pageAbility" + }, + "pages": [ + "pages/index" + ], + "name": ".uriSchemeHostPortPath" + }, + { + "mode": { + "syntax": "ets", + "type": "pageAbility" + }, + "pages": [ + "pages/index" + ], + "name": ".uriSchemeHostPortPathStartWith" + }, + { + "mode": { + "syntax": "ets", + "type": "pageAbility" + }, + "pages": [ + "pages/index" + ], + "name": ".uriSchemeHostPortPathRegx" + }, + { + "mode": { + "syntax": "ets", + "type": "pageAbility" + }, + "pages": [ + "pages/index" + ], + "name": ".uriSchemeEmpty" + }, + { + "mode": { + "syntax": "ets", + "type": "pageAbility" + }, + "pages": [ + "pages/index" + ], + "name": ".uriHostEmpty" + }, + { + "mode": { + "syntax": "ets", + "type": "pageAbility" + }, + "pages": [ + "pages/index" + ], + "name": ".uriPortEmptyWithPath" + }, + { + "mode": { + "syntax": "ets", + "type": "pageAbility" + }, + "pages": [ + "pages/index" + ], + "name": ".uriPortEmptyWithPathStartWith" + }, + { + "mode": { + "syntax": "ets", + "type": "pageAbility" + }, + "pages": [ + "pages/index" + ], + "name": ".uriPortEmptyWithPathRegx" + }, + { + "mode": { + "syntax": "ets", + "type": "pageAbility" + }, + "pages": [ + "pages/index" + ], + "name": ".uriMultiPath" + }, + { + "mode": { + "syntax": "ets", + "type": "pageAbility" + }, + "pages": [ + "pages/index" + ], + "name": ".TypeDoubleWildCard" + }, + { + "mode": { + "syntax": "ets", + "type": "pageAbility" + }, + "pages": [ + "pages/index" + ], + "name": ".TypeSingleWildCard" + }, + { + "mode": { + "syntax": "ets", + "type": "pageAbility" + }, + "pages": [ + "pages/index" + ], + "name": ".TypeString" + }, + { + "mode": { + "syntax": "ets", + "type": "pageAbility" + }, + "pages": [ + "pages/index" + ], + "name": ".TypeStringExt" + }, + { + "mode": { + "syntax": "ets", + "type": "pageAbility" + }, + "pages": [ + "pages/index" + ], + "name": ".TypeEmpty" + }, + { + "mode": { + "syntax": "ets", + "type": "pageAbility" + }, + "pages": [ + "pages/index" + ], + "name": ".TypeEmptyExt" + }, + { + "mode": { + "syntax": "ets", + "type": "pageAbility" + }, + "pages": [ + "pages/index" + ], + "name": ".allAE" + }, + { + "mode": { + "syntax": "ets", + "type": "pageAbility" + }, + "pages": [ + "pages/index" + ], + "name": ".allAEs" + }, + { + "mode": { + "syntax": "ets", + "type": "pageAbility" + }, + "pages": [ + "pages/index" + ], + "name": ".allUT" + }, + { + "mode": { + "syntax": "ets", + "type": "pageAbility" + }, + "pages": [ + "pages/index" + ], + "name": ".allAEUT" + } + ], + "reqPermissions": [ + { + "name": "ohos.permission.GET_BUNDLE_INFO", + "reason": "use ohos.permission.GET_BUNDLE_INFO" + }, + { + "name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED", + "reason": "use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" + } + ] + } +} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosseventhscene/src/main/js/default/app.js b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosseventhscene/src/main/js/default/app.js new file mode 100644 index 0000000000000000000000000000000000000000..2d316a0a089b332c5c28729be9ff937aa46618c5 --- /dev/null +++ b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosseventhscene/src/main/js/default/app.js @@ -0,0 +1,22 @@ +/* + * 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/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosseventhscene/src/main/js/default/i18n/en-US.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosseventhscene/src/main/js/default/i18n/en-US.json new file mode 100644 index 0000000000000000000000000000000000000000..e63c70d978a3a53be988388c87182f81785e170c --- /dev/null +++ b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosseventhscene/src/main/js/default/i18n/en-US.json @@ -0,0 +1,6 @@ +{ + "strings": { + "hello": "Hello", + "world": "World" + } +} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosseventhscene/src/main/js/default/i18n/zh-CN.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosseventhscene/src/main/js/default/i18n/zh-CN.json new file mode 100644 index 0000000000000000000000000000000000000000..de6ee5748322f44942c1b003319d8e66c837675f --- /dev/null +++ b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosseventhscene/src/main/js/default/i18n/zh-CN.json @@ -0,0 +1,6 @@ +{ + "strings": { + "hello": "您好", + "world": "世界" + } +} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosseventhscene/src/main/js/default/pages/index/index.css b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosseventhscene/src/main/js/default/pages/index/index.css new file mode 100644 index 0000000000000000000000000000000000000000..01ad739b27f208ff04f21924695104bd27c59df0 --- /dev/null +++ b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosseventhscene/src/main/js/default/pages/index/index.css @@ -0,0 +1,24 @@ +/* +* 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; +} + +.title { + font-size: 100px; +} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosseventhscene/src/main/js/default/pages/index/index.hml b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosseventhscene/src/main/js/default/pages/index/index.hml new file mode 100644 index 0000000000000000000000000000000000000000..8d0e2061b88c99c91488405f0f2ead0c77de1a9e --- /dev/null +++ b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosseventhscene/src/main/js/default/pages/index/index.hml @@ -0,0 +1,20 @@ + + +