Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
de40e6eb
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,发现更多精彩内容 >>
未验证
提交
de40e6eb
编写于
1月 30, 2022
作者:
O
openharmony_ci
提交者:
Gitee
1月 30, 2022
浏览文件
操作
浏览文件
下载
差异文件
!1782 xts userid修改
Merge pull request !1782 from Lotol/master
上级
dc942ece
86172a1b
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
33 addition
and
30 deletion
+33
-30
appexecfwk/bundle_standard/bundlemanager/actsbmsgetinfostest/entry/src/main/js/test/ActsBmsQueryAbilityByWant.test.js
.../entry/src/main/js/test/ActsBmsQueryAbilityByWant.test.js
+2
-2
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/actsbundlemanagertest/entry/src/main/js/test/ExampleJsunit.test.js
...emanagertest/entry/src/main/js/test/ExampleJsunit.test.js
+24
-21
未找到文件。
appexecfwk/bundle_standard/bundlemanager/actsbmsgetinfostest/entry/src/main/js/test/ActsBmsQueryAbilityByWant.test.js
浏览文件 @
de40e6eb
...
@@ -40,7 +40,7 @@ describe('ActsBmsQueryAbilityByWant', function () {
...
@@ -40,7 +40,7 @@ describe('ActsBmsQueryAbilityByWant', function () {
entities
:
[
'
entity.system.home
'
],
entities
:
[
'
entity.system.home
'
],
bundleName
:
BUNDLE_NAME1
bundleName
:
BUNDLE_NAME1
},
bundle
.
BundleFlag
.
GET_ABILITY_INFO_WITH_APPLICATION
|
bundle
.
BundleFlag
.
GET_ABILITY_INFO_SYSTEMAPP_ONLY
,
},
bundle
.
BundleFlag
.
GET_ABILITY_INFO_WITH_APPLICATION
|
bundle
.
BundleFlag
.
GET_ABILITY_INFO_SYSTEMAPP_ONLY
,
0
,
(
err
,
data
)
=>
{
10
0
,
(
err
,
data
)
=>
{
if
(
err
)
{
if
(
err
)
{
console
.
log
(
'
bms_queryAbilityByWant_0100 test query system app err is
'
+
err
)
console
.
log
(
'
bms_queryAbilityByWant_0100 test query system app err is
'
+
err
)
expect
(
err
).
assertEqual
(
1
);
expect
(
err
).
assertEqual
(
1
);
...
@@ -84,7 +84,7 @@ describe('ActsBmsQueryAbilityByWant', function () {
...
@@ -84,7 +84,7 @@ describe('ActsBmsQueryAbilityByWant', function () {
entities
:
[
'
entity.system.home
'
]
entities
:
[
'
entity.system.home
'
]
},
},
bundle
.
BundleFlag
.
GET_ABILITY_INFO_WITH_APPLICATION
|
bundle
.
BundleFlag
.
GET_ABILITY_INFO_SYSTEMAPP_ONLY
,
bundle
.
BundleFlag
.
GET_ABILITY_INFO_WITH_APPLICATION
|
bundle
.
BundleFlag
.
GET_ABILITY_INFO_SYSTEMAPP_ONLY
,
0
).
then
(
data
=>
{
10
0
).
then
(
data
=>
{
for
(
let
i
=
0
;
i
<
data
.
length
;
++
i
)
{
for
(
let
i
=
0
;
i
<
data
.
length
;
++
i
)
{
var
jsondata
=
JSON
.
stringify
(
data
[
i
]);
var
jsondata
=
JSON
.
stringify
(
data
[
i
]);
console
.
log
(
'
bms_queryAbilityByWant_0200 test query system app
'
+
jsondata
)
console
.
log
(
'
bms_queryAbilityByWant_0200 test query system app
'
+
jsondata
)
...
...
appexecfwk/bundle_standard/bundlemanager/actsbmsmetadatatest/entry/src/main/js/test/ActsBmsMetaDataTest.test.js
浏览文件 @
de40e6eb
...
@@ -41,7 +41,7 @@ describe('ActsBmsMetaDataTest', function () {
...
@@ -41,7 +41,7 @@ describe('ActsBmsMetaDataTest', function () {
{
{
"
bundleName
"
:
'
com.example.third1
'
,
"
bundleName
"
:
'
com.example.third1
'
,
"
abilityName
"
:
'
com.example.third1.MainAbility
'
,
"
abilityName
"
:
'
com.example.third1.MainAbility
'
,
},
bundle
.
BundleFlag
.
GET_ABILITY_INFO_WITH_METADATA
,
0
).
then
(
dataInfos
=>
{
},
bundle
.
BundleFlag
.
GET_ABILITY_INFO_WITH_METADATA
,
10
0
).
then
(
dataInfos
=>
{
for
(
let
i
=
0
,
len
=
dataInfos
.
length
;
i
<
len
;
i
++
)
{
for
(
let
i
=
0
,
len
=
dataInfos
.
length
;
i
<
len
;
i
++
)
{
dataMap
.
set
(
dataInfos
[
i
].
name
,
dataInfos
[
i
].
metaData
)
dataMap
.
set
(
dataInfos
[
i
].
name
,
dataInfos
[
i
].
metaData
)
}
}
...
@@ -95,7 +95,7 @@ describe('ActsBmsMetaDataTest', function () {
...
@@ -95,7 +95,7 @@ describe('ActsBmsMetaDataTest', function () {
{
{
"
bundleName
"
:
'
com.example.third1
'
,
"
bundleName
"
:
'
com.example.third1
'
,
"
abilityName
"
:
'
com.example.third1.AMainAbility
'
,
"
abilityName
"
:
'
com.example.third1.AMainAbility
'
,
},
bundle
.
BundleFlag
.
GET_ABILITY_INFO_WITH_METADATA
,
0
).
then
(
dataInfos
=>
{
},
bundle
.
BundleFlag
.
GET_ABILITY_INFO_WITH_METADATA
,
10
0
).
then
(
dataInfos
=>
{
for
(
let
i
=
0
,
len
=
dataInfos
.
length
;
i
<
len
;
i
++
)
{
for
(
let
i
=
0
,
len
=
dataInfos
.
length
;
i
<
len
;
i
++
)
{
dataMap
.
set
(
dataInfos
[
i
].
name
,
dataInfos
[
i
].
metaData
)
dataMap
.
set
(
dataInfos
[
i
].
name
,
dataInfos
[
i
].
metaData
)
}
}
...
@@ -144,7 +144,7 @@ describe('ActsBmsMetaDataTest', function () {
...
@@ -144,7 +144,7 @@ describe('ActsBmsMetaDataTest', function () {
{
{
bundleName
:
'
com.example.third1
'
,
bundleName
:
'
com.example.third1
'
,
abilityName
:
'
com.example.third1.MainAbility
'
,
abilityName
:
'
com.example.third1.MainAbility
'
,
},
bundle
.
BundleFlag
.
GET_ABILITY_INFO_WITH_METADATA
,
0
).
then
(
dataInfos
=>
{
},
bundle
.
BundleFlag
.
GET_ABILITY_INFO_WITH_METADATA
,
10
0
).
then
(
dataInfos
=>
{
expect
(
dataInfos
.
length
).
assertEqual
(
0
);
expect
(
dataInfos
.
length
).
assertEqual
(
0
);
});
});
done
();
done
();
...
@@ -176,7 +176,7 @@ describe('ActsBmsMetaDataTest', function () {
...
@@ -176,7 +176,7 @@ describe('ActsBmsMetaDataTest', function () {
{
{
bundleName
:
'
com.example.third5
'
,
bundleName
:
'
com.example.third5
'
,
abilityName
:
'
com.example.third5.AMainAbility
'
,
abilityName
:
'
com.example.third5.AMainAbility
'
,
},
bundle
.
BundleFlag
.
GET_ABILITY_INFO_WITH_METADATA
,
0
).
then
(
dataInfos
=>
{
},
bundle
.
BundleFlag
.
GET_ABILITY_INFO_WITH_METADATA
,
10
0
).
then
(
dataInfos
=>
{
for
(
let
i
=
0
,
len
=
dataInfos
.
length
;
i
<
len
;
i
++
)
{
for
(
let
i
=
0
,
len
=
dataInfos
.
length
;
i
<
len
;
i
++
)
{
dataMap
.
set
(
dataInfos
[
i
].
name
,
dataInfos
[
i
].
metaData
)
dataMap
.
set
(
dataInfos
[
i
].
name
,
dataInfos
[
i
].
metaData
)
}
}
...
@@ -208,7 +208,7 @@ describe('ActsBmsMetaDataTest', function () {
...
@@ -208,7 +208,7 @@ describe('ActsBmsMetaDataTest', function () {
{
{
bundleName
:
'
com.example.noexist
'
,
bundleName
:
'
com.example.noexist
'
,
abilityName
:
'
com.example.noexist.MainAbility
'
,
abilityName
:
'
com.example.noexist.MainAbility
'
,
},
bundle
.
BundleFlag
.
GET_ABILITY_INFO_WITH_METADATA
,
0
).
then
(
dataInfos
=>
{
},
bundle
.
BundleFlag
.
GET_ABILITY_INFO_WITH_METADATA
,
10
0
).
then
(
dataInfos
=>
{
expect
(
dataInfos
.
length
).
assertEqual
(
0
);
expect
(
dataInfos
.
length
).
assertEqual
(
0
);
})
})
done
();
done
();
...
@@ -227,7 +227,7 @@ describe('ActsBmsMetaDataTest', function () {
...
@@ -227,7 +227,7 @@ describe('ActsBmsMetaDataTest', function () {
{
{
bundleName
:
'
com.example.system1
'
,
bundleName
:
'
com.example.system1
'
,
abilityName
:
'
com.example.system1.MainAbility
'
,
abilityName
:
'
com.example.system1.MainAbility
'
,
},
bundle
.
BundleFlag
.
GET_ABILITY_INFO_WITH_METADATA
,
0
).
then
(
dataInfos
=>
{
},
bundle
.
BundleFlag
.
GET_ABILITY_INFO_WITH_METADATA
,
10
0
).
then
(
dataInfos
=>
{
for
(
let
i
=
0
,
len
=
dataInfos
.
length
;
i
<
len
;
i
++
)
{
for
(
let
i
=
0
,
len
=
dataInfos
.
length
;
i
<
len
;
i
++
)
{
dataMap
.
set
(
dataInfos
[
i
].
name
,
dataInfos
[
i
].
metaData
)
dataMap
.
set
(
dataInfos
[
i
].
name
,
dataInfos
[
i
].
metaData
)
}
}
...
@@ -251,7 +251,7 @@ describe('ActsBmsMetaDataTest', function () {
...
@@ -251,7 +251,7 @@ describe('ActsBmsMetaDataTest', function () {
{
{
bundleName
:
'
com.example.vendor1
'
,
bundleName
:
'
com.example.vendor1
'
,
abilityName
:
'
com.example.vendor1.MainAbility
'
,
abilityName
:
'
com.example.vendor1.MainAbility
'
,
},
bundle
.
BundleFlag
.
GET_ABILITY_INFO_WITH_METADATA
,
0
).
then
(
dataInfos
=>
{
},
bundle
.
BundleFlag
.
GET_ABILITY_INFO_WITH_METADATA
,
10
0
).
then
(
dataInfos
=>
{
for
(
let
i
=
0
,
len
=
dataInfos
.
length
;
i
<
len
;
i
++
)
{
for
(
let
i
=
0
,
len
=
dataInfos
.
length
;
i
<
len
;
i
++
)
{
dataMap
.
set
(
dataInfos
[
i
].
name
,
dataInfos
[
i
].
metaData
)
dataMap
.
set
(
dataInfos
[
i
].
name
,
dataInfos
[
i
].
metaData
)
}
}
...
...
appexecfwk/bundle_standard/bundlemanager/actsbundlemanagertest/entry/src/main/js/test/ExampleJsunit.test.js
浏览文件 @
de40e6eb
...
@@ -311,7 +311,7 @@ describe('ActsBundleManagerTest', function () {
...
@@ -311,7 +311,7 @@ describe('ActsBundleManagerTest', function () {
getInfo
();
getInfo
();
});
});
async
function
getInfo
()
{
async
function
getInfo
()
{
var
datainfo
=
await
demo
.
getAllApplicationInfo
(
8
,
0
)
var
datainfo
=
await
demo
.
getAllApplicationInfo
(
8
,
10
0
)
checkgetApplicationInfos
(
datainfo
)
checkgetApplicationInfos
(
datainfo
)
installData
.
uninstall
(
NAME1
,
{
installData
.
uninstall
(
NAME1
,
{
userId
:
100
,
userId
:
100
,
...
@@ -367,7 +367,7 @@ describe('ActsBundleManagerTest', function () {
...
@@ -367,7 +367,7 @@ describe('ActsBundleManagerTest', function () {
getInfo
();
getInfo
();
});
});
async
function
getInfo
()
{
async
function
getInfo
()
{
await
demo
.
getAllApplicationInfo
(
8
,
0
,
(
error
,
datainfo
)
=>
{
await
demo
.
getAllApplicationInfo
(
8
,
10
0
,
(
error
,
datainfo
)
=>
{
expect
(
datainfo
.
length
).
assertLarger
(
0
)
expect
(
datainfo
.
length
).
assertLarger
(
0
)
for
(
var
i
=
0
;
i
<
datainfo
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
datainfo
.
length
;
i
++
)
{
expect
(
datainfo
[
i
].
name
.
length
).
assertLarger
(
0
)
expect
(
datainfo
[
i
].
name
.
length
).
assertLarger
(
0
)
...
@@ -461,7 +461,7 @@ describe('ActsBundleManagerTest', function () {
...
@@ -461,7 +461,7 @@ describe('ActsBundleManagerTest', function () {
async
function
getInfo
()
{
async
function
getInfo
()
{
await
demo
.
getApplicationInfo
(
NAME1
,
await
demo
.
getApplicationInfo
(
NAME1
,
demo
.
BundleFlag
.
GET_APPLICATION_INFO_WITH_PERMISSION
|
demo
.
BundleFlag
.
GET_APPLICATION_INFO_WITH_METADATA
,
demo
.
BundleFlag
.
GET_APPLICATION_INFO_WITH_PERMISSION
|
demo
.
BundleFlag
.
GET_APPLICATION_INFO_WITH_METADATA
,
0
).
then
(
datainfo
=>
{
10
0
).
then
(
datainfo
=>
{
expect
(
typeof
datainfo
).
assertEqual
(
OBJECT
)
expect
(
typeof
datainfo
).
assertEqual
(
OBJECT
)
console
.
info
(
"
getApplicationInfo success:
"
+
JSON
.
stringify
(
datainfo
))
console
.
info
(
"
getApplicationInfo success:
"
+
JSON
.
stringify
(
datainfo
))
expect
(
datainfo
.
moduleSourceDirs
.
length
).
assertLarger
(
0
)
expect
(
datainfo
.
moduleSourceDirs
.
length
).
assertLarger
(
0
)
...
@@ -559,7 +559,7 @@ describe('ActsBundleManagerTest', function () {
...
@@ -559,7 +559,7 @@ describe('ActsBundleManagerTest', function () {
getInfo
();
getInfo
();
});
});
async
function
getInfo
()
{
async
function
getInfo
()
{
await
demo
.
getApplicationInfo
(
NAME1
,
demo
.
BundleFlag
.
GET_APPLICATION_INFO_WITH_PERMISSION
,
0
,
(
error
,
datainfo
)
=>
{
await
demo
.
getApplicationInfo
(
NAME1
,
demo
.
BundleFlag
.
GET_APPLICATION_INFO_WITH_PERMISSION
,
10
0
,
(
error
,
datainfo
)
=>
{
if
(
error
)
{
if
(
error
)
{
console
.
info
(
"
getApplicationInfo fail:
"
+
JSON
.
stringify
(
error
))
console
.
info
(
"
getApplicationInfo fail:
"
+
JSON
.
stringify
(
error
))
expect
(
error
).
assertFail
();
expect
(
error
).
assertFail
();
...
@@ -606,7 +606,7 @@ describe('ActsBundleManagerTest', function () {
...
@@ -606,7 +606,7 @@ describe('ActsBundleManagerTest', function () {
getInfo
();
getInfo
();
});
});
async
function
getInfo
()
{
async
function
getInfo
()
{
await
demo
.
getApplicationInfo
(
NAME1
,
demo
.
BundleFlag
.
GET_BUNDLE_DEFAULT
,
0
).
then
(
datainfo
=>
{
await
demo
.
getApplicationInfo
(
NAME1
,
demo
.
BundleFlag
.
GET_BUNDLE_DEFAULT
,
10
0
).
then
(
datainfo
=>
{
console
.
info
(
"
getApplicationInfo success
"
+
JSON
.
stringify
(
datainfo
))
console
.
info
(
"
getApplicationInfo success
"
+
JSON
.
stringify
(
datainfo
))
expect
(
typeof
datainfo
).
assertEqual
(
OBJECT
)
expect
(
typeof
datainfo
).
assertEqual
(
OBJECT
)
expect
(
datainfo
.
name
).
assertEqual
(
NAME1
)
expect
(
datainfo
.
name
).
assertEqual
(
NAME1
)
...
@@ -646,7 +646,7 @@ describe('ActsBundleManagerTest', function () {
...
@@ -646,7 +646,7 @@ describe('ActsBundleManagerTest', function () {
getInfo
();
getInfo
();
});
});
async
function
getInfo
()
{
async
function
getInfo
()
{
await
demo
.
getApplicationInfo
(
NAME1
,
demo
.
BundleFlag
.
GET_BUNDLE_DEFAULT
,
0
,
(
error
,
datainfo
)
=>
{
await
demo
.
getApplicationInfo
(
NAME1
,
demo
.
BundleFlag
.
GET_BUNDLE_DEFAULT
,
10
0
,
(
error
,
datainfo
)
=>
{
if
(
error
)
{
if
(
error
)
{
console
.
info
(
"
getApplicationInfo fail
"
+
JSON
.
stringify
(
error
))
console
.
info
(
"
getApplicationInfo fail
"
+
JSON
.
stringify
(
error
))
expect
(
error
).
assertFail
()
expect
(
error
).
assertFail
()
...
@@ -1283,7 +1283,7 @@ describe('ActsBundleManagerTest', function () {
...
@@ -1283,7 +1283,7 @@ describe('ActsBundleManagerTest', function () {
getInfo
();
getInfo
();
});
});
async
function
getInfo
()
{
async
function
getInfo
()
{
var
datainfo
=
await
demo
.
getAllApplicationInfo
(
8
,
0
)
var
datainfo
=
await
demo
.
getAllApplicationInfo
(
8
,
10
0
)
console
.
info
(
"
==========ActsBmsGetInfosSecondScene is ==========
"
+
JSON
.
stringify
(
datainfo
));
console
.
info
(
"
==========ActsBmsGetInfosSecondScene is ==========
"
+
JSON
.
stringify
(
datainfo
));
checkgetApplicationInfos
(
datainfo
)
checkgetApplicationInfos
(
datainfo
)
installData
.
uninstall
(
NAME2
,
{
installData
.
uninstall
(
NAME2
,
{
...
@@ -1317,7 +1317,7 @@ describe('ActsBundleManagerTest', function () {
...
@@ -1317,7 +1317,7 @@ describe('ActsBundleManagerTest', function () {
getInfo
();
getInfo
();
});
});
async
function
getInfo
()
{
async
function
getInfo
()
{
var
datainfo
=
await
demo
.
getAllApplicationInfo
(
0
,
0
)
var
datainfo
=
await
demo
.
getAllApplicationInfo
(
0
,
10
0
)
expect
(
datainfo
.
length
).
assertLarger
(
0
)
expect
(
datainfo
.
length
).
assertLarger
(
0
)
checkgetApplicationInfos
(
datainfo
)
checkgetApplicationInfos
(
datainfo
)
installData
.
uninstall
(
NAME2
,
{
installData
.
uninstall
(
NAME2
,
{
...
@@ -1352,7 +1352,7 @@ describe('ActsBundleManagerTest', function () {
...
@@ -1352,7 +1352,7 @@ describe('ActsBundleManagerTest', function () {
getInfo
();
getInfo
();
});
});
async
function
getInfo
()
{
async
function
getInfo
()
{
await
demo
.
getAllApplicationInfo
(
8
,
0
,
(
error
,
datainfo
)
=>
{
await
demo
.
getAllApplicationInfo
(
8
,
10
0
,
(
error
,
datainfo
)
=>
{
for
(
var
i
=
0
;
i
<
datainfo
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
datainfo
.
length
;
i
++
)
{
expect
(
datainfo
[
i
].
name
.
length
).
assertLarger
(
0
)
expect
(
datainfo
[
i
].
name
.
length
).
assertLarger
(
0
)
if
(
datainfo
[
i
].
name
==
NAME1
||
datainfo
[
i
].
name
==
NAME2
if
(
datainfo
[
i
].
name
==
NAME1
||
datainfo
[
i
].
name
==
NAME2
...
@@ -1402,7 +1402,7 @@ describe('ActsBundleManagerTest', function () {
...
@@ -1402,7 +1402,7 @@ describe('ActsBundleManagerTest', function () {
getInfo
();
getInfo
();
});
});
async
function
getInfo
()
{
async
function
getInfo
()
{
await
demo
.
getAllApplicationInfo
(
0
,
0
,
(
error
,
datainfo
)
=>
{
await
demo
.
getAllApplicationInfo
(
0
,
10
0
,
(
error
,
datainfo
)
=>
{
for
(
var
i
=
0
;
i
<
datainfo
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
datainfo
.
length
;
i
++
)
{
expect
(
datainfo
[
i
].
name
.
length
).
assertLarger
(
0
)
expect
(
datainfo
[
i
].
name
.
length
).
assertLarger
(
0
)
if
(
datainfo
[
i
].
name
==
NAME1
||
datainfo
[
i
].
name
==
NAME2
if
(
datainfo
[
i
].
name
==
NAME1
||
datainfo
[
i
].
name
==
NAME2
...
@@ -1551,7 +1551,8 @@ describe('ActsBundleManagerTest', function () {
...
@@ -1551,7 +1551,8 @@ describe('ActsBundleManagerTest', function () {
getInfo
();
getInfo
();
});
});
async
function
getInfo
()
{
async
function
getInfo
()
{
var
datainfo
=
await
demo
.
getApplicationInfo
(
NAME2
,
demo
.
BundleFlag
.
GET_APPLICATION_INFO_WITH_PERMISSION
,
0
)
var
datainfo
=
await
demo
.
getApplicationInfo
(
NAME2
,
demo
.
BundleFlag
.
GET_APPLICATION_INFO_WITH_PERMISSION
,
100
)
console
.
info
(
"
getApplicationInfo result
"
+
JSON
.
stringify
(
datainfo
))
console
.
info
(
"
getApplicationInfo result
"
+
JSON
.
stringify
(
datainfo
))
expect
(
typeof
datainfo
).
assertEqual
(
OBJECT
)
expect
(
typeof
datainfo
).
assertEqual
(
OBJECT
)
expect
(
datainfo
.
name
.
length
).
assertLarger
(
0
)
expect
(
datainfo
.
name
.
length
).
assertLarger
(
0
)
...
@@ -1697,7 +1698,8 @@ describe('ActsBundleManagerTest', function () {
...
@@ -1697,7 +1698,8 @@ describe('ActsBundleManagerTest', function () {
getInfo
();
getInfo
();
});
});
async
function
getInfo
()
{
async
function
getInfo
()
{
await
demo
.
getApplicationInfo
(
NAME2
,
demo
.
BundleFlag
.
GET_APPLICATION_INFO_WITH_PERMISSION
,
0
,
(
error
,
datainfo
)
=>
{
await
demo
.
getApplicationInfo
(
NAME2
,
demo
.
BundleFlag
.
GET_APPLICATION_INFO_WITH_PERMISSION
,
100
,
(
error
,
datainfo
)
=>
{
if
(
error
)
{
if
(
error
)
{
console
.
info
(
"
getApplicationInfo error
"
+
JSON
.
stringify
(
error
))
console
.
info
(
"
getApplicationInfo error
"
+
JSON
.
stringify
(
error
))
expect
(
error
).
assertFail
()
expect
(
error
).
assertFail
()
...
@@ -2009,7 +2011,7 @@ describe('ActsBundleManagerTest', function () {
...
@@ -2009,7 +2011,7 @@ describe('ActsBundleManagerTest', function () {
* @tc.desc Test getApplicationInfo interfaces with error hap.
* @tc.desc Test getApplicationInfo interfaces with error hap.
*/
*/
it
(
'
getApplicationInfo_0400
'
,
0
,
async
function
(
done
)
{
it
(
'
getApplicationInfo_0400
'
,
0
,
async
function
(
done
)
{
demo
.
getApplicationInfo
(
ERROR
,
demo
.
BundleFlag
.
GET_APPLICATION_INFO_WITH_PERMISSION
,
0
).
then
(
datainfo
=>
{
demo
.
getApplicationInfo
(
ERROR
,
demo
.
BundleFlag
.
GET_APPLICATION_INFO_WITH_PERMISSION
,
10
0
).
then
(
datainfo
=>
{
checkgetApplicationInfoe
(
datainfo
)
checkgetApplicationInfoe
(
datainfo
)
}).
catch
(
err
=>
{
}).
catch
(
err
=>
{
console
.
info
(
"
getApplicationInfo err
"
+
JSON
.
stringify
(
err
))
console
.
info
(
"
getApplicationInfo err
"
+
JSON
.
stringify
(
err
))
...
@@ -2029,7 +2031,7 @@ describe('ActsBundleManagerTest', function () {
...
@@ -2029,7 +2031,7 @@ describe('ActsBundleManagerTest', function () {
* @tc.desc Test getApplicationInfo interfaces with error hap.
* @tc.desc Test getApplicationInfo interfaces with error hap.
*/
*/
it
(
'
getApplicationInfo_0900
'
,
0
,
async
function
(
done
)
{
it
(
'
getApplicationInfo_0900
'
,
0
,
async
function
(
done
)
{
demo
.
getApplicationInfo
(
ERROR
,
demo
.
BundleFlag
.
GET_APPLICATION_INFO_WITH_PERMISSION
,
0
,
(
error
,
datainfo
)
=>
{
demo
.
getApplicationInfo
(
ERROR
,
demo
.
BundleFlag
.
GET_APPLICATION_INFO_WITH_PERMISSION
,
10
0
,
(
error
,
datainfo
)
=>
{
if
(
error
)
{
if
(
error
)
{
console
.
info
(
"
getApplicationInfo fail
"
+
JSON
.
stringify
(
error
));
console
.
info
(
"
getApplicationInfo fail
"
+
JSON
.
stringify
(
error
));
expect
(
error
).
assertEqual
(
1
);
expect
(
error
).
assertEqual
(
1
);
...
@@ -2069,7 +2071,7 @@ describe('ActsBundleManagerTest', function () {
...
@@ -2069,7 +2071,7 @@ describe('ActsBundleManagerTest', function () {
* @tc.desc Test getApplicationInfo interfaces with none hap.
* @tc.desc Test getApplicationInfo interfaces with none hap.
*/
*/
it
(
'
getApplicationInfo_0500
'
,
0
,
async
function
(
done
)
{
it
(
'
getApplicationInfo_0500
'
,
0
,
async
function
(
done
)
{
demo
.
getApplicationInfo
(
''
,
demo
.
BundleFlag
.
GET_APPLICATION_INFO_WITH_PERMISSION
,
0
,
(
error
,
datainfo
)
=>
{
demo
.
getApplicationInfo
(
''
,
demo
.
BundleFlag
.
GET_APPLICATION_INFO_WITH_PERMISSION
,
10
0
,
(
error
,
datainfo
)
=>
{
if
(
error
)
{
if
(
error
)
{
console
.
info
(
"
getApplicationInfo err
"
+
JSON
.
stringify
(
error
));
console
.
info
(
"
getApplicationInfo err
"
+
JSON
.
stringify
(
error
));
expect
(
error
).
assertEqual
(
1
);
expect
(
error
).
assertEqual
(
1
);
...
@@ -2105,7 +2107,7 @@ describe('ActsBundleManagerTest', function () {
...
@@ -2105,7 +2107,7 @@ describe('ActsBundleManagerTest', function () {
* @tc.desc Test getApplicationInfo interfaces with none hap.
* @tc.desc Test getApplicationInfo interfaces with none hap.
*/
*/
it
(
'
getApplicationInfo_1000
'
,
0
,
async
function
(
done
)
{
it
(
'
getApplicationInfo_1000
'
,
0
,
async
function
(
done
)
{
demo
.
getApplicationInfo
(
''
,
demo
.
BundleFlag
.
GET_APPLICATION_INFO_WITH_PERMISSION
,
0
,
(
error
,
datainfo
)
=>
{
demo
.
getApplicationInfo
(
''
,
demo
.
BundleFlag
.
GET_APPLICATION_INFO_WITH_PERMISSION
,
10
0
,
(
error
,
datainfo
)
=>
{
if
(
error
)
{
if
(
error
)
{
console
.
info
(
"
getApplicationInfo fail
"
+
JSON
.
stringify
(
error
));
console
.
info
(
"
getApplicationInfo fail
"
+
JSON
.
stringify
(
error
));
expect
(
error
).
assertEqual
(
1
);
expect
(
error
).
assertEqual
(
1
);
...
@@ -2140,7 +2142,8 @@ describe('ActsBundleManagerTest', function () {
...
@@ -2140,7 +2142,8 @@ describe('ActsBundleManagerTest', function () {
{
{
"
bundleName
"
:
"
com.example.myapplication1
"
,
"
bundleName
"
:
"
com.example.myapplication1
"
,
"
abilityName
"
:
"
com.example.myapplication1.MainAbility
"
,
"
abilityName
"
:
"
com.example.myapplication1.MainAbility
"
,
},
demo
.
BundleFlag
.
GET_ABILITY_INFO_WITH_APPLICATION
|
demo
.
BundleFlag
.
GET_ABILITY_INFO_WITH_PERMISSION
,
0
).
then
(
data
=>
{
},
demo
.
BundleFlag
.
GET_ABILITY_INFO_WITH_APPLICATION
|
demo
.
BundleFlag
.
GET_ABILITY_INFO_WITH_PERMISSION
,
100
).
then
(
data
=>
{
expect
(
data
.
length
).
assertLarger
(
0
);
expect
(
data
.
length
).
assertLarger
(
0
);
for
(
let
i
=
0
,
len
=
data
.
length
;
i
<
len
;
i
++
)
{
for
(
let
i
=
0
,
len
=
data
.
length
;
i
<
len
;
i
++
)
{
var
datainfo
=
data
[
i
];
var
datainfo
=
data
[
i
];
...
@@ -2208,7 +2211,7 @@ describe('ActsBundleManagerTest', function () {
...
@@ -2208,7 +2211,7 @@ describe('ActsBundleManagerTest', function () {
{
{
"
bundleName
"
:
"
com.example.myapplication2
"
,
"
bundleName
"
:
"
com.example.myapplication2
"
,
"
abilityName
"
:
"
com.example.myapplication1.MainAbility
"
,
"
abilityName
"
:
"
com.example.myapplication1.MainAbility
"
,
},
demo
.
BundleFlag
.
GET_ALL_APPLICATION_INFO
,
0
)
},
demo
.
BundleFlag
.
GET_ALL_APPLICATION_INFO
,
10
0
)
expect
(
data
.
length
).
assertLarger
(
0
);
expect
(
data
.
length
).
assertLarger
(
0
);
for
(
let
i
=
0
,
len
=
data
.
length
;
i
<
len
;
i
++
)
{
for
(
let
i
=
0
,
len
=
data
.
length
;
i
<
len
;
i
++
)
{
var
datainfo
=
data
[
i
];
var
datainfo
=
data
[
i
];
...
@@ -2281,7 +2284,7 @@ describe('ActsBundleManagerTest', function () {
...
@@ -2281,7 +2284,7 @@ describe('ActsBundleManagerTest', function () {
demo
.
queryAbilityByWant
(
demo
.
queryAbilityByWant
(
{
{
entities
:
[
'
entity.system.home
'
,
'
entitiesentities
'
]
entities
:
[
'
entity.system.home
'
,
'
entitiesentities
'
]
},
4
,
0
).
then
(
data
=>
{
},
4
,
10
0
).
then
(
data
=>
{
let
queryResultCount
=
0
;
let
queryResultCount
=
0
;
for
(
let
i
=
0
,
len
=
data
.
length
;
i
<
len
;
i
++
)
{
for
(
let
i
=
0
,
len
=
data
.
length
;
i
<
len
;
i
++
)
{
var
datainfo
=
data
[
i
];
var
datainfo
=
data
[
i
];
...
@@ -2370,7 +2373,7 @@ describe('ActsBundleManagerTest', function () {
...
@@ -2370,7 +2373,7 @@ describe('ActsBundleManagerTest', function () {
{
{
"
bundleName
"
:
"
wrong name
"
,
"
bundleName
"
:
"
wrong name
"
,
"
abilityName
"
:
"
com.example.myapplication1.MainAbility
"
,
"
abilityName
"
:
"
com.example.myapplication1.MainAbility
"
,
},
0
,
0
).
then
(
datainfo
=>
{
},
0
,
10
0
).
then
(
datainfo
=>
{
expect
(
datainfo
.
length
).
assertEqual
(
0
)
expect
(
datainfo
.
length
).
assertEqual
(
0
)
})
})
installData
.
uninstall
(
NAME1
,
{
installData
.
uninstall
(
NAME1
,
{
...
@@ -2640,7 +2643,7 @@ describe('ActsBundleManagerTest', function () {
...
@@ -2640,7 +2643,7 @@ describe('ActsBundleManagerTest', function () {
{
{
bundleName
:
"
wrong name
"
,
bundleName
:
"
wrong name
"
,
abilityName
:
"
wrong name
"
,
abilityName
:
"
wrong name
"
,
},
0
,
0
,
OnReceiveEvent
)
},
0
,
10
0
,
OnReceiveEvent
)
function
OnReceiveEvent
(
err
,
datainfo
)
{
function
OnReceiveEvent
(
err
,
datainfo
)
{
expect
(
datainfo
.
length
).
assertLarger
(
0
)
expect
(
datainfo
.
length
).
assertLarger
(
0
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录