Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
a28e4221
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,发现更多精彩内容 >>
提交
a28e4221
编写于
3月 18, 2022
作者:
R
r00559040
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add api
Signed-off-by:
N
r00559040
<
ry.renyi@huawei.com
>
上级
9821ad81
变更
2
展开全部
隐藏空白更改
内联
并排
Showing
2 changed file
with
395 addition
and
1740 deletion
+395
-1740
appexecfwk/bundle_standard/bundlemanager/actsbundlemanagertest/entry/src/main/js/test/ExampleJsunit.test.js
...emanagertest/entry/src/main/js/test/ExampleJsunit.test.js
+10
-9
appexecfwk/zlib/actszipfileandunzipfiletest/entry/src/main/js/test/actszipfileandunzipfiletest.test.js
...ntry/src/main/js/test/actszipfileandunzipfiletest.test.js
+385
-1731
未找到文件。
appexecfwk/bundle_standard/bundlemanager/actsbundlemanagertest/entry/src/main/js/test/ExampleJsunit.test.js
浏览文件 @
a28e4221
...
@@ -2126,14 +2126,13 @@ describe('ActsBundleManagerTest', function () {
...
@@ -2126,14 +2126,13 @@ describe('ActsBundleManagerTest', function () {
expect
(
err
.
code
).
assertEqual
(
0
);
expect
(
err
.
code
).
assertEqual
(
0
);
expect
(
data
.
status
).
assertEqual
(
demo
.
InstallErrorCode
.
SUCCESS
);
expect
(
data
.
status
).
assertEqual
(
demo
.
InstallErrorCode
.
SUCCESS
);
expect
(
data
.
statusMessage
).
assertEqual
(
'
SUCCESS
'
);
expect
(
data
.
statusMessage
).
assertEqual
(
'
SUCCESS
'
);
getInfo
();
await
demo
.
queryAbilityByWant
(
});
async
function
getInfo
()
{
demo
.
queryAbilityByWant
(
{
{
"
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
,
},
demo
.
BundleFlag
.
GET_ABILITY_INFO_WITH_APPLICATION
|
demo
.
BundleFlag
.
GET_ABILITY_INFO_WITH_PERMISSION
|
demo
.
BundleFlag
.
GET_ABILITY_INFO_WITH_METADATA
,
100
).
then
(
data
=>
{
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
++
)
{
...
@@ -2144,9 +2143,9 @@ describe('ActsBundleManagerTest', function () {
...
@@ -2144,9 +2143,9 @@ describe('ActsBundleManagerTest', function () {
expect
(
datainfo
.
icon
).
assertEqual
(
"
$media:icon
"
)
expect
(
datainfo
.
icon
).
assertEqual
(
"
$media:icon
"
)
expect
(
datainfo
.
moduleName
).
assertEqual
(
"
entry
"
)
expect
(
datainfo
.
moduleName
).
assertEqual
(
"
entry
"
)
expect
(
datainfo
.
bundleName
).
assertEqual
(
NAME1
)
expect
(
datainfo
.
bundleName
).
assertEqual
(
NAME1
)
expect
(
datainfo
.
type
).
assertEqual
(
1
)
expect
(
datainfo
.
type
).
assertEqual
(
demo
.
AbilityType
.
PAGE
)
expect
(
datainfo
.
subType
).
assertEqual
(
demo
.
AbilitySubType
.
UNSPECIFIED
)
expect
(
datainfo
.
subType
).
assertEqual
(
demo
.
AbilitySubType
.
UNSPECIFIED
)
expect
(
datainfo
.
orientation
).
assertEqual
(
0
)
expect
(
datainfo
.
orientation
).
assertEqual
(
demo
.
DisplayOrientation
.
UNSPECIFIED
)
expect
(
datainfo
.
launchMode
).
assertEqual
(
demo
.
LaunchMode
.
STANDARD
)
expect
(
datainfo
.
launchMode
).
assertEqual
(
demo
.
LaunchMode
.
STANDARD
)
expect
(
datainfo
.
permissions
[
0
]).
assertEqual
(
"
com.permission.BMS_PERMISSION_CAMERA
"
)
expect
(
datainfo
.
permissions
[
0
]).
assertEqual
(
"
com.permission.BMS_PERMISSION_CAMERA
"
)
expect
(
datainfo
.
applicationInfo
.
name
).
assertEqual
(
NAME1
)
expect
(
datainfo
.
applicationInfo
.
name
).
assertEqual
(
NAME1
)
...
@@ -2159,12 +2158,14 @@ describe('ActsBundleManagerTest', function () {
...
@@ -2159,12 +2158,14 @@ describe('ActsBundleManagerTest', function () {
expect
(
datainfo
.
applicationInfo
.
systemApp
).
assertEqual
(
true
)
expect
(
datainfo
.
applicationInfo
.
systemApp
).
assertEqual
(
true
)
expect
(
datainfo
.
applicationInfo
.
supportedModes
).
assertEqual
(
0
)
expect
(
datainfo
.
applicationInfo
.
supportedModes
).
assertEqual
(
0
)
expect
(
datainfo
.
applicationInfo
.
enabled
).
assertEqual
(
true
)
expect
(
datainfo
.
applicationInfo
.
enabled
).
assertEqual
(
true
)
expect
(
datainfo
.
metaData
.
customizeDatas
.
length
).
assertLarger
(
0
)
expect
(
datainfo
.
metaData
.
length
).
assertLarger
(
0
)
for
(
var
j
=
0
;
j
<
datainfo
.
applicationInfo
.
moduleInfos
;
j
++
)
{
for
(
var
j
=
0
;
j
<
datainfo
.
applicationInfo
.
moduleInfos
;
j
++
)
{
expect
(
datainfo
.
applicationInfo
.
moduleInfos
[
j
].
moduleName
).
assertEqual
(
"
entry
"
)
expect
(
datainfo
.
applicationInfo
.
moduleInfos
[
j
].
moduleName
).
assertEqual
(
"
entry
"
)
expect
(
datainfo
.
applicationInfo
.
moduleInfos
[
j
].
moduleSourceDir
).
assertEqual
(
DIR1
)
expect
(
datainfo
.
applicationInfo
.
moduleInfos
[
j
].
moduleSourceDir
).
assertEqual
(
DIR1
)
}
}
}
}
}).
catch
(
err
=>
{
expect
(
err
).
assertFail
();
})
})
installData
.
uninstall
(
NAME1
,
{
installData
.
uninstall
(
NAME1
,
{
userId
:
100
,
userId
:
100
,
...
@@ -2176,7 +2177,7 @@ describe('ActsBundleManagerTest', function () {
...
@@ -2176,7 +2177,7 @@ describe('ActsBundleManagerTest', function () {
expect
(
data
.
statusMessage
).
assertEqual
(
'
SUCCESS
'
);
expect
(
data
.
statusMessage
).
assertEqual
(
'
SUCCESS
'
);
done
();
done
();
});
});
}
}
);
})
})
/**
/**
...
...
appexecfwk/zlib/actszipfileandunzipfiletest/entry/src/main/js/test/actszipfileandunzipfiletest.test.js
浏览文件 @
a28e4221
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录