| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../../../resources/testharness.js"></script> |
| 3 <script src="../../../resources/testharnessreport.js"></script> |
| 4 <script src="../../../resources/bluetooth/bluetooth-helpers.js"></script> |
| 5 <script> |
| 6 'use strict'; |
| 7 promise_test(() => { |
| 8 return setBluetoothFakeAdapter('TwoHeartRateServicesAdapter') |
| 9 .then(() => requestDeviceWithKeyDown({ |
| 10 acceptAllDevices: true, |
| 11 optionalServices: ['heart_rate'] |
| 12 })) |
| 13 .then(device => device.gatt.connect()) |
| 14 .then(gattServer => gattServer.getPrimaryServices()) |
| 15 .then(services => { |
| 16 assert_equals(services.length, 2); |
| 17 services.forEach(service => { |
| 18 assert_equals(service.uuid, BluetoothUUID.getService('heart_rate')); |
| 19 }); |
| 20 }) |
| 21 }, 'requestDevice called with acceptAllDevices: true and with ' + |
| 22 'optionalServices. Should get access to services.'); |
| 23 </script> |
| OLD | NEW |