| OLD | NEW | 
|---|
| (Empty) |  | 
|  | 1 <!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py --> | 
|  | 2 <!DOCTYPE html> | 
|  | 3 <script src="../../../resources/testharness.js"></script> | 
|  | 4 <script src="../../../resources/testharnessreport.js"></script> | 
|  | 5 <script src="../../../resources/bluetooth/bluetooth-helpers.js"></script> | 
|  | 6 <script> | 
|  | 7 'use strict'; | 
|  | 8 promise_test( | 
|  | 9     () => { | 
|  | 10         return setBluetoothFakeAdapter('FailingGATTOperationsAdapter') | 
|  | 11             .then( | 
|  | 12                 () => requestDeviceWithKeyDown( | 
|  | 13                     {filters: [{services: [errorUUID(0xA0)]}]})) | 
|  | 14             .then(device => device.gatt.connect()) | 
|  | 15             .then(gattServer => gattServer.getPrimaryService(errorUUID(0xA0))) | 
|  | 16             .then( | 
|  | 17                 service => { | 
|  | 18                     service.getCharacteristic(errorUUID(0xA1)) | 
|  | 19                         .then(characteristic => { | 
|  | 20                           let tests = Promise.resolve(); | 
|  | 21                           gatt_errors_tests.forEach(testSpec => { | 
|  | 22                             tests = | 
|  | 23                                 tests | 
|  | 24                                     .then( | 
|  | 25                                         () => characteristic.getDescriptor( | 
|  | 26                                             testSpec.uuid)) | 
|  | 27                                     .then( | 
|  | 28                                         descriptor => | 
|  | 29                                             assert_promise_rejects_with_message( | 
|  | 30                                                 descriptor.readValue(), | 
|  | 31                                                 testSpec.error, | 
|  | 32                                                 testSpec.testName)); | 
|  | 33                           }); | 
|  | 34                           return tests; | 
|  | 35                         })})}, | 
|  | 36     'readValue fails. Should reject with appropriate error.'); | 
|  | 37 | 
|  | 38 </script> | 
| OLD | NEW | 
|---|