blob: 8492342c18a2bfc004b0830bd482ca56a46f4074 [file] [log] [blame]
<!DOCTYPE html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../../resources/testdriver.js"></script>
<script src="../../resources/testdriver-vendor.js"></script>
<script src="../../resources/bluetooth/bluetooth-helpers.js"></script>
<script src="../../external/wpt/bluetooth/resources/bluetooth-helpers.js"></script>
<script>
'use strict';
bluetooth_test(() => {
return navigator.bluetooth.test.simulateCentral({state: 'absent'})
.then(() => assert_promise_rejects_with_message(
requestDeviceWithTrustedClick({filters: [{services: ['generic_access']}]}),
new DOMException('Bluetooth adapter not available.', 'NotFoundError'),
'Bluetooth adapter is not present.'));
}, 'Reject with NotFoundError if there is no BT radio present.');
</script>