summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-discovery-complete-service-not-found-with-uuid.https.window.js
blob: 66cfb491c078d7ca378cb4418d399a0b33a9d07b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// META: script=/resources/testdriver.js
// META: script=/resources/testdriver-vendor.js
// META: script=/common/gc.js
// META: script=/bluetooth/resources/bluetooth-test.js
// META: script=/bluetooth/resources/bluetooth-fake-devices.js
// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
'use strict';
const test_desc = 'Request for absent service. Must reject with ' +
    'NotFoundError even when the services have previously been discovered.';

bluetooth_test(() => getHealthThermometerDeviceWithServicesDiscovered({
      filters: [{services: ['health_thermometer']}],
      optionalServices: ['glucose']})
    .then(({device}) => assert_promise_rejects_with_message(
        device.gatt.getPrimaryServices('glucose'),
        new DOMException(
            `No Services matching UUID ${glucose.uuid} found in Device.`,
            'NotFoundError'))),
    test_desc);