提交 e5b222d0 编写于 作者: Y yaocui

update

Signed-off-by: Nyaocui <yaocui2@h-partners.com>
上级 d661dc77
......@@ -730,13 +730,14 @@ export default function windowCallbackTest(context, windowStage, abilityStorage)
function setSystemBarPropertiesFun(tempWnd, systemBarProperties) {
return new Promise((resolve, reject) => {
tempWnd.setSystemBarProperties(systemBarProperties, (err) => {
tempWnd.setSystemBarProperties(systemBarProperties, (err, data) => {
if (err && err.code) {
reject(err)
reject(null)
} else {
console.log(msgStr + 'tempWnd.setSystemBarProperties ' + JSON.stringify(systemBarProperties) + ' success');
resolve(true)
}
})
})
}
......@@ -761,10 +762,8 @@ export default function windowCallbackTest(context, windowStage, abilityStorage)
};
await setSystemBarPropertiesFun(tempWnd, systemBarProperties).catch((err) => {
console.info(msgStr + 'setSystemBarProperties error : ' + JSON.stringify(err));
if(err.code!==801){
expect().assertFail();
done();
}
expect().assertFail();
done();
});
}
done();
......@@ -908,7 +907,7 @@ export default function windowCallbackTest(context, windowStage, abilityStorage)
tempWnd.setSystemBarProperties(systemBarProperties, (err, data) => {
console.log(msgStr + 'tempWnd.setSystemBarProperties err' + JSON.stringify(err));
console.log(msgStr + 'tempWnd.setSystemBarProperties data' + JSON.stringify(data));
if (err.code && err.code!==801) {
if (err && err.code) {
try {
expect(TRUE_FLAG).assertFail();
} catch (error) {
......@@ -1004,7 +1003,7 @@ export default function windowCallbackTest(context, windowStage, abilityStorage)
tempWnd.setSystemBarProperties(systemBarProperties, (err, data) => {
console.log(msgStr + 'tempWnd.setSystemBarProperties err' + JSON.stringify(err));
console.log(msgStr + 'tempWnd.setSystemBarProperties data' + JSON.stringify(data));
if (err.code && err.code!==801) {
if (err && err.code) {
try {
expect(TRUE_FLAG).assertFail();
} catch (error) {
......
......@@ -774,10 +774,7 @@ export default function windowPromiseTest(context, windowStage, abilityStorage)
console.log(msgStr + 'tempWnd.setSystemBarProperties ' + tempColor + ' success');
}, (err) => {
console.log(msgStr + 'tempWnd.setSystemBarProperties failed, err : ' + JSON.stringify(err));
if(err.code!==801){
expect(TRUE_FLAG).assertFail();
done();
}
expect(TRUE_FLAG).assertFail();
})
}
})
......@@ -875,10 +872,7 @@ export default function windowPromiseTest(context, windowStage, abilityStorage)
console.log(msgStr + 'tempWnd.setSystemBarProperties ' + tempColor + ' success');
}, (err) => {
console.log(msgStr + 'tempWnd.setSystemBarProperties failed, err : ' + JSON.stringify(err));
if(err.code!==801){
expect(TRUE_FLAG).assertFail();
done();
}
expect(TRUE_FLAG).assertFail();
})
}
})
......@@ -953,10 +947,8 @@ export default function windowPromiseTest(context, windowStage, abilityStorage)
console.log(msgStr + 'tempWnd.setSystemBarProperties ' + tempColor + ' success');
}, (err) => {
console.log(msgStr + 'tempWnd.setSystemBarProperties failed, err : ' + JSON.stringify(err));
if(err.code!==801){
expect(TRUE_FLAG).assertFail();
done();
}
expect(TRUE_FLAG).assertFail();
done();
})
}
})
......
......@@ -162,10 +162,12 @@ export default function windowRefactorInterfaceTest(context, windowStage, abilit
}
}).catch(err => {
console.info('setWindowSystemBarPropertiesTest1 error : ' + JSON.stringify(err));
if(err.code!==801){
if(err.code==801){
expect(TRUE_FLAG).assertTrue();
} else {
expect().assertFail()
done();
}
done();
})
}
})
......@@ -274,10 +276,12 @@ export default function windowRefactorInterfaceTest(context, windowStage, abilit
}
}).catch(err => {
console.info('setWindowSystemBarPropertiesTest2 error : ' + JSON.stringify(err));
if(err.code!==801){
if(err.code==801){
expect(TRUE_FLAG).assertTrue();
} else {
expect().assertFail()
done();
}
done();
})
}
})
......@@ -356,10 +360,12 @@ export default function windowRefactorInterfaceTest(context, windowStage, abilit
}
}).catch(err => {
console.info('setWindowSystemBarPropertiesTest3 error : ' + JSON.stringify(err));
if(err.code!==801){
if(err.code==801){
expect(TRUE_FLAG).assertTrue();
} else {
expect().assertFail()
done();
}
done();
})
}
})
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册