summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/bluetooth/idl/idl-Bluetooth.https.window.js
blob: 2b40eaff4900f5385b19d27115626fafe386a1cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// META: script=/resources/testdriver.js
// META: script=/resources/testdriver-vendor.js
'use strict';
const test_desc = 'Bluetooth IDL test';

test(() => {
  assert_throws_js(
      TypeError, () => new Bluetooth(),
      'the constructor should not be callable with "new"');
  assert_throws_js(
      TypeError, () => Bluetooth(),
      'the constructor should not be callable');

  // Bluetooth implements BluetoothDiscovery;
  assert_true('requestDevice' in navigator.bluetooth);
  assert_true('getDevices' in navigator.bluetooth);
  assert_equals(navigator.bluetooth.requestDevice.length, 0);
}, test_desc);