Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
6f7b7710
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
6f7b7710
编写于
10月 27, 2022
作者:
O
openharmony_ci
提交者:
Gitee
10月 27, 2022
浏览文件
操作
浏览文件
下载
差异文件
!6159 【包管理子系统 master】新增属性用例
Merge pull request !6159 from ry/master
上级
84d4f463
e63bc76b
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
273 addition
and
17 deletion
+273
-17
bundlemanager/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/config.json
...nager/actsbundlemanageretstest/entry/src/main/config.json
+24
-2
bundlemanager/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/test/GetBundleInfoForSelf.test.ets
...est/entry/src/main/ets/test/GetBundleInfoForSelf.test.ets
+55
-0
bundlemanager/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/test/List.test.ets
...undlemanageretstest/entry/src/main/ets/test/List.test.ets
+2
-0
bundlemanager/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/resources/base/element/string.json
...etstest/entry/src/main/resources/base/element/string.json
+12
-0
bundlemanager/bundle_standard/bundlemanager/actsbundlemanagerstagetest/entry/src/main/ets/test/GetBundleInfoForSelf.test.ets
...est/entry/src/main/ets/test/GetBundleInfoForSelf.test.ets
+88
-11
bundlemanager/bundle_standard/bundlemanager/actsbundlemanagerstagetest/entry/src/main/module.json
...ger/actsbundlemanagerstagetest/entry/src/main/module.json
+92
-4
未找到文件。
bundlemanager/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/config.json
浏览文件 @
6f7b7710
...
...
@@ -19,9 +19,8 @@
"srcPath"
:
""
,
"mainAbility"
:
"com.open.harmony.packagemag.MainAbility"
,
"deviceType"
:
[
"tablet"
,
"default"
,
"
default"
"
tablet"
],
"reqPermissions"
:
[
{
...
...
@@ -53,6 +52,7 @@
}
],
"visible"
:
true
,
"orientation"
:
"unspecified"
,
"srcPath"
:
"MainAbility"
,
"name"
:
".MainAbility"
,
"srcLanguage"
:
"ets"
,
...
...
@@ -82,6 +82,28 @@
"srcLanguage"
:
"ets"
,
"description"
:
"$string:description_serviceability"
,
"type"
:
"service"
},
{
"name"
:
".DataAbility"
,
"srcLanguage"
:
"ets"
,
"srcPath"
:
"MainAbility"
,
"icon"
:
"$media:icon"
,
"description"
:
"$string:DataAbility_desc"
,
"type"
:
"data"
,
"uri"
:
"dataability://com.open.harmony.packagemag.DataAbility"
},
{
"orientation"
:
"followRecent"
,
"formsEnabled"
:
false
,
"name"
:
".FollowRecentAbility"
,
"srcLanguage"
:
"ets"
,
"srcPath"
:
"MainAbility"
,
"icon"
:
"$media:icon"
,
"description"
:
"$string:PageAbility1_desc"
,
"label"
:
"$string:PageAbility1_label"
,
"type"
:
"page"
,
"visible"
:
true
,
"launchType"
:
"standard"
}
],
"js"
:
[
...
...
bundlemanager/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/test/GetBundleInfoForSelf.test.ets
0 → 100644
浏览文件 @
6f7b7710
/**
* 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 impligetProfileByAbilityEmptyAbilityCalled.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import bundle from '@ohos.bundle.bundleManager';
import util from "./Utils";
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "hypium/index"
export default function getBundleInfoForSelf() {
describe('getBundleInfoForSelf', function () {
/*
* @tc.number: SUB_BMS_APPINFO_QUERY_0124
* @tc.name: getBundleInfoForSelfAbilityPro
* @tc.desc: Test getBundleInfoForSelf with ability flag(by promise).
*/
it('getBundleInfoForSelfAbilityPro', 0, async function (done) {
await bundle.getBundleInfoForSelf(
bundle.BundleFlag.GET_BUNDLE_INFO_WITH_HAP_MODULE | bundle.BundleFlag.GET_BUNDLE_INFO_WITH_ABILITY
).then(data => {
console.info("AbilityPro" + JSON.stringify(data.hapModulesInfo[0].abilitiesInfo[0]));
expect(data.hapModulesInfo[0].abilitiesInfo.length).assertEqual(5);
expect(data.hapModulesInfo[0].abilitiesInfo[0].type).assertEqual(bundle.AbilityType.DATA);
expect(data.hapModulesInfo[0].abilitiesInfo[0].orientation).assertEqual(bundle.DisplayOrientation.UNSPECIFIED);
expect(data.hapModulesInfo[0].abilitiesInfo[1].type).assertEqual(bundle.AbilityType.PAGE);
expect(data.hapModulesInfo[0].abilitiesInfo[1].orientation).assertEqual(bundle.DisplayOrientation.FOLLOW_RECENT);
expect(data.hapModulesInfo[0].abilitiesInfo[2].type).assertEqual(bundle.AbilityType.PAGE);
expect(data.hapModulesInfo[0].abilitiesInfo[2].orientation).assertEqual(bundle.DisplayOrientation.UNSPECIFIED);
expect(data.hapModulesInfo[0].abilitiesInfo[3].type).assertEqual(bundle.AbilityType.SERVICE);
expect(data.hapModulesInfo[0].abilitiesInfo[3].orientation).assertEqual(bundle.DisplayOrientation.UNSPECIFIED);
expect(data.hapModulesInfo[0].abilitiesInfo[4].type).assertEqual(bundle.AbilityType.PAGE);
expect(data.hapModulesInfo[0].abilitiesInfo[4].orientation).assertEqual(bundle.DisplayOrientation.UNSPECIFIED);
console.info("AbilityPro11" + JSON.stringify(data.hapModulesInfo[0].abilitiesInfo[0]));
done();
}).catch(err => {
console.info("getBundleInfoForSelf fail" + JSON.stringify(err));
expect(err).assertFail();
done();
})
})
})
}
\ No newline at end of file
bundlemanager/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/test/List.test.ets
浏览文件 @
6f7b7710
...
...
@@ -29,8 +29,10 @@ import getWindowPorperties from './getWindowProperties.test.ets';
import GetSecondModuleTest from './GetSecondModule.test.ets';
import GetInfoSync from './GetInfoSync.test.ets';
import GetResourceTest from './GetResourceTest.test.ets';
import getBundleInfoForSelf from './GetBundleInfoForSelf.test.ets';
export default function testsuite() {
getBundleInfoForSelf();
getBundleArchiveInfo();
queryExtensionAbilityInfos();
getAbilityIcon();
...
...
bundlemanager/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/resources/base/element/string.json
浏览文件 @
6f7b7710
...
...
@@ -27,6 +27,18 @@
{
"name"
:
"entry_description"
,
"value"
:
"entry_description"
},
{
"name"
:
"PageAbility1_desc"
,
"value"
:
"description"
},
{
"name"
:
"PageAbility1_label"
,
"value"
:
"label"
},
{
"name"
:
"DataAbility_desc"
,
"value"
:
"hap sample empty provider"
}
]
}
\ No newline at end of file
bundlemanager/bundle_standard/bundlemanager/actsbundlemanagerstagetest/entry/src/main/ets/test/GetBundleInfoForSelf.test.ets
浏览文件 @
6f7b7710
...
...
@@ -266,11 +266,13 @@ export default function getBundleInfoForSelf() {
await bundle.getBundleInfoForSelf(
bundle.BundleFlag.GET_BUNDLE_INFO_WITH_HAP_MODULE | bundle.BundleFlag.GET_BUNDLE_INFO_WITH_ABILITY
).then(data => {
console.info("AbilityPro" + JSON.stringify(data.hapModulesInfo[0].abilitiesInfo[0]));
for (let count = 0; count < 11; count++) {
console.info(count + "AbilityPro::" + JSON.stringify(data.hapModulesInfo[0].abilitiesInfo[count]));
}
checkCommonBundleInfo(data);
checkCommonHapModuleInfo(data);
expect(data.appInfo).assertEqual(null);
expect(data.hapModulesInfo[0].abilitiesInfo.length).assertEqual(
3
);
expect(data.hapModulesInfo[0].abilitiesInfo.length).assertEqual(
11
);
expect(data.hapModulesInfo[0].abilitiesInfo[0].bundleName).assertEqual(BUNDLE_NAME);
expect(data.hapModulesInfo[0].abilitiesInfo[0].moduleName).assertEqual("testModule");
expect(data.hapModulesInfo[0].abilitiesInfo[0].name).assertEqual("ohos.acts.bundle.stage.test.MainAbility");
...
...
@@ -283,13 +285,15 @@ export default function getBundleInfoForSelf() {
expect(data.hapModulesInfo[0].abilitiesInfo[0].process).assertEqual("");
expect(data.hapModulesInfo[0].abilitiesInfo[0].isVisible).assertTrue();
expect(data.hapModulesInfo[0].abilitiesInfo[0].type).assertEqual(1);
expect(data.hapModulesInfo[0].abilitiesInfo[0].orientation).assertEqual(
2
);
expect(data.hapModulesInfo[0].abilitiesInfo[0].orientation).assertEqual(
bundle.DisplayOrientation.PORTRAIT
);
expect(data.hapModulesInfo[0].abilitiesInfo[0].launchType).assertEqual(bundle.LaunchType.SINGLETON);
expect(data.hapModulesInfo[0].abilitiesInfo[0].permissions.length).assertEqual(0);
expect(data.hapModulesInfo[0].abilitiesInfo[0].readPermission).assertEqual("");
expect(data.hapModulesInfo[0].abilitiesInfo[0].writePermission).assertEqual("");
expect(data.hapModulesInfo[0].abilitiesInfo[0].uri).assertEqual("");
expect(data.hapModulesInfo[0].abilitiesInfo[0].deviceTypes.length).assertEqual(2);
console.info("AbilityPro" + JSON.stringify(data.hapModulesInfo[0].abilitiesInfo[0].deviceTypes[0]));
console.info("AbilityPro" + JSON.stringify(data.hapModulesInfo[0].abilitiesInfo[0].deviceTypes[1]));
expect(data.hapModulesInfo[0].abilitiesInfo[0].deviceTypes[0]).assertEqual("default");
expect(data.hapModulesInfo[0].abilitiesInfo[0].deviceTypes[1]).assertEqual("tablet");
expect(data.hapModulesInfo[0].abilitiesInfo[0].applicationInfo).assertEqual(null);
...
...
@@ -310,10 +314,44 @@ export default function getBundleInfoForSelf() {
expect(data.hapModulesInfo[0].abilitiesInfo[0].windowSize.minWindowHeight).assertEqual(0);
expect(data.hapModulesInfo[0].abilitiesInfo[1].name).assertEqual("ohos.acts.bundle.stage.test.MainAbility1");
expect(data.hapModulesInfo[0].abilitiesInfo[1].launchType).assertEqual(bundle.LaunchType.STANDARD);
expect(data.hapModulesInfo[0].abilitiesInfo[2].name).assertEqual("ohos.acts.bundle.stage.test.MainAbility2");
expect(data.hapModulesInfo[0].abilitiesInfo[2].launchType).assertEqual(bundle.LaunchType.SPECIFIED);
expect(data.hapModulesInfo[0].abilitiesInfo[1].orientation).assertEqual(bundle.DisplayOrientation.LANDSCAPE);
expect(data.hapModulesInfo[0].abilitiesInfo[2].name).assertEqual("ohos.acts.bundle.stage.test.MainAbility10");
expect(data.hapModulesInfo[0].abilitiesInfo[2].orientation).assertEqual(bundle.DisplayOrientation.LOCKED);
expect(data.hapModulesInfo[0].abilitiesInfo[3].name).assertEqual("ohos.acts.bundle.stage.test.MainAbility2");
expect(data.hapModulesInfo[0].abilitiesInfo[3].launchType).assertEqual(bundle.LaunchType.SPECIFIED);
expect(data.hapModulesInfo[0].abilitiesInfo[3].orientation)
.assertEqual(bundle.DisplayOrientation.LANDSCAPE_INVERTED);
expect(data.hapModulesInfo[0].abilitiesInfo[4].name).assertEqual("ohos.acts.bundle.stage.test.MainAbility3");
expect(data.hapModulesInfo[0].abilitiesInfo[4].orientation)
.assertEqual(bundle.DisplayOrientation.PORTRAIT_INVERTED);
expect(data.hapModulesInfo[0].abilitiesInfo[5].name).assertEqual("ohos.acts.bundle.stage.test.MainAbility4");
expect(data.hapModulesInfo[0].abilitiesInfo[5].orientation)
.assertEqual(bundle.DisplayOrientation.AUTO_ROTATION);
expect(data.hapModulesInfo[0].abilitiesInfo[6].name).assertEqual("ohos.acts.bundle.stage.test.MainAbility5");
expect(data.hapModulesInfo[0].abilitiesInfo[6].orientation)
.assertEqual(bundle.DisplayOrientation.AUTO_ROTATION_LANDSCAPE);
expect(data.hapModulesInfo[0].abilitiesInfo[7].name).assertEqual("ohos.acts.bundle.stage.test.MainAbility6");
expect(data.hapModulesInfo[0].abilitiesInfo[7].orientation)
.assertEqual(bundle.DisplayOrientation.AUTO_ROTATION_PORTRAIT);
expect(data.hapModulesInfo[0].abilitiesInfo[8].name).assertEqual("ohos.acts.bundle.stage.test.MainAbility7");
expect(data.hapModulesInfo[0].abilitiesInfo[8].orientation)
.assertEqual(bundle.DisplayOrientation.AUTO_ROTATION_RESTRICTED);
expect(data.hapModulesInfo[0].abilitiesInfo[9].name).assertEqual("ohos.acts.bundle.stage.test.MainAbility8");
expect(data.hapModulesInfo[0].abilitiesInfo[9].orientation)
.assertEqual(bundle.DisplayOrientation.AUTO_ROTATION_LANDSCAPE_RESTRICTED);
expect(data.hapModulesInfo[0].abilitiesInfo[10].name).assertEqual("ohos.acts.bundle.stage.test.MainAbility9");
expect(data.hapModulesInfo[0].abilitiesInfo[10].orientation)
.assertEqual(bundle.DisplayOrientation.AUTO_ROTATION_PORTRAIT_RESTRICTED);
checkCommonAbilityInfo(data.hapModulesInfo[0].abilitiesInfo[1])
checkCommonAbilityInfo(data.hapModulesInfo[0].abilitiesInfo[2])
checkCommonAbilityInfo(data.hapModulesInfo[0].abilitiesInfo[3])
checkCommonAbilityInfo(data.hapModulesInfo[0].abilitiesInfo[4])
checkCommonAbilityInfo(data.hapModulesInfo[0].abilitiesInfo[5])
checkCommonAbilityInfo(data.hapModulesInfo[0].abilitiesInfo[6])
checkCommonAbilityInfo(data.hapModulesInfo[0].abilitiesInfo[7])
checkCommonAbilityInfo(data.hapModulesInfo[0].abilitiesInfo[8])
checkCommonAbilityInfo(data.hapModulesInfo[0].abilitiesInfo[9])
checkCommonAbilityInfo(data.hapModulesInfo[0].abilitiesInfo[10])
expect(data.hapModulesInfo[0].extensionAbilitiesInfo.length).assertEqual(0);
expect(data.hapModulesInfo[0].metadata.length).assertEqual(0);
expect(data.reqPermissionDetails.length).assertEqual(0);
...
...
@@ -337,11 +375,10 @@ export default function getBundleInfoForSelf() {
bundle.BundleFlag.GET_BUNDLE_INFO_WITH_HAP_MODULE | bundle.BundleFlag.GET_BUNDLE_INFO_WITH_ABILITY,
(err, data) => {
console.info("AbilityCal" + JSON.stringify(data.hapModulesInfo[0].abilitiesInfo[0]));
console.info("AbilityCal" + JSON.stringify(data.hapModulesInfo[0].abilitiesInfo[1]));
checkCommonBundleInfo(data);
checkCommonHapModuleInfo(data);
expect(data.appInfo).assertEqual(null);
expect(data.hapModulesInfo[0].abilitiesInfo.length).assertEqual(
3
);
expect(data.hapModulesInfo[0].abilitiesInfo.length).assertEqual(
11
);
expect(data.hapModulesInfo[0].abilitiesInfo[0].bundleName).assertEqual(BUNDLE_NAME);
expect(data.hapModulesInfo[0].abilitiesInfo[0].moduleName).assertEqual("testModule");
expect(data.hapModulesInfo[0].abilitiesInfo[0].name).assertEqual("ohos.acts.bundle.stage.test.MainAbility");
...
...
@@ -354,13 +391,15 @@ export default function getBundleInfoForSelf() {
expect(data.hapModulesInfo[0].abilitiesInfo[0].process).assertEqual("");
expect(data.hapModulesInfo[0].abilitiesInfo[0].isVisible).assertTrue();
expect(data.hapModulesInfo[0].abilitiesInfo[0].type).assertEqual(1);
expect(data.hapModulesInfo[0].abilitiesInfo[0].orientation).assertEqual(
2
);
expect(data.hapModulesInfo[0].abilitiesInfo[0].orientation).assertEqual(
bundle.DisplayOrientation.PORTRAIT
);
expect(data.hapModulesInfo[0].abilitiesInfo[0].launchType).assertEqual(bundle.LaunchType.SINGLETON);
expect(data.hapModulesInfo[0].abilitiesInfo[0].permissions.length).assertEqual(0);
expect(data.hapModulesInfo[0].abilitiesInfo[0].readPermission).assertEqual("");
expect(data.hapModulesInfo[0].abilitiesInfo[0].writePermission).assertEqual("");
expect(data.hapModulesInfo[0].abilitiesInfo[0].uri).assertEqual("");
expect(data.hapModulesInfo[0].abilitiesInfo[0].deviceTypes.length).assertEqual(2);
console.info("AbilityPro" + JSON.stringify(data.hapModulesInfo[0].abilitiesInfo[0].deviceTypes[0]));
console.info("AbilityPro" + JSON.stringify(data.hapModulesInfo[0].abilitiesInfo[0].deviceTypes[1]));
expect(data.hapModulesInfo[0].abilitiesInfo[0].deviceTypes[0]).assertEqual("default");
expect(data.hapModulesInfo[0].abilitiesInfo[0].deviceTypes[1]).assertEqual("tablet");
expect(data.hapModulesInfo[0].abilitiesInfo[0].applicationInfo).assertEqual(null);
...
...
@@ -381,10 +420,44 @@ export default function getBundleInfoForSelf() {
expect(data.hapModulesInfo[0].abilitiesInfo[0].windowSize.minWindowHeight).assertEqual(0);
expect(data.hapModulesInfo[0].abilitiesInfo[1].name).assertEqual("ohos.acts.bundle.stage.test.MainAbility1");
expect(data.hapModulesInfo[0].abilitiesInfo[1].launchType).assertEqual(bundle.LaunchType.STANDARD);
expect(data.hapModulesInfo[0].abilitiesInfo[2].name).assertEqual("ohos.acts.bundle.stage.test.MainAbility2");
expect(data.hapModulesInfo[0].abilitiesInfo[2].launchType).assertEqual(bundle.LaunchType.SPECIFIED);
expect(data.hapModulesInfo[0].abilitiesInfo[1].orientation).assertEqual(bundle.DisplayOrientation.LANDSCAPE);
expect(data.hapModulesInfo[0].abilitiesInfo[2].name).assertEqual("ohos.acts.bundle.stage.test.MainAbility10");
expect(data.hapModulesInfo[0].abilitiesInfo[2].orientation).assertEqual(bundle.DisplayOrientation.LOCKED);
expect(data.hapModulesInfo[0].abilitiesInfo[3].name).assertEqual("ohos.acts.bundle.stage.test.MainAbility2");
expect(data.hapModulesInfo[0].abilitiesInfo[3].launchType).assertEqual(bundle.LaunchType.SPECIFIED);
expect(data.hapModulesInfo[0].abilitiesInfo[3].orientation)
.assertEqual(bundle.DisplayOrientation.LANDSCAPE_INVERTED);
expect(data.hapModulesInfo[0].abilitiesInfo[4].name).assertEqual("ohos.acts.bundle.stage.test.MainAbility3");
expect(data.hapModulesInfo[0].abilitiesInfo[4].orientation)
.assertEqual(bundle.DisplayOrientation.PORTRAIT_INVERTED);
expect(data.hapModulesInfo[0].abilitiesInfo[5].name).assertEqual("ohos.acts.bundle.stage.test.MainAbility4");
expect(data.hapModulesInfo[0].abilitiesInfo[5].orientation)
.assertEqual(bundle.DisplayOrientation.AUTO_ROTATION);
expect(data.hapModulesInfo[0].abilitiesInfo[6].name).assertEqual("ohos.acts.bundle.stage.test.MainAbility5");
expect(data.hapModulesInfo[0].abilitiesInfo[6].orientation)
.assertEqual(bundle.DisplayOrientation.AUTO_ROTATION_LANDSCAPE);
expect(data.hapModulesInfo[0].abilitiesInfo[7].name).assertEqual("ohos.acts.bundle.stage.test.MainAbility6");
expect(data.hapModulesInfo[0].abilitiesInfo[7].orientation)
.assertEqual(bundle.DisplayOrientation.AUTO_ROTATION_PORTRAIT);
expect(data.hapModulesInfo[0].abilitiesInfo[8].name).assertEqual("ohos.acts.bundle.stage.test.MainAbility7");
expect(data.hapModulesInfo[0].abilitiesInfo[8].orientation)
.assertEqual(bundle.DisplayOrientation.AUTO_ROTATION_RESTRICTED);
expect(data.hapModulesInfo[0].abilitiesInfo[9].name).assertEqual("ohos.acts.bundle.stage.test.MainAbility8");
expect(data.hapModulesInfo[0].abilitiesInfo[9].orientation)
.assertEqual(bundle.DisplayOrientation.AUTO_ROTATION_LANDSCAPE_RESTRICTED);
expect(data.hapModulesInfo[0].abilitiesInfo[10].name).assertEqual("ohos.acts.bundle.stage.test.MainAbility9");
expect(data.hapModulesInfo[0].abilitiesInfo[10].orientation)
.assertEqual(bundle.DisplayOrientation.AUTO_ROTATION_PORTRAIT_RESTRICTED);
checkCommonAbilityInfo(data.hapModulesInfo[0].abilitiesInfo[1])
checkCommonAbilityInfo(data.hapModulesInfo[0].abilitiesInfo[2])
checkCommonAbilityInfo(data.hapModulesInfo[0].abilitiesInfo[3])
checkCommonAbilityInfo(data.hapModulesInfo[0].abilitiesInfo[4])
checkCommonAbilityInfo(data.hapModulesInfo[0].abilitiesInfo[5])
checkCommonAbilityInfo(data.hapModulesInfo[0].abilitiesInfo[6])
checkCommonAbilityInfo(data.hapModulesInfo[0].abilitiesInfo[7])
checkCommonAbilityInfo(data.hapModulesInfo[0].abilitiesInfo[8])
checkCommonAbilityInfo(data.hapModulesInfo[0].abilitiesInfo[9])
checkCommonAbilityInfo(data.hapModulesInfo[0].abilitiesInfo[10])
expect(data.hapModulesInfo[0].extensionAbilitiesInfo.length).assertEqual(0);
expect(data.hapModulesInfo[0].metadata.length).assertEqual(0);
expect(data.reqPermissionDetails.length).assertEqual(0);
...
...
@@ -639,6 +712,7 @@ export default function getBundleInfoForSelf() {
expect(data.permissionGrantStates.length).assertEqual(0);
expect(data.signatureInfo).assertEqual(null);
expect(err).assertEqual(null);
expect(bundle.ExtensionAbilityType.UNSPECIFIED).assertEqual(255);
done();
})
})
...
...
@@ -974,6 +1048,8 @@ export default function getBundleInfoForSelf() {
expect(data.hapModulesInfo[0].descriptionId).assertLarger(0);
expect(data.hapModulesInfo[0].mainElementName).assertEqual(ABILITY_NAME);
expect(data.hapModulesInfo[0].deviceTypes.length).assertEqual(2);
console.info("checkComm" + JSON.stringify(data.hapModulesInfo[0].deviceTypes[0]));
console.info("checkComm" + JSON.stringify(data.hapModulesInfo[0].deviceTypes[1]));
expect(data.hapModulesInfo[0].deviceTypes[0]).assertEqual("default");
expect(data.hapModulesInfo[0].deviceTypes[1]).assertEqual("tablet");
expect(data.hapModulesInfo[0].installationFree).assertFalse();
...
...
@@ -994,12 +1070,13 @@ export default function getBundleInfoForSelf() {
expect(data.process).assertEqual("");
expect(data.isVisible).assertTrue();
expect(data.type).assertEqual(1);
expect(data.orientation).assertEqual(2);
expect(data.permissions.length).assertEqual(0);
expect(data.readPermission).assertEqual("");
expect(data.writePermission).assertEqual("");
expect(data.uri).assertEqual("");
expect(data.deviceTypes.length).assertEqual(2);
console.info("checkComm" + JSON.stringify(data.deviceTypes[0]));
console.info("checkComm" + JSON.stringify(data.deviceTypes[1]));
expect(data.deviceTypes[0]).assertEqual("default");
expect(data.deviceTypes[1]).assertEqual("tablet");
expect(data.applicationInfo).assertEqual(null);
...
...
bundlemanager/bundle_standard/bundlemanager/actsbundlemanagerstagetest/entry/src/main/module.json
浏览文件 @
6f7b7710
...
...
@@ -6,8 +6,8 @@
"description"
:
"$string:testModule_entry_dsc"
,
"mainElement"
:
"ohos.acts.bundle.stage.test.MainAbility"
,
"deviceTypes"
:
[
"
table
t"
,
"
defaul
t"
"
defaul
t"
,
"
table
t"
],
"deliveryWithInstall"
:
true
,
"installationFree"
:
false
,
...
...
@@ -69,7 +69,7 @@
"label"
:
"$string:entry_label"
,
"visible"
:
true
,
"launchType"
:
"standard"
,
"orientation"
:
"
portrait
"
,
"orientation"
:
"
landscape
"
,
"skills"
:
[]
},
{
...
...
@@ -80,7 +80,95 @@
"label"
:
"$string:entry_label"
,
"visible"
:
true
,
"launchType"
:
"specified"
,
"orientation"
:
"portrait"
,
"orientation"
:
"landscape_inverted"
,
"skills"
:
[]
},
{
"name"
:
"ohos.acts.bundle.stage.test.MainAbility3"
,
"srcEntrance"
:
"./ets/MainAbility/MainAbility.ts"
,
"description"
:
"$string:testModule_entry_main"
,
"icon"
:
"$media:icon"
,
"label"
:
"$string:entry_label"
,
"visible"
:
true
,
"launchType"
:
"specified"
,
"orientation"
:
"portrait_inverted"
,
"skills"
:
[]
},
{
"name"
:
"ohos.acts.bundle.stage.test.MainAbility4"
,
"srcEntrance"
:
"./ets/MainAbility/MainAbility.ts"
,
"description"
:
"$string:testModule_entry_main"
,
"icon"
:
"$media:icon"
,
"label"
:
"$string:entry_label"
,
"visible"
:
true
,
"launchType"
:
"specified"
,
"orientation"
:
"auto_rotation"
,
"skills"
:
[]
},
{
"name"
:
"ohos.acts.bundle.stage.test.MainAbility5"
,
"srcEntrance"
:
"./ets/MainAbility/MainAbility.ts"
,
"description"
:
"$string:testModule_entry_main"
,
"icon"
:
"$media:icon"
,
"label"
:
"$string:entry_label"
,
"visible"
:
true
,
"launchType"
:
"specified"
,
"orientation"
:
"auto_rotation_landscape"
,
"skills"
:
[]
},
{
"name"
:
"ohos.acts.bundle.stage.test.MainAbility6"
,
"srcEntrance"
:
"./ets/MainAbility/MainAbility.ts"
,
"description"
:
"$string:testModule_entry_main"
,
"icon"
:
"$media:icon"
,
"label"
:
"$string:entry_label"
,
"visible"
:
true
,
"launchType"
:
"specified"
,
"orientation"
:
"auto_rotation_portrait"
,
"skills"
:
[]
},
{
"name"
:
"ohos.acts.bundle.stage.test.MainAbility7"
,
"srcEntrance"
:
"./ets/MainAbility/MainAbility.ts"
,
"description"
:
"$string:testModule_entry_main"
,
"icon"
:
"$media:icon"
,
"label"
:
"$string:entry_label"
,
"visible"
:
true
,
"launchType"
:
"specified"
,
"orientation"
:
"auto_rotation_restricted"
,
"skills"
:
[]
},
{
"name"
:
"ohos.acts.bundle.stage.test.MainAbility8"
,
"srcEntrance"
:
"./ets/MainAbility/MainAbility.ts"
,
"description"
:
"$string:testModule_entry_main"
,
"icon"
:
"$media:icon"
,
"label"
:
"$string:entry_label"
,
"visible"
:
true
,
"launchType"
:
"specified"
,
"orientation"
:
"auto_rotation_landscape_restricted"
,
"skills"
:
[]
},
{
"name"
:
"ohos.acts.bundle.stage.test.MainAbility9"
,
"srcEntrance"
:
"./ets/MainAbility/MainAbility.ts"
,
"description"
:
"$string:testModule_entry_main"
,
"icon"
:
"$media:icon"
,
"label"
:
"$string:entry_label"
,
"visible"
:
true
,
"launchType"
:
"specified"
,
"orientation"
:
"auto_rotation_portrait_restricted"
,
"skills"
:
[]
},
{
"name"
:
"ohos.acts.bundle.stage.test.MainAbility10"
,
"srcEntrance"
:
"./ets/MainAbility/MainAbility.ts"
,
"description"
:
"$string:testModule_entry_main"
,
"icon"
:
"$media:icon"
,
"label"
:
"$string:entry_label"
,
"visible"
:
true
,
"launchType"
:
"specified"
,
"orientation"
:
"locked"
,
"skills"
:
[]
}
],
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录