Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
e2be5c2e
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,发现更多精彩内容 >>
未验证
提交
e2be5c2e
编写于
2月 09, 2023
作者:
O
openharmony_ci
提交者:
Gitee
2月 09, 2023
浏览文件
操作
浏览文件
下载
差异文件
!7482 更新元能力AbilityManager和AppManager相关接口 挑单monthly
Merge pull request !7482 from dy/updateAPI9_monthly
上级
bc1b9c55
233a8bcb
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
26 addition
and
320 deletion
+26
-320
ability/ability_runtime/abilitymanager/actsamscallbackfirstscene/src/main/js/test/MangerAbilityJsunit.test.js
...ckfirstscene/src/main/js/test/MangerAbilityJsunit.test.js
+0
-31
ability/ability_runtime/abilitymanager/actsamscallbackfourthscene/src/main/js/test/MangerAbilityJsunit.test.js
...kfourthscene/src/main/js/test/MangerAbilityJsunit.test.js
+0
-31
ability/ability_runtime/abilitymanager/actsamscallbacksecondscene/src/main/js/test/MangerAbilityJsunit.test.js
...ksecondscene/src/main/js/test/MangerAbilityJsunit.test.js
+0
-31
ability/ability_runtime/abilitymanager/actsamscallbackthirdscene/src/main/js/test/MangerAbilityJsunit.test.js
...ckthirdscene/src/main/js/test/MangerAbilityJsunit.test.js
+0
-31
ability/ability_runtime/abilitymanager/actsamstestfifthscene/src/main/js/test/MangerAbilityJsunit.test.js
...stfifthscene/src/main/js/test/MangerAbilityJsunit.test.js
+0
-27
ability/ability_runtime/abilitymanager/actsamstestfirstscene/src/main/js/test/MangerAbilityJsunit.test.js
...stfirstscene/src/main/js/test/MangerAbilityJsunit.test.js
+0
-27
ability/ability_runtime/abilitymanager/actsamstestfourthscene/src/main/js/test/MangerAbilityJsunit.test.js
...tfourthscene/src/main/js/test/MangerAbilityJsunit.test.js
+0
-30
ability/ability_runtime/abilitymanager/actsamstestsecondscene/src/main/js/test/MangerAbilityJsunit.test.js
...tsecondscene/src/main/js/test/MangerAbilityJsunit.test.js
+0
-27
ability/ability_runtime/abilitymanager/actsamstestthirdscene/src/main/js/test/MangerAbilityJsunit.test.js
...stthirdscene/src/main/js/test/MangerAbilityJsunit.test.js
+0
-29
ability/ability_runtime/amsgetabilityprocessinfo/actsgetabilityprocessinfotest/src/main/js/test/ActsProcessManageJsTest.test.js
...infotest/src/main/js/test/ActsProcessManageJsTest.test.js
+0
-30
ability/ability_runtime/apicover/apicoverhaptest/entry/src/main/ets/test/ApiCoverAbility.test.ets
...rhaptest/entry/src/main/ets/test/ApiCoverAbility.test.ets
+26
-26
未找到文件。
ability/ability_runtime/abilitymanager/actsamscallbackfirstscene/src/main/js/test/MangerAbilityJsunit.test.js
浏览文件 @
e2be5c2e
...
...
@@ -82,36 +82,5 @@ export default function ActsAmsCallBackFirstScene() {
done
();
});
})
/*
* @tc.number : Acts_Ams_test_0300
* @tc.name : getProcessRunningInformation : Get All Running Processes Information
* @tc.desc : Get All Running Processes Information(by CallBack)
*/
it
(
'
Acts_Ams_test_0300
'
,
0
,
async
function
(
done
)
{
appManager
.
getProcessRunningInformation
(
(
error
,
info
)
=>
{
console
.
info
(
'
Acts_Ams_test_0300 getProcessRunningInformation error.code
\
'
+
error
.
code
+
'
, data length [
'
+
info
.
length
+
'
]
'
);
expect
(
Array
.
isArray
(
info
)).
assertEqual
(
true
);
expect
(
info
.
length
).
assertLarger
(
0
);
for
(
var
i
=
0
;
i
<
info
.
length
;
i
++
)
{
console
.
info
(
'
Acts_Ams_test_0200 getProcessRunningInformation[
'
+
i
+
"
]:
\
"
+
JSON
.
stringify
(
info
[
i
]));
expect
(
typeof
(
info
[
i
].
pid
)).
assertEqual
(
"
number
"
);
expect
(
info
[
i
].
pid
).
assertLarger
(
0
);
expect
(
typeof
(
info
[
i
].
processName
)).
assertEqual
(
"
string
"
);
expect
(
info
[
i
].
processName
.
length
).
assertLarger
(
0
);
expect
(
Array
.
isArray
(
info
[
i
].
bundleNames
)).
assertEqual
(
true
);
expect
(
info
[
i
].
bundleNames
.
length
).
assertLarger
(
0
);
expect
(
typeof
(
info
[
i
].
uid
)).
assertEqual
(
"
number
"
);
expect
(
info
[
i
].
uid
).
assertLarger
(
0
);
}
done
();
});
})
})
}
\ No newline at end of file
ability/ability_runtime/abilitymanager/actsamscallbackfourthscene/src/main/js/test/MangerAbilityJsunit.test.js
浏览文件 @
e2be5c2e
...
...
@@ -133,36 +133,5 @@ export default function ActsAmsCallBackFourthScene() {
done
();
});
})
/*
* @tc.number : Acts_Ams_test_5100
* @tc.name : getProcessRunningInformation : Get All Running Processes Information
* @tc.desc : Get All Running Processes Information(by CallBack)
*/
it
(
'
Acts_Ams_test_5100
'
,
0
,
async
function
(
done
)
{
appManager
.
getProcessRunningInformation
(
(
error
,
info
)
=>
{
console
.
info
(
'
Acts_Ams_test_5100 getProcessRunningInformation error.code
\
'
+
error
.
code
+
'
, data length [
'
+
info
.
length
+
'
]
'
);
expect
(
Array
.
isArray
(
info
)).
assertEqual
(
true
);
expect
(
info
.
length
).
assertLarger
(
0
);
for
(
let
i
=
0
;
i
<
info
.
length
;
i
++
)
{
console
.
info
(
'
Acts_Ams_test_5100 getProcessRunningInformation[
'
+
i
+
"
]:
\
"
+
JSON
.
stringify
(
info
[
i
]));
expect
(
typeof
(
info
[
i
].
pid
)).
assertEqual
(
"
number
"
);
expect
(
info
[
i
].
pid
).
assertLarger
(
0
);
expect
(
typeof
(
info
[
i
].
processName
)).
assertEqual
(
"
string
"
);
expect
(
info
[
i
].
processName
.
length
).
assertLarger
(
0
);
expect
(
Array
.
isArray
(
info
[
i
].
bundleNames
)).
assertEqual
(
true
);
expect
(
info
[
i
].
bundleNames
.
length
).
assertLarger
(
0
);
expect
(
typeof
(
info
[
i
].
uid
)).
assertEqual
(
"
number
"
);
expect
(
info
[
i
].
uid
).
assertLarger
(
0
);
}
done
();
});
})
})
}
\ No newline at end of file
ability/ability_runtime/abilitymanager/actsamscallbacksecondscene/src/main/js/test/MangerAbilityJsunit.test.js
浏览文件 @
e2be5c2e
...
...
@@ -99,36 +99,5 @@ export default function ActsAmsCallBackSecondScene() {
done
();
});
})
/*
* @tc.number : Acts_Ams_test_1900
* @tc.name : getProcessRunningInformation : Get All Running Processes Information
* @tc.desc : Get All Running Processes Information(by CallBack)
*/
it
(
'
Acts_Ams_test_1900
'
,
0
,
async
function
(
done
)
{
appManager
.
getProcessRunningInformation
(
(
error
,
info
)
=>
{
console
.
info
(
'
Acts_Ams_test_1900 getProcessRunningInformation error.code
\
'
+
error
.
code
+
'
, data length [
'
+
info
.
length
+
'
]
'
);
expect
(
Array
.
isArray
(
info
)).
assertEqual
(
true
);
expect
(
info
.
length
).
assertLarger
(
0
);
for
(
let
i
=
0
;
i
<
info
.
length
;
i
++
)
{
console
.
info
(
'
Acts_Ams_test_1900 getProcessRunningInformation[
'
+
i
+
"
]:
\
"
+
JSON
.
stringify
(
info
[
i
]));
expect
(
typeof
(
info
[
i
].
pid
)).
assertEqual
(
"
number
"
);
expect
(
info
[
i
].
pid
).
assertLarger
(
0
);
expect
(
typeof
(
info
[
i
].
processName
)).
assertEqual
(
"
string
"
);
expect
(
info
[
i
].
processName
.
length
).
assertLarger
(
0
);
expect
(
Array
.
isArray
(
info
[
i
].
bundleNames
)).
assertEqual
(
true
);
expect
(
info
[
i
].
bundleNames
.
length
).
assertLarger
(
0
);
expect
(
typeof
(
info
[
i
].
uid
)).
assertEqual
(
"
number
"
);
expect
(
info
[
i
].
uid
).
assertLarger
(
0
);
}
done
();
});
})
})
}
\ No newline at end of file
ability/ability_runtime/abilitymanager/actsamscallbackthirdscene/src/main/js/test/MangerAbilityJsunit.test.js
浏览文件 @
e2be5c2e
...
...
@@ -93,36 +93,5 @@ export default function ActsAmsCallBackThirdScene() {
done
();
});
})
/*
* @tc.number : Acts_Ams_test_3500
* @tc.name : getProcessRunningInformation : Get All Running Processes Information
* @tc.desc : Get All Running Processes Information(by CallBack)
*/
it
(
'
Acts_Ams_test_3500
'
,
0
,
async
function
(
done
)
{
appManager
.
getProcessRunningInformation
(
(
error
,
info
)
=>
{
console
.
info
(
'
Acts_Ams_test_3500 getProcessRunningInformation error.code
\
'
+
error
.
code
+
'
, data length [
'
+
info
.
length
+
'
]
'
);
expect
(
Array
.
isArray
(
info
)).
assertEqual
(
true
);
expect
(
info
.
length
).
assertLarger
(
0
);
for
(
let
i
=
0
;
i
<
info
.
length
;
i
++
)
{
console
.
info
(
'
Acts_Ams_test_3500 getProcessRunningInformation[
'
+
i
+
"
]:
\
"
+
JSON
.
stringify
(
info
[
i
]));
expect
(
typeof
(
info
[
i
].
pid
)).
assertEqual
(
"
number
"
);
expect
(
info
[
i
].
pid
).
assertLarger
(
0
);
expect
(
typeof
(
info
[
i
].
processName
)).
assertEqual
(
"
string
"
);
expect
(
info
[
i
].
processName
.
length
).
assertLarger
(
0
);
expect
(
Array
.
isArray
(
info
[
i
].
bundleNames
)).
assertEqual
(
true
);
expect
(
info
[
i
].
bundleNames
.
length
).
assertLarger
(
0
);
expect
(
typeof
(
info
[
i
].
uid
)).
assertEqual
(
"
number
"
);
expect
(
info
[
i
].
uid
).
assertLarger
(
0
);
}
done
();
});
})
})
}
\ No newline at end of file
ability/ability_runtime/abilitymanager/actsamstestfifthscene/src/main/js/test/MangerAbilityJsunit.test.js
浏览文件 @
e2be5c2e
...
...
@@ -149,32 +149,5 @@ export default function ActsAmsTestFifthScene() {
}
done
();
})
/*
* @tc.number : Acts_Ams_test_0200
* @tc.name : getProcessRunningInformation : Get All Running Processes Information
* @tc.desc : Get All Running Processes Information(by Promise)
*/
it
(
'
Acts_Ams_test_0200
'
,
0
,
async
function
(
done
)
{
let
info
=
await
appManager
.
getProcessRunningInformation
();
expect
(
Array
.
isArray
(
info
)).
assertEqual
(
true
);
expect
(
info
.
length
).
assertLarger
(
0
);
for
(
let
i
=
0
;
i
<
info
.
length
;
i
++
)
{
console
.
info
(
'
Acts_Ams_test_0200 getProcessRunningInformation[
'
+
i
+
"
]:
\
"
+
JSON
.
stringify
(
info
[
i
]));
expect
(
typeof
(
info
[
i
].
pid
)).
assertEqual
(
"
number
"
);
expect
(
info
[
i
].
pid
).
assertLarger
(
0
);
expect
(
typeof
(
info
[
i
].
processName
)).
assertEqual
(
"
string
"
);
expect
(
info
[
i
].
processName
.
length
).
assertLarger
(
0
);
expect
(
Array
.
isArray
(
info
[
i
].
bundleNames
)).
assertEqual
(
true
);
expect
(
info
[
i
].
bundleNames
.
length
).
assertLarger
(
0
);
expect
(
typeof
(
info
[
i
].
uid
)).
assertEqual
(
"
number
"
);
expect
(
info
[
i
].
uid
).
assertLarger
(
0
);
}
done
();
})
})
}
\ No newline at end of file
ability/ability_runtime/abilitymanager/actsamstestfirstscene/src/main/js/test/MangerAbilityJsunit.test.js
浏览文件 @
e2be5c2e
...
...
@@ -83,32 +83,5 @@ export default function ActsAmsTestFirstScene() {
}
done
();
})
/*
* @tc.number : Acts_Ams_test_0200
* @tc.name : getProcessRunningInformation : Get All Running Processes Information
* @tc.desc : Get All Running Processes Information(by Promise)
*/
it
(
'
Acts_Ams_test_0200
'
,
0
,
async
function
(
done
)
{
var
info
=
await
appManager
.
getProcessRunningInformation
();
expect
(
Array
.
isArray
(
info
)).
assertEqual
(
true
);
expect
(
info
.
length
).
assertLarger
(
0
);
for
(
var
i
=
0
;
i
<
info
.
length
;
i
++
)
{
console
.
info
(
'
Acts_Ams_test_0200 getProcessRunningInformation[
'
+
i
+
"
]:
\
"
+
JSON
.
stringify
(
info
[
i
]));
expect
(
typeof
(
info
[
i
].
pid
)).
assertEqual
(
"
number
"
);
expect
(
info
[
i
].
pid
).
assertLarger
(
0
);
expect
(
typeof
(
info
[
i
].
processName
)).
assertEqual
(
"
string
"
);
expect
(
info
[
i
].
processName
.
length
).
assertLarger
(
0
);
expect
(
Array
.
isArray
(
info
[
i
].
bundleNames
)).
assertEqual
(
true
);
expect
(
info
[
i
].
bundleNames
.
length
).
assertLarger
(
0
);
expect
(
typeof
(
info
[
i
].
uid
)).
assertEqual
(
"
number
"
);
expect
(
info
[
i
].
uid
).
assertLarger
(
0
);
}
done
();
})
})
}
\ No newline at end of file
ability/ability_runtime/abilitymanager/actsamstestfourthscene/src/main/js/test/MangerAbilityJsunit.test.js
浏览文件 @
e2be5c2e
...
...
@@ -152,35 +152,5 @@ export default function ActsAmsTestFourthScene() {
}
done
();
})
/*
* @tc.number : Acts_Ams_test_1800
* @tc.name : getProcessRunningInformation : Get All Running Processes Information
* @tc.desc : Get All Running Processes Information(by Promise)
*/
it
(
'
Acts_Ams_test_1800
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
sleep begin
"
);
sleep
(
2000
);
console
.
info
(
"
sleep end
"
);
var
info
=
await
appManager
.
getProcessRunningInformation
();
expect
(
Array
.
isArray
(
info
)).
assertEqual
(
true
);
expect
(
info
.
length
).
assertLarger
(
0
);
for
(
var
i
=
0
;
i
<
info
.
length
;
i
++
)
{
console
.
info
(
'
Acts_Ams_test_1800 getProcessRunningInformation[
'
+
i
+
"
]:
\
"
+
JSON
.
stringify
(
info
[
i
]));
expect
(
typeof
(
info
[
i
].
pid
)).
assertEqual
(
"
number
"
);
expect
(
info
[
i
].
pid
).
assertLarger
(
0
);
expect
(
typeof
(
info
[
i
].
processName
)).
assertEqual
(
"
string
"
);
expect
(
info
[
i
].
processName
.
length
).
assertLarger
(
0
);
expect
(
Array
.
isArray
(
info
[
i
].
bundleNames
)).
assertEqual
(
true
);
expect
(
info
[
i
].
bundleNames
.
length
).
assertLarger
(
0
);
expect
(
typeof
(
info
[
i
].
uid
)).
assertEqual
(
"
number
"
);
expect
(
info
[
i
].
uid
).
assertLarger
(
0
);
}
done
();
})
})
}
\ No newline at end of file
ability/ability_runtime/abilitymanager/actsamstestsecondscene/src/main/js/test/MangerAbilityJsunit.test.js
浏览文件 @
e2be5c2e
...
...
@@ -105,32 +105,5 @@ export default function ActsAmsTestSecondScene() {
}
done
();
})
/*
* @tc.number : Acts_Ams_test_1800
* @tc.name : getProcessRunningInformation : Get All Running Processes Information
* @tc.desc : Get All Running Processes Information(by Promise)
*/
it
(
'
Acts_Ams_test_1800
'
,
0
,
async
function
(
done
)
{
var
info
=
await
appManager
.
getProcessRunningInformation
();
expect
(
Array
.
isArray
(
info
)).
assertEqual
(
true
);
expect
(
info
.
length
).
assertLarger
(
0
);
for
(
var
i
=
0
;
i
<
info
.
length
;
i
++
)
{
console
.
info
(
'
Acts_Ams_test_1800 getProcessRunningInformation[
'
+
i
+
"
]:
\
"
+
JSON
.
stringify
(
info
[
i
]));
expect
(
typeof
(
info
[
i
].
pid
)).
assertEqual
(
"
number
"
);
expect
(
info
[
i
].
pid
).
assertLarger
(
0
);
expect
(
typeof
(
info
[
i
].
processName
)).
assertEqual
(
"
string
"
);
expect
(
info
[
i
].
processName
.
length
).
assertLarger
(
0
);
expect
(
Array
.
isArray
(
info
[
i
].
bundleNames
)).
assertEqual
(
true
);
expect
(
info
[
i
].
bundleNames
.
length
).
assertLarger
(
0
);
expect
(
typeof
(
info
[
i
].
uid
)).
assertEqual
(
"
number
"
);
expect
(
info
[
i
].
uid
).
assertLarger
(
0
);
}
done
();
})
})
}
\ No newline at end of file
ability/ability_runtime/abilitymanager/actsamstestthirdscene/src/main/js/test/MangerAbilityJsunit.test.js
浏览文件 @
e2be5c2e
...
...
@@ -107,34 +107,5 @@ export default function ActsAmsTestThirdScene() {
}
done
();
})
/*
* @tc.number : Acts_Ams_test_3400
* @tc.name : getProcessRunningInformation : Get All Running Processes Information
* @tc.desc : Get All Running Processes Information(by Promise)
*/
it
(
'
Acts_Ams_test_3400
'
,
0
,
async
function
(
done
)
{
var
info
=
await
appManager
.
getProcessRunningInformation
();
console
.
info
(
'
Acts_Ams_test_3400 getProcessRunningInformation JSON String:
\
'
+
JSON
.
stringify
(
info
));
expect
(
Array
.
isArray
(
info
)).
assertEqual
(
true
);
expect
(
info
.
length
).
assertLarger
(
0
);
for
(
var
i
=
0
;
i
<
info
.
length
;
i
++
)
{
console
.
info
(
'
Acts_Ams_test_3400 getProcessRunningInformation[
'
+
i
+
"
]:
\
"
+
JSON
.
stringify
(
info
[
i
]));
expect
(
typeof
(
info
[
i
].
pid
)).
assertEqual
(
"
number
"
);
expect
(
info
[
i
].
pid
).
assertLarger
(
0
);
expect
(
typeof
(
info
[
i
].
processName
)).
assertEqual
(
"
string
"
);
expect
(
info
[
i
].
processName
.
length
).
assertLarger
(
0
);
expect
(
Array
.
isArray
(
info
[
i
].
bundleNames
)).
assertEqual
(
true
);
expect
(
info
[
i
].
bundleNames
.
length
).
assertLarger
(
0
);
expect
(
typeof
(
info
[
i
].
uid
)).
assertEqual
(
"
number
"
);
expect
(
info
[
i
].
uid
).
assertLarger
(
0
);
}
done
();
})
})
}
\ No newline at end of file
ability/ability_runtime/amsgetabilityprocessinfo/actsgetabilityprocessinfotest/src/main/js/test/ActsProcessManageJsTest.test.js
浏览文件 @
e2be5c2e
...
...
@@ -58,35 +58,5 @@ describe('ActsAbilityRunningInfosTest', function () {
done
();
})
})
/*
* @tc.number: ACTS_getProcessRunningInformation_0300
* @tc.name: Application running ability information query
* @tc.desc: Verify applications are started to query getProcessRunningInformation ability information
* (by promise)
*/
it
(
'
ACTS_getProcessRunningInformation_0300
'
,
0
,
async
function
(
done
)
{
console
.
log
(
'
ACTS_getProcessRunningInformation_0300====<begin
'
);
var
data
=
await
appManager
.
getProcessRunningInformation
()
console
.
info
(
'
====> ACTS_getProcessRunningInformation_0300 ====>
'
+
JSON
.
stringify
(
data
))
expect
(
checkRunningProcess
(
'
com.example.abilityrunninginfostest
'
,
data
)).
assertTrue
();
done
();
})
/*
* @tc.number: ACTS_getProcessRunningInformation_0400
* @tc.name: Application running ability information query
* @tc.desc: Verify applications are started to query getProcessRunningInformation ability information
* (by callback)
*/
it
(
'
ACTS_getProcessRunningInformation_0400
'
,
0
,
async
function
(
done
)
{
console
.
log
(
'
ACTS_getProcessRunningInformation_0400====<begin
'
);
appManager
.
getProcessRunningInformation
((
err
,
data
)
=>
{
console
.
info
(
'
====> ACTS_getProcessRunningInformation_0400 ====>
'
+
JSON
.
stringify
(
data
))
expect
(
checkRunningProcess
(
'
com.example.abilityrunninginfostest
'
,
data
)).
assertTrue
();
done
();
})
})
})
}
ability/ability_runtime/apicover/apicoverhaptest/entry/src/main/ets/test/ApiCoverAbility.test.ets
浏览文件 @
e2be5c2e
...
...
@@ -313,7 +313,7 @@ export default function ApiCoverTest() {
*/
it
(
'SUB_AA_ABILITY_Extension_API_012'
,
0
,
async
function
(
done
)
{
try
{
let
info
:
appManagerNew
.
Process
RunningInfo
;
let
info
:
appManagerNew
.
Process
Information
;
let
stageContext
:
common
.
AbilityStageContext
=
globalThis
.
stageContext
;
let
abilityContext
:
common
.
UIAbilityContext
=
globalThis
.
abilityContext
;
let
appContext
:
common
.
ApplicationContext
=
abilityContext
.
getApplicationContext
();
...
...
@@ -520,54 +520,54 @@ export default function ApiCoverTest() {
});
/*
* @tc.number SUB_AA_Test_Process
Running
Information_0100
* @tc.name Test get
ProcessRunning
Information in appManager.
* @tc.number SUB_AA_Test_ProcessInformation_0100
* @tc.name Test get
RunningProcess
Information in appManager.
* @tc.desc Function test
* @tc.level 3
*/
it
(
'SUB_AA_Test_Process
Running
Information_0100'
,
0
,
async
function
(
done
)
{
let
processRunningInformation
:
appManagerNew
.
ProcessRunning
Information
;
it
(
'SUB_AA_Test_ProcessInformation_0100'
,
0
,
async
function
(
done
)
{
let
ProcessInformation
:
appManagerNew
.
Process
Information
;
let
process
;
appManagerNew
.
get
ProcessRunningInformation
()
.
then
((
processRunning
Informations
)
=>
{
console
.
info
(
"SUB_AA_Test_Process
RunningInformation_0100:"
+
JSON
.
stringify
(
processRunning
Informations
));
for
(
let
i
=
0
;
i
<
processRunning
Informations
.
length
;
i
++
){
console
.
info
(
"SUB_AA_Test_Process
RunningInformation_0100:"
+
JSON
.
stringify
(
processRunning
Informations
[
i
]));
expect
(
processRunning
Informations
[
i
]
.
pid
)
.
assertLarger
(
0
)
expect
(
processRunning
Informations
[
i
]
.
uid
)
.
assertLarger
(
0
)
if
(
processRunning
Informations
[
i
]
.
processName
==
"com.example.apicoverhaptest"
){
process
=
processRunning
Informations
[
i
]
appManagerNew
.
get
RunningProcessInformation
()
.
then
((
Process
Informations
)
=>
{
console
.
info
(
"SUB_AA_Test_Process
Information_0100:"
+
JSON
.
stringify
(
Process
Informations
));
for
(
let
i
=
0
;
i
<
Process
Informations
.
length
;
i
++
){
console
.
info
(
"SUB_AA_Test_Process
Information_0100:"
+
JSON
.
stringify
(
Process
Informations
[
i
]));
expect
(
Process
Informations
[
i
]
.
pid
)
.
assertLarger
(
0
)
expect
(
Process
Informations
[
i
]
.
uid
)
.
assertLarger
(
0
)
if
(
Process
Informations
[
i
]
.
processName
==
"com.example.apicoverhaptest"
){
process
=
Process
Informations
[
i
]
}
}
expect
(
process
.
bundleNames
[
0
])
.
assertEqual
(
"com.example.apicoverhaptest"
)
done
()
})
.
catch
((
error
)
=>
{
console
.
info
(
"SUB_AA_Test_Process
Running
Information_0100:"
+
JSON
.
stringify
(
error
));
console
.
info
(
"SUB_AA_Test_ProcessInformation_0100:"
+
JSON
.
stringify
(
error
));
expect
()
.
assertFail
()
done
()
})
});
/*
* @tc.number SUB_AA_Test_Process
Running
Information_0200
* @tc.name Test get
ProcessRunning
Information by callback in appManager.
* @tc.number SUB_AA_Test_ProcessInformation_0200
* @tc.name Test get
RunningProcess
Information by callback in appManager.
* @tc.desc Function test
* @tc.level 3
*/
it
(
'SUB_AA_Test_Process
Running
Information_0200'
,
0
,
async
function
(
done
)
{
it
(
'SUB_AA_Test_ProcessInformation_0200'
,
0
,
async
function
(
done
)
{
let
process
;
appManagerNew
.
get
ProcessRunningInformation
((
error
,
processRunning
Informations
)
=>
{
appManagerNew
.
get
RunningProcessInformation
((
error
,
Process
Informations
)
=>
{
if
(
error
)
{
console
.
info
(
"SUB_AA_Test_Process
Running
Information_0200:"
+
JSON
.
stringify
(
error
));
console
.
info
(
"SUB_AA_Test_ProcessInformation_0200:"
+
JSON
.
stringify
(
error
));
expect
()
.
assertFail
()
done
()
}
console
.
info
(
"SUB_AA_Test_Process
RunningInformation_0200:"
+
JSON
.
stringify
(
processRunning
Informations
));
for
(
let
i
=
0
;
i
<
processRunning
Informations
.
length
;
i
++
){
console
.
info
(
"SUB_AA_Test_Process
RunningInformation_0200:"
+
JSON
.
stringify
(
processRunning
Informations
[
i
]));
expect
(
processRunning
Informations
[
i
]
.
pid
)
.
assertLarger
(
0
)
expect
(
processRunning
Informations
[
i
]
.
uid
)
.
assertLarger
(
0
)
if
(
processRunning
Informations
[
i
]
.
processName
==
"com.example.apicoverhaptest"
){
process
=
processRunning
Informations
[
i
]
console
.
info
(
"SUB_AA_Test_Process
Information_0200:"
+
JSON
.
stringify
(
Process
Informations
));
for
(
let
i
=
0
;
i
<
Process
Informations
.
length
;
i
++
){
console
.
info
(
"SUB_AA_Test_Process
Information_0200:"
+
JSON
.
stringify
(
Process
Informations
[
i
]));
expect
(
Process
Informations
[
i
]
.
pid
)
.
assertLarger
(
0
)
expect
(
Process
Informations
[
i
]
.
uid
)
.
assertLarger
(
0
)
if
(
Process
Informations
[
i
]
.
processName
==
"com.example.apicoverhaptest"
){
process
=
Process
Informations
[
i
]
}
}
expect
(
process
.
bundleNames
[
0
])
.
assertEqual
(
"com.example.apicoverhaptest"
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录