 Chromium Code Reviews
 Chromium Code Reviews Issue 2637343002:
  Implement WebBluetooth descriptor.readValue()  (Closed)
    
  
    Issue 2637343002:
  Implement WebBluetooth descriptor.readValue()  (Closed) 
  | OLD | NEW | 
|---|---|
| (Empty) | |
| 1 'use strict'; | |
| 2 promise_test( | |
| 3 () => { | |
| 4 return setBluetoothFakeAdapter('FailingGATTOperationsAdapter') | |
| 5 .then( | |
| 6 () => requestDeviceWithKeyDown( | |
| 7 {filters: [{services: [errorUUID(0xA0)]}]})) | |
| 8 .then(device => device.gatt.connect()) | |
| 9 .then(gattServer => gattServer.getPrimaryService(errorUUID(0xA0))) | |
| 10 .then( | |
| 11 service => { | |
| 12 service.getCharacteristic(errorUUID(0xA1)) | |
| 13 .then(characteristic => { | |
| 14 let tests = Promise.resolve(); | |
| 15 gatt_errors_tests.forEach(testSpec => { | |
| 16 tests = | |
| 17 tests | |
| 18 .then( | |
| 19 () => characteristic.getDescriptor( | |
| 20 testSpec.uuid)) | |
| 21 .then( | |
| 22 descriptor => | |
| 23 assert_promise_rejects_with_message( | |
| 24 descriptor.CALLS([readValue()]), | |
| 25 testSpec.error, | |
| 26 testSpec.testName)); | |
| 
ortuno
2017/01/23 22:20:42
So much whitespace T_T
 
dougt
2017/01/24 00:26:24
clang formatter
 
scheib
2017/01/24 01:23:33
I've filed an issue to see if this can be improved
 | |
| 27 }); | |
| 28 return tests; | |
| 29 })})}, | |
| 30 'FUNCTION_NAME fails. Should reject with appropriate error.'); | |
| OLD | NEW |