Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
d1bb4995
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,发现更多精彩内容 >>
提交
d1bb4995
编写于
2月 17, 2023
作者:
C
chengxingzhen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
xts-用例下库
Signed-off-by:
N
chengxingzhen
<
chengxingzhen@huawei.com
>
上级
be1d602e
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
0 addition
and
104 deletion
+0
-104
ability/ability_runtime/actsusers/ActsAmsUsersSystemTest/entry/src/main/ets/test/Ability.test.ets
...sUsersSystemTest/entry/src/main/ets/test/Ability.test.ets
+0
-104
未找到文件。
ability/ability_runtime/actsusers/ActsAmsUsersSystemTest/entry/src/main/ets/test/Ability.test.ets
浏览文件 @
d1bb4995
...
...
@@ -388,110 +388,6 @@ export default function abilityTest() {
})
/*
* @tc.number : ACTS_startAbility_3000
* @tc.name : start new ability
* @tc.desc : Start an ability with the parameter startability with options succeeded.(promise)
*/
it('ACTS_startAbility_3000', 0, async function (done) {
let TAG = 'ACTS_startAbility_3000'
let Subscriber
var flag = true
var startresult = false
function SubscribeCallBack (err, data) {
expect(data.event == "ACTS_InterfaceMultiUsers_0100_Start_CommonEvent" || data.event == "ACTS_TerminateSelf_CommonEvent").assertTrue();
console.debug(TAG + "====>0100 Subscribe CallBack data:====>" + JSON.stringify(data));
if(data.event == "ACTS_InterfaceMultiUsers_0100_Start_CommonEvent"){
startresult = true
}
commonEvent.unsubscribe(Subscriber, UnSubscribeCallback);
}
commonEvent.createSubscriber(subscriberInfo_MainAbility).then(async (data) => {
console.debug(TAG + "====>Create Subscriber====>");
data.getSubscribeInfo().then(async (SubscribeInfo)=>{
console.debug(TAG + "====>SubscribeInfo is====>" + JSON.stringify(SubscribeInfo));
Subscriber = data;
commonEvent.subscribe(Subscriber, SubscribeCallBack);
console.debug(TAG + "====>start startAbility====>");
await globalThis.abilityContext.startAbility(
{
bundleName: 'com.example.userservicesystemapi7',
abilityName: 'com.example.userservicesystemapi7.ServiceAbility'
}).then(()=>{
console.debug(TAG + "====>startAbility end====>");
})
})
})
function UnSubscribeCallback() {
console.debug(TAG + "====>UnSubscribeCallback====>");
flag = false
expect(startresult).assertEqual(true);
done();
}
function timeout() {
if(flag == true) {
expect().assertFail();
console.debug(TAG + 'ACTS_startAbility_3000 - timeout');
commonEvent.unsubscribe(Subscriber, UnSubscribeCallback)
}
}
setTimeout(timeout, START_ABILITY_TIMEOUT);
})
/*
* @tc.number : ACTS_startAbility_3100
* @tc.name : start new ability
* @tc.desc : Start an ability with the parameter startability with options succeeded.(promise)
*/
it('ACTS_startAbility_3100', 0, async function (done) {
let TAG = 'ACTS_startAbility_3100'
let Subscriber
var flag = true
var startresult = false
function SubscribeCallBack (err, data) {
expect(data.event == "ACTS_InterfaceMultiUsers_0100_Start_CommonEvent" || data.event == "ACTS_TerminateSelf_CommonEvent").assertTrue();
console.debug(TAG + "====>0100 Subscribe CallBack data:====>" + JSON.stringify(data));
if(data.event == "ACTS_InterfaceMultiUsers_0100_Start_CommonEvent"){
startresult = true
}
commonEvent.unsubscribe(Subscriber, UnSubscribeCallback);
}
commonEvent.createSubscriber(subscriberInfo_MainAbility).then(async (data) => {
console.debug(TAG + "====>Create Subscriber====>");
data.getSubscribeInfo().then(async (SubscribeInfo)=>{
console.debug(TAG + "====>SubscribeInfo is====>" + JSON.stringify(SubscribeInfo));
Subscriber = data;
commonEvent.subscribe(Subscriber, SubscribeCallBack);
console.debug(TAG + "====>start startAbility====>");
await globalThis.abilityContext.startAbility(
{
bundleName: 'com.example.userservicesystemapi7',
abilityName: 'com.example.userservicesystemapi7.ServiceAbility'
},()=>{
console.debug(TAG + "====>startAbility end====>");
})
})
})
function UnSubscribeCallback() {
console.debug(TAG + "====>UnSubscribeCallback====>");
flag = false
expect(startresult).assertEqual(true);
done();
}
function timeout() {
if(flag == true) {
expect().assertFail();
console.debug(TAG + 'ACTS_startAbility_3100 - timeout');
commonEvent.unsubscribe(Subscriber, UnSubscribeCallback)
}
}
setTimeout(timeout, START_ABILITY_TIMEOUT);
})
/*
* @tc.number : ACTS_StartAbilityForResult_0100
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录