提交 84b2276d 编写于 作者: X xinking129

change code number

Signed-off-by: Nxinking129 <xinxin13@huawei.com>
上级 07ca4882
......@@ -97,7 +97,7 @@ export default class EntryAbility extends Ability {
})
}
if (actionStr === 'Acts_CrossUserCall_3100') {
if (actionStr === 'Acts_CrossUserCall_2900') {
var caller;
function releaseCallback(data) {
console.info('====>' + actionStr + ' releaseCallBack:' + data);
......@@ -112,7 +112,7 @@ export default class EntryAbility extends Ability {
}, accountId).then((data) => {
caller = data;
caller.onRelease(releaseCallback);
let param = new MyParcelAble(3100, 'Acts_CrossUserCall_3100', false);
let param = new MyParcelAble(2900, 'Acts_CrossUserCall_2900', false);
caller.callWithResult('call', param).then((data) => {
var result = new MyParcelAble(0, '', false);
data.readParcelable(result);
......
......@@ -207,7 +207,7 @@ export default class ServiceAbility extends ServiceExtensionAbility {
})
}
if (actionStr == 'Acts_CrossUserCall_3200') {
if (actionStr == 'Acts_CrossUserCall_3000') {
var caller;
function releaseCallback(data) {
console.info('====>' + actionStr + ' releaseCallBack:' + data);
......@@ -222,7 +222,7 @@ export default class ServiceAbility extends ServiceExtensionAbility {
}, accountId).then((data) => {
caller = data;
caller.onRelease(releaseCallback);
let param = new MyParcelAble(3200, 'Acts_CrossUserCall_3200', false);
let param = new MyParcelAble(3000, 'Acts_CrossUserCall_3000', false);
caller.callWithResult('call', param).then((data) => {
var result = new MyParcelAble(0, '', false);
data.readParcelable(result);
......
......@@ -823,37 +823,37 @@ export default function abilityTest() {
})
/*
* @tc.number: Acts_CrossUserCall_3100
* @tc.number: Acts_CrossUserCall_2900
* @tc.name: Support for cross-UserID background call calls
* @tc.desc: The Caller.release interface of UIAbility under the same account executes normally.
*/
it('Acts_CrossUserCall_3100',0, async function (done) {
it('Acts_CrossUserCall_2900',0, async function (done) {
var subscriber;
var eventCount = 0;
console.info('====>Acts_CrossUserCall_3100 start');
console.info('====>Acts_CrossUserCall_2900 start');
commonEvent.createSubscriber(ACTS_CrossCallFunction).then(async (data) => {
console.info('====>Acts_CrossUserCall_3100 Create Subscribe');
console.info('====>Acts_CrossUserCall_2900 Create Subscribe');
subscriber = data;
commonEvent.subscribe(subscriber, subscribeCallBack);
globalThis.abilityContext.startAbility({
bundleName: 'com.acts.actscallability',
abilityName: 'EntryAbility',
parameters: {
action: 'Acts_CrossUserCall_3100',
action: 'Acts_CrossUserCall_2900',
accountId: -1
}
},(err) => {
console.info('====>Acts_CrossUserCall_3100 startAbility err:' + JSON.stringify(err));
console.info('====>Acts_CrossUserCall_2900 startAbility err:' + JSON.stringify(err));
expect(err.code).assertEqual(0);
})
})
function subscribeCallBack(err, data) {
console.info('====>Acts_CrossUserCall_3100 subscribeCallBack data:' + JSON.stringify(data));
console.info('====>Acts_CrossUserCall_2900 subscribeCallBack data:' + JSON.stringify(data));
if (data.event === 'ACTS_CROSS_CALL_EVENT') {
eventCount++;
expect(data.parameters.message.num).assertEqual(3100);
expect(data.parameters.message.str).assertEqual('Acts_CrossUserCall_3100 processed');
expect(data.parameters.message.num).assertEqual(2900);
expect(data.parameters.message.str).assertEqual('Acts_CrossUserCall_2900 processed');
expect(data.parameters.message.result).assertTrue();
}
if (data.event === 'ACTS_CROSS_RELEASE_EVENT') {
......@@ -866,7 +866,7 @@ export default function abilityTest() {
}
function unSubscribeCallback() {
console.info('====>Acts_CrossUserCall_3100 unSubscribeCallback');
console.info('====>Acts_CrossUserCall_2900 unSubscribeCallback');
done();
}
......@@ -879,37 +879,37 @@ export default function abilityTest() {
})
/*
* @tc.number: Acts_CrossUserCall_3200
* @tc.number: Acts_CrossUserCall_3000
* @tc.name: Support for cross-UserID background call calls
* @tc.desc: The Caller.release interface of ServiceExtension under the same account executes normally.
*/
it('Acts_CrossUserCall_3200',0, async function (done) {
it('Acts_CrossUserCall_3000',0, async function (done) {
var subscriber;
var eventCount = 0;
console.info('====>Acts_CrossUserCall_3200 start');
console.info('====>Acts_CrossUserCall_3000 start');
commonEvent.createSubscriber(ACTS_CrossCallFunction).then(async (data) => {
console.info('====>Acts_CrossUserCall_3200 Create Subscribe');
console.info('====>Acts_CrossUserCall_3000 Create Subscribe');
subscriber = data;
commonEvent.subscribe(subscriber, subscribeCallBack);
globalThis.abilityContext.startAbility({
bundleName: 'com.acts.actscallability',
abilityName: 'ServiceAbility',
parameters: {
action: 'Acts_CrossUserCall_3200',
action: 'Acts_CrossUserCall_3000',
accountId: -1
}
},(err) => {
console.info('====>Acts_CrossUserCall_3200 startAbility err:' + JSON.stringify(err));
console.info('====>Acts_CrossUserCall_3000 startAbility err:' + JSON.stringify(err));
expect(err.code).assertEqual(0);
})
})
function subscribeCallBack(err, data) {
console.info('====>Acts_CrossUserCall_3200 subscribeCallBack data:' + JSON.stringify(data));
console.info('====>Acts_CrossUserCall_3000 subscribeCallBack data:' + JSON.stringify(data));
if (data.event === 'ACTS_CROSS_CALL_EVENT') {
eventCount++;
expect(data.parameters.message.num).assertEqual(3200);
expect(data.parameters.message.str).assertEqual('Acts_CrossUserCall_3200 processed');
expect(data.parameters.message.num).assertEqual(3000);
expect(data.parameters.message.str).assertEqual('Acts_CrossUserCall_3000 processed');
expect(data.parameters.message.result).assertTrue();
}
if (data.event === 'ACTS_CROSS_RELEASE_EVENT') {
......@@ -922,7 +922,7 @@ export default function abilityTest() {
}
function unSubscribeCallback() {
console.info('====>Acts_CrossUserCall_3200 unSubscribeCallback');
console.info('====>Acts_CrossUserCall_3000 unSubscribeCallback');
done();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册