| OLD | NEW |
| 1 'use strict'; | 1 'use strict'; |
| 2 promise_test(() => { | 2 promise_test(() => { |
| 3 return setBluetoothFakeAdapter('HeartRateAdapter') | 3 return getConnectedHealthThermometerDevice({acceptAllDevices: true}) |
| 4 .then(() => requestDeviceWithKeyDown({ | 4 .then(([device]) => assert_promise_rejects_with_message( |
| 5 filters: [{name: 'Heart Rate Device'}]})) | 5 device.gatt.CALLS([ |
| 6 .then(device => device.gatt.connect()) | |
| 7 .then(gattServer => assert_promise_rejects_with_message( | |
| 8 gattServer.CALLS([ | |
| 9 getPrimaryService('heart_rate')| | 6 getPrimaryService('heart_rate')| |
| 10 getPrimaryServices()| | 7 getPrimaryServices()| |
| 11 getPrimaryServices('heart_rate')[UUID]]), | 8 getPrimaryServices('heart_rate')[UUID]]), |
| 12 new DOMException('Origin is not allowed to access any service. Tip: ' + | 9 new DOMException('Origin is not allowed to access any service. Tip: ' + |
| 13 'Add the service UUID to \'optionalServices\' in ' + | 10 'Add the service UUID to \'optionalServices\' in ' + |
| 14 'requestDevice() options. https://goo.gl/HxfxSQ', | 11 'requestDevice() options. https://goo.gl/HxfxSQ', |
| 15 'SecurityError'))); | 12 'SecurityError'))); |
| 16 }, 'Request for present service without permission to access any service. ' + | 13 }, 'Request for present service without permission to access any service. ' + |
| 17 'Reject with SecurityError.'); | 14 'Reject with SecurityError.'); |
| 18 </script> | 15 </script> |
| OLD | NEW |