未验证 提交 05454dd6 编写于 作者: O openharmony_ci 提交者: Gitee

!2827 【communication】add LBS testcase

Merge pull request !2827 from 权力/cherry-pick-1648099477
...@@ -69,6 +69,7 @@ describe('bluetoothhostTest', function() { ...@@ -69,6 +69,7 @@ describe('bluetoothhostTest', function() {
let sta = bluetooth.getState(); let sta = bluetooth.getState();
switch(sta){ switch(sta){
case 0: case 0:
console.info('[bluetooth_js] bt turn off:'+ JSON.stringify(sta));
bluetooth.enableBluetooth(); bluetooth.enableBluetooth();
await sleep(3000); await sleep(3000);
break; break;
...@@ -77,9 +78,10 @@ describe('bluetoothhostTest', function() { ...@@ -77,9 +78,10 @@ describe('bluetoothhostTest', function() {
await sleep(3000); await sleep(3000);
break; break;
case 2: case 2:
console.info('[bluetooth_js] state is On:'+ JSON.stringify(sta)); console.info('[bluetooth_js] bt turn on:'+ JSON.stringify(sta));
break; break;
case 3: case 3:
console.info('[bluetooth_js] bt turning off:'+ JSON.stringify(sta));
bluetooth.enableBluetooth(); bluetooth.enableBluetooth();
await sleep(3000); await sleep(3000);
break; break;
......
...@@ -135,6 +135,7 @@ describe('bluetoothhostTest', function() { ...@@ -135,6 +135,7 @@ describe('bluetoothhostTest', function() {
let sta = bluetooth.getState(); let sta = bluetooth.getState();
switch(sta){ switch(sta){
case 0: case 0:
console.info('[bluetooth_js] bt turn off:'+ JSON.stringify(sta));
bluetooth.enableBluetooth(); bluetooth.enableBluetooth();
await sleep(3000); await sleep(3000);
break; break;
...@@ -143,9 +144,10 @@ describe('bluetoothhostTest', function() { ...@@ -143,9 +144,10 @@ describe('bluetoothhostTest', function() {
await sleep(3000); await sleep(3000);
break; break;
case 2: case 2:
console.info('[bluetooth_js] state is On:'+ JSON.stringify(sta)); console.info('[bluetooth_js] bt turn on:'+ JSON.stringify(sta));
break; break;
case 3: case 3:
console.info('[bluetooth_js] bt turning off:'+ JSON.stringify(sta));
bluetooth.enableBluetooth(); bluetooth.enableBluetooth();
await sleep(3000); await sleep(3000);
break; break;
......
...@@ -62,6 +62,7 @@ describe('bluetoothhostTest', function() { ...@@ -62,6 +62,7 @@ describe('bluetoothhostTest', function() {
let sta = bluetooth.getState(); let sta = bluetooth.getState();
switch(sta){ switch(sta){
case 0: case 0:
console.info('[bluetooth_js] bt turn off:'+ JSON.stringify(sta));
bluetooth.enableBluetooth(); bluetooth.enableBluetooth();
await sleep(3000); await sleep(3000);
break; break;
...@@ -70,9 +71,10 @@ describe('bluetoothhostTest', function() { ...@@ -70,9 +71,10 @@ describe('bluetoothhostTest', function() {
await sleep(3000); await sleep(3000);
break; break;
case 2: case 2:
console.info('[bluetooth_js] state is On:'+ JSON.stringify(sta)); console.info('[bluetooth_js] bt turn on:'+ JSON.stringify(sta));
break; break;
case 3: case 3:
console.info('[bluetooth_js] bt turning off:'+ JSON.stringify(sta));
bluetooth.enableBluetooth(); bluetooth.enableBluetooth();
await sleep(3000); await sleep(3000);
break; break;
......
...@@ -4,17 +4,19 @@ ...@@ -4,17 +4,19 @@
"vendor": "acts", "vendor": "acts",
"version": { "version": {
"code": 1000000, "code": 1000000,
"name": "1.0.0" "name": "1.0"
}, },
"apiVersion": { "apiVersion": {
"compatible": 4, "compatible": 4,
"target": 5 "target": 5,
"releaseType": "Beta1"
} }
}, },
"deviceConfig": {}, "deviceConfig": {},
"module": { "module": {
"package": "ohos.acts.location.geolocation.function", "package": "ohos.acts.location.geolocation",
"name": ".MyApplication", "name": ".MyApplication",
"mainAbility": "ohos.acts.location.geolocation.function.MainAbility",
"deviceType": [ "deviceType": [
"phone" "phone"
], ],
...@@ -25,7 +27,6 @@ ...@@ -25,7 +27,6 @@
}, },
"abilities": [ "abilities": [
{ {
"visible": true,
"skills": [ "skills": [
{ {
"entities": [ "entities": [
...@@ -36,6 +37,7 @@ ...@@ -36,6 +37,7 @@
] ]
} }
], ],
"visible": true,
"name": "ohos.acts.location.geolocation.function.MainAbility", "name": "ohos.acts.location.geolocation.function.MainAbility",
"icon": "$media:icon", "icon": "$media:icon",
"description": "$string:mainability_description", "description": "$string:mainability_description",
...@@ -44,6 +46,81 @@ ...@@ -44,6 +46,81 @@
"launchType": "standard" "launchType": "standard"
} }
], ],
"defPermissions": [
{
"availableScope": [],
"grantMode": "system_grant",
"name": "ohos.permission.ACCESS_LOCATION"
},
{
"availableScope": [],
"grantMode": "system_grant",
"name": "ohos.permission.LOCATION"
}
],
"reqPermissions": [
{
"name": "ohos.permission.LOCATION",
"reason": "need use ohos.permission.LOCATION",
"usedScene": {
"ability": [
"ohos.acts.location.geolocation.function.MainAbility"
],
"when": "inuse"
}
},
{
"name":"ohos.permission.ACCESS_LOCATION",
"reason":"need use ohos.permission.ACCESS_LOCATION",
"usedScene": {
"ability": [
"ohos.acts.location.geolocation.function.MainAbility"
],
"when": "inuse"
}
},
{
"name":"ohos.permission.LOCATION_IN_BACKGROUND",
"reason":"need use ohos.permission.LOCATION_IN_BACKGROUND",
"usedScene": {
"ability": [
"ohos.acts.location.geolocation.function.MainAbility"
],
"when": "inuse"
}
},
{
"name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED",
"reason":"need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED",
"usedScene": {
"ability": [
"ohos.acts.location.geolocation.function.MainAbility"
],
"when": "inuse"
}
},
{
"name":"ohos.permission.GET_WIFI_LOCAL_MAC",
"reason":"need use ohos.permission.GET_WIFI_LOCAL_MAC",
"usedScene": {
"ability": [
"ohos.acts.location.geolocation.function.MainAbility"
],
"when": "inuse"
}
},
{
"name":"ohos.permission.GET_WIFI_INFO_INTERNAL",
"reason":"need use ohos.permission.GET_WIFI_INFO_INTERNAL",
"usedScene": {
"ability": [
"ohos.acts.location.geolocation.function.MainAbility"
],
"when": "inuse"
}
}
],
"js": [ "js": [
{ {
"pages": [ "pages": [
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册