servo/tests/wpt/web-platform-tests/bluetooth/server/getPrimaryServices/gen-service-not-found-with-uuid.https.html

23 lines
887 B
HTML

<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
<!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="/bluetooth/resources/bluetooth-helpers.js"></script>
<script>
'use strict';
const test_desc = 'Request for absent service. Reject with NotFoundError.';
bluetooth_test(() => getHealthThermometerDevice({
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);
</script>