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

!3108 Modify use case

Merge pull request !3108 from 火箭龟/master_0505
...@@ -170,9 +170,9 @@ describe("TransientTaskJsTest", function () { ...@@ -170,9 +170,9 @@ describe("TransientTaskJsTest", function () {
console.info('----------------------TransientTaskJsTest005---------------------------'); console.info('----------------------TransientTaskJsTest005---------------------------');
function callback() {} function callback() {}
let info = backgroundTaskManager.requestSuspendDelay("test", callback); let info = backgroundTaskManager.requestSuspendDelay("test", callback);
if (info.actualDealyTime != -1) { if (info.actualDelayTime != -1) {
console.info('TransientTaskJsTest005 backgroundTaskManager success, actualDealyTime:' + console.info('TransientTaskJsTest005 backgroundTaskManager success, actualDelayTime:' +
info.actualDealyTime); info.actualDelayTime);
expect(true).assertTrue(); expect(true).assertTrue();
backgroundTaskManager.cancelSuspendDelay(info.requestId) backgroundTaskManager.cancelSuspendDelay(info.requestId)
} else { } else {
...@@ -183,7 +183,7 @@ describe("TransientTaskJsTest", function () { ...@@ -183,7 +183,7 @@ describe("TransientTaskJsTest", function () {
/* /*
* @tc.name: TransientTaskJsTest006 * @tc.name: TransientTaskJsTest006
* @tc.desc: test DelaySuspendInfo actualDealyTime * @tc.desc: test DelaySuspendInfo actualDelayTime
* @tc.type: FUNC * @tc.type: FUNC
* @tc.require: * @tc.require:
*/ */
...@@ -192,8 +192,8 @@ describe("TransientTaskJsTest", function () { ...@@ -192,8 +192,8 @@ describe("TransientTaskJsTest", function () {
function callback() {} function callback() {}
let info = backgroundTaskManager.requestSuspendDelay("123456", callback); let info = backgroundTaskManager.requestSuspendDelay("123456", callback);
if (info.requestId != -1) { if (info.requestId != -1) {
console.info('TransientTaskJsTest006 DelaySuspendInfo actualDealyTime:' + console.info('TransientTaskJsTest006 DelaySuspendInfo actualDelayTime:' +
info.actualDealyTime); info.actualDelayTime);
backgroundTaskManager.cancelSuspendDelay(info.requestId); backgroundTaskManager.cancelSuspendDelay(info.requestId);
expect(true).assertTrue(); expect(true).assertTrue();
} else { } else {
......
...@@ -2344,7 +2344,7 @@ describe("DeviceUsageStatisticsJsTest", function () { ...@@ -2344,7 +2344,7 @@ describe("DeviceUsageStatisticsJsTest", function () {
/* /*
* @tc.name: DeviceUsageStatisticsJsTest096 * @tc.name: DeviceUsageStatisticsJsTest096
* @tc.desc: test bundleState getRecentlyUsedModules BundleActiveFormInfo formId promise. * @tc.desc: test bundleState getRecentlyUsedModules BundleActiveFormInfo count promise.
* @tc.type: FUNC * @tc.type: FUNC
* @tc.require: * @tc.require:
*/ */
...@@ -2354,10 +2354,10 @@ describe("DeviceUsageStatisticsJsTest", function () { ...@@ -2354,10 +2354,10 @@ describe("DeviceUsageStatisticsJsTest", function () {
console.info('test bundle DeviceUsageStatisticsJsTest096 promise success'); console.info('test bundle DeviceUsageStatisticsJsTest096 promise success');
let BundleActiveFormInfo = res[0].formRecords; let BundleActiveFormInfo = res[0].formRecords;
if(BundleActiveFormInfo.length === 0) { if(BundleActiveFormInfo.length === 0) {
BundleActiveFormInfo = [{ formId: 'formId'}]; BundleActiveFormInfo = [{ count: 'count'}];
} }
console.info('test bundle promise BundleActiveFormInfo formId: ' + console.info('test bundle promise BundleActiveFormInfo count: ' +
BundleActiveFormInfo[0].formId); BundleActiveFormInfo[0].count);
expect(BundleActiveFormInfo).assertInstanceOf('Array'); expect(BundleActiveFormInfo).assertInstanceOf('Array');
}).catch((err) => { }).catch((err) => {
console.info('test bundle DeviceUsageStatisticsJsTest096 promise failed, because: ' + console.info('test bundle DeviceUsageStatisticsJsTest096 promise failed, because: ' +
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册