| OLD | NEW |
| 1 <!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py --> | 1 <!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py --> |
| 2 <!DOCTYPE html> | 2 <!DOCTYPE html> |
| 3 <script src="../../../resources/testharness.js"></script> | 3 <script src="../../../resources/testharness.js"></script> |
| 4 <script src="../../../resources/testharnessreport.js"></script> | 4 <script src="../../../resources/testharnessreport.js"></script> |
| 5 <script src="../../../resources/bluetooth/bluetooth-helpers.js"></script> | 5 <script src="../../../resources/bluetooth/bluetooth-helpers.js"></script> |
| 6 <script src="../../../resources/bluetooth/web-bluetooth-test.js"></script> | 6 <script src="../../../resources/bluetooth/web-bluetooth-test.js"></script> |
| 7 <script src="../../../resources/mojo-helpers.js"></script> | 7 <script src="../../../resources/mojo-helpers.js"></script> |
| 8 <script> | 8 <script> |
| 9 'use strict'; | 9 'use strict'; |
| 10 promise_test(() => { | 10 promise_test(() => { |
| 11 return setBluetoothFakeAdapter('HeartRateAdapter') | 11 return getHealthThermometerDevice({acceptAllDevices: true}) |
| 12 .then(() => requestDeviceWithKeyDown({ | 12 .then(([device]) => assert_promise_rejects_with_message( |
| 13 filters: [{name: 'Heart Rate Device'}]})) | 13 device.gatt.getPrimaryService('heart_rate'), |
| 14 .then(device => device.gatt.connect()) | |
| 15 .then(gattServer => assert_promise_rejects_with_message( | |
| 16 gattServer.getPrimaryService('heart_rate'), | |
| 17 new DOMException('Origin is not allowed to access any service. Tip: ' + | 14 new DOMException('Origin is not allowed to access any service. Tip: ' + |
| 18 'Add the service UUID to \'optionalServices\' in ' + | 15 'Add the service UUID to \'optionalServices\' in ' + |
| 19 'requestDevice() options. https://goo.gl/HxfxSQ', | 16 'requestDevice() options. https://goo.gl/HxfxSQ', |
| 20 'SecurityError'))); | 17 'SecurityError'))); |
| 21 }, 'Request for present service without permission to access any service. ' + | 18 }, 'Request for present service without permission to access any service. ' + |
| 22 'Reject with SecurityError.'); | 19 'Reject with SecurityError.'); |
| 23 </script> | |
| 24 | 20 |
| 25 </script> | 21 </script> |
| OLD | NEW |