https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 826375a734caf3cbe9b757ca69dbef9d578aa76d authored by Robert Ma on 26 March 2018, 20:24:51 UTC
Better explain test execution in resources/test/README
Tip revision: 826375a
gen-service-not-found-with-uuid.https.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>
back to top