B2G/gecko/toolkit/components/downloads/test/unit/test_privatebrowsing.js
/**
 * Try to see if an active download is available using the |activeDownloads|
 * property.
 */
Try to see if an active download is available using the |activeDownloads|
property.
Try to see if an active download is available using the |activeDownloads| property .
function is_active_download_available(aID, aSrc, aDst, aName) {
  let enumerator = dm.activeDownloads;
  while (enumerator.hasMoreElements()) {
    let download = enumerator.getNext();
    if (download.id == aID &&
        download.source.spec == aSrc &&
        download.targetFile.path == aDst.path &&
        download.displayName == aName &&
        download.isPrivate == pb.privateBrowsingEnabled)
      return true;
  }
  return false;
}
function is_active_download_available ( aID , aSrc , aDst , aName ) { let enumerator = dm . activeDownloads ; while ( enumerator . hasMoreElements ( ) ) { let download = enumerator . getNext ( ) ; if ( download . id == aID && download . source . spec == aSrc && download . targetFile . path == aDst . path && download . displayName == aName && download . isPrivate == pb . privateBrowsingEnabled ) return true ; } return false ; }
Try to see if an active download is available using the |activeDownloads|
 property.
Try to see if an active download is available using the |activeDownloads| property .