Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
c4b935ab
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看板
提交
c4b935ab
编写于
5月 30, 2022
作者:
I
inter515
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
新增查询extensionInfo信息的用例和一个feature的资源demo
Signed-off-by:
N
inter515
<
ry.renyi@huawei.com
>
上级
25c936e3
变更
24
显示空白变更内容
内联
并排
Showing
24 changed file
with
895 addition
and
17 deletion
+895
-17
appexecfwk/bundle_standard/bundlemanager/BUILD.gn
appexecfwk/bundle_standard/bundlemanager/BUILD.gn
+1
-0
appexecfwk/bundle_standard/bundlemanager/actsbmsetsunpermissiontest/entry/src/main/ets/test/ActsBmsEtsUnPermissionTest.test.ets
...try/src/main/ets/test/ActsBmsEtsUnPermissionTest.test.ets
+34
-0
appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/Test.json
...standard/bundlemanager/actsbundlemanageretstest/Test.json
+6
-3
appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/test/GetabilityInfo.test.ets
...eretstest/entry/src/main/ets/test/GetabilityInfo.test.ets
+0
-7
appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/test/QueryExtensionAbilityInfos.test.ets
...try/src/main/ets/test/QueryExtensionAbilityInfos.test.ets
+206
-7
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsstagedemoone/entry/src/main/ets/ServiceAbility/FormAbility.ts
...edemoone/entry/src/main/ets/ServiceAbility/FormAbility.ts
+37
-0
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsstagedemoone/entry/src/main/module.json
...r/sceneProject/bmsstagedemoone/entry/src/main/module.json
+28
-0
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsstagedemotwo/AppScope/app.json
...dlemanager/sceneProject/bmsstagedemotwo/AppScope/app.json
+21
-0
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsstagedemotwo/AppScope/resources/base/element/string.json
...sstagedemotwo/AppScope/resources/base/element/string.json
+8
-0
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsstagedemotwo/BUILD.gn
...ndard/bundlemanager/sceneProject/bmsstagedemotwo/BUILD.gn
+43
-0
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsstagedemotwo/Test.json
...dard/bundlemanager/sceneProject/bmsstagedemotwo/Test.json
+4
-0
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsstagedemotwo/entry/src/main/ets/Application/AbilityStage.ts
...agedemotwo/entry/src/main/ets/Application/AbilityStage.ts
+9
-0
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsstagedemotwo/entry/src/main/ets/FormAbility/FormAbility.ts
...tagedemotwo/entry/src/main/ets/FormAbility/FormAbility.ts
+37
-0
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsstagedemotwo/entry/src/main/ets/MainAbility/MainAbility.ts
...tagedemotwo/entry/src/main/ets/MainAbility/MainAbility.ts
+36
-0
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsstagedemotwo/entry/src/main/ets/ServiceAbility/FormAbility.ts
...edemotwo/entry/src/main/ets/ServiceAbility/FormAbility.ts
+37
-0
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsstagedemotwo/entry/src/main/ets/pages/index/index.ets
.../bmsstagedemotwo/entry/src/main/ets/pages/index/index.ets
+66
-0
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsstagedemotwo/entry/src/main/ets/pages/second/second.ets
...msstagedemotwo/entry/src/main/ets/pages/second/second.ets
+43
-0
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsstagedemotwo/entry/src/main/ets/test/List.test.ets
...ect/bmsstagedemotwo/entry/src/main/ets/test/List.test.ets
+20
-0
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsstagedemotwo/entry/src/main/module.json
...r/sceneProject/bmsstagedemotwo/entry/src/main/module.json
+132
-0
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsstagedemotwo/entry/src/main/resources/base/element/string.json
...demotwo/entry/src/main/resources/base/element/string.json
+40
-0
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsstagedemotwo/entry/src/main/resources/base/media/icon.png
...stagedemotwo/entry/src/main/resources/base/media/icon.png
+0
-0
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsstagedemotwo/entry/src/main/resources/base/profile/form_config.json
...wo/entry/src/main/resources/base/profile/form_config.json
+81
-0
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsstagedemotwo/entry/src/main/resources/base/profile/main_pages.json
...two/entry/src/main/resources/base/profile/main_pages.json
+6
-0
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsstagedemotwo/signature/openharmony_sx.p7b
...sceneProject/bmsstagedemotwo/signature/openharmony_sx.p7b
+0
-0
未找到文件。
appexecfwk/bundle_standard/bundlemanager/BUILD.gn
浏览文件 @
c4b935ab
...
@@ -57,6 +57,7 @@ group("bundlemanager") {
...
@@ -57,6 +57,7 @@ group("bundlemanager") {
"sceneProject/bmsscenetwo:bmsJstest2",
"sceneProject/bmsscenetwo:bmsJstest2",
"sceneProject/bmssecondright:second_right",
"sceneProject/bmssecondright:second_right",
"sceneProject/bmsstagedemoone:bmsStageDemo1",
"sceneProject/bmsstagedemoone:bmsStageDemo1",
"sceneProject/bmsstagedemotwo:bmsStageDemo2",
]
]
}
}
}
}
appexecfwk/bundle_standard/bundlemanager/actsbmsetsunpermissiontest/entry/src/main/ets/test/ActsBmsEtsUnPermissionTest.test.ets
浏览文件 @
c4b935ab
...
@@ -24,6 +24,8 @@ const SELF_BUNDLENAME = "com.example.actsbmsetsunpermissiontest";
...
@@ -24,6 +24,8 @@ const SELF_BUNDLENAME = "com.example.actsbmsetsunpermissiontest";
const
SELF_ABILITYNAME
=
"com.example.actsbmsetsunpermissiontest.MainAbility"
;
const
SELF_ABILITYNAME
=
"com.example.actsbmsetsunpermissiontest.MainAbility"
;
const
BUNDLE_SETTINGS
=
"com.ohos.settings"
;
const
BUNDLE_SETTINGS
=
"com.ohos.settings"
;
const
ABILITIY_SETTINGS
=
"com.ohos.settings.MainAbility"
;
const
ABILITIY_SETTINGS
=
"com.ohos.settings.MainAbility"
;
const
BUNDLE_NAME1
=
"ohos.acts.bundle.stage"
;
const
ABILITY_NAME1
=
"ExtensionAbility1"
;
export
default
function
actsBmsJsUnPermissionTest
()
{
export
default
function
actsBmsJsUnPermissionTest
()
{
describe
(
'actsBmsJsUnPermissionTest'
,
function
()
{
describe
(
'actsBmsJsUnPermissionTest'
,
function
()
{
...
@@ -183,6 +185,38 @@ export default function actsBmsJsUnPermissionTest() {
...
@@ -183,6 +185,38 @@ export default function actsBmsJsUnPermissionTest() {
});
});
});
});
/*
* @tc.number: SUB_BMS_APPINFO_EXTENSION_0019
* @tc.name: test queryExtensionAbilityInfos api
* @tc.desc: test queryExtensionAbilityInfos no permission
*/
it
(
'SUB_BMS_APPINFO_EXTENSION_0019'
,
0
,
async
function
(
done
)
{
await
bundle
.
queryExtensionAbilityInfos
(
{
"bundleName"
:
BUNDLE_NAME1
,
"abilityName"
:
ABILITY_NAME1
},
bundle
.
ExtensionAbilityType
.
FORM
,
bundle
.
ExtensionFlag
.
GET_EXTENSION_INFO_DEFAULT
,
100
)
.
then
(
data
=>
{
expect
(
data
)
.
assertFail
();
})
.
catch
(
err
=>
{
expect
(
err
)
.
assertEqual
(
1
);
});
bundle
.
queryExtensionAbilityInfos
(
{
"bundleName"
:
BUNDLE_NAME1
,
"abilityName"
:
ABILITY_NAME1
},
bundle
.
ExtensionAbilityType
.
FORM
,
bundle
.
ExtensionFlag
.
GET_EXTENSION_INFO_DEFAULT
,
100
,
(
err
,
data
)
=>
{
if
(
err
)
{
expect
(
err
)
.
assertEqual
(
1
);
done
();
return
;
}
expect
(
data
)
.
assertFail
();
done
();
})
})
async
function
checkAbilityInfo
(
data
)
{
async
function
checkAbilityInfo
(
data
)
{
console
.
info
(
"checkAbilityInfo start !!!"
);
console
.
info
(
"checkAbilityInfo start !!!"
);
expect
(
data
.
bundleName
)
.
assertEqual
(
"com.example.actsbmsetsunpermissiontest"
);
expect
(
data
.
bundleName
)
.
assertEqual
(
"com.example.actsbmsetsunpermissiontest"
);
...
...
appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/Test.json
浏览文件 @
c4b935ab
...
@@ -28,7 +28,8 @@
...
@@ -28,7 +28,8 @@
"bmsThirdBundleTest1.hap -> /data/bmsThirdBundleTest1.hap "
,
"bmsThirdBundleTest1.hap -> /data/bmsThirdBundleTest1.hap "
,
"first_right.hap -> /data/test/first_right.hap"
,
"first_right.hap -> /data/test/first_right.hap"
,
"second_right.hap -> /data/second_right.hap"
,
"second_right.hap -> /data/second_right.hap"
,
"bmsStageDemo1.hap -> /data/test/bmsStageDemo1.hap"
"bmsStageDemo1.hap -> /data/test/bmsStageDemo1.hap"
,
"bmsStageDemo2.hap -> /data/test/bmsStageDemo2.hap"
]
]
},
},
{
{
...
@@ -37,11 +38,13 @@
...
@@ -37,11 +38,13 @@
"bm install -p /data/bmsThirdBundleTest1.hap"
,
"bm install -p /data/bmsThirdBundleTest1.hap"
,
"bm install -p /data/test/first_right.hap"
,
"bm install -p /data/test/first_right.hap"
,
"bm install -p /data/second_right.hap"
,
"bm install -p /data/second_right.hap"
,
"bm install -p /data/test/bmsStageDemo1.hap"
"bm install -p /data/test/bmsStageDemo1.hap"
,
"bm install -p /data/test/bmsStageDemo2.hap"
],
],
"teardown-command"
:[
"teardown-command"
:[
"bm uninstall -n com.example.third1"
,
"bm uninstall -n com.example.third1"
,
"bm uninstall -n com.example.l3jsdemo"
"bm uninstall -n com.example.l3jsdemo"
,
"bm uninstall -n ohos.acts.bundle.stage"
]
]
}
}
]
]
...
...
appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/test/GetabilityInfo.test.ets
浏览文件 @
c4b935ab
...
@@ -227,10 +227,6 @@ export default function GetabilityInfo() {
...
@@ -227,10 +227,6 @@ export default function GetabilityInfo() {
expect
(
typeof
(
data
.
description
))
.
assertEqual
(
"string"
);
expect
(
typeof
(
data
.
description
))
.
assertEqual
(
"string"
);
expect
(
data
.
icon
)
.
assertEqual
(
"
$media
:icon"
);
expect
(
data
.
icon
)
.
assertEqual
(
"
$media
:icon"
);
expect
(
typeof
(
data
.
icon
))
.
assertEqual
(
"string"
);
expect
(
typeof
(
data
.
icon
))
.
assertEqual
(
"string"
);
expect
(
data
.
srcPath
)
.
assertEqual
(
"MainAbility"
);
expect
(
typeof
(
data
.
srcPath
))
.
assertEqual
(
"string"
);
expect
(
data
.
srcLanguage
)
.
assertEqual
(
"ets"
);
expect
(
typeof
(
data
.
srcLanguage
))
.
assertEqual
(
"string"
);
expect
(
data
.
isVisible
)
.
assertEqual
(
true
);
expect
(
data
.
isVisible
)
.
assertEqual
(
true
);
expect
(
Array
.
isArray
(
data
.
permissions
))
.
assertEqual
(
true
);
expect
(
Array
.
isArray
(
data
.
permissions
))
.
assertEqual
(
true
);
expect
(
Array
.
isArray
(
data
.
deviceCapabilities
))
.
assertEqual
(
true
);
expect
(
Array
.
isArray
(
data
.
deviceCapabilities
))
.
assertEqual
(
true
);
...
@@ -284,8 +280,6 @@ export default function GetabilityInfo() {
...
@@ -284,8 +280,6 @@ export default function GetabilityInfo() {
expect
(
data
.
label
)
.
assertEqual
(
"
$string
:app_name"
);
expect
(
data
.
label
)
.
assertEqual
(
"
$string
:app_name"
);
expect
(
data
.
description
)
.
assertEqual
(
"
$string
:mainability_description"
);
expect
(
data
.
description
)
.
assertEqual
(
"
$string
:mainability_description"
);
expect
(
data
.
icon
)
.
assertEqual
(
"
$media
:icon"
);
expect
(
data
.
icon
)
.
assertEqual
(
"
$media
:icon"
);
expect
(
data
.
srcPath
)
.
assertEqual
(
""
);
expect
(
data
.
srcLanguage
)
.
assertEqual
(
"js"
);
expect
(
data
.
isVisible
)
.
assertEqual
(
true
);
expect
(
data
.
isVisible
)
.
assertEqual
(
true
);
expect
(
data
.
deviceTypes
[
0
])
.
assertEqual
(
"phone"
);
expect
(
data
.
deviceTypes
[
0
])
.
assertEqual
(
"phone"
);
expect
(
data
.
process
)
.
assertEqual
(
""
);
expect
(
data
.
process
)
.
assertEqual
(
""
);
...
@@ -304,7 +298,6 @@ export default function GetabilityInfo() {
...
@@ -304,7 +298,6 @@ export default function GetabilityInfo() {
expect
(
data
.
readPermission
)
.
assertEqual
(
""
);
expect
(
data
.
readPermission
)
.
assertEqual
(
""
);
expect
(
data
.
writePermission
)
.
assertEqual
(
""
);
expect
(
data
.
writePermission
)
.
assertEqual
(
""
);
expect
(
data
.
targetAbility
)
.
assertEqual
(
""
);
expect
(
data
.
targetAbility
)
.
assertEqual
(
""
);
expect
(
data
.
theme
)
.
assertEqual
(
""
);
expect
(
data
.
metaData
.
length
)
.
assertEqual
(
0
);
expect
(
data
.
metaData
.
length
)
.
assertEqual
(
0
);
expect
(
data
.
metadata
.
length
)
.
assertEqual
(
0
);
expect
(
data
.
metadata
.
length
)
.
assertEqual
(
0
);
checkApplicationInfo_other
(
data
.
applicationInfo
);
checkApplicationInfo_other
(
data
.
applicationInfo
);
...
...
appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/test/QueryExtensionAbilityInfos.test.ets
浏览文件 @
c4b935ab
...
@@ -18,6 +18,7 @@ import { describe, it, expect } from 'hypium/index';
...
@@ -18,6 +18,7 @@ import { describe, it, expect } from 'hypium/index';
const BUNDLE_NAME1 = "ohos.acts.bundle.stage";
const BUNDLE_NAME1 = "ohos.acts.bundle.stage";
const BUNDLE_NAME2 = "com.noexit.com";
const BUNDLE_NAME2 = "com.noexit.com";
const BUNDLE_NAME3 = 'com.example.third1';
const ABILITY_NAME1 = "ExtensionAbility1";
const ABILITY_NAME1 = "ExtensionAbility1";
const ABILITY_NAME2 = "noexitAbility";
const ABILITY_NAME2 = "noexitAbility";
const ABILITY_NAME3 = "ServiceAbility";
const ABILITY_NAME3 = "ServiceAbility";
...
@@ -113,7 +114,6 @@ export default function QueryExtensionAbilityInfos() {
...
@@ -113,7 +114,6 @@ export default function QueryExtensionAbilityInfos() {
* @tc.name: test queryExtensionAbilityInfos api
* @tc.name: test queryExtensionAbilityInfos api
* @tc.desc: test queryExtensionAbilityInfos with default flag
* @tc.desc: test queryExtensionAbilityInfos with default flag
*/
*/
it('SUB_BMS_APPINFO_EXTENSION_0003', 0, async function (done) {
it('SUB_BMS_APPINFO_EXTENSION_0003', 0, async function (done) {
await bundle.queryExtensionAbilityInfos(
await bundle.queryExtensionAbilityInfos(
{
{
...
@@ -170,7 +170,6 @@ export default function QueryExtensionAbilityInfos() {
...
@@ -170,7 +170,6 @@ export default function QueryExtensionAbilityInfos() {
* @tc.name: test queryExtensionAbilityInfos api
* @tc.name: test queryExtensionAbilityInfos api
* @tc.desc: test queryExtensionAbilityInfos with get application flag
* @tc.desc: test queryExtensionAbilityInfos with get application flag
*/
*/
it('SUB_BMS_APPINFO_EXTENSION_0004', 0, async function (done) {
it('SUB_BMS_APPINFO_EXTENSION_0004', 0, async function (done) {
await bundle.queryExtensionAbilityInfos({
await bundle.queryExtensionAbilityInfos({
"bundleName": BUNDLE_NAME1,
"bundleName": BUNDLE_NAME1,
...
@@ -572,7 +571,7 @@ export default function QueryExtensionAbilityInfos() {
...
@@ -572,7 +571,7 @@ export default function QueryExtensionAbilityInfos() {
/*
/*
* @tc.number: SUB_BMS_APPINFO_EXTENSION_0013
* @tc.number: SUB_BMS_APPINFO_EXTENSION_0013
* @tc.name: test queryExtensionAbilityInfos api
* @tc.name: test queryExtensionAbilityInfos api
* @tc.desc: test queryExtensionAbilityInfos of Implicit query with
get permission flag
* @tc.desc: test queryExtensionAbilityInfos of Implicit query with
uri get failed
*/
*/
it('SUB_BMS_APPINFO_EXTENSION_0013', 0, async function (done) {
it('SUB_BMS_APPINFO_EXTENSION_0013', 0, async function (done) {
await bundle.queryExtensionAbilityInfos(
await bundle.queryExtensionAbilityInfos(
...
@@ -603,7 +602,61 @@ export default function QueryExtensionAbilityInfos() {
...
@@ -603,7 +602,61 @@ export default function QueryExtensionAbilityInfos() {
})
})
})
})
/*
* @tc.number: SUB_BMS_APPINFO_EXTENSION_0014
* @tc.name: test queryExtensionAbilityInfos api
* @tc.desc: test queryExtensionAbilityInfos of Implicit query with entities
*/
it('SUB_BMS_APPINFO_EXTENSION_0014', 0, async function (done) {
await bundle.queryExtensionAbilityInfos({
"bundleName": BUNDLE_NAME1,
"action": "",
"entities": ["entitiesCommon"],
}, bundle.ExtensionAbilityType.UNSPECIFIED, bundle.ExtensionFlag.GET_EXTENSION_INFO_DEFAULT,
100).then(data => {
expect(data[0].bundleName).assertEqual("ohos.acts.bundle.stage");
expect(data[0].moduleName).assertEqual("myfeature");
expect(data[0].name).assertEqual("ExtensionAbilityW");
expect(data[0].labelId).assertLarger(0);
expect(data[0].descriptionId).assertLarger(0);
expect(data[0].iconId).assertEqual(0);
expect(data[0].isVisible).assertFalse();
expect(data[0].extensionAbilityType).assertEqual(3);
expect(data[0].permissions.length).assertEqual(0);
expect(data[0].enabled).assertTrue();
expect(data[0].readPermission).assertEqual("");
expect(data[0].writePermission).assertEqual("");
expect(data[0].metadata.length).assertEqual(0);
}).catch(err => {
expect(err).assertFail();
});
bundle.queryExtensionAbilityInfos({
"bundleName": BUNDLE_NAME1,
"action": "",
"entities": ["entitiesCommon"]
}, bundle.ExtensionAbilityType.UNSPECIFIED, bundle.ExtensionFlag.GET_EXTENSION_INFO_DEFAULT,
100, (err, data) => {
if (err) {
expect(err).assertFail();
done();
return;
}
expect(data[0].bundleName).assertEqual("ohos.acts.bundle.stage");
expect(data[0].moduleName).assertEqual("myfeature");
expect(data[0].name).assertEqual("ExtensionAbilityW");
expect(data[0].labelId).assertLarger(0);
expect(data[0].descriptionId).assertLarger(0);
expect(data[0].iconId).assertEqual(0);
expect(data[0].isVisible).assertFalse();
expect(data[0].extensionAbilityType).assertEqual(3);
expect(data[0].permissions.length).assertEqual(0);
expect(data[0].enabled).assertTrue();
expect(data[0].readPermission).assertEqual("");
expect(data[0].writePermission).assertEqual("");
expect(data[0].metadata.length).assertEqual(0);
done();
})
})
/*
/*
* @tc.number: SUB_BMS_APPINFO_EXTENSION_0015
* @tc.number: SUB_BMS_APPINFO_EXTENSION_0015
* @tc.name: test queryExtensionAbilityInfos api
* @tc.name: test queryExtensionAbilityInfos api
...
@@ -630,6 +683,152 @@ export default function QueryExtensionAbilityInfos() {
...
@@ -630,6 +683,152 @@ export default function QueryExtensionAbilityInfos() {
})
})
})
})
/*
* @tc.number: SUB_BMS_APPINFO_EXTENSION_0016
* @tc.name: test queryExtensionAbilityInfos api
* @tc.desc: test queryExtensionAbilityInfos of Implicit query with entities
*/
it('SUB_BMS_APPINFO_EXTENSION_0016', 0, async function (done) {
await bundle.queryExtensionAbilityInfos({
"bundleName": BUNDLE_NAME1,
"action": "",
"entities": ["entitiesCommon"],
}, bundle.ExtensionAbilityType.FORM, bundle.ExtensionFlag.GET_EXTENSION_INFO_DEFAULT,
100).then(data => {
expect(data[0].bundleName).assertEqual("ohos.acts.bundle.stage");
expect(data[0].moduleName).assertEqual("phone");
expect(data[0].name).assertEqual("FormAbility");
expect(data[0].labelId).assertLarger(0);
expect(data[0].descriptionId).assertLarger(0);
expect(data[0].iconId).assertEqual(0);
expect(data[0].isVisible).assertFalse();
expect(data[0].extensionAbilityType).assertEqual(0);
expect(data[0].permissions.length).assertEqual(0);
expect(data[0].enabled).assertTrue();
expect(data[0].readPermission).assertEqual("");
expect(data[0].writePermission).assertEqual("");
expect(data[0].metadata.length).assertEqual(0);
}).catch(err => {
expect(err).assertFail();
});
bundle.queryExtensionAbilityInfos({
"bundleName": BUNDLE_NAME1,
"action": "",
"entities": ["entitiesCommon"]
}, bundle.ExtensionAbilityType.FORM, bundle.ExtensionFlag.GET_EXTENSION_INFO_DEFAULT,
100, (err, data) => {
if (err) {
expect(err).assertFail();
done();
return;
}
expect(data[0].bundleName).assertEqual("ohos.acts.bundle.stage");
expect(data[0].moduleName).assertEqual("phone");
expect(data[0].name).assertEqual("FormAbility");
expect(data[0].labelId).assertLarger(0);
expect(data[0].descriptionId).assertLarger(0);
expect(data[0].iconId).assertEqual(0);
expect(data[0].isVisible).assertFalse();
expect(data[0].extensionAbilityType).assertEqual(0);
expect(data[0].permissions.length).assertEqual(0);
expect(data[0].enabled).assertTrue();
expect(data[0].readPermission).assertEqual("");
expect(data[0].writePermission).assertEqual("");
expect(data[0].metadata.length).assertEqual(0);
done();
})
})
/*
* @tc.number: SUB_BMS_APPINFO_EXTENSION_0017
* @tc.name: test queryExtensionAbilityInfos api
* @tc.desc: test queryExtensionAbilityInfos of Implicit query with uri get failed
*/
it('SUB_BMS_APPINFO_EXTENSION_0017', 0, async function (done) {
await bundle.queryExtensionAbilityInfos(
{
"type": "",
"uri": "https://www.test.com/abbc"
}, bundle.ExtensionAbilityType.WINDOW, bundle.ExtensionFlag.GET_EXTENSION_INFO_DEFAULT,
100).then(data => {
expect(data).assertFail();
}).catch(err => {
expect(err).assertEqual(1);
});
bundle.queryExtensionAbilityInfos(
{
"type": "",
"uri": "https://www.test.com/abbc"
}, bundle.ExtensionAbilityType.WINDOW, bundle.ExtensionFlag.GET_EXTENSION_INFO_DEFAULT,
100, (err, data) => {
if (err) {
expect(err).assertEqual(1);
done();
return;
}
expect(data).assertFail();
done();
})
})
/*
* @tc.number: SUB_BMS_APPINFO_EXTENSION_0020
* @tc.name: test getBundleInfo api
* @tc.desc: test getBundleInfo get extensionAbilityInfos success
*/
it('SUB_BMS_APPINFO_EXTENSION_0020', 0, async function (done) {
await bundle.getBundleInfo(BUNDLE_NAME1, bundle.BundleFlag.GET_BUNDLE_WITH_EXTENSION_ABILITY).then(data => {
expect(data.extensionAbilityInfo.length).assertEqual(7);
expect(data.extensionAbilityInfo[0].name).assertEqual("ExtensionAbilityA");
expect(data.extensionAbilityInfo[1].name).assertEqual("ExtensionAbilityB");
expect(data.extensionAbilityInfo[2].name).assertEqual("ExtensionAbilityQ");
expect(data.extensionAbilityInfo[3].name).assertEqual("ExtensionAbilityW");
expect(data.extensionAbilityInfo[4].name).assertEqual("ExtensionAbility1");
expect(data.extensionAbilityInfo[5].name).assertEqual("FormAbility");
expect(data.extensionAbilityInfo[6].name).assertEqual("ServiceAbility");
}).catch(err => {
expect(err).assertFail();
});
bundle.getBundleInfo(BUNDLE_NAME1, bundle.BundleFlag.GET_BUNDLE_WITH_EXTENSION_ABILITY, (err, data) => {
if (err) {
expect(err).assertFail();
done();
return;
}
expect(data.extensionAbilityInfo.length).assertEqual(7);
expect(data.extensionAbilityInfo[0].name).assertEqual("ExtensionAbilityA");
expect(data.extensionAbilityInfo[1].name).assertEqual("ExtensionAbilityB");
expect(data.extensionAbilityInfo[2].name).assertEqual("ExtensionAbilityQ");
expect(data.extensionAbilityInfo[3].name).assertEqual("ExtensionAbilityW");
expect(data.extensionAbilityInfo[4].name).assertEqual("ExtensionAbility1");
expect(data.extensionAbilityInfo[5].name).assertEqual("FormAbility");
expect(data.extensionAbilityInfo[6].name).assertEqual("ServiceAbility");
done();
})
})
/*
* @tc.number: SUB_BMS_APPINFO_EXTENSION_0021
* @tc.name: test getBundleInfo api
* @tc.desc: test getBundleInfo with extensionAbilityInfos flag get failed
*/
it('SUB_BMS_APPINFO_EXTENSION_0021', 0, async function (done) {
await bundle.getBundleInfo(BUNDLE_NAME3, bundle.BundleFlag.GET_BUNDLE_WITH_EXTENSION_ABILITY).then(data => {
expect(data.extensionAbilityInfo.length).assertEqual(0);
}).catch(err => {
expect(err).assertEqual(1);
});
bundle.getBundleInfo(BUNDLE_NAME3, bundle.BundleFlag.GET_BUNDLE_WITH_EXTENSION_ABILITY, (err, data) => {
if (err) {
expect(err).assertEqual(1);
done();
return;
}
expect(data.extensionAbilityInfo.length).assertEqual(0);
done();
})
})
function checkApplication(data) {
function checkApplication(data) {
expect(data[0].applicationInfo.name).assertEqual("ohos.acts.bundle.stage");
expect(data[0].applicationInfo.name).assertEqual("ohos.acts.bundle.stage");
expect(data[0].applicationInfo.codePath).assertEqual("/data/app/el1/bundle/public/ohos.acts.bundle.stage");
expect(data[0].applicationInfo.codePath).assertEqual("/data/app/el1/bundle/public/ohos.acts.bundle.stage");
...
@@ -645,9 +844,9 @@ export default function QueryExtensionAbilityInfos() {
...
@@ -645,9 +844,9 @@ export default function QueryExtensionAbilityInfos() {
expect(data[0].applicationInfo.process).assertEqual("");
expect(data[0].applicationInfo.process).assertEqual("");
expect(data[0].applicationInfo.entryDir).assertEqual("/data/app/el1/bundle/public/ohos.acts.bundle.stage/phone");
expect(data[0].applicationInfo.entryDir).assertEqual("/data/app/el1/bundle/public/ohos.acts.bundle.stage/phone");
expect(data[0].applicationInfo.permissions.length).assertEqual(0);
expect(data[0].applicationInfo.permissions.length).assertEqual(0);
expect(data[0].applicationInfo.moduleSourceDirs[
0
]).assertEqual("/data/app/el1/bundle/public/ohos.acts.bundle.stage/phone");
expect(data[0].applicationInfo.moduleSourceDirs[
1
]).assertEqual("/data/app/el1/bundle/public/ohos.acts.bundle.stage/phone");
expect(data[0].applicationInfo.moduleInfos[
0
].moduleName).assertEqual("phone");
expect(data[0].applicationInfo.moduleInfos[
1
].moduleName).assertEqual("phone");
expect(data[0].applicationInfo.moduleInfos[
0
].moduleSourceDir).assertEqual("/data/app/el1/bundle/public/ohos.acts.bundle.stage/phone");
expect(data[0].applicationInfo.moduleInfos[
1
].moduleSourceDir).assertEqual("/data/app/el1/bundle/public/ohos.acts.bundle.stage/phone");
expect(JSON.stringify(data[0].applicationInfo.metaData)).assertEqual("{}");
expect(JSON.stringify(data[0].applicationInfo.metaData)).assertEqual("{}");
expect(JSON.stringify(data[0].applicationInfo.metadata)).assertEqual("{}");
expect(JSON.stringify(data[0].applicationInfo.metadata)).assertEqual("{}");
expect(data[0].applicationInfo.enabled).assertTrue();
expect(data[0].applicationInfo.enabled).assertTrue();
...
...
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsstagedemoone/entry/src/main/ets/ServiceAbility/FormAbility.ts
0 → 100644
浏览文件 @
c4b935ab
import
FormExtension
from
'
@ohos.application.FormExtension
'
;
import
formBindingData
from
'
@ohos.application.formBindingData
'
;
import
formInfo
from
'
@ohos.application.formInfo
'
;
export
default
class
FormAbility
extends
FormExtension
{
onCreate
(
want
)
{
// Called to return a FormBindingData object.
let
formData
=
{};
return
formBindingData
.
createFormBindingData
(
formData
);
}
onCastToNormal
(
formId
)
{
// Called when the form provider is notified that a temporary form is successfully
// converted to a normal form.
}
onUpdate
(
formId
)
{
// Called to notify the form provider to update a specified form.
}
onVisibilityChange
(
newStatus
)
{
// Called when the form provider receives form events from the system.
}
onEvent
(
formId
,
message
)
{
// Called when a specified message event defined by the form provider is triggered.
}
onDestroy
(
formId
)
{
// Called to notify the form provider that a specified form has been destroyed.
}
onAcquireFormState
(
want
)
{
// Called to return a {@link FormState} object.
return
formInfo
.
FormState
.
READY
;
}
};
\ No newline at end of file
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsstagedemoone/entry/src/main/module.json
浏览文件 @
c4b935ab
...
@@ -53,6 +53,20 @@
...
@@ -53,6 +53,20 @@
"pathStartWith"
:
"query/teacher"
"pathStartWith"
:
"query/teacher"
}
}
]
]
},
{
"actions"
:
[
"action_1"
],
"uris"
:
[
{
"scheme"
:
"https"
,
"host"
:
"www.test.com"
,
"path"
:
"query/student/name"
}
]
},
{
"actions"
:
[
"actionZ14"
],
"entities"
:
[
"entitiesZ14"
,
"entitiesCommon"
,
"entitiesZZ"
]
}
}
],
],
"metadata"
:
[
"metadata"
:
[
...
@@ -81,6 +95,20 @@
...
@@ -81,6 +95,20 @@
"path"
:
"query/student/name"
"path"
:
"query/student/name"
}
}
]
]
},
{
"actions"
:
[
"action_2"
],
"uris"
:
[
{
"scheme"
:
"https"
,
"host"
:
"www.test.com"
,
"pathStartWith"
:
"query/teacher"
}
]
},
{
"actions"
:
[
"actionY14"
],
"entities"
:
[
"entitiesY14"
]
}
}
],
],
"metadata"
:
[
"metadata"
:
[
...
...
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsstagedemotwo/AppScope/app.json
0 → 100644
浏览文件 @
c4b935ab
{
"app"
:{
"bundleName"
:
"ohos.acts.bundle.stage"
,
"vendor"
:
"huawei"
,
"versionCode"
:
1000000
,
"versionName"
:
"1.0.0"
,
"debug"
:
false
,
"icon"
:
"$media:icon"
,
"label"
:
"$string:app_name"
,
"description"
:
"$string:description_application"
,
"distributedNotificationEnabled"
:
true
,
"keepAlive"
:
true
,
"singleUser"
:
true
,
"minAPIVersion"
:
8
,
"targetAPIVersion"
:
8
,
"car"
:{
"apiCompatibleVersion"
:
8
,
"singleUser"
:
false
}
}
}
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsstagedemotwo/AppScope/resources/base/element/string.json
0 → 100644
浏览文件 @
c4b935ab
{
"string"
:[
{
"name"
:
"app_name"
,
"value"
:
"ohosProject"
}
]
}
\ No newline at end of file
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsstagedemotwo/BUILD.gn
0 → 100644
浏览文件 @
c4b935ab
# Copyright (c) 2021 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("bmsStageDemo2") {
hap_profile = "entry/src/main/module.json"
hap_name = "bmsStageDemo2"
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_app_scope("bmsstagedemoone_app_profile") {
app_profile = "AppScope/app.json"
sources = [ "AppScope/resources" ]
}
ohos_js_assets("hjs_demo_js_assets") {
source_dir = "entry/src/main/ets"
}
ohos_resources("hjs_demo_resources") {
sources = [ "entry/src/main/resources" ]
deps = [ ":bmsstagedemoone_app_profile" ]
hap_profile = "entry/src/main/module.json"
}
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsstagedemotwo/Test.json
0 → 100644
浏览文件 @
c4b935ab
{
"description"
:
"Configuration for hjunit demo Tests"
,
}
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsstagedemotwo/entry/src/main/ets/Application/AbilityStage.ts
0 → 100644
浏览文件 @
c4b935ab
import
AbilityStage
from
"
@ohos.application.AbilityStage
"
export
default
class
MyAbilityStage
extends
AbilityStage
{
onCreate
()
{
console
.
log
(
"
[Demo] MyAbilityStage onCreate
"
)
globalThis
.
stageOnCreateRun
=
1
;
globalThis
.
stageContext
=
this
.
context
;
}
}
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsstagedemotwo/entry/src/main/ets/FormAbility/FormAbility.ts
0 → 100644
浏览文件 @
c4b935ab
import
FormExtension
from
'
@ohos.application.FormExtension
'
;
import
formBindingData
from
'
@ohos.application.formBindingData
'
;
import
formInfo
from
'
@ohos.application.formInfo
'
;
export
default
class
FormAbility
extends
FormExtension
{
onCreate
(
want
)
{
// Called to return a FormBindingData object.
let
formData
=
{};
return
formBindingData
.
createFormBindingData
(
formData
);
}
onCastToNormal
(
formId
)
{
// Called when the form provider is notified that a temporary form is successfully
// converted to a normal form.
}
onUpdate
(
formId
)
{
// Called to notify the form provider to update a specified form.
}
onVisibilityChange
(
newStatus
)
{
// Called when the form provider receives form events from the system.
}
onEvent
(
formId
,
message
)
{
// Called when a specified message event defined by the form provider is triggered.
}
onDestroy
(
formId
)
{
// Called to notify the form provider that a specified form has been destroyed.
}
onAcquireFormState
(
want
)
{
// Called to return a {@link FormState} object.
return
formInfo
.
FormState
.
READY
;
}
};
\ No newline at end of file
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsstagedemotwo/entry/src/main/ets/MainAbility/MainAbility.ts
0 → 100644
浏览文件 @
c4b935ab
import
Ability
from
'
@ohos.application.Ability
'
export
default
class
MainAbility
extends
Ability
{
onCreate
(
want
,
launchParam
){
// Ability is creating, initialize resources for this ability
console
.
log
(
"
[Demo] MainAbility onCreate
"
)
globalThis
.
abilityWant
=
want
;
}
onDestroy
()
{
// Ability is destroying, release resources for this ability
console
.
log
(
"
[Demo] MainAbility onDestroy
"
)
}
onWindowStageCreate
(
windowStage
)
{
// Main window is created, set main page for this ability
console
.
log
(
"
[Demo] MainAbility onWindowStageCreate
"
)
globalThis
.
abilityContext
=
this
.
context
windowStage
.
setUIContent
(
this
.
context
,
"
pages/index/index
"
,
null
)
}
onWindowStageDestroy
()
{
//Main window is destroyed, release UI related resources
console
.
log
(
"
[Demo] MainAbility onWindowStageDestroy
"
)
}
onForeground
()
{
// Ability has brought to foreground
console
.
log
(
"
[Demo] MainAbility onForeground
"
)
}
onBackground
()
{
// Ability has back to background
console
.
log
(
"
[Demo] MainAbility onBackground
"
)
}
};
\ No newline at end of file
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsstagedemotwo/entry/src/main/ets/ServiceAbility/FormAbility.ts
0 → 100644
浏览文件 @
c4b935ab
import
FormExtension
from
'
@ohos.application.FormExtension
'
;
import
formBindingData
from
'
@ohos.application.formBindingData
'
;
import
formInfo
from
'
@ohos.application.formInfo
'
;
export
default
class
FormAbility
extends
FormExtension
{
onCreate
(
want
)
{
// Called to return a FormBindingData object.
let
formData
=
{};
return
formBindingData
.
createFormBindingData
(
formData
);
}
onCastToNormal
(
formId
)
{
// Called when the form provider is notified that a temporary form is successfully
// converted to a normal form.
}
onUpdate
(
formId
)
{
// Called to notify the form provider to update a specified form.
}
onVisibilityChange
(
newStatus
)
{
// Called when the form provider receives form events from the system.
}
onEvent
(
formId
,
message
)
{
// Called when a specified message event defined by the form provider is triggered.
}
onDestroy
(
formId
)
{
// Called to notify the form provider that a specified form has been destroyed.
}
onAcquireFormState
(
want
)
{
// Called to return a {@link FormState} object.
return
formInfo
.
FormState
.
READY
;
}
};
\ No newline at end of file
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsstagedemotwo/entry/src/main/ets/pages/index/index.ets
0 → 100644
浏览文件 @
c4b935ab
/*
* Copyright (c) 2021 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 file from '@system.file';
import {Core, ExpectExtend, InstrumentLog, ReportExtend} from "deccjsunit/index.ets"
import testsuite from "../../test/List.test.ets"
@Entry
@Component
struct Index {
aboutToAppear(){
console.info("start run testcase!!!!")
const core = Core.getInstance()
const expectExtend = new ExpectExtend({
'id': 'extend'
})
core.addService('expect', expectExtend)
const reportExtend = new ReportExtend(file)
core.addService('report', reportExtend)
core.init()
core.subscribeEvent('task', reportExtend)
const configService = core.getDefaultService('config')
console.info('parameters---->' + JSON.stringify(globalThis.abilityWant.parameters))
globalThis.abilityWant.parameters.timeout = 70000;
configService.setConfig(globalThis.abilityWant.parameters)
testsuite(globalThis.abilityContext)
core.execute()
}
build() {
Flex({ direction:FlexDirection.Column, alignItems:ItemAlign.Center, justifyContent: FlexAlign.Center }) {
Text('Hello World')
.fontSize(50)
.fontWeight(FontWeight.Bold)
Button() {
Text('next page')
.fontSize(25)
.fontWeight(FontWeight.Bold)
}.type(ButtonType.Capsule)
.margin({
top: 20
})
.backgroundColor('#0D9FFB')
.onClick(() => {
})
}
.width('100%')
.height('100%')
}
}
\ No newline at end of file
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsstagedemotwo/entry/src/main/ets/pages/second/second.ets
0 → 100644
浏览文件 @
c4b935ab
/*
* Copyright (c) 2021 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 router from '@system.router';
@Entry
@Component
struct Second {
private content: string = "Second Page"
build() {
Flex({ direction: FlexDirection.Column,alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) {
Text(`${this.content}`)
.fontSize(50)
.fontWeight(FontWeight.Bold)
Button() {
Text('back to index')
.fontSize(20)
.fontWeight(FontWeight.Bold)
}.type(ButtonType.Capsule)
.margin({
top: 20
})
.backgroundColor('#0D9FFB')
.onClick(() => {
router.back()
})
}
.width('100%')
.height('100%')
}
}
\ No newline at end of file
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsstagedemotwo/entry/src/main/ets/test/List.test.ets
0 → 100644
浏览文件 @
c4b935ab
/*
* Copyright (c) 2021 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 function testsuite(context) {
}
\ No newline at end of file
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsstagedemotwo/entry/src/main/module.json
0 → 100644
浏览文件 @
c4b935ab
{
"module"
:
{
"name"
:
"myfeature"
,
"type"
:
"feature"
,
"srcEntrance"
:
"./ets/Application/AbilityStage.ts"
,
"description"
:
"$string:phone_entry_dsc"
,
"mainElement"
:
"MainAbility1"
,
"deviceTypes"
:
[
"phone"
],
"deliveryWithInstall"
:
true
,
"installationFree"
:
false
,
"uiSyntax"
:
"ets"
,
"pages"
:
"$profile:main_pages"
,
"abilities"
:
[
{
"name"
:
"ohos.acts.bundle.stage.MainAbility1"
,
"srcEntrance"
:
"./ets/MainAbility/MainAbility.ts"
,
"description"
:
"$string:phone_entry_main"
,
"icon"
:
"$media:icon"
,
"label"
:
"$string:entry_label"
,
"orientation"
:
"portrait"
,
"visible"
:
true
,
"skills"
:
[
{
"actions"
:
[
"action.system.home"
],
"entities"
:[
"entity.system.home"
]
}
]
}
],
"extensionAbilities"
:
[
{
"name"
:
"ExtensionAbilityQ"
,
"srcEntrance"
:
"./ets/FormAbility/FormAbility.ts"
,
"label"
:
"$string:form_FormAbility_label"
,
"description"
:
"$string:form_FormAbility_desc"
,
"type"
:
"form"
,
"skills"
:
[
{
"actions"
:
[
"actionQ"
],
"entities"
:
[
"entitiesQ"
]
}
],
"metadata"
:
[
{
"name"
:
"ohos.extension.form"
,
"resource"
:
"$profile:form_config"
}
]
},
{
"name"
:
"ExtensionAbilityW"
,
"srcEntrance"
:
"./ets/FormAbility/FormAbility.ts"
,
"label"
:
"$string:form_FormAbility_label"
,
"description"
:
"$string:form_FormAbility_desc"
,
"type"
:
"service"
,
"skills"
:
[
{
"actions"
:
[
"actionW"
],
"entities"
:
[
"entitiesW"
,
"entitiesCommon"
]
}
],
"metadata"
:
[
{
"name"
:
"ohos.extension.form"
,
"resource"
:
"$profile:form_config"
}
],
"permissions"
:
[
"ohos.permission.GET_BUNDLE_INFO"
]
},
{
"name"
:
"ExtensionAbilityA"
,
"srcEntrance"
:
"./ets/FormAbility/FormAbility.ts"
,
"label"
:
"$string:form_FormAbility_label"
,
"description"
:
"$string:form_FormAbility_desc"
,
"type"
:
"wallpaper"
,
"skills"
:
[
{
"actions"
:
[
"action_3"
],
"uris"
:
[
{
"scheme"
:
"https"
,
"host"
:
"www.test.com"
,
"pathRegex"
:
"ab*c"
}
]
}
],
"metadata"
:
[
{
"name"
:
"ohos.extension.form"
,
"resource"
:
"$profile:form_config"
}
]
},
{
"name"
:
"ExtensionAbilityB"
,
"srcEntrance"
:
"./ets/FormAbility/FormAbility.ts"
,
"label"
:
"$string:form_FormAbility_label"
,
"description"
:
"$string:form_FormAbility_desc"
,
"type"
:
"workScheduler"
,
"skills"
:
[
{
"actions"
:
[
"action_4"
],
"uris"
:
[
{
"scheme"
:
"https"
,
"host"
:
"www.test.com"
,
"path"
:
"query/student/name"
,
"pathRegex"
:
"ab*c"
,
"pathStartWith"
:
"query/teacher"
}
]
}
],
"metadata"
:
[
{
"name"
:
"ohos.extension.form"
,
"resource"
:
"$profile:form_config"
}
],
"permissions"
:
[
"ohos.permission.GET_BUNDLE_INFO"
]
}
]
}
}
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsstagedemotwo/entry/src/main/resources/base/element/string.json
0 → 100644
浏览文件 @
c4b935ab
{
"string"
:
[
{
"name"
:
"phone_entry_dsc"
,
"value"
:
"i am an entry for phone"
},
{
"name"
:
"phone_entry_main"
,
"value"
:
"the phone entry ability"
},
{
"name"
:
"entry_label"
,
"value"
:
"ActsContextTest"
},
{
"name"
:
"form_description"
,
"value"
:
"my form"
},
{
"name"
:
"serviceability_description"
,
"value"
:
"my whether"
},
{
"name"
:
"description_application"
,
"value"
:
"demo for test"
},
{
"name"
:
"app_name"
,
"value"
:
"Demo"
},
{
"name"
:
"form_FormAbility_desc"
,
"value"
:
"form_description"
},
{
"name"
:
"form_FormAbility_label"
,
"value"
:
"form_label"
}
]
}
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsstagedemotwo/entry/src/main/resources/base/media/icon.png
0 → 100644
浏览文件 @
c4b935ab
15.1 KB
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsstagedemotwo/entry/src/main/resources/base/profile/form_config.json
0 → 100644
浏览文件 @
c4b935ab
{
"forms"
:
[
{
"isDefault"
:
true
,
"src"
:
"./js/widget/pages/index/index"
,
"scheduledUpdateTime"
:
"10:30"
,
"defaultDimension"
:
"2*2"
,
"name"
:
"widget"
,
"description"
:
"This is a service widget."
,
"colorMode"
:
"auto"
,
"window"
:
{
"designWidth"
:
720
,
"autoDesignWidth"
:
true
},
"formConfigAbility"
:
"ability://xxxxx"
,
"supportDimensions"
:
[
"2*2"
],
"updateEnabled"
:
true
,
"updateDuration"
:
1
},
{
"isDefault"
:
true
,
"src"
:
"./js/widget1/pages/index/index"
,
"scheduledUpdateTime"
:
"10:30"
,
"defaultDimension"
:
"2*2"
,
"name"
:
"widget1"
,
"description"
:
"This is a service widget."
,
"colorMode"
:
"auto"
,
"window"
:
{
"designWidth"
:
720
,
"autoDesignWidth"
:
true
},
"formConfigAbility"
:
"ability://xxxxx"
,
"supportDimensions"
:
[
"1*2"
,
"2*2"
],
"updateEnabled"
:
true
,
"updateDuration"
:
1
},
{
"isDefault"
:
true
,
"src"
:
"./js/widget2/pages/index/index"
,
"scheduledUpdateTime"
:
"10:30"
,
"defaultDimension"
:
"2*2"
,
"name"
:
"widget2"
,
"description"
:
"This is a service widget."
,
"colorMode"
:
"auto"
,
"window"
:
{
"designWidth"
:
720
,
"autoDesignWidth"
:
true
},
"formConfigAbility"
:
"ability://xxxxx"
,
"supportDimensions"
:
[
"2*2"
],
"updateEnabled"
:
true
,
"updateDuration"
:
1
},
{
"isDefault"
:
true
,
"src"
:
"./js/widget3/pages/index/index"
,
"scheduledUpdateTime"
:
"10:30"
,
"defaultDimension"
:
"2*2"
,
"name"
:
"widget3"
,
"description"
:
"This is a service widget."
,
"colorMode"
:
"auto"
,
"window"
:
{
"designWidth"
:
720
,
"autoDesignWidth"
:
true
},
"formConfigAbility"
:
"ability://xxxxx"
,
"supportDimensions"
:
[
"2*2"
],
"updateEnabled"
:
true
,
"updateDuration"
:
1
}
]
}
\ No newline at end of file
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsstagedemotwo/entry/src/main/resources/base/profile/main_pages.json
0 → 100644
浏览文件 @
c4b935ab
{
"src"
:
[
"pages/index/index"
,
"pages/second/second"
]
}
\ No newline at end of file
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsstagedemotwo/signature/openharmony_sx.p7b
0 → 100644
浏览文件 @
c4b935ab
文件已添加
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录