summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/bluetooth/requestDevice/single-filter-single-service.https.window.js
blob: 67afad0b930c7930614f3ed17a0db78e1aa20d69 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// META: script=/resources/testdriver.js
// META: script=/resources/testdriver-vendor.js
// META: script=/bluetooth/resources/bluetooth-test.js
// META: script=/bluetooth/resources/bluetooth-fake-devices.js
'use strict';
const test_desc = 'Simple filter selects matching device.';

bluetooth_test(
    () => setUpHealthThermometerAndHeartRateDevices()
              .then(
                  () => requestDeviceWithTrustedClick(
                      {filters: [{services: ['health_thermometer']}]}))
              .then(device => assert_equals(device.name, 'Health Thermometer')),
    test_desc);