提交 0f11eb4f 编写于 作者: N nwn1007101 提交者: 倪钰斐
上级 4cd3a673
...@@ -39,7 +39,6 @@ async function changedLocationMode(){ ...@@ -39,7 +39,6 @@ async function changedLocationMode(){
await geolocation.requestEnableLocation().then(async(result) => { await geolocation.requestEnableLocation().then(async(result) => {
await sleep(3000); await sleep(3000);
console.info('[lbs_js] test requestEnableLocation promise result: ' + JSON.stringify(result)); console.info('[lbs_js] test requestEnableLocation promise result: ' + JSON.stringify(result));
expect(result).assertTrue();
}).catch((error) => { }).catch((error) => {
console.info("[lbs_js] promise then error." + JSON.stringify(error)); console.info("[lbs_js] promise then error." + JSON.stringify(error));
expect().assertFail(); expect().assertFail();
...@@ -47,7 +46,7 @@ async function changedLocationMode(){ ...@@ -47,7 +46,7 @@ async function changedLocationMode(){
} }
}); });
await geolocation.isLocationEnabled().then(async(result) => { await geolocation.isLocationEnabled().then(async(result) => {
console.info('[lbs_js] getLocationSwitchState result: ' + JSON.stringify(result)); console.info('[lbs_js]check LocationSwitchState result: ' + JSON.stringify(result));
}); });
} }
......
...@@ -30,7 +30,6 @@ async function changedLocationMode(){ ...@@ -30,7 +30,6 @@ async function changedLocationMode(){
await geolocation.requestEnableLocation().then(async(result) => { await geolocation.requestEnableLocation().then(async(result) => {
await sleep(3000); await sleep(3000);
console.info('[lbs_js] test requestEnableLocation promise result: ' + JSON.stringify(result)); console.info('[lbs_js] test requestEnableLocation promise result: ' + JSON.stringify(result));
expect(result).assertTrue();
}).catch((error) => { }).catch((error) => {
console.info("[lbs_js] promise then error." + JSON.stringify(error)); console.info("[lbs_js] promise then error." + JSON.stringify(error));
expect().assertFail(); expect().assertFail();
...@@ -38,7 +37,7 @@ async function changedLocationMode(){ ...@@ -38,7 +37,7 @@ async function changedLocationMode(){
} }
}); });
await geolocation.isLocationEnabled().then(async(result) => { await geolocation.isLocationEnabled().then(async(result) => {
console.info('[lbs_js] getLocationSwitchState result: ' + JSON.stringify(result)); console.info('[lbs_js] check LocationSwitchState result: ' + JSON.stringify(result));
}); });
} }
......
...@@ -38,9 +38,8 @@ async function changedLocationMode(){ ...@@ -38,9 +38,8 @@ async function changedLocationMode(){
console.info('[lbs_js] getLocationSwitchState result: ' + JSON.stringify(result)); console.info('[lbs_js] getLocationSwitchState result: ' + JSON.stringify(result));
if(!result){ if(!result){
await geolocation.requestEnableLocation().then(async(result) => { await geolocation.requestEnableLocation().then(async(result) => {
// await sleep(3000); await sleep(3000);
console.info('[lbs_js] test requestEnableLocation promise result: ' + JSON.stringify(result)); console.info('[lbs_js] test requestEnableLocation promise result: ' + JSON.stringify(result));
expect(result).assertTrue();
}).catch((error) => { }).catch((error) => {
console.info("[lbs_js] promise then error." + JSON.stringify(error)); console.info("[lbs_js] promise then error." + JSON.stringify(error));
expect().assertFail(); expect().assertFail();
...@@ -48,7 +47,7 @@ async function changedLocationMode(){ ...@@ -48,7 +47,7 @@ async function changedLocationMode(){
} }
}); });
await geolocation.isLocationEnabled().then(async(result) => { await geolocation.isLocationEnabled().then(async(result) => {
console.info('[lbs_js] getLocationSwitchState result: ' + JSON.stringify(result)); console.info('[lbs_js] check LocationSwitchState result: ' + JSON.stringify(result));
}); });
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册