| 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)); |
| 27 }); |
| 28 return tests; |
| 29 })})}, |
| 30 'FUNCTION_NAME fails. Should reject with appropriate error.'); |
| OLD | NEW |