Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 'use strict'; | |
| 2 promise_test(() => { | |
| 3 return setBluetoothFakeAdapter('DisconnectingHealthThermometerAdapter') | |
| 4 .then(() => requestDeviceWithKeyDown({ | |
| 5 filters: [{services: ['health_thermometer']}]})) | |
| 6 .then(device => device.gatt.connect()) | |
| 7 .then(gattServer => gattServer.getPrimaryService('health_thermometer')) | |
| 8 .then(service => service.getCharacteristic('measurement_interval')) | |
| 9 | |
|
ortuno
2016/12/02 06:14:50
nit: Remove blank line.
dougt
2016/12/02 18:31:28
Done.
| |
| 10 .then(characteristic => Promise.all([ | |
| 11 characteristic.CALLS([ | |
| 12 getDescriptor(user_description.name)| | |
| 13 getDescriptors()| | |
| 14 getDescriptors(user_description.name)[UUID]]), | |
| 15 characteristic.PREVIOUS_CALL])) | |
| 16 .then(descriptors_arrays => { | |
| 17 // Convert to arrays if necessary. | |
| 18 for (let i = 0; i < descriptors_arrays.length; i++) { | |
| 19 descriptors_arrays[i] = [].concat(descriptors_arrays[i]); | |
| 20 } | |
| 21 | |
| 22 for (let i = 1; i < descriptors_arrays.length; i++) { | |
| 23 assert_equals(descriptors_arrays[0].length, | |
| 24 descriptors_arrays[i].length); | |
| 25 } | |
| 26 | |
| 27 let base_set = new Set(descriptors_arrays[0]); | |
| 28 for (let descriptors of descriptors_arrays) { | |
| 29 descriptors.forEach( | |
| 30 descriptor => assert_true(base_set.has(descriptor))); | |
| 31 } | |
| 32 }); | |
| 33 }, 'Calls to FUNCTION_NAME should return the same object.'); | |
| OLD | NEW |