tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

disconnected-device.js (856B)


      1 'use strict';
      2 const test_desc = 'FUNCTION_NAME called before connecting. Reject with ' +
      3    'NetworkError.';
      4 const expected = new DOMException(
      5    'GATT Server is disconnected. Cannot retrieve services. (Re)connect ' +
      6        'first with `device.gatt.connect`.',
      7    'NetworkError');
      8 
      9 bluetooth_bidi_test(
     10    () => getDiscoveredHealthThermometerDevice({
     11            filters: [{services: ['health_thermometer']}],
     12            optionalServices: ['generic_access']
     13          })
     14              .then(
     15                  ({device}) => assert_promise_rejects_with_message(
     16                      device.gatt.CALLS(
     17                          [getPrimaryService('health_thermometer') |
     18                           getPrimaryServices() |
     19                           getPrimaryServices('health_thermometer')[UUID]]),
     20                      expected)),
     21    test_desc);