提交 7de601ef 编写于 作者: X xuchenghua09

fix call

Signed-off-by: Nxuchenghua09 <xuchenghua09@huawei.com>
上级 0e277858
...@@ -298,33 +298,16 @@ export default function abilityTest(abilityContext) { ...@@ -298,33 +298,16 @@ export default function abilityTest(abilityContext) {
it('ACTS_CommonComponent_Call_1500', 0, async function (done) { it('ACTS_CommonComponent_Call_1500', 0, async function (done) {
console.log('ACTS_CommonComponent_Call_1500 begin'); console.log('ACTS_CommonComponent_Call_1500 begin');
var caller; var caller;
try{
function releaseCallback(data) {
expect(data).assertEqual('release');
console.log('ACTS_CommonComponent_Call_1500 releaseCallBack' + data);
done();
}
caller = await globalThis.abilityContext.startAbilityByCall({ caller = await globalThis.abilityContext.startAbilityByCall({
bundleName: systemAppCalleeABundleName, bundleName: systemAppCalleeABundleName,
abilityName: systemAppCalleeAMainAbilityName, abilityName: systemAppCalleeAMainAbilityName,
}); });
}catch(error){
caller.onRelease(releaseCallback); console.log('ACTS_CommonComponent_Call_1500 start err'+error);
let param = new MySequenceable(1500, "ACTS_CommonComponent_Call_1500", 'default'); expect(error=="Error: function request remote error").assertTrue();
caller.callWithResult('testCallWithResult', param).then((data) => { done();
console.log('ACTS_CommonComponent_Call_1500 call success'); }
var result = new MySequenceable(0, '', '');
data.readSequenceable(result);
expect(result.num).assertEqual(1500);
expect(result.str).assertEqual('ACTS_CommonComponent_Call_1500');
expect(result.result).assertEqual('ACTS_CommonComponent_Call_1500processed');
caller.release();
}).catch(err => {
console.log('ACTS_CommonComponent_Call_1500 call exception' + err);
expect().assertFail();
caller.release();
})
}) })
/** /**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册