From 5f9e6b6cd45bfb5304935faed8ea2e0ddd6e2070 Mon Sep 17 00:00:00 2001 From: njupthan Date: Mon, 14 Mar 2022 15:35:17 +0800 Subject: [PATCH] Update md file Signed-off-by: njupthan --- .../apis/js-apis-abilityDelegatorRegistry.md | 6 +- .../js-apis-application-abilityDelegator.md | 112 +++++++++--------- .../reference/apis/js-apis-testRunner.md | 9 -- 3 files changed, 59 insertions(+), 68 deletions(-) diff --git a/zh-cn/application-dev/reference/apis/js-apis-abilityDelegatorRegistry.md b/zh-cn/application-dev/reference/apis/js-apis-abilityDelegatorRegistry.md index c2b731c6fe..217dc248ae 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-abilityDelegatorRegistry.md +++ b/zh-cn/application-dev/reference/apis/js-apis-abilityDelegatorRegistry.md @@ -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); ``` diff --git a/zh-cn/application-dev/reference/apis/js-apis-application-abilityDelegator.md b/zh-cn/application-dev/reference/apis/js-apis-application-abilityDelegator.md index f45ac69bd9..95649dfab1 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-application-abilityDelegator.md +++ b/zh-cn/application-dev/reference/apis/js-apis-application-abilityDelegator.md @@ -34,18 +34,18 @@ addAbilityMonitor(monitor: AbilityMonitor, callback: AsyncCallback\): 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\ ```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\): 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\ ```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\): ```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\ ```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"); }); ``` diff --git a/zh-cn/application-dev/reference/apis/js-apis-testRunner.md b/zh-cn/application-dev/reference/apis/js-apis-testRunner.md index 931ec568a5..1af8261084 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-testRunner.md +++ b/zh-cn/application-dev/reference/apis/js-apis-testRunner.md @@ -49,12 +49,3 @@ export default class UserTestRunner extends TestRunner { } }; ``` - - - - - - - - - -- GitLab