function deviceListToExpectedDevicesMap(devices) {
  var expectedDevicesMap = {};
  devices.forEach(function(device) {
    expectedDevicesMap[device.id] = device;
  });
  return expectedDevicesMap;
}
/**
 *
 * @param {Array.<Object>} devices List of devices returned by
 *    chrome.audio.getInfo or chrome.audio.getDevices.
 * @return {Object.<string, Object>} List of devices formatted as map of
 *      expected devices used to assert devices match expectation.
 */
@param {Array.} devices List of devices returned by
chrome.audio.getInfo or chrome.audio.getDevices.
@return {Object.} List of devices formatted as map of
expected devices used to assert devices match expectation.
@param { Array . } devices List of devices returned by chrome . audio . getInfo or chrome . audio . getDevices . @return { Object . } List of devices formatted as map of expected devices used to assert devices match expectation .
function deviceListToExpectedDevicesMap(devices) {
  var expectedDevicesMap = {};
  devices.forEach(function(device) {
    expectedDevicesMap[device.id] = device;
  });
  return expectedDevicesMap;
}
function deviceListToExpectedDevicesMap ( devices ) { var expectedDevicesMap = { } ; devices . forEach ( function ( device ) { expectedDevicesMap [ device . id ] = device ; } ) ; return expectedDevicesMap ; }
@param {Array.<Object>} devices List of devices returned by
    chrome.audio.getInfo or chrome.audio.getDevices.
@param { Array . <Object > } devices List of devices returned by chrome . audio . getInfo or chrome . audio . getDevices .