Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
44b25e27
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看板
未验证
提交
44b25e27
编写于
1月 22, 2022
作者:
O
openharmony_ci
提交者:
Gitee
1月 22, 2022
浏览文件
操作
浏览文件
下载
差异文件
!1664 【XTS】bundle_manger xts代码适配
Merge pull request !1664 from ry/master
上级
be9dfc63
bf3fb39f
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
136 addition
and
212 deletion
+136
-212
appexecfwk/bundle_standard/bundlemanager/actsbmsgetinfostest/entry/src/main/js/test/ActsBmsGetBackGroundModes.test.js
.../entry/src/main/js/test/ActsBmsGetBackGroundModes.test.js
+129
-205
appexecfwk/bundle_standard/bundlemanager/actsbmsmetadatatest/entry/src/main/js/test/ActsBmsMetaDataTest.test.js
...tatest/entry/src/main/js/test/ActsBmsMetaDataTest.test.js
+7
-7
未找到文件。
appexecfwk/bundle_standard/bundlemanager/actsbmsgetinfostest/entry/src/main/js/test/ActsBmsGetBackGroundModes.test.js
浏览文件 @
44b25e27
...
...
@@ -32,6 +32,7 @@ const BUNDLE_NAME4 = 'com.example.third4';
const
BUNDLE_NAME5
=
'
com.example.third5
'
;
const
BUNDLE_NAME6
=
'
com.example.third6
'
;
const
SYSTEM_NAME
=
'
com.example.system2
'
;
const
NUM_ONE
=
1
;
const
NUM_TWO
=
2
;
const
NUM_THREE
=
3
;
const
NUM_FOUR
=
4
;
...
...
@@ -58,40 +59,35 @@ describe('ActsBmsGetBackGroundModes', function () {
var
bundlePath
=
[
BUNDLE_PATH5
]
var
installer
=
await
bundle
.
getBundleInstaller
();
installer
.
install
(
bundlePath
,
{
param
:
{
userId
:
0
,
installFlag
:
1
,
isKeepData
:
false
}
},
async
(
err
,
data
)
=>
{
expect
(
err
.
code
).
assertEqual
(
0
);
expect
(
data
.
status
).
assertEqual
(
0
);
expect
(
data
.
statusMessage
).
assertEqual
(
'
SUCCESS
'
);
var
dataInfos
=
await
bundle
.
queryAbilityByWant
({
want
:
{
bundleName
:
BUNDLE_NAME5
,
action
:
'
action.system.home
'
,
entities
:
[
'
entity.system.home
'
],
elementName
:
{
deviceId
:
'
0
'
,
bundleName
:
BUNDLE_NAME5
,
abilityName
:
'
com.example.third5.MainAbilityA
'
,
},
}
},
0
,
0
)
expect
(
dataInfos
.
length
).
assertEqual
(
NUM_FOUR
);
if
(
dataInfos
.
length
==
NUM_FOUR
)
{
expect
(
dataInfos
[
NUM_TWO
].
name
).
assertEqual
(
"
com.example.third5.MainAbilityA
"
);
expect
(
dataInfos
[
NUM_TWO
].
backgroundModes
).
assertEqual
(
dataTransfer
+
audioPlayback
+
audioRecording
+
},
bundle
.
BundleFlag
.
GET_BUNDLE_DEFAULT
,
0
)
let
queryResult
=
0
for
(
let
infoCount
=
0
;
infoCount
<
dataInfos
.
length
;
infoCount
++
){
if
(
dataInfos
[
infoCount
].
name
==
"
com.example.third5.MainAbilityA
"
){
expect
(
dataInfos
[
infoCount
].
backgroundModes
).
assertEqual
(
dataTransfer
+
audioPlayback
+
audioRecording
+
location
+
bluetoothInteraction
+
multiDeviceConnection
+
wifiInteraction
+
voip
+
taskKeeping
);
expect
(
dataInfos
[
NUM_THREE
].
name
).
assertEqual
(
"
com.example.third5.MainAbilityB
"
);
expect
(
dataInfos
[
NUM_THREE
].
backgroundModes
).
assertEqual
(
dataTransfer
+
voip
);
queryResult
++
}
if
(
dataInfos
[
infoCount
].
name
==
"
com.example.third5.MainAbilityB
"
){
expect
(
dataInfos
[
infoCount
].
backgroundModes
).
assertEqual
(
dataTransfer
+
voip
);
queryResult
++
}
}
expect
(
queryResult
).
assertEqual
(
NUM_TWO
);
installer
.
uninstall
(
BUNDLE_NAME5
,
{
param
:
{
userId
:
0
,
installFlag
:
1
,
isKeepData
:
false
}
},
(
err
,
data
)
=>
{
expect
(
err
.
code
).
assertEqual
(
0
);
expect
(
data
.
status
).
assertEqual
(
0
);
...
...
@@ -112,26 +108,19 @@ describe('ActsBmsGetBackGroundModes', function () {
var
bundlePath
=
[
BUNDLE_PATH6
]
var
installer
=
await
bundle
.
getBundleInstaller
();
installer
.
install
(
bundlePath
,
{
param
:
{
userId
:
0
,
installFlag
:
1
,
isKeepData
:
false
}
},
async
(
err
,
data
)
=>
{
expect
(
err
.
code
).
assertEqual
(
0
);
expect
(
data
.
status
).
assertEqual
(
0
);
expect
(
data
.
statusMessage
).
assertEqual
(
'
SUCCESS
'
);
var
dataInfos
=
await
bundle
.
queryAbilityByWant
({
want
:
{
action
:
'
action.system.home
'
,
entities
:
[
'
entity.system.home
'
],
elementName
:
{
deviceId
:
'
0
'
,
bundleName
:
BUNDLE_NAME6
,
abilityName
:
''
,
}
,
}
},
0
,
0
)
action
:
'
action.system.home
'
,
entities
:
[
'
entity.system.home
'
]
},
bundle
.
BundleFlag
.
GET_BUNDLE_DEFAULT
,
0
)
expect
(
dataInfos
.
length
).
assertEqual
(
NUM_NINE
);
for
(
let
i
=
0
,
len
=
dataInfos
.
length
;
i
<
len
;
i
++
)
{
expect
(
dataInfos
[
i
].
backgroundModes
).
assertEqual
(
1
<<
i
);
...
...
@@ -139,11 +128,9 @@ describe('ActsBmsGetBackGroundModes', function () {
console
.
info
(
"
==========dataInfos[1].name=========
"
+
dataInfos
[
i
].
name
);
}
installer
.
uninstall
(
BUNDLE_NAME6
,
{
param
:
{
userId
:
0
,
installFlag
:
1
,
isKeepData
:
false
}
},
(
err
,
data
)
=>
{
expect
(
err
.
code
).
assertEqual
(
0
);
expect
(
data
.
status
).
assertEqual
(
0
);
...
...
@@ -163,38 +150,27 @@ describe('ActsBmsGetBackGroundModes', function () {
var
bundlePath
=
[
BUNDLE_PATH2
]
var
installer
=
await
bundle
.
getBundleInstaller
();
installer
.
install
(
bundlePath
,
{
param
:
{
userId
:
0
,
installFlag
:
1
,
isKeepData
:
false
}
},
async
(
err
,
data
)
=>
{
expect
(
err
.
code
).
assertEqual
(
0
);
expect
(
data
.
status
).
assertEqual
(
0
);
expect
(
data
.
statusMessage
).
assertEqual
(
'
SUCCESS
'
);
var
dataInfos
=
await
bundle
.
queryAbilityByWant
({
want
:
{
action
:
'
action.system.home
'
,
entities
:
[
'
entity.system.home
'
],
elementName
:
{
deviceId
:
'
0
'
,
bundleName
:
BUNDLE_NAME2
,
abilityName
:
'
com.example.third2.MainAbilityA
'
,
},
}
},
0
,
0
)
expect
(
dataInfos
.
length
).
assertEqual
(
NUM_TWO
);
if
(
dataInfos
.
length
==
NUM_TWO
)
{
expect
(
dataInfos
[
1
].
name
).
assertEqual
(
"
com.example.third2.MainAbilityA
"
)
expect
(
dataInfos
[
1
].
backgroundModes
).
assertEqual
(
audioPlayback
+
audioRecording
+
location
action
:
'
action.system.home
'
,
entities
:
[
'
entity.system.home
'
]
},
bundle
.
BundleFlag
.
GET_BUNDLE_DEFAULT
,
0
)
expect
(
dataInfos
.
length
).
assertEqual
(
NUM_ONE
);
expect
(
dataInfos
[
0
].
name
).
assertEqual
(
"
com.example.third2.MainAbilityA
"
)
expect
(
dataInfos
[
0
].
backgroundModes
).
assertEqual
(
audioPlayback
+
audioRecording
+
location
+
bluetoothInteraction
+
multiDeviceConnection
+
wifiInteraction
+
voip
+
taskKeeping
)
}
installer
.
uninstall
(
BUNDLE_NAME2
,
{
param
:
{
userId
:
0
,
installFlag
:
1
,
isKeepData
:
false
}
},
(
err
,
data
)
=>
{
expect
(
err
.
code
).
assertEqual
(
0
);
expect
(
data
.
status
).
assertEqual
(
0
);
...
...
@@ -214,37 +190,28 @@ describe('ActsBmsGetBackGroundModes', function () {
var
bundlePath1
=
[
BUNDLE_PATH4
]
var
installer
=
await
bundle
.
getBundleInstaller
();
installer
.
install
(
bundlePath1
,
{
param
:
{
userId
:
0
,
installFlag
:
1
,
isKeepData
:
false
}
},
async
(
err
,
data
)
=>
{
expect
(
err
.
code
).
assertEqual
(
0
);
expect
(
data
.
status
).
assertEqual
(
0
);
expect
(
data
.
statusMessage
).
assertEqual
(
'
SUCCESS
'
);
var
dataInfos
=
await
bundle
.
queryAbilityByWant
({
want
:
{
action
:
'
action.system.home
'
,
entities
:
[
'
entity.system.home
'
],
elementName
:
{
deviceId
:
'
0
'
,
bundleName
:
BUNDLE_NAME4
,
abilityName
:
'
com.example.third4.MainAbility
'
,
}
,
}
},
0
,
0
)
expect
(
dataInfos
.
length
).
assertEqual
(
1
);
action
:
'
action.system.home
'
,
entities
:
[
'
entity.system.home
'
]
},
bundle
.
BundleFlag
.
GET_BUNDLE_DEFAULT
,
0
)
expect
(
dataInfos
.
length
).
assertEqual
(
NUM_ONE
);
if
(
dataInfos
.
length
==
1
)
{
expect
(
dataInfos
[
0
].
name
).
assertEqual
(
"
com.example.third4.MainAbility
"
)
expect
(
dataInfos
[
0
].
backgroundModes
).
assertEqual
(
0
)
}
installer
.
uninstall
(
BUNDLE_NAME4
,
{
param
:
{
userId
:
0
,
installFlag
:
1
,
isKeepData
:
false
}
},
(
err
,
data
)
=>
{
expect
(
err
.
code
).
assertEqual
(
0
);
expect
(
data
.
status
).
assertEqual
(
0
);
...
...
@@ -264,39 +231,28 @@ describe('ActsBmsGetBackGroundModes', function () {
var
bundlePath
=
[
BUNDLE_PATH1
,
BUNDLE_PATH3
];
var
installer
=
await
bundle
.
getBundleInstaller
();
installer
.
install
(
bundlePath
,
{
param
:
{
userId
:
0
,
installFlag
:
1
,
isKeepData
:
false
}
},
async
(
err
,
data
)
=>
{
expect
(
err
.
code
).
assertEqual
(
0
);
expect
(
data
.
status
).
assertEqual
(
0
);
expect
(
data
.
statusMessage
).
assertEqual
(
'
SUCCESS
'
);
var
dataInfos
=
await
bundle
.
queryAbilityByWant
({
want
:
{
action
:
'
action.system.home
'
,
entities
:
[
'
entity.system.home
'
],
elementName
:
{
deviceId
:
'
0
'
,
bundleName
:
BUNDLE_NAME1
,
abilityName
:
'
com.example.third1.MainAbilityA
'
,
},
}
},
0
,
0
)
expect
(
dataInfos
.
length
).
assertEqual
(
NUM_FOUR
);
if
(
dataInfos
.
length
==
NUM_FOUR
)
{
expect
(
dataInfos
[
1
].
name
).
assertEqual
(
"
com.example.third1.MainAbilityA
"
)
expect
(
dataInfos
[
1
].
backgroundModes
).
assertEqual
(
dataTransfer
+
audioPlayback
+
audioRecording
+
action
:
'
action.system.home
'
,
entities
:
[
'
entity.system.home
'
]
},
bundle
.
BundleFlag
.
GET_BUNDLE_DEFAULT
,
0
)
expect
(
dataInfos
.
length
).
assertEqual
(
NUM_ONE
);
expect
(
dataInfos
[
0
].
name
).
assertEqual
(
"
com.example.third1.MainAbilityA
"
)
expect
(
dataInfos
[
0
].
backgroundModes
).
assertEqual
(
dataTransfer
+
audioPlayback
+
audioRecording
+
location
+
bluetoothInteraction
+
multiDeviceConnection
+
wifiInteraction
+
voip
+
taskKeeping
)
}
console
.
info
(
"
========dataInfos[0].backgroundModes=======>
"
+
dataInfos
[
0
].
backgroundModes
)
installer
.
uninstall
(
BUNDLE_NAME1
,
{
param
:
{
userId
:
0
,
installFlag
:
1
,
isKeepData
:
false
}
},
(
err
,
data
)
=>
{
expect
(
err
.
code
).
assertEqual
(
0
);
expect
(
data
.
status
).
assertEqual
(
0
);
...
...
@@ -317,65 +273,45 @@ describe('ActsBmsGetBackGroundModes', function () {
var
bundlePath2
=
[
BUNDLE_PATHUPDATE
]
var
installer
=
await
bundle
.
getBundleInstaller
();
installer
.
install
(
bundlePath1
,
{
param
:
{
userId
:
0
,
installFlag
:
1
,
isKeepData
:
false
}
},
async
(
err
,
data
)
=>
{
expect
(
err
.
code
).
assertEqual
(
0
);
expect
(
data
.
status
).
assertEqual
(
0
);
expect
(
data
.
statusMessage
).
assertEqual
(
'
SUCCESS
'
);
var
dataInfos
=
await
bundle
.
queryAbilityByWant
({
want
:
{
action
:
'
action.system.home
'
,
entities
:
[
'
entity.system.home
'
],
elementName
:
{
deviceId
:
'
0
'
,
bundleName
:
BUNDLE_NAME1
,
abilityName
:
'
com.example.third1.MainAbilityA
'
,
},
}
},
0
,
0
)
expect
(
dataInfos
.
length
).
assertEqual
(
NUM_TWO
);
if
(
dataInfos
.
length
==
NUM_TWO
)
{
expect
(
dataInfos
[
1
].
name
).
assertEqual
(
"
com.example.third1.MainAbilityA
"
)
expect
(
dataInfos
[
1
].
backgroundModes
).
assertEqual
(
dataTransfer
+
audioPlayback
+
audioRecording
+
action
:
'
action.system.home
'
,
entities
:
[
'
entity.system.home
'
]
},
bundle
.
BundleFlag
.
GET_BUNDLE_DEFAULT
,
0
)
expect
(
dataInfos
.
length
).
assertEqual
(
NUM_ONE
);
expect
(
dataInfos
[
0
].
name
).
assertEqual
(
"
com.example.third1.MainAbilityA
"
)
expect
(
dataInfos
[
0
].
backgroundModes
).
assertEqual
(
dataTransfer
+
audioPlayback
+
audioRecording
+
location
+
bluetoothInteraction
+
multiDeviceConnection
+
wifiInteraction
+
voip
+
taskKeeping
)
}
installer
.
install
(
bundlePath2
,
{
param
:
{
userId
:
0
,
installFlag
:
1
,
isKeepData
:
false
}
},
async
(
err
,
data
)
=>
{
expect
(
err
.
code
).
assertEqual
(
0
);
expect
(
data
.
status
).
assertEqual
(
0
);
expect
(
data
.
statusMessage
).
assertEqual
(
'
SUCCESS
'
);
var
dataInfos
=
await
bundle
.
queryAbilityByWant
({
want
:
{
action
:
'
action.system.home
'
,
entities
:
[
'
entity.system.home
'
],
elementName
:
{
deviceId
:
'
0
'
,
bundleName
:
BUNDLE_NAME1
,
abilityName
:
'
com.example.third1.MainAbility
'
,
},
}
},
0
,
0
)
expect
(
dataInfos
.
length
).
assertEqual
(
NUM_TWO
);
if
(
dataInfos
.
length
==
NUM_TWO
)
{
expect
(
dataInfos
[
1
].
name
).
assertEqual
(
"
com.example.third1.AMainAbilityA
"
);
expect
(
dataInfos
[
1
].
backgroundModes
).
assertEqual
(
audioRecording
+
location
+
bluetoothInteraction
+
abilityName
:
'
com.example.third1.AMainAbilityA
'
,
action
:
'
action.system.home
'
,
entities
:
[
'
entity.system.home
'
]
},
bundle
.
BundleFlag
.
GET_BUNDLE_DEFAULT
,
0
)
expect
(
dataInfos
.
length
).
assertEqual
(
NUM_ONE
);
expect
(
dataInfos
[
0
].
name
).
assertEqual
(
"
com.example.third1.AMainAbilityA
"
);
expect
(
dataInfos
[
0
].
backgroundModes
).
assertEqual
(
audioRecording
+
location
+
bluetoothInteraction
+
multiDeviceConnection
+
wifiInteraction
+
voip
+
taskKeeping
);
}
installer
.
uninstall
(
BUNDLE_NAME1
,
{
param
:
{
userId
:
0
,
installFlag
:
1
,
isKeepData
:
false
}
},
(
err
,
data
)
=>
{
expect
(
err
.
code
).
assertEqual
(
0
);
expect
(
data
.
status
).
assertEqual
(
0
);
...
...
@@ -396,55 +332,43 @@ describe('ActsBmsGetBackGroundModes', function () {
var
bundlePath
=
[
BUNDLE_PATH1
]
var
installer
=
await
bundle
.
getBundleInstaller
();
installer
.
install
(
bundlePath
,
{
param
:
{
userId
:
0
,
installFlag
:
1
,
isKeepData
:
false
}
},
async
(
err
,
data
)
=>
{
expect
(
err
.
code
).
assertEqual
(
0
);
expect
(
data
.
status
).
assertEqual
(
0
);
expect
(
data
.
statusMessage
).
assertEqual
(
'
SUCCESS
'
);
var
dataInfos
=
await
bundle
.
queryAbilityByWant
({
want
:
{
action
:
'
action.system.home
'
,
entities
:
[
'
entity.system.home
'
],
elementName
:
{
deviceId
:
'
0
'
,
bundleName
:
BUNDLE_NAME1
,
abilityName
:
'
com.example.third1.MainAbility
'
}
}
},
0
,
0
)
expect
(
dataInfos
.
length
).
assertEqual
(
NUM_TWO
);
if
(
dataInfos
.
length
==
NUM_TWO
)
{
expect
(
dataInfos
[
1
].
name
).
assertEqual
(
"
com.example.third1.MainAbilityA
"
)
expect
(
dataInfos
[
1
].
backgroundModes
).
assertEqual
(
dataTransfer
+
audioPlayback
+
audioRecording
+
abilityName
:
'
com.example.third1.MainAbilityA
'
,
action
:
'
action.system.home
'
,
entities
:
[
'
entity.system.home
'
]
},
bundle
.
BundleFlag
.
GET_BUNDLE_DEFAULT
,
0
)
expect
(
dataInfos
.
length
).
assertEqual
(
NUM_ONE
);
expect
(
dataInfos
[
0
].
name
).
assertEqual
(
"
com.example.third1.MainAbilityA
"
)
expect
(
dataInfos
[
0
].
backgroundModes
).
assertEqual
(
dataTransfer
+
audioPlayback
+
audioRecording
+
location
+
bluetoothInteraction
+
multiDeviceConnection
+
wifiInteraction
+
voip
+
taskKeeping
)
}
installer
.
uninstall
(
BUNDLE_NAME1
,
{
param
:
{
userId
:
0
,
installFlag
:
1
,
isKeepData
:
false
}
},
async
(
err
,
data
)
=>
{
expect
(
err
.
code
).
assertEqual
(
0
);
expect
(
data
.
status
).
assertEqual
(
0
);
expect
(
data
.
statusMessage
).
assertEqual
(
'
SUCCESS
'
);
var
dataInfos
=
await
bundle
.
queryAbilityByWant
({
want
:
{
await
bundle
.
queryAbilityByWant
({
bundleName
:
BUNDLE_NAME1
,
abilityName
:
'
com.example.third1.MainAbility
'
,
action
:
'
action.system.home
'
,
entities
:
[
'
entity.system.home
'
],
elementName
:
{
deviceId
:
'
0
'
,
bundleName
:
BUNDLE_NAME1
,
abilityName
:
'
com.example.third1.MainAbility
'
}
}
},
0
,
0
)
expect
(
dataInfos
.
length
).
assertEqual
(
0
);
},
bundle
.
BundleFlag
.
GET_BUNDLE_DEFAULT
,
0
).
then
(
dataInfo
=>
{
expect
(
dataInfo
).
assertFail
();
done
();
}).
catch
(
error
=>
{
expect
(
error
).
assertEqual
(
1
);
done
();
})
});
})
})
...
...
appexecfwk/bundle_standard/bundlemanager/actsbmsmetadatatest/entry/src/main/js/test/ActsBmsMetaDataTest.test.js
浏览文件 @
44b25e27
...
...
@@ -41,7 +41,7 @@ describe('ActsBmsMetaDataTest', function () {
{
"
bundleName
"
:
'
com.example.third1
'
,
"
abilityName
"
:
'
com.example.third1.MainAbility
'
,
},
32
,
0
).
then
(
dataInfos
=>
{
},
bundle
.
BundleFlag
.
GET_ABILITY_INFO_WITH_METADATA
,
0
).
then
(
dataInfos
=>
{
for
(
let
i
=
0
,
len
=
dataInfos
.
length
;
i
<
len
;
i
++
)
{
dataMap
.
set
(
dataInfos
[
i
].
name
,
dataInfos
[
i
].
metaData
)
}
...
...
@@ -95,7 +95,7 @@ describe('ActsBmsMetaDataTest', function () {
{
"
bundleName
"
:
'
com.example.third1
'
,
"
abilityName
"
:
'
com.example.third1.AMainAbility
'
,
},
32
,
0
).
then
(
dataInfos
=>
{
},
bundle
.
BundleFlag
.
GET_ABILITY_INFO_WITH_METADATA
,
0
).
then
(
dataInfos
=>
{
for
(
let
i
=
0
,
len
=
dataInfos
.
length
;
i
<
len
;
i
++
)
{
dataMap
.
set
(
dataInfos
[
i
].
name
,
dataInfos
[
i
].
metaData
)
}
...
...
@@ -144,7 +144,7 @@ describe('ActsBmsMetaDataTest', function () {
{
bundleName
:
'
com.example.third1
'
,
abilityName
:
'
com.example.third1.MainAbility
'
,
},
32
,
0
).
then
(
dataInfos
=>
{
},
bundle
.
BundleFlag
.
GET_ABILITY_INFO_WITH_METADATA
,
0
).
then
(
dataInfos
=>
{
expect
(
dataInfos
.
length
).
assertEqual
(
0
);
});
done
();
...
...
@@ -176,7 +176,7 @@ describe('ActsBmsMetaDataTest', function () {
{
bundleName
:
'
com.example.third5
'
,
abilityName
:
'
com.example.third5.AMainAbility
'
,
},
32
,
0
).
then
(
dataInfos
=>
{
},
bundle
.
BundleFlag
.
GET_ABILITY_INFO_WITH_METADATA
,
0
).
then
(
dataInfos
=>
{
for
(
let
i
=
0
,
len
=
dataInfos
.
length
;
i
<
len
;
i
++
)
{
dataMap
.
set
(
dataInfos
[
i
].
name
,
dataInfos
[
i
].
metaData
)
}
...
...
@@ -208,7 +208,7 @@ describe('ActsBmsMetaDataTest', function () {
{
bundleName
:
'
com.example.noexist
'
,
abilityName
:
'
com.example.noexist.MainAbility
'
,
},
32
,
0
).
then
(
dataInfos
=>
{
},
bundle
.
BundleFlag
.
GET_ABILITY_INFO_WITH_METADATA
,
0
).
then
(
dataInfos
=>
{
expect
(
dataInfos
.
length
).
assertEqual
(
0
);
})
done
();
...
...
@@ -227,7 +227,7 @@ describe('ActsBmsMetaDataTest', function () {
{
bundleName
:
'
com.example.system1
'
,
abilityName
:
'
com.example.system1.MainAbility
'
,
},
32
,
0
).
then
(
dataInfos
=>
{
},
bundle
.
BundleFlag
.
GET_ABILITY_INFO_WITH_METADATA
,
0
).
then
(
dataInfos
=>
{
for
(
let
i
=
0
,
len
=
dataInfos
.
length
;
i
<
len
;
i
++
)
{
dataMap
.
set
(
dataInfos
[
i
].
name
,
dataInfos
[
i
].
metaData
)
}
...
...
@@ -251,7 +251,7 @@ describe('ActsBmsMetaDataTest', function () {
{
bundleName
:
'
com.example.vendor1
'
,
abilityName
:
'
com.example.vendor1.MainAbility
'
,
},
32
,
0
).
then
(
dataInfos
=>
{
},
bundle
.
BundleFlag
.
GET_ABILITY_INFO_WITH_METADATA
,
0
).
then
(
dataInfos
=>
{
for
(
let
i
=
0
,
len
=
dataInfos
.
length
;
i
<
len
;
i
++
)
{
dataMap
.
set
(
dataInfos
[
i
].
name
,
dataInfos
[
i
].
metaData
)
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录