Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
21cb99f0
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看板
提交
21cb99f0
编写于
8月 24, 2022
作者:
C
chengxingzhen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
XTS接口覆盖
Signed-off-by:
N
chengxingzhen
<
chengxingzhen@huawei.com
>
上级
4ccf5801
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
39 addition
and
1 deletion
+39
-1
ability/ability_runtime/abilitymontior/entry/src/main/ets/test/Ability.test.ets
...e/abilitymontior/entry/src/main/ets/test/Ability.test.ets
+4
-1
ability/ability_runtime/actsqueryfunctiontest/actsgetabilitystatestagetest/entry/src/main/ets/test/Ability.test.ets
...tystatestagetest/entry/src/main/ets/test/Ability.test.ets
+2
-0
ability/ability_runtime/apicover/apicoverhaptest/entry/src/main/ets/ServiceAbility/ServiceAbility.ts
...ptest/entry/src/main/ets/ServiceAbility/ServiceAbility.ts
+2
-0
ability/ability_runtime/apicover/apicoverhaptest/entry/src/main/ets/test/ApiCoverAbility.test.ets
...rhaptest/entry/src/main/ets/test/ApiCoverAbility.test.ets
+31
-0
未找到文件。
ability/ability_runtime/abilitymontior/entry/src/main/ets/test/Ability.test.ets
浏览文件 @
21cb99f0
...
...
@@ -109,7 +109,10 @@ export default function abilityTest() {
data.addAbilityMonitor(
{
abilityName: 'MainAbility2',
onAbilityForeground: onAbilityForeground
onAbilityForeground: onAbilityForeground,
onWindowStageRestore:(Ability)=>{
console.info("===>onWindowStageRestore");
}
}, (async (err) => {
console.debug("====>ACTS_AddAbilityMonitor_0200 success====>" + err.code);
await globalThis.abilitydelegator.startAbility(
...
...
ability/ability_runtime/actsqueryfunctiontest/actsgetabilitystatestagetest/entry/src/main/ets/test/Ability.test.ets
浏览文件 @
21cb99f0
...
...
@@ -97,6 +97,8 @@ export default function abilityTest() {
var state = abilityDelegator.getAbilityState(ability);
console.debug("====>ACTS_GetAbilityState_0300 state:" + state);
expect(state).assertEqual(AbilityDelegatorRegistry.AbilityLifecycleState.FOREGROUND);
expect(state != AbilityDelegatorRegistry.AbilityLifecycleState.CREATE).assertTrue()
expect(state != AbilityDelegatorRegistry.AbilityLifecycleState.DESTROY).assertTrue()
abilityDelegator.doAbilityBackground(ability, (err, isBackground)=>{
console.debug("====>doAbilityBackground_0300 data:" + JSON.stringify(isBackground));
expect(isBackground).assertTrue();
...
...
ability/ability_runtime/apicover/apicoverhaptest/entry/src/main/ets/ServiceAbility/ServiceAbility.ts
浏览文件 @
21cb99f0
...
...
@@ -21,11 +21,13 @@ export default class ServiceAbility extends ServiceExtension {
onCreate
(
want
:
Want
)
{
globalThis
.
abilityWant
=
want
;
let
direction
=
this
.
context
.
config
.
direction
let
pointerDervice
=
this
.
context
.
config
.
hasPointerDevice
let
AbilityInfo
=
this
.
context
.
extensionAbilityInfo
.
bundleName
console
.
log
(
'
ServiceAbility onCreate, want:
'
+
want
.
abilityName
);
var
CommonEventPublishData
=
{
parameters
:
{
"
config
"
:
direction
,
"
poniterDevices
"
:
pointerDervice
,
"
AbilityInfo
"
:
AbilityInfo
}
}
...
...
ability/ability_runtime/apicover/apicoverhaptest/entry/src/main/ets/test/ApiCoverAbility.test.ets
浏览文件 @
21cb99f0
...
...
@@ -418,6 +418,35 @@ export default function ApiCoverTest() {
})
});
/*
* @tc.number SUB_AA_Test_ProcessRunningInformation_0200
* @tc.name Test getProcessRunningInformation by callback in appManager.
* @tc.desc Function test
* @tc.level 3
*/
it('SUB_AA_Test_ProcessRunningInformation_0200', 0, async function (done) {
let process;
appManager.getProcessRunningInformation((error, processRunningInformations)=>{
if(error.code == 0){
console.info("SUB_AA_Test_ProcessRunningInformation_0100:" + JSON.stringify(processRunningInformations));
for(let i = 0; i < processRunningInformations.length; i++){
console.info("SUB_AA_Test_ProcessRunningInformation_0100:" + JSON.stringify(processRunningInformations[i]));
expect(processRunningInformations[i].pid).assertLarger(0)
expect(processRunningInformations[i].uid).assertLarger(0)
if(processRunningInformations[i].processName == "com.example.apicoverhaptest"){
process = processRunningInformations[i]
}
}
expect(process.bundleNames[0]).assertEqual("com.example.apicoverhaptest")
done()
}else{
console.info("SUB_AA_Test_ProcessRunningInformation_0100:" + JSON.stringify(error));
expect().assertFail()
done()
}
})
});
/*
* @tc.number SUB_AA_FMS_AbilityStage_0100
* @tc.name Start AbilityStage and get config.
...
...
@@ -476,6 +505,7 @@ export default function ApiCoverTest() {
function SubscribeInfoCallback(err, data) {
console.info("SUB_AA_FMS_AbilityStage_0200===SubscribeInfoCallback===" + JSON.stringify(data))
expect(data.parameters["config"]).assertEqual(0)
expect(data.parameters["poniterDevices"]).assertFalse()
expect(data.parameters["AbilityInfo"]).assertEqual("com.example.apicoverhaptest")
commonEvent.unsubscribe(subscriber, UnSubscribeInfoCallback)
done()
...
...
@@ -508,6 +538,7 @@ export default function ApiCoverTest() {
*/
it('SUB_AA_FMS_AcquireForm_0100', 0, async function (done) {
let subscriber = null
let formExtensionContext:appContext.FormExtensionContext
let subscribeInfo = {
events: ["Form_StartAbility"]
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录