提交 1fe82a11 编写于 作者: H hwx951322

comm1

Signed-off-by: Nhwx951322 <huangyuan39@huawei.com>
上级 8672201d
......@@ -241,7 +241,7 @@ describe('bluetoothhostTest', function() {
console.info('[bluetooth_js] BLE scan device find result1 = '+JSON.stringify(data));
except(true).assertTrue(data.length>0);
}
bluetooth.BLE.on("BLEDeviceFind")
bluetooth.BLE.on("BLEDeviceFind",onReceiveEvent)
bluetooth.BLE.startBLEScan([{}]);
await sleep(1000);
console.info('[bluetooth_js] BLE SCAN OFF01');
......
......@@ -16,7 +16,7 @@
import bluetooth from '@ohos.bluetooth';
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from '@ohos/hypium'
let hidHostProfile = bluetooth.getProfile(6);
let hidHostProfile = bluetooth.getProfileInst(6);
function on(ON_VALUE_TEST_ELEMENT) {
return new Promise((resolve, reject) => {
......@@ -109,7 +109,7 @@ describe('bluetoothhostTest_host_2', function () {
it('SUB_COMMUNACATION_bluetooth_DEVICE_JS_GET_PROFILE_LOOP_0001', 0, async function (done) {
console.info('[bluetooth_js] loop get profile start');
await tryToEnableBt();
let proFile = bluetooth.getProfile(6);
let proFile = bluetooth.getProfileInst(6);
console.info('[bluetooth_js] loop get profile result:' + JSON.stringify(proFile));
expect(proFile != null).assertEqual(true);
done();
......@@ -224,7 +224,6 @@ describe('bluetoothhostTest_host_2', function () {
done();
})
})
/**
......@@ -238,7 +237,7 @@ describe('bluetoothhostTest_host_2', function () {
it('SUB_COMMUNACATION_bluetoothble_PANProfile_Tethering_0001', 0, async function (done) {
await tryToEnableBt();
console.info('[bluetooth_js] tethering test start');
let panProfile = bluetooth.getProfile(bluetooth.ProfileId.PROFILE_PAN_NETWORK);
let panProfile = bluetooth.getProfileInst(bluetooth.ProfileId.PROFILE_PAN_NETWORK);
let ret = panProfile.setTethering(false);
console.info("[bluetooth_js] setTethering false result "+JSON.stringify(ret));
let result = panProfile.isTetheringOn();
......@@ -246,5 +245,5 @@ describe('bluetoothhostTest_host_2', function () {
expect(result).assertFalse();
done();
})
})
}
......@@ -220,12 +220,12 @@ describe('bluetoothhostTest', function() {
let scanModeResult = bluetooth.getBluetoothScanMode();
console.info('[bluetooth_js] get scan mode result2 = ' + JSON.stringify(scanModeResult));
expect(scanModeResult).assertEqual(1);
expect(true).assertTrue(ScanMode.SCAN_MODE_NONE != scanMode);
expect(true).assertTrue(ScanMode.SCAN_MODE_CONNECTABLE != scanMode);
expect(true).assertTrue(ScanMode.SCAN_MODE_GENERAL_DISCOVERABLE != scanMode);
expect(true).assertTrue(ScanMode.SCAN_MODE_LIMITED_DISCOVERABLE != scanMode);
expect(true).assertTrue(ScanMode.SCAN_MODE_CONNECTABLE_GENERAL_DISCOVERABLE != scanMode);
expect(true).assertTrue(ScanMode.SCAN_MODE_CONNECTABLE_LIMITED_DISCOVERABLE != scanMode);
expect(true).assertTrue(ScanMode.SCAN_MODE_NONE != scanModeResult);
expect(true).assertTrue(ScanMode.SCAN_MODE_CONNECTABLE != scanModeResult);
expect(true).assertTrue(ScanMode.SCAN_MODE_GENERAL_DISCOVERABLE != scanModeResult);
expect(true).assertTrue(ScanMode.SCAN_MODE_LIMITED_DISCOVERABLE != scanModeResult);
expect(true).assertTrue(ScanMode.SCAN_MODE_CONNECTABLE_GENERAL_DISCOVERABLE != scanModeResult);
expect(true).assertTrue(ScanMode.SCAN_MODE_CONNECTABLE_LIMITED_DISCOVERABLE != scanModeResult);
done();
})
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册