tor-browser

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

gen-service-not-found-with-uuid.https.window.js (961B)


      1 // META: script=/resources/testdriver.js?feature=bidi
      2 // META: script=/resources/testdriver-vendor.js
      3 // META: script=/common/gc.js
      4 // META: script=/bluetooth/resources/bluetooth-test.js
      5 // META: script=/bluetooth/resources/bluetooth-fake-devices.js
      6 // META: timeout=long
      7 // Generated by
      8 // //bluetooth/bidi/generate.py
      9 'use strict';
     10 const test_desc = 'Request for absent service. Reject with NotFoundError.';
     11 
     12 bluetooth_bidi_test(
     13    () => getHealthThermometerDevice({
     14            filters: [{services: ['health_thermometer']}],
     15            optionalServices: ['glucose']
     16          })
     17              .then(
     18                  ({device}) => assert_promise_rejects_with_message(
     19                      device.gatt.getPrimaryServices('glucose'),
     20                      new DOMException(
     21                          `No Services matching UUID ${
     22                              glucose.uuid} found in Device.`,
     23                          'NotFoundError'))),
     24    test_desc);