Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
c02c1604
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看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
c02c1604
编写于
5月 20, 2022
作者:
O
openharmony_ci
提交者:
Gitee
5月 20, 2022
浏览文件
操作
浏览文件
下载
差异文件
!3225 新增测试用例+修改拼写错误
Merge pull request !3225 from ry/master
上级
4ccf41fc
31d09a4b
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
211 addition
and
98 deletion
+211
-98
appexecfwk/bundle_standard/bundlemanager/actsbmsetsunpermissiontest/entry/src/main/ets/MainAbility/test/ActsBmsEtsUnPermissionTest.test.ets
.../ets/MainAbility/test/ActsBmsEtsUnPermissionTest.test.ets
+27
-14
appexecfwk/bundle_standard/bundlemanager/actsbmsmetadatatest/Test.json
...ndle_standard/bundlemanager/actsbmsmetadatatest/Test.json
+9
-2
appexecfwk/bundle_standard/bundlemanager/actsbmsmetadatatest/entry/src/main/js/test/ActsBmsMetaDataTest.test.js
...tatest/entry/src/main/js/test/ActsBmsMetaDataTest.test.js
+131
-61
appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/MainAbility/test/GetabilityInfo.test.ets
...try/src/main/ets/MainAbility/test/GetabilityInfo.test.ets
+11
-11
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfirstright/src/main/config.json
...lemanager/sceneProject/bmsfirstright/src/main/config.json
+10
-1
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosfirstsceneupdate/src/main/config.json
...eProject/bmsgetinfosfirstsceneupdate/src/main/config.json
+4
-4
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenevendor/src/main/config.json
.../sceneProject/bmsgetinfosscenevendor/src/main/config.json
+7
-2
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondright/src/main/config.json
...emanager/sceneProject/bmssecondright/src/main/config.json
+10
-1
appexecfwk/zlib/actszipfileandunzipfiletest/entry/src/main/js/test/actszipfileandunzipfiletest.test.js
...ntry/src/main/js/test/actszipfileandunzipfiletest.test.js
+1
-1
appexecfwk/zlib/actszlibtest/ActsZlibTest.cpp
appexecfwk/zlib/actszlibtest/ActsZlibTest.cpp
+1
-1
未找到文件。
appexecfwk/bundle_standard/bundlemanager/actsbmsetsunpermissiontest/entry/src/main/ets/MainAbility/test/ActsBmsEtsUnPermissionTest.test.ets
浏览文件 @
c02c1604
...
...
@@ -22,6 +22,8 @@ const INVALID_CODE = 1;
const
LAUNCHER_BUNDLE_NAME
=
"com.ohos.launcher"
;
const
SELF_BUNDLENAME
=
"com.example.actsbmsetsunpermissiontest"
;
const
SELF_ABILITYNAME
=
"com.example.actsbmsetsunpermissiontest.MainAbility"
;
const
BUNDLE_SETTINGS
=
"com.ohos.settings"
;
const
ABILITIY_SETTINGS
=
"com.ohos.settings.MainAbility"
;
export
default
function
actsBmsJsUnPermissionTest
()
{
describe
(
'actsBmsJsUnPermissionTest'
,
function
()
{
...
...
@@ -34,10 +36,8 @@ export default function actsBmsJsUnPermissionTest() {
it
(
'getApplicationInfos_1300'
,
0
,
async
function
(
done
)
{
await
bundle
.
getAllApplicationInfo
(
DEFAULT_FLAG
)
.
then
(
data
=>
{
expect
()
.
assertFail
();
done
();
})
.
catch
(
err
=>
{
expect
(
err
)
.
assertEqual
(
INVALID_CODE
);
done
();
});
bundle
.
getAllApplicationInfo
(
DEFAULT_FLAG
,
(
err
,
data
)
=>
{
expect
(
err
)
.
assertEqual
(
INVALID_CODE
);
...
...
@@ -54,10 +54,8 @@ export default function actsBmsJsUnPermissionTest() {
it
(
'getBundleInfo_2000'
,
0
,
async
function
(
done
)
{
await
bundle
.
getBundleInfo
(
LAUNCHER_BUNDLE_NAME
,
DEFAULT_FLAG
,
{
userId
:
100
})
.
then
(
data
=>
{
expect
()
.
assertFail
();
done
();
})
.
catch
(
err
=>
{
expect
(
err
)
.
assertEqual
(
INVALID_CODE
);
done
();
});
bundle
.
getBundleInfo
(
LAUNCHER_BUNDLE_NAME
,
DEFAULT_FLAG
,
{
userId
:
100
},
(
err
,
data
)
=>
{
expect
(
err
)
.
assertEqual
(
INVALID_CODE
);
...
...
@@ -74,10 +72,8 @@ export default function actsBmsJsUnPermissionTest() {
it
(
'getApplicationInfo_1800'
,
0
,
async
function
(
done
)
{
await
bundle
.
getApplicationInfo
(
LAUNCHER_BUNDLE_NAME
,
DEFAULT_FLAG
)
.
then
(
data
=>
{
expect
()
.
assertFail
();
done
();
})
.
catch
(
err
=>
{
expect
(
err
)
.
assertEqual
(
INVALID_CODE
);
done
();
});
bundle
.
getApplicationInfo
(
LAUNCHER_BUNDLE_NAME
,
DEFAULT_FLAG
,
(
err
,
data
)
=>
{
expect
(
err
)
.
assertEqual
(
INVALID_CODE
);
...
...
@@ -138,6 +134,23 @@ export default function actsBmsJsUnPermissionTest() {
})
});
/*
* @tc.number: SUB_BMS_APPINFO_GETABILITYICON_0006
* @tc.name: test getAbilityIcon
* @tc.desc: test getAbilityIcon without permission
*/
it
(
'SUB_BMS_APPINFO_GETABILITYICON_0006'
,
0
,
async
function
(
done
)
{
await
bundle
.
getAbilityIcon
(
BUNDLE_SETTINGS
,
ABILITIY_SETTINGS
)
.
then
(
pixelmap
=>
{
expect
(
pixelmap
)
.
assertFail
();
})
.
catch
(
err
=>
{
expect
(
err
)
.
assertEqual
(
1
);
});
bundle
.
getAbilityIcon
(
BUNDLE_SETTINGS
,
ABILITIY_SETTINGS
,
(
err
,
pixelmap
)
=>
{
expect
(
err
)
.
assertEqual
(
1
);
done
();
});
});
/*
* @tc.number: getAbilityInfo_100
* @tc.name: test getAbilityInfo
...
...
@@ -191,15 +204,15 @@ export default function actsBmsJsUnPermissionTest() {
expect
(
data
.
descriptionId
)
.
assertLarger
(
0
);
expect
(
data
.
formEnabled
)
.
assertEqual
(
false
);
expect
(
data
.
iconId
)
.
assertLarger
(
0
);
ex
cep
t
(
data
.
labelId
)
.
assertLarger
(
0
);
ex
pec
t
(
data
.
labelId
)
.
assertLarger
(
0
);
expect
(
data
.
subType
)
.
assertEqual
(
0
);
ex
cep
t
(
data
.
enabled
)
.
assertEqual
(
true
);
ex
pec
t
(
data
.
enabled
)
.
assertEqual
(
true
);
expect
(
data
.
readPermission
)
.
assertEqual
(
""
);
expect
(
data
.
writePermission
)
.
assertEqual
(
""
);
expect
(
data
.
targetAbility
)
.
assertEqual
(
""
);
expect
(
data
.
theme
)
.
assertEqual
(
""
);
expect
(
data
.
metaData
)
.
assertEqual
([]
);
expect
(
data
.
metadata
)
.
assertEqual
([]
);
expect
(
data
.
metaData
.
length
)
.
assertEqual
(
0
);
expect
(
data
.
metadata
.
length
)
.
assertEqual
(
0
);
checkApplicationInfo
(
data
.
applicationInfo
);
console
.
log
(
"---checkAbilityInfo_other End--- "
);
}
...
...
@@ -220,10 +233,10 @@ export default function actsBmsJsUnPermissionTest() {
expect
(
info
.
supportedModes
)
.
assertEqual
(
0
);
expect
(
info
.
process
)
.
assertEqual
(
""
);
expect
(
info
.
moduleSourceDirs
[
0
])
.
assertEqual
(
"/data/app/el1/bundle/public/com.example.actsbmsetsunpermissiontest/com.example.actsbmsetsunpermissiontest"
);
expect
(
info
.
metaData
)
.
expect
({}
);
expect
(
info
.
metadata
)
.
expect
({}
);
expect
(
info
.
enabled
)
.
expect
(
true
);
expect
(
info
.
flags
)
.
expect
(
0
);
expect
(
JSON
.
stringify
(
info
.
metadata
))
.
assertEqual
(
"{}"
);
expect
(
JSON
.
stringify
(
info
.
metadata
))
.
assertEqual
(
"{}"
);
expect
(
info
.
enabled
)
.
assertEqual
(
true
);
expect
(
info
.
flags
)
.
assertEqual
(
0
);
expect
(
info
.
uid
)
.
assertLarger
(
0
);
expect
(
info
.
entityType
)
.
assertEqual
(
"unspecified"
);
expect
(
info
.
removable
)
.
assertEqual
(
true
);
...
...
appexecfwk/bundle_standard/bundlemanager/actsbmsmetadatatest/Test.json
浏览文件 @
c02c1604
...
...
@@ -27,24 +27,31 @@
"type"
:
"PushKit"
,
"push"
:
[
"bmsThirdBundleTest1.hap->/data/test/bmsThirdBundleTest1.hap"
,
"bmsThirdBundleTestA1.hap->/data/test/bmsThirdBundleTestA1.hap"
,
"bmsThirdBundleTest5.hap->/data/test/bmsThirdBundleTest5.hap"
,
"bmsSystemBundleTest1.hap->/data/test/bmsSystemBundleTest1.hap"
,
"bmsVendorBundleTest1.hap->/data/test/bmsVendorBundleTest1.hap"
"bmsVendorBundleTest1.hap->/data/test/bmsVendorBundleTest1.hap"
,
"first_right.hap->/data/test/first_right.hap"
,
"second_right.hap->/data/test/second_right.hap"
]
},
{
"type"
:
"ShellKit"
,
"run-command"
:
[
"bm install -p /data/test/bmsThirdBundleTest1.hap"
,
"bm install -p /data/test/bmsThirdBundleTestA1.hap"
,
"bm install -p /data/test/bmsSystemBundleTest1.hap"
,
"bm install -p /data/test/bmsVendorBundleTest1.hap"
,
"bm install -p /data/test/bmsThirdBundleTest5.hap"
"bm install -p /data/test/bmsThirdBundleTest5.hap"
,
"bm install -p /data/test/first_right.hap"
,
"bm install -p /data/test/second_right.hap"
],
"teardown-command"
:[
"bm uninstall -n com.example.third1"
,
"bm uninstall -n com.example.system1"
,
"bm uninstall -n com.example.vendor1"
,
"bm uninstall -n com.example.third5"
,
"bm uninstall -n com.example.l3jsdemo"
,
"rm -rf /data/test/"
]
}
...
...
appexecfwk/bundle_standard/bundlemanager/actsbmsmetadatatest/entry/src/main/js/test/ActsBmsMetaDataTest.test.js
浏览文件 @
c02c1604
...
...
@@ -21,11 +21,13 @@ const BUNDLE_NAME2 = 'com.example.third5';
const
BUNDLE_NAME3
=
'
com.example.noexist
'
;
const
BUNDLE_NAME4
=
'
com.example.system1
'
;
const
BUNDLE_NAME5
=
'
com.example.vendor1
'
;
const
BUNDLE_NAME6
=
'
com.example.l3jsdemo
'
;
const
ABILITY_NAME1
=
'
com.example.third1.MainAbility
'
;
const
ABILITY_NAME3
=
'
com.example.third5.AMainAbility
'
;
const
ABILITY_NAME4
=
'
com.example.noexist.MainAbility
'
;
const
ABILITY_NAME5
=
'
com.example.system1.MainAbility
'
;
const
ABILITY_NAME6
=
'
com.example.vendor1.MainAbility
'
;
const
ABILITY_NAME2
=
'
com.example.third5.AMainAbility
'
;
const
ABILITY_NAME3
=
'
com.example.noexist.MainAbility
'
;
const
ABILITY_NAME4
=
'
com.example.system1.MainAbility
'
;
const
ABILITY_NAME5
=
'
com.example.vendor1.MainAbility
'
;
const
ABILITY_NAME6
=
'
com.example.l3jsdemo.MainAbility
'
;
const
USERID
=
100
;
describe
(
'
ActsBmsMetaDataTest
'
,
function
()
{
...
...
@@ -33,7 +35,7 @@ describe('ActsBmsMetaDataTest', function () {
/*
* @tc.number: bms_getMetaData_0100
* @tc.name: test to get meta data for an application.
* @tc.desc: get an a
pplication's meta data which contains two HAP packages
.
* @tc.desc: get an a
bility's meta data when update
.
*/
it
(
'
bms_getMetaData_0100
'
,
0
,
async
function
(
done
)
{
await
bundle
.
queryAbilityByWant
(
...
...
@@ -41,105 +43,173 @@ describe('ActsBmsMetaDataTest', function () {
"
bundleName
"
:
BUNDLE_NAME1
,
"
abilityName
"
:
ABILITY_NAME1
},
bundle
.
BundleFlag
.
GET_ABILITY_INFO_WITH_METADATA
,
USERID
).
then
(
dataInfos
=>
{
console
.
info
(
"
dataInfos[0].metaData
"
+
JSON
.
stringify
(
dataInfos
[
0
].
metaData
));
let
metaData
=
dataInfos
[
0
].
metaData
;
expect
(
metaData
[
0
].
name
).
assertEqual
(
"
Data1
"
);
expect
(
metaData
[
0
].
value
).
assertEqual
(
"
float
"
);
expect
(
metaData
[
0
].
extra
).
assertEqual
(
"
$string:mainability_description
"
);
done
();
}).
catch
(
err
=>
{
expect
(
err
).
assertFail
();
done
();
});
let
metaData
=
dataInfos
[
0
].
metaData
;
expect
(
metaData
[
0
].
name
).
assertEqual
(
"
DataA1
"
);
expect
(
metaData
[
0
].
value
).
assertEqual
(
"
float
"
);
expect
(
metaData
[
0
].
extra
).
assertEqual
(
"
$string:mainability_description
"
);
}).
catch
(
err
=>
{
expect
(
err
).
assertFail
();
});
bundle
.
queryAbilityByWant
(
{
"
bundleName
"
:
BUNDLE_NAME1
,
"
abilityName
"
:
ABILITY_NAME1
},
bundle
.
BundleFlag
.
GET_ABILITY_INFO_WITH_METADATA
,
USERID
,
(
err
,
dataInfos
)
=>
{
let
metaData
=
dataInfos
[
0
].
metaData
;
expect
(
metaData
[
0
].
name
).
assertEqual
(
"
DataA1
"
);
expect
(
metaData
[
0
].
value
).
assertEqual
(
"
float
"
);
expect
(
metaData
[
0
].
extra
).
assertEqual
(
"
$string:mainability_description
"
);
done
();
});
});
/*
* @tc.number: bms_getMetaData_0200
* @tc.name: test to get meta data for an application.
* @tc.desc: get an ability's meta data which contains two HAP packages.
*/
it
(
'
bms_getMetaData_0200
'
,
0
,
async
function
(
done
)
{
await
bundle
.
queryAbilityByWant
(
{
"
bundleName
"
:
BUNDLE_NAME6
,
"
abilityName
"
:
ABILITY_NAME6
},
bundle
.
BundleFlag
.
GET_ABILITY_INFO_WITH_METADATA
,
USERID
).
then
(
dataInfos
=>
{
let
metaDataInfo
=
dataInfos
[
0
].
metaData
;
expect
(
metaDataInfo
[
0
].
name
).
assertEqual
(
"
Data3
"
);
expect
(
metaDataInfo
[
0
].
value
).
assertEqual
(
"
float
"
);
expect
(
metaDataInfo
[
0
].
extra
).
assertEqual
(
"
$string:mainability_description
"
);
}).
catch
(
err
=>
{
expect
(
err
).
assertFail
();
});
bundle
.
queryAbilityByWant
(
{
"
bundleName
"
:
BUNDLE_NAME6
,
"
abilityName
"
:
ABILITY_NAME6
},
bundle
.
BundleFlag
.
GET_ABILITY_INFO_WITH_METADATA
,
USERID
,
(
err
,
dataInfos
)
=>
{
let
metaData
=
dataInfos
[
0
].
metaData
;
expect
(
metaData
[
0
].
name
).
assertEqual
(
"
Data3
"
);
expect
(
metaData
[
0
].
value
).
assertEqual
(
"
float
"
);
expect
(
metaData
[
0
].
extra
).
assertEqual
(
"
$string:mainability_description
"
);
done
();
});
});
/*
* @tc.number: bms_getMetaData_0400
* @tc.name: test to get meta data for an application.
* @tc.desc: get an a
pplication's meta data which has one
ability.
* @tc.desc: get an a
bility's meta data which has two
ability.
*/
it
(
'
bms_getMetaData_0400
'
,
0
,
async
function
(
done
)
{
await
bundle
.
queryAbilityByWant
(
{
bundleName
:
BUNDLE_NAME2
,
abilityName
:
ABILITY_NAME
3
,
abilityName
:
ABILITY_NAME
2
,
},
bundle
.
BundleFlag
.
GET_ABILITY_INFO_WITH_METADATA
,
USERID
).
then
(
dataInfos
=>
{
console
.
info
(
"
dataInfos[0].metaData
"
+
JSON
.
stringify
(
dataInfos
[
0
].
metaData
));
let
metaData
=
dataInfos
[
0
].
metaData
;
expect
(
metaData
[
0
].
name
).
assertEqual
(
"
Data5A
"
);
expect
(
metaData
[
0
].
value
).
assertEqual
(
"
float
"
);
expect
(
metaData
[
0
].
extra
).
assertEqual
(
"
$string:mainability_description
"
);
done
();
}).
catch
(
err
=>
{
expect
(
err
).
assertFail
();
done
();
});
let
metaData
=
dataInfos
[
0
].
metaData
;
expect
(
metaData
[
0
].
name
).
assertEqual
(
"
Data5A
"
);
expect
(
metaData
[
0
].
value
).
assertEqual
(
"
float
"
);
expect
(
metaData
[
0
].
extra
).
assertEqual
(
"
$string:mainability_description
"
);
}).
catch
(
err
=>
{
expect
(
err
).
assertFail
();
});
bundle
.
queryAbilityByWant
(
{
"
bundleName
"
:
BUNDLE_NAME2
,
"
abilityName
"
:
ABILITY_NAME2
},
bundle
.
BundleFlag
.
GET_ABILITY_INFO_WITH_METADATA
,
USERID
,
(
err
,
dataInfos
)
=>
{
let
metaData
=
dataInfos
[
0
].
metaData
;
expect
(
metaData
[
0
].
name
).
assertEqual
(
"
Data5A
"
);
expect
(
metaData
[
0
].
value
).
assertEqual
(
"
float
"
);
expect
(
metaData
[
0
].
extra
).
assertEqual
(
"
$string:mainability_description
"
);
done
();
});
});
/*
* @tc.number: bms_getMetaData_0500
* @tc.name: test to get meta data for an application that does not exist.
* @tc.desc: get an a
pplication
's meta data which does not exist.
* @tc.desc: get an a
bility
's meta data which does not exist.
*/
it
(
'
bms_getMetaData_0500
'
,
0
,
async
function
(
done
)
{
await
bundle
.
queryAbilityByWant
(
{
bundleName
:
BUNDLE_NAME3
,
abilityName
:
ABILITY_NAME
4
,
abilityName
:
ABILITY_NAME
3
,
},
bundle
.
BundleFlag
.
GET_ABILITY_INFO_WITH_METADATA
,
USERID
).
then
(
dataInfos
=>
{
expect
(
dataInfos
.
length
).
assertEqual
(
0
);
done
();
}).
catch
(
err
=>
{
console
.
info
(
"
err====:
"
+
err
);
expect
(
err
).
assertEqual
(
1
);
done
();
});
expect
(
dataInfos
).
assertFail
();
}).
catch
(
err
=>
{
expect
(
err
).
assertEqual
(
1
);
});
bundle
.
queryAbilityByWant
(
{
"
bundleName
"
:
BUNDLE_NAME3
,
"
abilityName
"
:
ABILITY_NAME3
},
bundle
.
BundleFlag
.
GET_ABILITY_INFO_WITH_METADATA
,
USERID
,
(
err
,
dataInfos
)
=>
{
expect
(
err
).
assertEqual
(
1
);
expect
(
dataInfos
).
assertEqual
(
"
QueryAbilityInfos failed
"
);
done
();
});
});
/*
* @tc.number: bms_getMetaData_0600
* @tc.name: test to get meta data for a system application.
* @tc.desc: get a system a
pplication
's meta data.
* @tc.desc: get a system a
bility
's meta data.
*/
it
(
'
bms_getMetaData_0600
'
,
0
,
async
function
(
done
)
{
await
bundle
.
queryAbilityByWant
(
{
bundleName
:
BUNDLE_NAME4
,
abilityName
:
ABILITY_NAME
5
,
abilityName
:
ABILITY_NAME
4
,
},
bundle
.
BundleFlag
.
GET_ABILITY_INFO_WITH_METADATA
,
USERID
).
then
(
dataInfos
=>
{
console
.
info
(
"
dataInfos[0].metaData
"
+
JSON
.
stringify
(
dataInfos
[
0
].
metaData
));
let
metaData
=
dataInfos
[
0
].
metaData
;
expect
(
metaData
[
0
].
name
).
assertEqual
(
"
Data1S
"
);
expect
(
metaData
[
0
].
value
).
assertEqual
(
"
float
"
);
expect
(
metaData
[
0
].
extra
).
assertEqual
(
"
$string:mainability_description
"
);
done
();
}).
catch
(
err
=>
{
expect
(
err
).
assertFail
();
done
();
});
let
metaData
=
dataInfos
[
0
].
metaData
;
expect
(
metaData
[
0
].
name
).
assertEqual
(
"
Data1S
"
);
expect
(
metaData
[
0
].
value
).
assertEqual
(
"
float
"
);
expect
(
metaData
[
0
].
extra
).
assertEqual
(
"
$string:mainability_description
"
);
}).
catch
(
err
=>
{
expect
(
err
).
assertFail
();
});
bundle
.
queryAbilityByWant
(
{
"
bundleName
"
:
BUNDLE_NAME4
,
"
abilityName
"
:
ABILITY_NAME4
},
bundle
.
BundleFlag
.
GET_ABILITY_INFO_WITH_METADATA
,
USERID
,
(
err
,
dataInfos
)
=>
{
let
metaData
=
dataInfos
[
0
].
metaData
;
expect
(
metaData
[
0
].
name
).
assertEqual
(
"
Data1S
"
);
expect
(
metaData
[
0
].
value
).
assertEqual
(
"
float
"
);
expect
(
metaData
[
0
].
extra
).
assertEqual
(
"
$string:mainability_description
"
);
done
();
});
});
/*
* @tc.number: bms_getMetaData_0700
* @tc.name: test to get meta data for a vendor application.
* @tc.desc: get a vendor a
pplication
's meta data.
* @tc.desc: get a vendor a
bility
's meta data.
*/
it
(
'
bms_getMetaData_0700
'
,
0
,
async
function
(
done
)
{
await
bundle
.
queryAbilityByWant
(
{
bundleName
:
BUNDLE_NAME5
,
abilityName
:
ABILITY_NAME
6
,
abilityName
:
ABILITY_NAME
5
,
},
bundle
.
BundleFlag
.
GET_ABILITY_INFO_WITH_METADATA
,
USERID
).
then
(
dataInfos
=>
{
console
.
info
(
"
dataInfos[0].metaData
"
+
JSON
.
stringify
(
dataInfos
[
0
].
metaData
));
let
metaData
=
dataInfos
[
0
].
metaData
;
expect
(
metaData
[
0
].
name
).
assertEqual
(
""
);
expect
(
metaData
[
0
].
value
).
assertEqual
(
""
);
expect
(
metaData
[
0
].
extra
).
assertEqual
(
""
);
done
();
}).
catch
(
err
=>
{
expect
(
err
).
assertFail
();
done
();
});
let
metaData
=
dataInfos
[
0
].
metaData
;
expect
(
metaData
[
0
].
name
).
assertEqual
(
"
vendorName
"
);
expect
(
metaData
[
0
].
value
).
assertEqual
(
"
vendorValue
"
);
expect
(
metaData
[
0
].
extra
).
assertEqual
(
"
vendorcustomizeData
"
);
}).
catch
(
err
=>
{
expect
(
err
).
assertFail
();
});
bundle
.
queryAbilityByWant
(
{
"
bundleName
"
:
BUNDLE_NAME5
,
"
abilityName
"
:
ABILITY_NAME5
},
bundle
.
BundleFlag
.
GET_ABILITY_INFO_WITH_METADATA
,
USERID
,
(
err
,
dataInfos
)
=>
{
let
metaData
=
dataInfos
[
0
].
metaData
;
expect
(
metaData
[
0
].
name
).
assertEqual
(
"
vendorName
"
);
expect
(
metaData
[
0
].
value
).
assertEqual
(
"
vendorValue
"
);
expect
(
metaData
[
0
].
extra
).
assertEqual
(
"
vendorcustomizeData
"
);
done
();
});
});
})
\ No newline at end of file
appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/MainAbility/test/GetabilityInfo.test.ets
浏览文件 @
c02c1604
...
...
@@ -298,15 +298,15 @@ export default function GetabilityInfo() {
expect
(
data
.
descriptionId
)
.
assertLarger
(
0
);
expect
(
data
.
formEnabled
)
.
assertEqual
(
false
);
expect
(
data
.
iconId
)
.
assertLarger
(
0
);
ex
cep
t
(
data
.
labelId
)
.
assertLarger
(
0
);
ex
pec
t
(
data
.
labelId
)
.
assertLarger
(
0
);
expect
(
data
.
subType
)
.
assertEqual
(
0
);
ex
cep
t
(
data
.
enabled
)
.
assertEqual
(
true
);
ex
pec
t
(
data
.
enabled
)
.
assertEqual
(
true
);
expect
(
data
.
readPermission
)
.
assertEqual
(
""
);
expect
(
data
.
writePermission
)
.
assertEqual
(
""
);
expect
(
data
.
targetAbility
)
.
assertEqual
(
""
);
expect
(
data
.
theme
)
.
assertEqual
(
""
);
expect
(
data
.
metaData
)
.
assertEqual
([]
);
expect
(
data
.
metadata
)
.
assertEqual
([]
);
expect
(
data
.
metaData
.
length
)
.
assertEqual
(
0
);
expect
(
data
.
metadata
.
length
)
.
assertEqual
(
0
);
checkApplicationInfo_other
(
data
.
applicationInfo
);
console
.
log
(
"---checkAbilityInfo_other End--- "
);
}
...
...
@@ -321,15 +321,15 @@ export default function GetabilityInfo() {
expect
(
info
.
iconId
>
0
)
.
assertTrue
();
expect
(
info
.
label
)
.
assertEqual
(
"
$string
:app_name"
);
expect
(
info
.
labelId
>
0
)
.
assertTrue
();
expect
(
info
.
systemApp
)
.
assertEqual
(
tru
e
);
expect
(
info
.
entryDir
)
.
assertEqual
(
"/data/app/el1/bundle/public/com.
ohos.acecollaboration/com.ohos.acecollaboration
"
);
expect
(
info
.
systemApp
)
.
assertEqual
(
fals
e
);
expect
(
info
.
entryDir
)
.
assertEqual
(
"/data/app/el1/bundle/public/com.
example.third1/com.example.third1.entry
"
);
expect
(
info
.
supportedModes
)
.
assertEqual
(
0
);
expect
(
info
.
process
)
.
assertEqual
(
""
);
expect
(
info
.
moduleSourceDirs
[
0
])
.
assertEqual
(
"/data/app/el1/bundle/public/com.
ohos.acecollaboration/com.ohos.acecollaboration
"
);
expect
(
info
.
metaData
)
.
expect
({}
);
expect
(
info
.
metadata
)
.
expect
({}
);
expect
(
info
.
enabled
)
.
expect
(
true
);
expect
(
info
.
flags
)
.
expect
(
0
);
expect
(
info
.
moduleSourceDirs
[
0
])
.
assertEqual
(
"/data/app/el1/bundle/public/com.
example.third1/com.example.third1.entry
"
);
expect
(
JSON
.
stringify
(
info
.
metaData
))
.
assertEqual
(
"{}"
);
expect
(
JSON
.
stringify
(
info
.
metadata
))
.
assertEqual
(
"{}"
);
expect
(
info
.
enabled
)
.
assertEqual
(
true
);
expect
(
info
.
flags
)
.
assertEqual
(
0
);
expect
(
info
.
uid
)
.
assertLarger
(
0
);
expect
(
info
.
entityType
)
.
assertEqual
(
"unspecified"
);
expect
(
info
.
removable
)
.
assertEqual
(
true
);
...
...
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfirstright/src/main/config.json
浏览文件 @
c02c1604
...
...
@@ -39,7 +39,16 @@
"label"
:
"$string:app_name"
,
"type"
:
"page"
,
"homeAbility"
:
true
,
"launchType"
:
"standard"
"launchType"
:
"standard"
,
"metaData"
:
{
"customizeData"
:
[
{
"name"
:
"Data3"
,
"value"
:
"float"
,
"extra"
:
"$string:mainability_description"
}
]
}
}
],
"deviceType"
:
[
...
...
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosfirstsceneupdate/src/main/config.json
浏览文件 @
c02c1604
...
...
@@ -18,7 +18,7 @@
"module"
:
{
"package"
:
"com.example.third1.entry"
,
"name"
:
"com.example.third1.BmsThirdBundle1"
,
"mainAbility"
:
"com.example.third1.
A
MainAbility"
,
"mainAbility"
:
"com.example.third1.MainAbility"
,
"colorMode"
:
"dark"
,
"deviceType"
:
[
"phone"
...
...
@@ -40,7 +40,7 @@
]
}
],
"name"
:
"com.example.third1.
A
MainAbility"
,
"name"
:
"com.example.third1.MainAbility"
,
"icon"
:
"$media:icon"
,
"description"
:
"$string:mainability_description"
,
"label"
:
"$string:app_name"
,
...
...
@@ -128,7 +128,7 @@
"voip"
,
"taskKeeping"
],
"name"
:
"com.example.third1.
A
MainAbilityA"
,
"name"
:
"com.example.third1.MainAbilityA"
,
"icon"
:
"$media:icon"
,
"description"
:
"$string:mainability_description"
,
"label"
:
"$string:app_name"
,
...
...
@@ -144,7 +144,7 @@
"label"
:
"$string:shortcut"
,
"intents"
:
[
{
"targetClass"
:
"com.example.third1.
A
MainAbility"
,
"targetClass"
:
"com.example.third1.MainAbility"
,
"targetBundle"
:
"com.example.third1"
}
]
...
...
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenevendor/src/main/config.json
浏览文件 @
c02c1604
...
...
@@ -106,8 +106,13 @@
"type"
:
"float"
,
"description"
:
"$string:mainability_description"
}],
"customizeData"
:
[{
}]
"customizeData"
:
[
{
"name"
:
"vendorName"
,
"value"
:
"vendorValue"
,
"extra"
:
"vendorcustomizeData"
}
]
}
}
],
...
...
appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondright/src/main/config.json
浏览文件 @
c02c1604
...
...
@@ -34,7 +34,16 @@
"label"
:
"$string:app_name"
,
"type"
:
"page"
,
"homeAbility"
:
false
,
"launchType"
:
"standard"
"launchType"
:
"standard"
,
"metaData"
:
{
"customizeData"
:
[
{
"name"
:
"Data2"
,
"value"
:
"float"
,
"extra"
:
"$string:mainability_description"
}
]
}
}
],
"deviceType"
:
[
...
...
appexecfwk/zlib/actszipfileandunzipfiletest/entry/src/main/js/test/actszipfileandunzipfiletest.test.js
浏览文件 @
c02c1604
...
...
@@ -122,7 +122,7 @@ it('ACTS_ZipFile_0300', 0, async function (done) {
/*
* @tc.number: ACTS_ZipFile_0400
* @tc.name: zipFile
* @tc.desc: The ouput file is a directory that does not exist
* @tc.desc: The ou
t
put file is a directory that does not exist
*/
it
(
'
ACTS_ZipFile_0400
'
,
0
,
async
function
(
done
)
{
console
.
log
(
"
==================ACTS_ZipFile_0400 start==================
"
);
...
...
appexecfwk/zlib/actszlibtest/ActsZlibTest.cpp
浏览文件 @
c02c1604
...
...
@@ -455,7 +455,7 @@ HWTEST_F(ActsZlibTest, ActsZlibTestSync, Function | MediumTest | Level2)
inflateSync
(
&
d_stream
);
inflate
(
&
d_stream
,
Z_FINISH
);
inflateEnd
(
&
d_stream
);
printf
(
"after inflateSync: hel%s
\n
"
,
reinterpret_cast
<
char
*>
(
uncompr
));
printf
(
"after inflateSync: hel
p
%s
\n
"
,
reinterpret_cast
<
char
*>
(
uncompr
));
free
(
compr
);
free
(
uncompr
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录