https://github.com/web-platform-tests/wpt
Raw File
Tip revision: fbd0b72403a51b313f17fb9e5a8445ab872b2784 authored by Mattias Buelens on 15 March 2018, 21:08:12 UTC
Add assert messages
Tip revision: fbd0b72
idl-Bluetooth.html
<!DOCTYPE html>
<title>Bluetooth interface</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
'use strict';
const test_desc = 'Bluetooth IDL test';

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

  // Bluetooth implements BluetoothDiscovery;
  assert_true('requestDevice' in navigator.bluetooth);
  assert_equals(navigator.bluetooth.requestDevice.length, 0);
}, test_desc);
</script>
back to top