未验证 提交 5a9a9f0b 编写于 作者: O openharmony_ci 提交者: Gitee

!8508 add extension type(driver)

Merge pull request !8508 from SoftSquirrel/master
......@@ -357,6 +357,17 @@
"srcEntrance": "./ets/FormAbility/FormAbility.ts",
"type": "preview",
"visible": true
},
{
"description": "$string:form_description",
"descriptionId": 16777219,
"icon": "$media:icon",
"iconId": 16777225,
"label": "$string:entry_label",
"name": "driver",
"srcEntrance": "./ets/FormAbility/FormAbility.ts",
"type": "driver",
"visible": true
}
],
"requestPermissions": [
......
......@@ -481,9 +481,9 @@ export default function getBundleInfoForSelf() {
expect(data.appInfo).assertEqual(null);
expect(data.hapModulesInfo[0].abilitiesInfo.length).assertEqual(0);
let extensionList = data.hapModulesInfo[0].extensionAbilitiesInfo
expect(extensionList.length).assertEqual(13);
expect(extensionList.length).assertEqual(14);
let count = 0;
for (let i = 0;i < 13; i++) {
for (let i = 0;i < 14; i++) {
switch (extensionList[i].name) {
case "Form":
console.info("Form" + JSON.stringify(extensionList[i].extensionAbilityType));
......@@ -576,10 +576,15 @@ export default function getBundleInfoForSelf() {
expect(extensionList[i].extensionAbilityType).assertEqual(bundle.ExtensionAbilityType.PREVIEW)
count = count + 13;
break;
case 'driver':
console.info("driver" + JSON.stringify(extensionList[i].extensionAbilityType));
expect(extensionList[i].extensionAbilityType).assertEqual(bundle.ExtensionAbilityType.DRIVER)
count = count + 14;
break;
}
console.info("count" + JSON.stringify(count));
}
expect(count).assertEqual(91);
expect(count).assertEqual(105);
expect(data.hapModulesInfo[0].metadata.length).assertEqual(0);
expect(data.reqPermissionDetails.length).assertEqual(0);
expect(data.permissionGrantStates.length).assertEqual(0);
......@@ -608,7 +613,7 @@ export default function getBundleInfoForSelf() {
expect(data.hapModulesInfo[0].abilitiesInfo.length).assertEqual(0);
let extensionList = data.hapModulesInfo[0].extensionAbilitiesInfo
let count = 0;
for (let i = 0;i < 13; i++) {
for (let i = 0;i < 14; i++) {
switch (extensionList[i].name) {
case "Form":
console.info("Form" + JSON.stringify(extensionList[i].extensionAbilityType));
......@@ -701,10 +706,15 @@ export default function getBundleInfoForSelf() {
expect(extensionList[i].extensionAbilityType).assertEqual(bundle.ExtensionAbilityType.PREVIEW)
count = count + 13;
break;
case 'driver':
console.info("driver" + JSON.stringify(extensionList[i].extensionAbilityType));
expect(extensionList[i].extensionAbilityType).assertEqual(bundle.ExtensionAbilityType.DRIVER)
count = count + 14;
break;
}
console.info("count" + JSON.stringify(count));
}
expect(count).assertEqual(91);
expect(count).assertEqual(105);
expect(data.hapModulesInfo[0].metadata.length).assertEqual(0);
expect(data.reqPermissionDetails.length).assertEqual(0);
expect(data.permissionGrantStates.length).assertEqual(0);
......
......@@ -481,9 +481,9 @@ export default function getBundleInfoForSelf() {
expect(data.appInfo).assertEqual(null);
expect(data.hapModulesInfo[0].abilitiesInfo.length).assertEqual(0);
let extensionList = data.hapModulesInfo[0].extensionAbilitiesInfo
expect(extensionList.length).assertEqual(13);
expect(extensionList.length).assertEqual(14);
let count = 0;
for (let i = 0;i < 13; i++) {
for (let i = 0;i < 14; i++) {
switch (extensionList[i].name) {
case "Form":
console.info("Form" + JSON.stringify(extensionList[i].extensionAbilityType));
......@@ -576,10 +576,15 @@ export default function getBundleInfoForSelf() {
expect(extensionList[i].extensionAbilityType).assertEqual(bundle.ExtensionAbilityType.PREVIEW)
count = count + 13;
break;
case 'driver':
console.info("driver" + JSON.stringify(extensionList[i].extensionAbilityType));
expect(extensionList[i].extensionAbilityType).assertEqual(bundle.ExtensionAbilityType.DRIVER)
count = count + 14;
break;
}
console.info("count" + JSON.stringify(count));
}
expect(count).assertEqual(91);
expect(count).assertEqual(105);
expect(data.hapModulesInfo[0].metadata.length).assertEqual(0);
expect(data.reqPermissionDetails.length).assertEqual(0);
expect(data.permissionGrantStates.length).assertEqual(0);
......@@ -608,7 +613,7 @@ export default function getBundleInfoForSelf() {
expect(data.hapModulesInfo[0].abilitiesInfo.length).assertEqual(0);
let extensionList = data.hapModulesInfo[0].extensionAbilitiesInfo
let count = 0;
for (let i = 0;i < 13; i++) {
for (let i = 0;i < 14; i++) {
switch (extensionList[i].name) {
case "Form":
console.info("Form" + JSON.stringify(extensionList[i].extensionAbilityType));
......@@ -701,10 +706,15 @@ export default function getBundleInfoForSelf() {
expect(extensionList[i].extensionAbilityType).assertEqual(bundle.ExtensionAbilityType.PREVIEW)
count = count + 13;
break;
case 'driver':
console.info("driver" + JSON.stringify(extensionList[i].extensionAbilityType));
expect(extensionList[i].extensionAbilityType).assertEqual(bundle.ExtensionAbilityType.DRIVER)
count = count + 14;
break;
}
console.info("count" + JSON.stringify(count));
}
expect(count).assertEqual(91);
expect(count).assertEqual(105);
expect(data.hapModulesInfo[0].metadata.length).assertEqual(0);
expect(data.reqPermissionDetails.length).assertEqual(0);
expect(data.permissionGrantStates.length).assertEqual(0);
......
......@@ -342,6 +342,17 @@
"srcEntrance": "./ets/FormAbility/FormAbility.ts",
"type": "preview",
"visible": true
},
{
"description": "$string:form_description",
"descriptionId": 16777219,
"icon": "$media:icon",
"iconId": 16777225,
"label": "$string:entry_label",
"name": "driver",
"srcEntrance": "./ets/FormAbility/FormAbility.ts",
"type": "driver",
"visible": true
}
],
"requestPermissions": [
......
......@@ -485,9 +485,9 @@ export default function getBundleInfoForSelf() {
expect(data.appInfo).assertEqual(null);
expect(data.hapModulesInfo[0].abilitiesInfo.length).assertEqual(0);
let extensionList = data.hapModulesInfo[0].extensionAbilitiesInfo
expect(extensionList.length).assertEqual(13);
expect(extensionList.length).assertEqual(14);
let count = 0;
for (let i = 0;i < 13; i++) {
for (let i = 0;i < 14; i++) {
switch (extensionList[i].name) {
case "Form":
console.info("Form" + JSON.stringify(extensionList[i].extensionAbilityType));
......@@ -580,10 +580,15 @@ export default function getBundleInfoForSelf() {
expect(extensionList[i].extensionAbilityType).assertEqual(bundle.ExtensionAbilityType.PREVIEW)
count = count + 13;
break;
case 'driver':
console.info("driver" + JSON.stringify(extensionList[i].extensionAbilityType));
expect(extensionList[i].extensionAbilityType).assertEqual(bundle.ExtensionAbilityType.DRIVER)
count = count + 14;
break;
}
console.info("count" + JSON.stringify(count));
}
expect(count).assertEqual(91);
expect(count).assertEqual(105);
expect(data.hapModulesInfo[0].metadata.length).assertEqual(0);
expect(data.reqPermissionDetails.length).assertEqual(0);
expect(data.permissionGrantStates.length).assertEqual(0);
......@@ -612,7 +617,7 @@ export default function getBundleInfoForSelf() {
expect(data.hapModulesInfo[0].abilitiesInfo.length).assertEqual(0);
let extensionList = data.hapModulesInfo[0].extensionAbilitiesInfo
let count = 0;
for (let i = 0;i < 13; i++) {
for (let i = 0;i < 14; i++) {
switch (extensionList[i].name) {
case "Form":
console.info("Form" + JSON.stringify(extensionList[i].extensionAbilityType));
......@@ -705,10 +710,15 @@ export default function getBundleInfoForSelf() {
expect(extensionList[i].extensionAbilityType).assertEqual(bundle.ExtensionAbilityType.PREVIEW)
count = count + 13;
break;
case 'driver':
console.info("driver" + JSON.stringify(extensionList[i].extensionAbilityType));
expect(extensionList[i].extensionAbilityType).assertEqual(bundle.ExtensionAbilityType.DRIVER)
count = count + 14;
break;
}
console.info("count" + JSON.stringify(count));
}
expect(count).assertEqual(91);
expect(count).assertEqual(105);
expect(data.hapModulesInfo[0].metadata.length).assertEqual(0);
expect(data.reqPermissionDetails.length).assertEqual(0);
expect(data.permissionGrantStates.length).assertEqual(0);
......
......@@ -342,6 +342,17 @@
"srcEntrance": "./ets/FormAbility/FormAbility.ts",
"type": "preview",
"visible": true
},
{
"description": "$string:form_description",
"descriptionId": 16777219,
"icon": "$media:icon",
"iconId": 16777225,
"label": "$string:entry_label",
"name": "driver",
"srcEntrance": "./ets/FormAbility/FormAbility.ts",
"type": "driver",
"visible": true
}
],
"requestPermissions": [
......
......@@ -198,6 +198,19 @@
"resource": "$profile:form_config"
}
]
},
{
"name": "DriverAbility",
"srcEntrance": "./ets/ServiceAbility/FormAbility.ts",
"label": "$string:form_FormAbility_label",
"description": "$string:form_FormAbility_desc",
"type": "driver",
"metadata": [
{
"name": "ohos.extension.form",
"resource": "$profile:form_config"
}
]
}
]
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册