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

!9472 元能力api覆盖

Merge pull request !9472 from kirl75/master
......@@ -52,6 +52,15 @@ export default class MainAbility extends Ability {
console.log("[Demo] MainAbility onBackground")
}
onContinue(wantParam){
console.log("[Demo] MainAbility onContinue")
return undefined;
}
onBackPressed(){
return false
}
onConfigurationUpdate(config) {
console.log('[Demo] MainAbility onConfigurationUpdate: ' + this.context.config.language)
console.log('[Demo] MainAbility onConfigurationUpdate: ' + config.language)
......
......@@ -26,7 +26,7 @@ import abilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry
import common from '@ohos.app.ability.common';
import contextConstant from "@ohos.app.ability.contextConstant"
import wantConstant from "@ohos.app.ability.wantConstant"
import formBindingData from '@ohos.application.formBindingData';
import formBindingData from '@ohos.app.form.formBindingData';
let EXTENSION_INFO_ERR = 16000001;
let INNER_ERROR = 16000050;
......@@ -374,13 +374,13 @@ export default function ApiCoverTest() {
})
})
/*
/*
* @tc.number SUB_AA_AMS_Context_0200
* @tc.name Register the listener of Ability and cancel the listener.
* @tc.desc Function test
* @tc.level 3
*/
it('SUB_AA_AMS_Context_0200', 0, async function (done) {
it('SUB_AA_AMS_Context_0200', 0, async function (done) {
await globalThis.abilityContext.eventHub.on("contextEvent", func1)
globalThis.abilityContext.eventHub.emit("contextEvent", "aa", "bb")
await sleep(500)
......
......@@ -255,6 +255,7 @@ export default function stageAppContextTest(abilityContext) {
context.getProcessRunningInformation((err, data) => {
console.log(TAG + " result = " + JSON.stringify(data));
expect(data[0].processName).assertEqual("com.example.stageappcontexttest");
expect(typeof data[0].state).assertEqual("number");
})
done();
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册