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

!8424 getProcessRunningInformation XTS补充

Merge pull request !8424 from gongyuechen/master
......@@ -204,5 +204,41 @@ export default function stageAppContextTest(abilityContext) {
expect(result.bundleCodeDir).assertEqual("/data/storage/el1/bundle");
done();
});
/**
* @tc.number: SUB_AA_OpenHarmony_ApplicationContext_1600
* @tc.name: getProcessRunningInformation test 1
* getProcessRunningInformation test
* @tc.desc: Function test
* @tc.level 3
*/
it('SUB_AA_OpenHarmony_ApplicationContext_1600', 0, async function (done) {
let TAG = "SUB_AA_OpenHarmony_ApplicationContext_1600";
console.log(TAG + " --- start");
let context = globalThis.abilityStageContext.getApplicationContext();
context.getProcessRunningInformation().then((data) => {
console.log(TAG + " result = " + JSON.stringify(data));
expect(data[0].processName).assertEqual("com.example.stageappcontexttest");
})
done();
});
/**
* @tc.number: SUB_AA_OpenHarmony_ApplicationContext_1700
* @tc.name: getProcessRunningInformation test 2
* getProcessRunningInformation test
* @tc.desc: Function test
* @tc.level 3
*/
it('SUB_AA_OpenHarmony_ApplicationContext_1700', 0, async function (done) {
let TAG = "SUB_AA_OpenHarmony_ApplicationContext_1700";
console.log(TAG + " --- start");
let context = globalThis.abilityStageContext.getApplicationContext();
context.getProcessRunningInformation((err, data) => {
console.log(TAG + " result = " + JSON.stringify(data));
expect(data[0].processName).assertEqual("com.example.stageappcontexttest");
})
done();
});
})
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册