提交 f618d9f2 编写于 作者: Y yaocui

update

Signed-off-by: Nyaocui <yaocui2@h-partners.com>
上级 8ee085b9
...@@ -1657,4 +1657,4 @@ export default function windowPromiseTest(context, windowStage, abilityStorage) ...@@ -1657,4 +1657,4 @@ export default function windowPromiseTest(context, windowStage, abilityStorage)
}) })
}) })
}) })
} }
\ No newline at end of file
...@@ -162,7 +162,11 @@ export default function windowRefactorInterfaceTest(context, windowStage, abilit ...@@ -162,7 +162,11 @@ export default function windowRefactorInterfaceTest(context, windowStage, abilit
} }
}).catch(err => { }).catch(err => {
console.info('setWindowSystemBarPropertiesTest1 error : ' + JSON.stringify(err)); console.info('setWindowSystemBarPropertiesTest1 error : ' + JSON.stringify(err));
expect().assertFail() if(err.code==801){
expect(TRUE_FLAG).assertTrue();
} else {
expect().assertFail()
}
done(); done();
}) })
} }
...@@ -272,7 +276,11 @@ export default function windowRefactorInterfaceTest(context, windowStage, abilit ...@@ -272,7 +276,11 @@ export default function windowRefactorInterfaceTest(context, windowStage, abilit
} }
}).catch(err => { }).catch(err => {
console.info('setWindowSystemBarPropertiesTest2 error : ' + JSON.stringify(err)); console.info('setWindowSystemBarPropertiesTest2 error : ' + JSON.stringify(err));
expect().assertFail() if(err.code==801){
expect(TRUE_FLAG).assertTrue();
} else {
expect().assertFail()
}
done(); done();
}) })
} }
...@@ -352,7 +360,11 @@ export default function windowRefactorInterfaceTest(context, windowStage, abilit ...@@ -352,7 +360,11 @@ export default function windowRefactorInterfaceTest(context, windowStage, abilit
} }
}).catch(err => { }).catch(err => {
console.info('setWindowSystemBarPropertiesTest3 error : ' + JSON.stringify(err)); console.info('setWindowSystemBarPropertiesTest3 error : ' + JSON.stringify(err));
expect().assertFail() if(err.code==801){
expect(TRUE_FLAG).assertTrue();
} else {
expect().assertFail()
}
done(); done();
}) })
} }
...@@ -377,14 +389,21 @@ export default function windowRefactorInterfaceTest(context, windowStage, abilit ...@@ -377,14 +389,21 @@ export default function windowRefactorInterfaceTest(context, windowStage, abilit
try { try {
tempWnd.setWindowSystemBarProperties(SystemBarProperties, (err) => { tempWnd.setWindowSystemBarProperties(SystemBarProperties, (err) => {
console.info('Succeeded in setting the system bar properties.' + JSON.stringify(err)); console.info('Succeeded in setting the system bar properties.' + JSON.stringify(err));
if (err.code) { if (err.code && err.code!==801) {
try { try {
expect(err.code).assertEqual(401); expect(err.code).assertEqual(401);
} catch (error) { } catch (error) {
console.info(`tempWnd.setWindowSystemBarProperties catch error: ${JSON.stringify(error)}`) console.info(`tempWnd.setWindowSystemBarProperties catch error: ${JSON.stringify(error)}`)
} }
done() 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.'); console.info('Succeeded in setting the system bar properties.');
try { try {
expect(TRUE_FLAG).assertTrue(); expect(TRUE_FLAG).assertTrue();
...@@ -396,8 +415,13 @@ export default function windowRefactorInterfaceTest(context, windowStage, abilit ...@@ -396,8 +415,13 @@ export default function windowRefactorInterfaceTest(context, windowStage, abilit
}); });
} catch (exception) { } catch (exception) {
console.error('Failed to set the system bar properties. Cause: ' + JSON.stringify(exception)); console.error('Failed to set the system bar properties. Cause: ' + JSON.stringify(exception));
expect(exception.code).assertEqual(401); if(exception.code && exception.code==801){
done() 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.
先完成此消息的编辑!
想要评论请 注册