未验证 提交 13293b59 编写于 作者: O openharmony_ci 提交者: Gitee

!5235 xts失败用例适配

Merge pull request !5235 from chengxingzhen/master
......@@ -17,14 +17,14 @@ import commonEvent from '@ohos.commonEvent'
function PublishCallBackOne() {
console.debug("====>Publish CallBack ACTS_DoAbilityForeground_0100_Event====>");
setTimeout(()=>{
globalThis.abilityContext.terminateSelf();
globalThis.abilityContextMainAbility2.terminateSelf();
console.debug("====>MainAbility2 terminateSelf succese====>")
},2000)
},5000)
}
export default class MainAbility2 extends Ability {
onCreate(want, launchParam) {
console.log("[Demo] MainAbility2 onCreate")
globalThis.abilityContext = this.context
globalThis.abilityContextMainAbility2 = this.context
}
onDestroy() {
......@@ -36,6 +36,11 @@ export default class MainAbility2 extends Ability {
console.log("[Demo] MainAbility2 onWindowStageCreate")
windowStage.setUIContent(this.context, "pages/index", null)
windowStage.on('windowStageEvent', (data)=>{
if(data == 2){
commonEvent.publish("ACTS_DoAbility_Event", PublishCallBackOne);
}
})
}
onWindowStageDestroy() {
......@@ -46,7 +51,6 @@ export default class MainAbility2 extends Ability {
onForeground() {
// Ability has brought to foreground
console.log("[Demo] MainAbility2 onForeground")
commonEvent.publish("ACTS_DoAbility_Event", PublishCallBackOne);
}
onBackground() {
......
......@@ -16,14 +16,14 @@ import Ability from '@ohos.application.Ability'
import commonEvent from '@ohos.commonEvent'
function PublishCallBackOne() {
console.debug("====>Publish CallBack ACTS_DoAbilityForeground_0300_Event====>");
globalThis.abilityContext.terminateSelf().then(()=>{
globalThis.abilityContextMainAbility3.terminateSelf().then(()=>{
console.debug("====>MainAbility3 terminateSelf====>");
});
}
export default class MainAbility3 extends Ability {
onCreate(want, launchParam) {
console.log("[Demo] MainAbility3 onCreate")
globalThis.abilityContext = this.context
globalThis.abilityContextMainAbility3 = this.context
}
onDestroy() {
......
......@@ -20,7 +20,7 @@ function PublishCallBackOne() {
export default class MainAbility5 extends Ability {
onCreate(want, launchParam) {
console.log("[Demo] MainAbility5 onCreate")
globalThis.abilityContext = this.context
globalThis.abilityContextMainAility5 = this.context
setTimeout(()=> {
commonEvent.publish("ACTS_DoAbility_Event", PublishCallBackOne);
}, 500)
......
......@@ -19,7 +19,7 @@ var subscriberInfo_MainAbility = {
events: ["ACTS_DoAbility_Event"]
};
var mainability
const START_ABILITY_TIMEOUT = 4000;
const START_ABILITY_TIMEOUT = 10000;
const START_ABILITY_TIMEOUT_TWO_THOUSAND = 2000;
const START_ABILITY_TIMEOUT_THOUSAND = 1000;
export default function abilityTest() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册