| 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({acceptAllDevices: true})) |
| 10 .then(device => device.gatt.connect()) |
| 11 .then(gattServer => assert_promise_rejects_with_message( |
| 12 gattServer.getPrimaryServices(), |
| 13 new DOMException( |
| 14 'Origin is not allowed to access any service. ' + |
| 15 'Tip: Add the service UUID to \'optionalServices\' in ' + |
| 16 'requestDevice() options. https://goo.gl/HxfxSQ', |
| 17 'SecurityError'))); |
| 18 }, 'requestDevice called with acceptAllDevices: true and with no ' + |
| 19 'optionalServices. Should not get access to any services.'); |
| 20 </script> |
| OLD | NEW |