Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
13293b59
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看板
未验证
提交
13293b59
编写于
8月 26, 2022
作者:
O
openharmony_ci
提交者:
Gitee
8月 26, 2022
浏览文件
操作
浏览文件
下载
差异文件
!5235 xts失败用例适配
Merge pull request !5235 from chengxingzhen/master
上级
dff56900
b8b88fb3
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
12 addition
and
8 deletion
+12
-8
ability/ability_runtime/apitest/entry/src/main/ets/MainAbility2/MainAbility2.ts
...e/apitest/entry/src/main/ets/MainAbility2/MainAbility2.ts
+8
-4
ability/ability_runtime/apitest/entry/src/main/ets/MainAbility3/MainAbility3.ts
...e/apitest/entry/src/main/ets/MainAbility3/MainAbility3.ts
+2
-2
ability/ability_runtime/apitest/entry/src/main/ets/MainAbility5/MainAbility5.ts
...e/apitest/entry/src/main/ets/MainAbility5/MainAbility5.ts
+1
-1
ability/ability_runtime/apitest/entry/src/main/ets/test/Ability.test.ets
..._runtime/apitest/entry/src/main/ets/test/Ability.test.ets
+1
-1
未找到文件。
ability/ability_runtime/apitest/entry/src/main/ets/MainAbility2/MainAbility2.ts
浏览文件 @
13293b59
...
...
@@ -17,14 +17,14 @@ import commonEvent from '@ohos.commonEvent'
function
PublishCallBackOne
()
{
console
.
debug
(
"
====>Publish CallBack ACTS_DoAbilityForeground_0100_Event====>
"
);
setTimeout
(()
=>
{
globalThis
.
abilityContext
.
terminateSelf
();
globalThis
.
abilityContext
MainAbility2
.
terminateSelf
();
console
.
debug
(
"
====>MainAbility2 terminateSelf succese====>
"
)
},
2
000
)
},
5
000
)
}
export
default
class
MainAbility2
extends
Ability
{
onCreate
(
want
,
launchParam
)
{
console
.
log
(
"
[Demo] MainAbility2 onCreate
"
)
globalThis
.
abilityContext
=
this
.
context
globalThis
.
abilityContext
MainAbility2
=
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
()
{
...
...
ability/ability_runtime/apitest/entry/src/main/ets/MainAbility3/MainAbility3.ts
浏览文件 @
13293b59
...
...
@@ -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
.
abilityContext
MainAbility3
.
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
.
abilityContext
MainAbility3
=
this
.
context
}
onDestroy
()
{
...
...
ability/ability_runtime/apitest/entry/src/main/ets/MainAbility5/MainAbility5.ts
浏览文件 @
13293b59
...
...
@@ -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
.
abilityContext
MainAility5
=
this
.
context
setTimeout
(()
=>
{
commonEvent
.
publish
(
"
ACTS_DoAbility_Event
"
,
PublishCallBackOne
);
},
500
)
...
...
ability/ability_runtime/apitest/entry/src/main/ets/test/Ability.test.ets
浏览文件 @
13293b59
...
...
@@ -19,7 +19,7 @@ var subscriberInfo_MainAbility = {
events: ["ACTS_DoAbility_Event"]
};
var mainability
const START_ABILITY_TIMEOUT =
4
000;
const START_ABILITY_TIMEOUT =
10
000;
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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录