tor-browser

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

service-is-removed.js (940B)


      1 // TODO(https://crbug.com/672127) Use this test case to test the rest of
      2 // characteristic functions.
      3 'use strict';
      4 const test_desc = 'Service is removed. Reject with InvalidStateError.';
      5 const expected =
      6    new DOMException('GATT Service no longer exists.', 'InvalidStateError');
      7 let characteristic, fake_peripheral, fake_service;
      8 
      9 bluetooth_bidi_test(
     10    () => getMeasurementIntervalCharacteristic()
     11              .then(_ => ({characteristic, fake_peripheral, fake_service} = _))
     12              .then(() => fake_service.remove())
     13              .then(
     14                  () => assert_promise_rejects_with_message(
     15                      characteristic.CALLS(
     16                          [getDescriptor(user_description.name) |
     17                           getDescriptors(user_description.uuid)[UUID] |
     18                           getDescriptors(user_description.name)]),
     19                      expected, 'Service got removed.')),
     20    test_desc);