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

!8541 适配801错误码。需要XTS同步适配

Merge pull request !8541 from 姚翠/OpenHarmony-3.2-Release
......@@ -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');
})
......
......@@ -162,7 +162,11 @@ export default function windowRefactorInterfaceTest(context, windowStage, abilit
}
}).catch(err => {
console.info('setWindowSystemBarPropertiesTest1 error : ' + JSON.stringify(err));
expect().assertFail()
if(err.code==801){
expect(TRUE_FLAG).assertTrue();
} else {
expect().assertFail()
}
done();
})
}
......@@ -272,7 +276,11 @@ export default function windowRefactorInterfaceTest(context, windowStage, abilit
}
}).catch(err => {
console.info('setWindowSystemBarPropertiesTest2 error : ' + JSON.stringify(err));
expect().assertFail()
if(err.code==801){
expect(TRUE_FLAG).assertTrue();
} else {
expect().assertFail()
}
done();
})
}
......@@ -352,7 +360,11 @@ export default function windowRefactorInterfaceTest(context, windowStage, abilit
}
}).catch(err => {
console.info('setWindowSystemBarPropertiesTest3 error : ' + JSON.stringify(err));
expect().assertFail()
if(err.code==801){
expect(TRUE_FLAG).assertTrue();
} else {
expect().assertFail()
}
done();
})
}
......@@ -377,14 +389,21 @@ export default function windowRefactorInterfaceTest(context, windowStage, abilit
try {
tempWnd.setWindowSystemBarProperties(SystemBarProperties, (err) => {
console.info('Succeeded in setting the system bar properties.' + JSON.stringify(err));
if (err.code) {
if (err.code && err.code!==801) {
try {
expect(err.code).assertEqual(401);
} catch (error) {
console.info(`tempWnd.setWindowSystemBarProperties catch error: ${JSON.stringify(error)}`)
}
done()
} else {
} else if(err.code && err.code==801){
try {
expect(TRUE_FLAG).assertTrue();
} catch (error) {
console.info(`tempWnd.setWindowSystemBarProperties catch error: ${JSON.stringify(error)}`)
}
done();
}else {
console.info('Succeeded in setting the system bar properties.');
try {
expect(TRUE_FLAG).assertTrue();
......@@ -396,8 +415,13 @@ export default function windowRefactorInterfaceTest(context, windowStage, abilit
});
} catch (exception) {
console.error('Failed to set the system bar properties. Cause: ' + JSON.stringify(exception));
expect(exception.code).assertEqual(401);
done()
if(exception.code && exception.code==801){
expect(TRUE_FLAG).assertTrue();
done()
} else {
expect(exception.code).assertEqual(401);
done()
}
}
;
})
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册