summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/bluetooth/requestDevice/acceptAllDevices/device-with-name.https.window.js
blob: f3373a6bb64f517c57c7a1decd2c3c553478a55e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// META: script=/resources/testdriver.js
// META: script=/resources/testdriver-vendor.js
// META: script=/bluetooth/resources/bluetooth-test.js
// META: script=/bluetooth/resources/bluetooth-fake-devices.js
const test_desc =
    'A device with name and no UUIDs nearby. Should be found if ' +
    'acceptAllDevices is true.';
const name = 'LE Device';

bluetooth_test(async () => {
  let { device } = await setUpPreconnectedFakeDevice({
    fakeDeviceOptions: {
      name: name
    },
    requestDeviceOptions: {
      acceptAllDevices: true
    }
  });
  assert_equals(device.name, name);
}, test_desc);