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

!8403 优化用例listenerTest1

Merge pull request !8403 from 姚翠/master
......@@ -132,6 +132,8 @@ export default function windowPromiseTest(context, windowStage, abilityStorage)
console.log(msgStr + 'tempWnd.on systemAvoidAreaChange, listenerOnFlag : ' + JSON.stringify(listenerOnFlag));
if (listenerOnFlag) {
expect(!!avoidAreaData).assertTrue();
tempWnd.off('systemAvoidAreaChange');
done();
}
})
expect(!!tempWnd).assertTrue();
......@@ -147,15 +149,11 @@ export default function windowPromiseTest(context, windowStage, abilityStorage)
unexpectedError(err, caseName, 'tempWnd.setSystemBarEnable([])', done);
});
console.log(msgStr + 'tempWnd.setSystemBarEnable([]) success');
console.log(msgStr + 'tempWnd.on systemAvoidAreaChange finished');
listenerOnFlag = true;
await sleep(1000);
await tempWnd.setSystemBarEnable(['status', 'navigation']).catch((err) => {
unexpectedError(err, caseName, 'tempWnd.setSystemBarEnable([status, navigation])', done);
});
await tempWnd.off('systemAvoidAreaChange');
done();
console.log(msgStr + 'tempWnd.setSystemBarEnable([status, navigation]) success');
})
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册