Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
5f9e6b6c
D
Docs
项目概览
OpenHarmony
/
Docs
大约 1 年 前同步成功
通知
159
Star
292
Fork
28
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
Docs
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
5f9e6b6c
编写于
3月 14, 2022
作者:
N
njupthan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Update md file
Signed-off-by:
N
njupthan
<
hanhaibin@huawei.com
>
上级
17d4a870
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
59 addition
and
68 deletion
+59
-68
zh-cn/application-dev/reference/apis/js-apis-abilityDelegatorRegistry.md
...on-dev/reference/apis/js-apis-abilityDelegatorRegistry.md
+3
-3
zh-cn/application-dev/reference/apis/js-apis-application-abilityDelegator.md
...ev/reference/apis/js-apis-application-abilityDelegator.md
+56
-56
zh-cn/application-dev/reference/apis/js-apis-testRunner.md
zh-cn/application-dev/reference/apis/js-apis-testRunner.md
+0
-9
未找到文件。
zh-cn/application-dev/reference/apis/js-apis-abilityDelegatorRegistry.md
浏览文件 @
5f9e6b6c
...
...
@@ -72,7 +72,7 @@ getArguments(): AbilityDelegatorArgs
```
js
var
args
=
AbilityDelegatorRegistry
.
getArguments
();
console
.
info
(
"
=========>getArguments==========>
bundleName:
"
+
args
.
bundleName
);
console
.
info
(
"
=========>getArguments==========>
testCaseNames:
"
+
args
.
testCaseNames
);
console
.
info
(
"
=========>getArguments==========>
testRunnerClassName:
"
+
args
.
testRunnerClassName
);
console
.
info
(
"
getArguments
bundleName:
"
+
args
.
bundleName
);
console
.
info
(
"
getArguments
testCaseNames:
"
+
args
.
testCaseNames
);
console
.
info
(
"
getArguments
testRunnerClassName:
"
+
args
.
testRunnerClassName
);
```
zh-cn/application-dev/reference/apis/js-apis-application-abilityDelegator.md
浏览文件 @
5f9e6b6c
...
...
@@ -34,18 +34,18 @@ addAbilityMonitor(monitor: AbilityMonitor, callback: AsyncCallback\<void>): void
```
js
var
abilityDelegator
;
function
onAbilityCreateCallback
(
err
)
{
console
.
info
(
"
==========================>onAbilityCreateCallback=======================>
"
);
function
onAbilityCreateCallback
()
{
console
.
info
(
"
onAbilityCreateCallback
"
);
}
var
monitor
=
{
abilityName
:
"
abilityname
"
,
onAbilityCreate
:
onAbilityCreateCallback
abilityName
:
"
abilityname
"
,
onAbilityCreate
:
onAbilityCreateCallback
}
abilityDelegator
=
AbilityDelegatorRegistry
.
getAbilityDelegator
();
abilityDelegator
.
addAbilityMonitor
(
monitor
,
(
err
)
=>
{
console
.
info
(
"
==========================>AddAbilityMonitorCallback=======================>
"
);
console
.
info
(
"
addAbilityMonitor callback
"
);
});
```
...
...
@@ -76,18 +76,18 @@ addAbilityMonitor(monitor: AbilityMonitor): Promise\<void>
```
js
var
abilityDelegator
;
function
onAbilityCreateCallback
(
err
)
{
console
.
info
(
"
==========================>onAbilityCreateCallback=======================>
"
);
function
onAbilityCreateCallback
()
{
console
.
info
(
"
onAbilityCreateCallback
"
);
}
var
monitor
=
{
abilityName
:
"
abilityname
"
,
onAbilityCreate
:
onAbilityCreateCallback
abilityName
:
"
abilityname
"
,
onAbilityCreate
:
onAbilityCreateCallback
}
abilityDelegator
=
AbilityDelegatorRegistry
.
getAbilityDelegator
();
abilityDelegator
.
addAbilityMonitor
(
monitor
).
then
((
void
)
=>
{
console
.
info
(
"
==========================>AddAbilityMonitor Promise=======================>
"
);
console
.
info
(
"
addAbilityMonitor promise
"
);
});
```
...
...
@@ -113,18 +113,18 @@ removeAbilityMonitor(monitor: AbilityMonitor, callback: AsyncCallback\<void>): v
```
js
var
abilityDelegator
;
function
onAbilityCreateCallback
(
err
)
{
console
.
info
(
"
==========================>onAbilityCreateCallback=======================>
"
);
function
onAbilityCreateCallback
()
{
console
.
info
(
"
onAbilityCreateCallback
"
);
}
var
monitor
=
{
abilityName
:
"
abilityname
"
,
onAbilityCreate
:
onAbilityCreateCallback
abilityName
:
"
abilityname
"
,
onAbilityCreate
:
onAbilityCreateCallback
}
abilityDelegator
=
AbilityDelegatorRegistry
.
getAbilityDelegator
();
abilityDelegator
.
removeAbilityMonitor
(
monitor
,
(
err
)
=>
{
console
.
info
(
"
==========================>removeAbilityMonitorCallback=======================>
"
);
console
.
info
(
"
removeAbilityMonitor callback
"
);
});
```
...
...
@@ -155,18 +155,18 @@ removeAbilityMonitor(monitor: AbilityMonitor): Promise\<void>
```
js
var
abilityDelegator
;
function
onAbilityCreateCallback
(
err
)
{
console
.
info
(
"
==========================>onAbilityCreateCallback=======================>
"
);
function
onAbilityCreateCallback
()
{
console
.
info
(
"
onAbilityCreateCallback
"
);
}
var
monitor
=
{
abilityName
:
"
abilityname
"
,
onAbilityCreate
:
onAbilityCreateCallback
abilityName
:
"
abilityname
"
,
onAbilityCreate
:
onAbilityCreateCallback
}
abilityDelegator
=
AbilityDelegatorRegistry
.
getAbilityDelegator
();
abilityDelegator
.
removeAbilityMonitor
(
monitor
).
then
((
void
)
=>
{
console
.
info
(
"
==========================>removeAbilityMonitor Promise=======================>
"
);
console
.
info
(
"
removeAbilityMonitor promise
"
);
});
```
...
...
@@ -192,18 +192,18 @@ waitAbilityMonitor(monitor: AbilityMonitor, callback: AsyncCallback\<Ability>):
```
js
var
abilityDelegator
;
function
onAbilityCreateCallback
(
err
)
{
console
.
info
(
"
==========================>onAbilityCreateCallback=======================>
"
);
function
onAbilityCreateCallback
()
{
console
.
info
(
"
onAbilityCreateCallback
"
);
}
var
monitor
=
{
abilityName
:
"
abilityname
"
,
onAbilityCreate
:
onAbilityCreateCallback
abilityName
:
"
abilityname
"
,
onAbilityCreate
:
onAbilityCreateCallback
}
abilityDelegator
=
AbilityDelegatorRegistry
.
getAbilityDelegator
();
abilityDelegator
.
waitAbilityMonitor
(
monitor
,
(
err
,
data
)
=>
{
console
.
info
(
"
==========================>waitAbilityMonitorCallback=======================>
"
);
console
.
info
(
"
waitAbilityMonitor callback
"
);
});
```
...
...
@@ -231,18 +231,18 @@ waitAbilityMonitor(monitor: AbilityMonitor, timeout: number, callback: AsyncCall
var
abilityDelegator
;
var
timeout
=
100
;
function
onAbilityCreateCallback
(
err
)
{
console
.
info
(
"
==========================>onAbilityCreateCallback=======================>
"
);
function
onAbilityCreateCallback
()
{
console
.
info
(
"
onAbilityCreateCallback
"
);
}
var
monitor
=
{
abilityName
:
"
abilityname
"
,
onAbilityCreate
:
onAbilityCreateCallback
abilityName
:
"
abilityname
"
,
onAbilityCreate
:
onAbilityCreateCallback
}
abilityDelegator
=
AbilityDelegatorRegistry
.
getAbilityDelegator
();
abilityDelegator
.
waitAbilityMonitor
(
monitor
,
timeout
,
(
err
,
data
)
=>
{
console
.
info
(
"
==========================>waitAbilityMonitorCallback=======================>
"
);
console
.
info
(
"
waitAbilityMonitor callback
"
);
});
```
...
...
@@ -274,18 +274,18 @@ waitAbilityMonitor(monitor: AbilityMonitor, timeout?: number): Promise\<Ability>
```
js
var
abilityDelegator
;
function
onAbilityCreateCallback
(
err
)
{
console
.
info
(
"
==========================>onAbilityCreateCallback=======================>
"
);
function
onAbilityCreateCallback
()
{
console
.
info
(
"
onAbilityCreateCallback
"
);
}
var
monitor
=
{
abilityName
:
"
abilityname
"
,
onAbilityCreate
:
onAbilityCreateCallback
abilityName
:
"
abilityname
"
,
onAbilityCreate
:
onAbilityCreateCallback
}
abilityDelegator
=
AbilityDelegatorRegistry
.
getAbilityDelegator
();
abilityDelegator
.
waitAbilityMonitor
(
monitor
).
then
((
data
)
=>
{
console
.
info
(
"
==========================>waitAbilityMonitor Promise=======================>
"
);
console
.
info
(
"
waitAbilityMonitor promise
"
);
});
```
...
...
@@ -344,10 +344,10 @@ var ability;
abilityDelegator
=
AbilityDelegatorRegistry
.
getAbilityDelegator
();
abilityDelegator
.
getCurrentTopAbility
((
err
,
data
)
=>
{
console
.
info
(
"
==========================>GetCurrentTopCallBack=======================>
"
);
console
.
info
(
"
getCurrentTopAbility callback
"
);
ability
=
data
;
var
state
=
abilityDelegator
.
getAbilityState
(
ability
);
console
.
info
(
"
==========================>getAbilityState=======================>
"
+
state
);
console
.
info
(
"
getAbilityState
"
+
state
);
});
```
...
...
@@ -375,7 +375,7 @@ var ability;
abilityDelegator
=
AbilityDelegatorRegistry
.
getAbilityDelegator
();
abilityDelegator
.
getCurrentTopAbility
((
err
,
data
)
=>
{
console
.
info
(
"
==========================>GetCurrentTopCallBack=======================>
"
);
console
.
info
(
"
getCurrentTopAbility callback
"
);
ability
=
data
;
});
```
...
...
@@ -404,8 +404,8 @@ var ability;
abilityDelegator
=
AbilityDelegatorRegistry
.
getAbilityDelegator
();
abilityDelegator
.
getCurrentTopAbility
().
then
((
data
)
=>
{
console
.
info
(
"
==========================>getCurrentTopAbility Promise=======================>
"
);
ability
=
data
;
console
.
info
(
"
getCurrentTopAbility promise
"
);
ability
=
data
;
});
```
...
...
@@ -437,7 +437,7 @@ var want = {
abilityDelegator
=
AbilityDelegatorRegistry
.
getAbilityDelegator
();
abilityDelegator
.
startAbility
(
want
,
(
err
,
data
)
=>
{
console
.
info
(
"
==========================>StartAbilityCallBack=======================>
"
);
console
.
info
(
"
startAbility callback
"
);
});
```
...
...
@@ -474,7 +474,7 @@ var want = {
abilityDelegator
=
AbilityDelegatorRegistry
.
getAbilityDelegator
();
abilityDelegator
.
startAbility
(
want
).
then
((
data
)
=>
{
console
.
info
(
"
==========================>startAbility Promise=======================>
"
);
console
.
info
(
"
startAbility promise
"
);
});
```
...
...
@@ -503,11 +503,11 @@ var ability;
abilityDelegator
=
AbilityDelegatorRegistry
.
getAbilityDelegator
();
abilityDelegator
.
getCurrentTopAbility
((
err
,
data
)
=>
{
console
.
info
(
"
==========================>GetCurrentTopCallBack=======================>
"
);
console
.
info
(
"
getCurrentTopAbility callback
"
);
ability
=
data
;
abilityDelegator
.
doAbilityForeground
(
ability
,
(
err
,
data
)
=>
{
console
.
info
(
"
==========================>DoAbilityForegroundCallBack=======================>
"
);
});
console
.
info
(
"
doAbilityForeground callback
"
);
});
});
```
...
...
@@ -541,10 +541,10 @@ var ability;
abilityDelegator
=
AbilityDelegatorRegistry
.
getAbilityDelegator
();
abilityDelegator
.
getCurrentTopAbility
((
err
,
data
)
=>
{
console
.
info
(
"
==========================>GetCurrentTopCallBack=======================>
"
);
console
.
info
(
"
getCurrentTopAbility callback
"
);
ability
=
data
;
abilityDelegator
.
doAbilityForeground
(
ability
).
then
((
data
)
=>
{
console
.
info
(
"
==========================>doAbilityForeground Promise=======================>
"
);
console
.
info
(
"
doAbilityForeground promise
"
);
});
});
```
...
...
@@ -574,10 +574,10 @@ var ability;
abilityDelegator
=
AbilityDelegatorRegistry
.
getAbilityDelegator
();
abilityDelegator
.
getCurrentTopAbility
((
err
,
data
)
=>
{
console
.
info
(
"
==========================>GetCurrentTopCallBack=======================>
"
);
console
.
info
(
"
getCurrentTopAbility callback
"
);
ability
=
data
;
abilityDelegator
.
doAbilityBackground
(
ability
,
(
err
,
data
)
=>
{
console
.
info
(
"
==========================>DoAbilityBackgroundCallBack=======================>
"
);
console
.
info
(
"
doAbilityBackground callback
"
);
});
});
```
...
...
@@ -612,10 +612,10 @@ var ability;
abilityDelegator
=
AbilityDelegatorRegistry
.
getAbilityDelegator
();
abilityDelegator
.
getCurrentTopAbility
((
err
,
data
)
=>
{
console
.
info
(
"
==========================>GetCurrentTopCallBack=======================>
"
);
console
.
info
(
"
getCurrentTopAbility callback
"
);
ability
=
data
;
abilityDelegator
.
doAbilityBackground
(
ability
).
then
((
data
)
=>
{
console
.
info
(
"
==========================>doAbilityBackground Promise=======================>
"
);
console
.
info
(
"
doAbilityBackground promise
"
);
});
});
```
...
...
@@ -645,7 +645,7 @@ var msg = "msg";
abilityDelegator
=
AbilityDelegatorRegistry
.
getAbilityDelegator
();
abilityDelegator
.
print
(
msg
,
(
err
)
=>
{
console
.
info
(
"
==========================>printCallBack=======================>
"
);
console
.
info
(
"
print callback
"
);
});
```
...
...
@@ -679,7 +679,7 @@ var msg = "msg";
abilityDelegator
=
AbilityDelegatorRegistry
.
getAbilityDelegator
();
abilityDelegator
.
print
(
msg
).
then
(()
=>
{
console
.
info
(
"
==========================>print Promise=======================>
"
);
console
.
info
(
"
print promise
"
);
});
```
...
...
@@ -708,7 +708,7 @@ var cmd = "cmd";
abilityDelegator
=
AbilityDelegatorRegistry
.
getAbilityDelegator
();
abilityDelegator
.
executeShellCommand
(
cmd
,
(
err
,
data
)
=>
{
console
.
info
(
"
==========================>executeShellCommandCallBack=======================>
"
);
console
.
info
(
"
executeShellCommand callback
"
);
});
```
...
...
@@ -739,7 +739,7 @@ var timeout = 100;
abilityDelegator
=
AbilityDelegatorRegistry
.
getAbilityDelegator
();
abilityDelegator
.
executeShellCommand
(
cmd
,
timeout
,
(
err
,
data
)
=>
{
console
.
info
(
"
==========================>executeShellCommandCallBack=======================>
"
);
console
.
info
(
"
executeShellCommand callback
"
);
});
```
...
...
@@ -775,6 +775,6 @@ var timeout = 100;
abilityDelegator
=
AbilityDelegatorRegistry
.
getAbilityDelegator
();
abilityDelegator
.
executeShellCommand
(
cmd
,
timeout
).
then
((
data
)
=>
{
console
.
info
(
"
==========================>executeShellCommand Promise=======================>
"
);
console
.
info
(
"
executeShellCommand promise
"
);
});
```
zh-cn/application-dev/reference/apis/js-apis-testRunner.md
浏览文件 @
5f9e6b6c
...
...
@@ -49,12 +49,3 @@ export default class UserTestRunner extends TestRunner {
}
};
```
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录