https://github.com/web-platform-tests/wpt
Raw File
Tip revision: b7f7c26c794bb62b5c70ff619b3fa9df9e2550e9 authored by Suneel Kota on 31 August 2018, 12:26:43 UTC
Modify containing block logical height for positioned in
Tip revision: b7f7c26
services-found-with-uuid.https.html
<!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 services. Should return right number of ' +
    'services.';

bluetooth_test(() => getTwoHealthThermometerServicesDevice({
  filters: [{services: ['health_thermometer']}]
})
    .then(({device}) => Promise.all([
      device.gatt.getPrimaryServices(health_thermometer.alias),
      device.gatt.getPrimaryServices(health_thermometer.name),
      device.gatt.getPrimaryServices(health_thermometer.uuid)]))
    .then(services_arrays => services_arrays.forEach(services => {
        assert_equals(services.length, 2);
        services.forEach(service => {
          assert_equals(service.uuid,
              BluetoothUUID.getService('health_thermometer'));
          assert_true(service.isPrimary);
        });
    })), test_desc);
</script>
back to top