https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 4c8921bfd758572b8c04b57954780f52d7255d3c authored by Stephen McGruer on 04 April 2018, 11:19:47 UTC
Address comments from birtles
Tip revision: 4c8921b
device-same-from-2-services.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 = 'Same parent device returned from multiple services.';

bluetooth_test(() => getTwoHealthThermometerServicesDevice({
  filters: [{services: ['health_thermometer']}]
})
    .then(({device}) => device.gatt.getPrimaryServices('health_thermometer'))
    .then(([service1, service2]) =>
        assert_equals(service1.device, service2.device)),
    test_desc);
</script>
back to top