提交 200aff23 编写于 作者: C chensi10 提交者: Gitee

Merge branch 'master' of gitee.com:openharmony/xts_acts into master

Signed-off-by: Nchensi10 <chensi52@huawei.com>
此差异已折叠。
......@@ -22,6 +22,8 @@ ohos_js_hap_suite("ActsCallDataAbilityTest") {
ets2abc = true
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsCallDataAbilityTest"
subsystem_name = "ability"
part_name = "ability_runtime"
}
ohos_js_assets("actscalldataabilitytest_ets_assets") {
source_dir = "./entry/src/main/ets"
......
......@@ -32,7 +32,7 @@ export default function abilityTest() {
/*
* @tc.number: ACTS_requestDialog_0100
* @tc.name: Start Recent Ability with no permission.
* @tc.name: Start Recent Ability with no callback.
* @tc.desc: reguest dialog service
*/
it('ACTS_requestDialog_0100', 0, async function (done) {
......@@ -66,11 +66,11 @@ export default function abilityTest() {
subscriber = data;
commonEvent.subscribe(subscriber, subscribeCallBack);
try {
await globalThis.abilityContext.requestDialogService(
globalThis.abilityContext.requestDialogService(
{
bundleName: 'com.acts.example.requestdialog',
abilityName: 'com.acts.example.requestdialog.MainAbility2',
}).then((data) => {
}, (data) => {
console.info("====>ACTS_requestDialog_0100 request end + data:" + JSON.stringify(data));
resultCode = data.result;
})
......@@ -91,5 +91,67 @@ export default function abilityTest() {
id = setTimeout(timeout, CASE_TIMEOUT);
console.log('Start ACTS_requestDialog_0100 timer id : ' + id);
})
/*
* @tc.number: ACTS_requestDialog_0200
* @tc.name: Start Recent Ability with no permission.
* @tc.desc: reguest dialog service
*/
it('ACTS_requestDialog_0200', 0, async function (done) {
console.log('ACTS_requestDialog_0200====<begin');
var subscriber;
let id;
let resultCode;
async function subscribeCallBack(err, data) {
console.info("====>ACTS_requestDialog_0200 Subscribe CallBack data:====>" + JSON.stringify(data));
async function processInfoCheck(data) {
console.info('====> ACTS_requestDialog_0200 processInfoCheck=====>');
expect(globalThis.requestDialogSuccess).assertTrue();
expect(globalThis.validRequestInfo).assertTrue();
expect(globalThis.validRequestCallback).assertTrue();
commonEvent.unsubscribe(subscriber, unSubscribeCallback);
done();
}
if (data.event == "ACTS_REQUEST_DIALOG_EVENT1") {
console.info('====> ACTS_requestDialog_0200 ACTS_StartAbility_CommonEvent1 success=====>');
await sleep(500);
processInfoCheck(data);
}
}
commonEvent.createSubscriber(subscriberInfo).then(async (data) => {
console.info("====>ACTS_requestDialog_0200 Create Subscriber====>");
subscriber = data;
commonEvent.subscribe(subscriber, subscribeCallBack);
try {
await globalThis.abilityContext.requestDialogService(
{
bundleName: 'com.acts.example.requestdialog',
abilityName: 'com.acts.example.requestdialog.MainAbility2',
}).then((data) => {
console.info("====>ACTS_requestDialog_0200 request end + data:" + JSON.stringify(data));
resultCode = data.result;
})
} catch (paramError) {
console.info("====>ACTS_requestDialog_0200 requestDialogSerivce paramError====>");
}
})
function unSubscribeCallback() {
console.info("====>UnSubscribe0200 CallBack====>");
}
function timeout() {
console.log('ACTS_requestDialog_0200 timeout.');
done();
}
id = setTimeout(timeout, CASE_TIMEOUT);
console.log('Start ACTS_requestDialog_0200 timer id : ' + id);
})
})
}
\ No newline at end of file
#wrapper {
flex-direction: column;
}
#div1 {
width: 100%;
height: 100%;
justify-content: center;
align-items: center;
background-color: white;
}
#text1 {
height: 45px;
width: 150px;
font-size: 16px;
text-align: center;
}
<div>
<div id="wrapper">
<div id="div1">
<text id="text1">{{title}}</text>
</div>
</div>
</div>
\ No newline at end of file
#wrapper {
flex-direction: column;
}
#div1 {
width: 100%;
height: 100%;
justify-content: center;
align-items: center;
background-color: white;
}
#text1 {
height: 45px;
width: 150px;
font-size: 16px;
text-align: center;
}
<div>
<div id="wrapper">
<div id="div1">
<text id="text1">{{title}}</text>
</div>
</div>
</div>
\ No newline at end of file
#wrapper {
flex-direction: column;
}
#div1 {
width: 100%;
height: 100%;
justify-content: center;
align-items: center;
background-color: white;
}
#text1 {
height: 45px;
width: 150px;
font-size: 16px;
text-align: center;
}
<div>
<div id="wrapper">
<div id="div1">
<text id="text1">{{title}}</text>
</div>
</div>
</div>
\ No newline at end of file
<div>
<div id="wrapper">
<div id="div1">
<text id="text1">{{title}}</text>
</div>
</div>
</div>
\ No newline at end of file
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册