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 .then(characteristic => Promise.all([ | |
| 10 characteristic.CALLS([ | |
| 11 getDescriptor(user_description.alias), | |
|
ortuno
2016/12/08 05:42:52
hmm this will generate a single file with the firs
dougt
2016/12/08 08:35:59
Same is true for the other same-object tests for c
| |
| 12 getDescriptor(user_description.name), | |
| 13 getDescriptor(user_description.uuid)]), | |
| 14 characteristic.PREVIOUS_CALL])) | |
| 15 .then(descriptors_arrays => { | |
| 16 | |
| 17 assert_true(descriptors_arrays.length > 0) | |
| 18 | |
| 19 // Convert to arrays if necessary. | |
| 20 for (let i = 0; i < descriptors_arrays.length; i++) { | |
| 21 descriptors_arrays[i] = [].concat(descriptors_arrays[i]); | |
| 22 } | |
| 23 | |
| 24 for (let i = 1; i < descriptors_arrays.length; i++) { | |
| 25 assert_equals(descriptors_arrays[0].length, | |
| 26 descriptors_arrays[i].length); | |
| 27 } | |
| 28 | |
| 29 let base_set = new Set(descriptors_arrays[0]); | |
| 30 for (let descriptors of descriptors_arrays) { | |
| 31 descriptors.forEach( | |
| 32 descriptor => assert_true(base_set.has(descriptor))); | |
| 33 } | |
| 34 }); | |
| 35 }, 'Calls to FUNCTION_NAME should return the same object.'); | |
| OLD | NEW |