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

!4684 【communication】beta2修改getprofile,API9增加新接口getprofileInst()

Merge pull request !4684 from 黄苑/OpenHarmony-3.2-Beta2
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
import bluetooth from '@ohos.bluetooth'; import bluetooth from '@ohos.bluetooth';
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index' import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index'
let hidHostProfile = bluetooth.getProfile(6); let hidHostProfile = bluetooth.getProfileInst(6);
function on(ON_VALUE_TEST_ELEMENT) { function on(ON_VALUE_TEST_ELEMENT) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
...@@ -108,7 +108,7 @@ describe('bluetoothhostTest_host_2', function () { ...@@ -108,7 +108,7 @@ describe('bluetoothhostTest_host_2', function () {
it('SUB_COMMUNACATION_bluetooth_DEVICE_JS_GET_PROFILE_LOOP_0001', 0, async function (done) { it('SUB_COMMUNACATION_bluetooth_DEVICE_JS_GET_PROFILE_LOOP_0001', 0, async function (done) {
console.info('[bluetooth_js] loop get profile start'); console.info('[bluetooth_js] loop get profile start');
await tryToEnableBt(); await tryToEnableBt();
let proFile = bluetooth.getProfile(6); let proFile = bluetooth.getProfileInst(6);
console.info('[bluetooth_js] loop get profile result:' + JSON.stringify(proFile)); console.info('[bluetooth_js] loop get profile result:' + JSON.stringify(proFile));
expect(proFile != null).assertEqual(true); expect(proFile != null).assertEqual(true);
done(); done();
...@@ -234,7 +234,7 @@ describe('bluetoothhostTest_host_2', function () { ...@@ -234,7 +234,7 @@ describe('bluetoothhostTest_host_2', function () {
it('SUB_COMMUNACATION_bluetoothble_PANProfile_Tethering_0001', 0, async function (done) { it('SUB_COMMUNACATION_bluetoothble_PANProfile_Tethering_0001', 0, async function (done) {
await tryToEnableBt(); await tryToEnableBt();
console.info('[bluetooth_js] tethering test start'); 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); let ret = panProfile.setTethering(false);
console.info("[bluetooth_js] setTethering false result "+JSON.stringify(ret)); console.info("[bluetooth_js] setTethering false result "+JSON.stringify(ret));
let result = panProfile.isTetheringOn(); let result = panProfile.isTetheringOn();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册