| OLD | NEW |
| (Empty) |
| 1 'use strict'; | |
| 2 promise_test(() => { | |
| 3 return setBluetoothFakeAdapter('HeartRateAdapter') | |
| 4 .then(() => requestDeviceWithKeyDown({ | |
| 5 filters: [{services: ['heart_rate']}]})) | |
| 6 .then(device => device.gatt.connect()) | |
| 7 .then(gattServer => gattServer.getPrimaryService('heart_rate')) | |
| 8 .then(service => Promise.all([ | |
| 9 service.CALLS([ | |
| 10 getCharacteristic('body_sensor_location')| | |
| 11 getCharacteristics()| | |
| 12 getCharacteristics('body_sensor_location')[UUID]]), | |
| 13 service.PREVIOUS_CALL])) | |
| 14 .then(characteristics_arrays => { | |
| 15 // Convert to arrays if necessary. | |
| 16 for (let i = 0; i < characteristics_arrays.length; i++) { | |
| 17 characteristics_arrays[i] = [].concat(characteristics_arrays[i]); | |
| 18 } | |
| 19 | |
| 20 for (let i = 1; i < characteristics_arrays.length; i++) { | |
| 21 assert_equals(characteristics_arrays[0].length, | |
| 22 characteristics_arrays[i].length); | |
| 23 } | |
| 24 | |
| 25 let base_set = new Set(characteristics_arrays[0]); | |
| 26 for (let characteristics of characteristics_arrays) { | |
| 27 characteristics.forEach( | |
| 28 characteristic => assert_true(base_set.has(characteristic))); | |
| 29 } | |
| 30 }); | |
| 31 }, 'Calls to FUNCTION_NAME should return the same object.'); | |
| OLD | NEW |